only monitor fragment loading rate when in auto quality mode and when level is not lowest related to https://github.com/mangui/flashls/issues/342

--- src/org/mangui/hls/loader/FragmentLoader.as
+++ src/org/mangui/hls/loader/FragmentLoader.as
@@ -150,40 +150,43 @@
                     break;
                 // loading already in progress
                 case LOADING_IN_PROGRESS:
-                    // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate
-                    var requestDelay : int = getTimer() - _metrics.loading_request_time;
-                    var fragDuration : Number = _fragCurrent.duration;
-                    if(requestDelay > 500*fragDuration) {
-                        var loaded : int = _fragCurrent.data.bytesLoaded;
-                        var expected : int = fragDuration*_levels[_fragCurrent.level].bitrate/8;
-                        if(expected < loaded) {
-                            expected = loaded;
-                        }
-                        var loadRate : int = loaded*1000/requestDelay; // byte/s
-                        var fragLoadedDelay : Number =(expected-loaded)/loadRate;
-                        var fragLevel0LoadedDelay : Number = fragDuration*_levels[0].bitrate/(8*loadRate); //bps/Bps
-                        var bufferLen : Number = _hls.stream.bufferLength;
-                        // CONFIG::LOGGING {
-                        //     Log.info("bufferLen/fragDuration/fragLoadedDelay/fragLevel0LoadedDelay:" + bufferLen.toFixed(1) + "/" + fragDuration.toFixed(1) + "/" + fragLoadedDelay.toFixed(1) + "/" + fragLevel0LoadedDelay.toFixed(1));
-                        // }
-                        /* if we have less than 2 frag duration in buffer and if frag loaded delay is greater than buffer len
-                          ... and also bigger than duration needed to load fragment at next level ...*/
-                        if(bufferLen < 2*fragDuration && fragLoadedDelay > bufferLen && fragLoadedDelay > fragLevel0LoadedDelay) {
-                            // abort fragment loading ...
-                            CONFIG::LOGGING {
-                                Log.warn("_checkLoading : loading too slow, abort fragment loading");
-                                Log.warn("fragLoadedDelay/bufferLen/fragLevel0LoadedDelay:" + fragLoadedDelay.toFixed(1) + "/" + bufferLen.toFixed(1) + "/" + fragLevel0LoadedDelay.toFixed(1));
+                    // only monitor fragment loading rate if in auto mode, and current level is not the lowest level
+                    if(_hls.autoLevel && _fragCurrent.level) {
+                        // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate
+                        var requestDelay : int = getTimer() - _metrics.loading_request_time;
+                        var fragDuration : Number = _fragCurrent.duration;
+                        if(requestDelay > 500*fragDuration) {
+                            var loaded : int = _fragCurrent.data.bytesLoaded;
+                            var expected : int = fragDuration*_levels[_fragCurrent.level].bitrate/8;
+                            if(expected < loaded) {
+                                expected = loaded;
                             }
-                            //abort fragment loading
-                            _stop_load();
-                            // fill loadMetrics so please LevelController that will adjust bw for next fragment
-                            // fill theoritical value, assuming bw will remain as it is
-                            _metrics.size = expected;
-                            _metrics.duration = 1000*fragDuration;
-                            _metrics.loading_end_time = _metrics.parsing_end_time = _metrics.loading_request_time + 1000*expected/loadRate;
-                            _hls.dispatchEvent(new HLSEvent(HLSEvent.FRAGMENT_LOAD_EMERGENCY_ABORTED, _metrics));
-                          // switch back to IDLE state to request new fragment at lowest level
-                          _loadingState = LOADING_IDLE;
+                            var loadRate : int = loaded*1000/requestDelay; // byte/s
+                            var fragLoadedDelay : Number =(expected-loaded)/loadRate;
+                            var fragLevel0LoadedDelay : Number = fragDuration*_levels[0].bitrate/(8*loadRate); //bps/Bps
+                            var bufferLen : Number = _hls.stream.bufferLength;
+                            // CONFIG::LOGGING {
+                            //     Log.info("bufferLen/fragDuration/fragLoadedDelay/fragLevel0LoadedDelay:" + bufferLen.toFixed(1) + "/" + fragDuration.toFixed(1) + "/" + fragLoadedDelay.toFixed(1) + "/" + fragLevel0LoadedDelay.toFixed(1));
+                            // }
+                            /* if we have less than 2 frag duration in buffer and if frag loaded delay is greater than buffer len
+                              ... and also bigger than duration needed to load fragment at next level ...*/
+                            if(bufferLen < 2*fragDuration && fragLoadedDelay > bufferLen && fragLoadedDelay > fragLevel0LoadedDelay) {
+                                // abort fragment loading ...
+                                CONFIG::LOGGING {
+                                    Log.warn("_checkLoading : loading too slow, abort fragment loading");
+                                    Log.warn("fragLoadedDelay/bufferLen/fragLevel0LoadedDelay:" + fragLoadedDelay.toFixed(1) + "/" + bufferLen.toFixed(1) + "/" + fragLevel0LoadedDelay.toFixed(1));
+                                }
+                                //abort fragment loading
+                                _stop_load();
+                                // fill loadMetrics so please LevelController that will adjust bw for next fragment
+                                // fill theoritical value, assuming bw will remain as it is
+                                _metrics.size = expected;
+                                _metrics.duration = 1000*fragDuration;
+                                _metrics.loading_end_time = _metrics.parsing_end_time = _metrics.loading_request_time + 1000*expected/loadRate;
+                                _hls.dispatchEvent(new HLSEvent(HLSEvent.FRAGMENT_LOAD_EMERGENCY_ABORTED, _metrics));
+                              // switch back to IDLE state to request new fragment at lowest level
+                              _loadingState = LOADING_IDLE;
+                            }
                         }
                     }
                     break;
@@ -302,6 +305,9 @@
         }

         public function seek(position : Number) : void {
+            CONFIG::LOGGING {
+                Log.debug("FragmentLoader:seek(" + position.toFixed(2) + ")");
+            }
             // reset IO Error when seeking
             _fragRetryCount = _keyRetryCount = 0;
             _fragRetryTimeout = _keyRetryTimeout = 1000;


Pull framerate into a constant

Pull framerate into a constant

--- runtime/src/main/as/flump/display/Movie.as
+++ runtime/src/main/as/flump/display/Movie.as
@@ -12,6 +12,8 @@

 public class Movie extends Sprite
 {
+    public static const FRAMERATE :Number = 30;
+
     public function Movie (src :MovieMold, idToDisplayObject :Function) {
         name = src.libraryItem;
         _ticker = new Ticker(advanceTime);
@@ -28,7 +30,7 @@
                 frames = Math.max(src.layers[ii].frames, frames);
             }
         }
-        _duration = frames / 30.0;
+        _duration = frames / FRAMERATE;
         goto(0, true, false);
         addEventListener(Event.ADDED_TO_STAGE, addedToStage);
         addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
@@ -39,7 +41,7 @@

         _playTime += dt;
         if (_playTime > _duration) _playTime = _playTime % _duration;
-        var newFrame :int = int(_playTime * 30);
+        var newFrame :int = int(_playTime * FRAMERATE);
         const overDuration :Boolean = dt >= _duration;
         // If the update crosses or goes to the stopFrame, go to the stop frame, stop the movie and
         // clear it
@@ -76,7 +78,7 @@
         _frame = newFrame;
         if (fromSkip) {
             // TODO [self fireLabelsFrom:newFrame to:newFrame];
-            _playTime = newFrame/30.0;
+            _playTime = newFrame/FRAMERATE;
         } else if (overDuration) {
             //[self fireLabelsFrom:oldFrame + 1 to:[_labels count] - 1];
             //[self fireLabelsFrom:0 to:_frame];


Temporarily commenting out one test to make the trace log easier to read

--- unittests/TestSuite1.as
+++ unittests/TestSuite1.as
@@ -7,7 +7,7 @@
 	public class TestSuite1
 	{
 		public var test1:unittests.TestArgumentSchemes;
-		public var test2:unittests.TestDisjunctiveSyllogism;
+		//public var test2:unittests.TestDisjunctiveSyllogism;
 		public var test3:unittests.TestEquivalence;
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261229 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/codec/IImageEncoder.as
+++ frameworks/projects/framework/src/mx/graphics/codec/IImageEncoder.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 12568
Author:   gruehle@adobe.com
Date:     2009-12-05T00:33:54.244586Z

Log Message:
-----------
Fix the theme attribute for cornerRadius metadata on mx components. This required moving the metadata out of BorderStyles.as and into each file that includes BorderStyle.as

QE notes: -
Doc notes: -
Bugs: SDK-24437
Reviewer: Kevin
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262723 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as
+++ frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as
@@ -165,20 +165,6 @@
 [Style(name="borderVisible", type="Boolean", inherit="no", theme="spark")]

 /**
- *  Radius of component corners.
- *  The default value depends on the component class;
- *  if not overridden for the class, the default value
- *  for the Halo theme is 0 and for the Spark theme is 2.
- *  The default value for ApplicationControlBar is 5.
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
- */
-[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo, spark")]
-
-/**
  *  Boolean property that specifies whether the component has a visible
  *  drop shadow.
  *  This style is used with borderStyle="solid".


Transferred from the Adobe Open Source Subversion Repository

Revision: 22661
Author:   jasonsj@adobe.com
Date:     2011-09-21T18:53:37.129472Z

Log Message:
-----------
Move max size calculations to commitProperties(). Change max size calculations to use actual positions instead of preferred positions. Adjust max size positions when using AUTO to allow extra size in the event that callout the needs to flip from exterior to interior.

Allow AUTO positions to covert from exterior to interior if both exterior positions do not fit. Move interior AUTO positioning adjustments from commitProperties() to updateDisplayList().

QE notes: Need new test cases for AUTO positioning where the callout size is too large to fit in the AUTO exterior position. Need additional test cases to verify that max width/height are only extended to interior positions if the callout owner is larger than the external max size.
Doc notes:
Bugs:
SDK-31605 When callout owner is topLevelApplication, callout renders incorrect (looks like smashed)
SDK-31558 Callout position is different when SplitVIewNavigator is inside TabbedVIewApplication
Reviewer: chiedozi
Tests run: checkintests, mustella-mobile
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1263801 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/Callout.as
+++ frameworks/projects/mobilecomponents/src/spark/components/Callout.as
@@ -27,7 +27,6 @@
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.ResizeEvent;
-import mx.managers.ISystemManager;
 import mx.managers.SystemManager;
 import mx.styles.StyleProtoChain;
 import mx.utils.MatrixUtil;
@@ -381,7 +380,7 @@

     /**
      *  @private
-     *
+     *  Indicates if arrow direction was flipped automatically.
      */
     private var arrowDirectionAdjusted:Boolean = false;

@@ -570,7 +569,15 @@
     {
         super.commitProperties();

+        // Compute actual positions when using AUTO
         commitAutoPosition();
+
+        // Compute max size based on actual positions
+        commitMaxSize();
+
+        // Invalidate skin size to use calloutMaxWidth and calloutMaxHeight
+        if (!isMaxSizeSet)
+            skin.invalidateSize();

         if (arrow)
         {
@@ -648,9 +655,9 @@
         if (isOpen)
             return;

-        // Reset max size for new owner before this callout is added
-        // to PopUpManager
-        determineMaxSize(owner);
+        // reset state
+        invalidatePositionFlag = false;
+        arrowDirectionAdjusted = false;

         // Add to PopUpManager, calls updatePopUpPosition(), and change state
         super.open(owner, modal);
@@ -869,44 +876,79 @@
      *  Flip or clear the adjusted position when the callout bounds are outside
      *  the screen bounds.
      */
-    mx_internal function adjustCalloutPosition(position:String,
+    mx_internal function adjustCalloutPosition(actualPosition:String, preferredPosition:String,
                                                calloutStart:Number, calloutEnd:Number,
                                                screenStart:Number, screenEnd:Number,
+                                               ownerStart:Number, ownerEnd:Number,
                                                revert:Boolean=false):String
     {
-        // Skip all adjustments when using AUTO
-        if (!position || (position == CalloutPosition.AUTO))
+        if (!actualPosition)
             return null;

         var adjustedPosition:String = null;
-
-        // Maintain outer/inner positions when flipping to opposite direction
-        switch (position)
+        var calloutSize:Number = calloutEnd - calloutStart;
+
+        // Exterior space
+        var exteriorSpaceStart:Number = Math.max(0, ownerStart - screenStart);
+        var exteriorSpaceEnd:Number = Math.max(0, ownerEnd - screenEnd);
+
+        // Fallback to interior positions if using AUTO and callout can not
+        // fit in either exterior positions
+        var useInterior:Boolean = (preferredPosition == CalloutPosition.AUTO) &&
+            (exteriorSpaceStart < calloutSize) &&
+            (exteriorSpaceEnd < calloutSize);
+        var isExterior:Boolean = false;
+
+        // Flip to opposite position
+        switch (actualPosition)
         {
             case CalloutPosition.BEFORE:
+            {
+                isExterior = true;
+
                 if (calloutStart < screenStart)
                     adjustedPosition = CalloutPosition.AFTER;
-                break;
+
+                break;
+            }
             case CalloutPosition.AFTER:
+            {
+                isExterior = true;
+
                 if (calloutEnd > screenEnd)
                     adjustedPosition = CalloutPosition.BEFORE;
-                break;
+
+                break;
+            }
             case CalloutPosition.END:
+            {
                 if (calloutStart < screenStart)
                     adjustedPosition = CalloutPosition.START;
                 break;
+            }
             case CalloutPosition.START:
+            {
                 if (calloutEnd > screenEnd)
                     adjustedPosition = CalloutPosition.END;
                 break;
+            }
             // case CalloutPosition.MIDDLE:
             // Nudge instead of flipping
+        }
+
+        // Use interior position if exterior flipping was necessary
+        if (useInterior && adjustedPosition && isExterior)
+        {
+            // Choose the exterior position with the most available space.
+            // Note that START grows towards the exterior END and vice versa.
+            adjustedPosition = (exteriorSpaceEnd >= exteriorSpaceStart) ?
+                CalloutPosition.START : CalloutPosition.END;
         }

         // Return null to revert the adjusted position
         // Otherwise, return the incoming position
         if (revert)
-            return (adjustedPosition) ? null : position;
+            return (adjustedPosition) ? null : actualPosition;

         // Adjusted position or null if the callout already fits
         return adjustedPosition;
@@ -961,20 +1003,23 @@
         var adjustedVerticalPosition:String;
         var calloutBounds:Rectangle = determinePosition(actualHorizontalPosition,
             actualVerticalPosition, matrix, regPoint);
+        var ownerBounds:Rectangle = owner.getBounds(systemManager.getSandboxRoot());

         // Position the callout in the opposite direction if it
         // does not fit on the screen.
         if (screen)
         {
             adjustedHorizontalPosition = adjustCalloutPosition(
-                actualHorizontalPosition,
+                actualHorizontalPosition, horizontalPosition,
                 calloutBounds.left, calloutBounds.right,
-                screen.left, screen.right);
+                screen.left, screen.right,
+                ownerBounds.left, ownerBounds.right);

             adjustedVerticalPosition = adjustCalloutPosition(
-                actualVerticalPosition,
+                actualVerticalPosition, verticalPosition,
                 calloutBounds.top, calloutBounds.bottom,
-                screen.top, screen.bottom);
+                screen.top, screen.bottom,
+                ownerBounds.top, ownerBounds.bottom);
         }

         var oldArrowDirection:String = arrowDirection;
@@ -1014,14 +1059,18 @@
                 // If we adjusted the position but the callout still doesn't fit,
                 // then revert to the original position.
                 adjustedHorizontalPosition = adjustCalloutPosition(
-                    adjustedHorizontalPosition,
+                    adjustedHorizontalPosition, horizontalPosition,
                     adjustedBounds.left, adjustedBounds.right,
-                    screen.left, screen.right, true);
+                    screen.left, screen.right,
+                    ownerBounds.left, ownerBounds.right,
+                    true);

                 adjustedVerticalPosition = adjustCalloutPosition(
-                    adjustedVerticalPosition,
+                    adjustedVerticalPosition, verticalPosition,
                     adjustedBounds.top, adjustedBounds.bottom,
-                    screen.top, screen.bottom, true);
+                    screen.top, screen.bottom,
+                    ownerBounds.top, ownerBounds.bottom,
+                    true);
             }

             if ((adjustedHorizontalPosition != null) || (adjustedVerticalPosition != null))
@@ -1120,6 +1169,7 @@
     }

     /**
+     *  @private
      *  Computes actualHorizontalPosition and/or
      *  actualVerticalPosition values when using
      *  CalloutPosition.AUTO. When implementing subclasses of
@@ -1167,13 +1217,11 @@
         // Use aspect ratio to determine vertical/horizontal preference
         var isLandscape:Boolean = (screen.width > screen.height);

-        var spaceLeft:Number = ownerBounds.left;
-        var spaceRight:Number = screen.width - ownerBounds.right;
-        var spaceTop:Number = ownerBounds.top;
-        var spaceBottom:Number = screen.height - ownerBounds.bottom;
-
-        var canFitVertical:Boolean = ((spaceTop > 0) || (spaceBottom > 0));
-        var canFitHorizontal:Boolean = ((spaceLeft > 0) || (spaceRight > 0));
+        // Exterior space
+        var exteriorSpaceLeft:Number = Math.max(0, ownerBounds.left);
+        var exteriorSpaceRight:Number = Math.max(0, screen.width - ownerBounds.right);
+        var exteriorSpaceTop:Number = Math.max(0, ownerBounds.top);
+        var exteriorSpaceBottom:Number = Math.max(0, screen.height - ownerBounds.bottom);

         if (verticalPosition != CalloutPosition.AUTO)
         {
@@ -1184,7 +1232,7 @@
                 case CalloutPosition.MIDDLE:
                 case CalloutPosition.END:
                 {
-                    actualHorizontalPosition = (spaceRight > spaceLeft) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
+                    actualHorizontalPosition = (exteriorSpaceRight > exteriorSpaceLeft) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
                     break;
                 }
                 default:
@@ -1205,7 +1253,7 @@
                 case CalloutPosition.MIDDLE:
                 case CalloutPosition.END:
                 {
-                    actualVerticalPosition = (spaceBottom > spaceTop) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
+                    actualVerticalPosition = (exteriorSpaceBottom > exteriorSpaceTop) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
                     break;
                 }
                 default:
@@ -1219,41 +1267,16 @@
         }
         else // if ((verticalPosition == CalloutPosition.AUTO) && (horizontalPosition == CalloutPosition.AUTO))
         {
-            var useVertical:Boolean = true;
-            var useInterior:Boolean = false;
-
-            if (!canFitHorizontal && !canFitVertical)
-            {
-                // Edge case where callout doesn't fit in any direction.
-                // Choose position based on aspect ratio
-                useVertical = !isLandscape;
-
-                // Only use interior positions when no space is available
-                useInterior = (spaceTop <= 0) && (spaceBottom <= 0) &&
-                              (spaceLeft <= 0) && (spaceRight <= 0);
-            }
-            else if (isLandscape)
-            {
-                // Favor horizontal before/after in landscape
-                useVertical = !canFitHorizontal;
+            if (!isLandscape)
+            {
+                // Arrow will be vertical when in portrait
+                actualHorizontalPosition = CalloutPosition.MIDDLE;
+                actualVerticalPosition = (exteriorSpaceBottom > exteriorSpaceTop) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
             }
             else
             {
-                // Favor vertical before/after in portrait
-                useVertical = canFitVertical;
-            }
-
-            var startPos:String = (useInterior) ? CalloutPosition.START : CalloutPosition.BEFORE;
-            var endPos:String = (useInterior) ? CalloutPosition.END : CalloutPosition.AFTER;
-
-            if (useVertical)
-            {
-                actualHorizontalPosition = CalloutPosition.MIDDLE;
-                actualVerticalPosition = (spaceBottom > spaceTop) ? endPos : startPos;
-            }
-            else
-            {
-                actualHorizontalPosition = (spaceRight > spaceLeft) ? endPos : startPos;
+                // Arrow will be horizontal when in landscape
+                actualHorizontalPosition = (exteriorSpaceRight > exteriorSpaceLeft) ? CalloutPosition.AFTER : CalloutPosition.BEFORE;
                 actualVerticalPosition = CalloutPosition.MIDDLE;
             }
         }
@@ -1261,100 +1284,91 @@

     /**
      *  @private
-     */
-    mx_internal function determineMaxSize(owner:DisplayObject = null):void
-    {
-        var calloutOwner:UIComponent = owner as UIComponent;
-        var sbRoot:DisplayObject = (calloutOwner) ? calloutOwner.systemManager.getSandboxRoot() : null;
-
-        // Sanity check
-        if (!sbRoot)
-            return;
-
-        // Clear previous max size values
-        calloutMaxWidth = calloutMaxHeight = NaN;
-
-        // Set maxWidth and maxHeight based on owner bounds. Prefer top/bottom
-        // and left/right max based on most available space. The owner can
-        // still be obscured only if horizontalPosition and verticalPosition
-        // are explicitly set START or END.
-        var screen:Rectangle = calloutOwner.screen;
-        var ownerBounds:Rectangle = calloutOwner.getBounds(sbRoot);
-        var isLandscape:Boolean = (screen.width > screen.height);
-
+     *  Return true if user-specified max size if set
+     */
+    mx_internal function get isMaxSizeSet():Boolean
+    {
+        var explicitMaxW:Number = super.explicitMaxWidth;
+        var explicitMaxH:Number = super.explicitMaxHeight;
+
+        return (!isNaN(explicitMaxW) && !isNaN(explicitMaxH));
+    }
+
+    /**
+     *  @private
+     *  Compute max width and max height. Uses the the owner and screen bounds
+     *  as well as preferred positions to determine max width and max height
+     *  for all possible exterior and interior positions.
+     */
+    mx_internal function commitMaxSize():void
+    {
+        var ownerBounds:Rectangle = owner.getBounds(systemManager.getSandboxRoot());
         var ownerLeft:Number = ownerBounds.left;
         var ownerRight:Number = ownerBounds.right;
-        var calloutMaxW:Number = NaN;
-
-        // Compute max width based on preferred position. Actual position
-        // is later based on this max width.
-        switch (horizontalPosition)
-        {
-            case CalloutPosition.AUTO:
-            {
-                // fall through to middle when portrait
-                if (isLandscape)
-                    break;
-            }
+        var ownerTop:Number = ownerBounds.top;
+        var ownerBottom:Number = ownerBounds.bottom;
+
+        switch (actualHorizontalPosition)
+        {
             case CalloutPosition.MIDDLE:
             {
                 // Callout matches screen width
-                calloutMaxW = screen.width - (margin * 2);
+                calloutMaxWidth = screen.width - (margin * 2);
                 break;
             }
             case CalloutPosition.START:
             case CalloutPosition.END:
             {
-                // Swap left and right when using inner positions
+                // Flip left and right when using inner positions
                 ownerLeft = ownerBounds.right;
                 ownerRight = ownerBounds.left;
-                break;
-            }
-        }
-
-        if (!isNaN(calloutMaxW))
-            calloutMaxWidth = calloutMaxW;
-        else
-            calloutMaxWidth = Math.max(ownerLeft, screen.right - ownerRight) - margin;
-
-        var ownerTop:Number = ownerBounds.top;
-        var ownerBottom:Number = ownerBounds.bottom;
-        var calloutMaxH:Number = NaN;
-
-        // Compute max height based on preferred position. Actual position
-        // is later based on this max height.
-        switch (verticalPosition)
-        {
-            case CalloutPosition.AUTO:
-            {
-                // fall through to middle when landscape
-                if (!isLandscape)
-                    break;
-            }
+
+                // Fall through
+            }
+            default:
+            {
+                // Maximum is the larger of the actual position or flipped position
+                calloutMaxWidth = Math.max(ownerLeft, screen.right - ownerRight) - margin;
+                break;
+            }
+        }
+
+        // If preferred position was AUTO, then allow maxWidth to grow to
+        // fit the interior position if the owner is wide
+        if ((horizontalPosition == CalloutPosition.AUTO) &&
+            (ownerBounds.width > calloutMaxWidth))
+            calloutMaxWidth += ownerBounds.width;
+
+        switch (actualVerticalPosition)
+        {
             case CalloutPosition.MIDDLE:
             {
                 // Callout matches screen height
-                calloutMaxH = screen.height - (margin * 2);
+                calloutMaxHeight = screen.height - (margin * 2);
                 break;
             }
             case CalloutPosition.START:
             case CalloutPosition.END:
             {
-                // Swap top and bottom when using inner positions
+                // Flip top and bottom when using inner positions
                 ownerTop = ownerBounds.bottom;
                 ownerBottom = ownerBounds.top;
-                break;
-            }
-        }
-
-        if (!isNaN(calloutMaxH))
-            calloutMaxHeight = calloutMaxH;
-        else
-            calloutMaxHeight = Math.max(ownerTop, screen.bottom - ownerBottom) - margin;
-
-        // invalidate size if no explicit max sizes are set
-        if (skin && ((isNaN(super.explicitMaxWidth) || isNaN(super.explicitMaxHeight))))
-            skin.invalidateSize();
+
+                // Fall through
+            }
+            default:
+            {
+                // Maximum is the larger of the actual position or flipped position
+                calloutMaxHeight = Math.max(ownerTop, screen.bottom - ownerBottom) - margin;
+                break;
+            }
+        }
+
+        // If preferred position was AUTO, then allow maxHeight to grow to
+        // fit the interior position if the owner is tall
+        if ((verticalPosition == CalloutPosition.AUTO) &&
+            (ownerBounds.height > calloutMaxHeight))
+            calloutMaxHeight += ownerBounds.height;
     }

     /**
@@ -1431,7 +1445,7 @@
             {
                 // The full width of the callout is before the owner
                 // All arrow directions are ArrowDirection.RIGHT x=(width - arrow.width)
-                registrationPoint.x = -width;
+                registrationPoint.x = -calloutWidth;
                 break;
             }
             case CalloutPosition.START:
@@ -1466,7 +1480,7 @@
             {
                 // The full height of the callout is before the owner
                 // All arrow directions are ArrowDirection.DOWN y=(height - arrow.height)
-                registrationPoint.y = -height;
+                registrationPoint.y = -calloutHeight;
                 break;
             }
             case CalloutPosition.START:
@@ -1537,7 +1551,6 @@
     {
         // Screen resize might require a new arrow direction and callout position
         invalidatePosition();
-        determineMaxSize(owner);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3973
Author:   rfrishbe@adobe.com
Date:     2008-10-30T20:30:13.007923Z

Log Message:
-----------
Adding IVisualContainer interface.  Group, FxContainer, and FxScroller implement this interface now.  Added owner and parent to IVisualItem.  GraphicElement and UIComponent implement this interface--work had to be done in GraphicElement to do this.  In doing so, elementHost is going to be renamed to parent.  For now, I added parent in GraphicElement and left elementHost in there; however, it is removed from IGraphicElement.  I’ve removed all references to elementHost in our code; however, I think mustella needs to be updated as do mustella tests, so I’m not going to remove elementHost until later.

Most of the changes here are name changes dealing with "elementHost" -> "parent".  If we decide that Gumbo components only support IVisualItems, we should clean up some of the code, but for now, I kept any assumptions that were in the original code (meaning we may be able to support DisplayObjects and old definitions of UIComponents/IUIComponents that aren’t IVisualItems).

I ran checkin tests, Group mustella tests, DataGroup mustella tests, FxContainer mustella tests, graphic tags tests, and all effects Mustella tests.

QE Notes: We will need to update mustella and mustella tests to use elementHost rather than parent.  We can also update mustella to use IVisualContainer rather than what it's doing now.  However, let's wait on these changes for now.  I'll send out an email when we're ready to make these changes and remove elementHost from GraphicElement.
Doc Notes: None
Bugs: -
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IVisualContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxFadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IUIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280583 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -25,6 +25,9 @@
 import mx.core.IDeferredInstance;
 import mx.core.IFactory;
 import mx.managers.IFocusManagerContainer;
+import mx.core.IVisualContainer;
+import mx.core.IVisualItem;
+import mx.core.IUIComponent;

 [IconFile("FxContainer.png")]

@@ -61,7 +64,7 @@
  *  @see FxDataContainer
  */
 public class FxContainer extends FxContainerBase
-       implements IDeferredContentOwner
+       implements IDeferredContentOwner, IVisualContainer
 {
     include "../core/Version.as";

@@ -505,12 +508,28 @@

     private function contentGroup_itemAddedHandler(event:ItemExistenceChangedEvent):void
     {
+        // TODO (rfrishbe): need to check for IUIComponent
+        // as well if checking for IVisualItem?
+        if (event.relatedObject is IVisualItem ||
+            event.relatedObject is IUIComponent)
+        {
+            event.relatedObject.owner = this;
+        }
+
         // Re-dispatch the event
         dispatchEvent(event);
     }

     private function contentGroup_itemRemovedHandler(event:ItemExistenceChangedEvent):void
     {
+        // TODO (rfrishbe): need to check for IUIComponent
+        // as well if checking for IVisualItem?
+        if (event.relatedObject is IVisualItem ||
+            event.relatedObject is IUIComponent)
+        {
+            event.relatedObject.owner = null;
+        }
+
         // Re-dispatch the event
         dispatchEvent(event);
     }


Rename CIRRUS_URL to RTMFP_URL.

Rename CIRRUS_URL to RTMFP_URL.

--- swfcat.as
+++ swfcat.as
@@ -18,7 +18,7 @@

     public class swfcat extends Sprite
     {
-        private const CIRRUS_URL:String = "rtmfp://tor-facilitator.bamsoftware.com";
+        private const RTMFP_URL:String = "rtmfp://tor-facilitator.bamsoftware.com";

         private const DEFAULT_FACILITATOR_ADDR:Object = {
             host: "tor-facilitator.bamsoftware.com",
@@ -197,7 +197,7 @@
         {
             var rs:RTMFPSocket;

-            rs = new RTMFPSocket(CIRRUS_URL);
+            rs = new RTMFPSocket(RTMFP_URL);
             rs.addEventListener(Event.COMPLETE, function (e:Event):void {
                 puts("Got RTMFP id " + rs.id);
                 register(rs);
@@ -282,7 +282,7 @@
             }

             if (client_spec.match(/^[0-9A-Fa-f]{64}$/)) {
-                s_c = new RTMFPSocket(CIRRUS_URL);
+                s_c = new RTMFPSocket(RTMFP_URL);
                 s_r = new Socket();
                 proxy_pair = new ProxyPair(this, s_c, function ():void {
                     s_c.connect(client_spec);


Revert "Now using ByteArray in CSVParser.createCSV() for 2x speedup."

This reverts commit 721aaba8b1b70953a764dabf3dc743372a206d84.

--- WeaveData/src/weave/data/CSVParser.as
+++ WeaveData/src/weave/data/CSVParser.as
@@ -19,7 +19,6 @@

 package weave.data
 {
-	import flash.utils.ByteArray;
 	import flash.utils.getTimer;

 	import mx.utils.ObjectUtil;
@@ -217,28 +216,17 @@
 		 */
 		public function createCSV(rows:Array):String
 		{
-			var firstRow:Boolean = true;
-			var out:ByteArray = new ByteArray();
-			for each (var row:Array in rows)
-			{
-				if (firstRow)
-					firstRow = false;
-				else
-					out.writeUTFBytes(LF);
+			var lines:Array = new Array(rows.length);
+			for (var i:int = rows.length; i--;)
+			{
+				var tokens:Array = new Array(rows[i].length);
+				for (var j:int = tokens.length; j--;)
+					tokens[j] = createCSVToken(rows[i][j]);

-				var firstItem:Boolean = true;
-				for each (var item:String in row)
-				{
-					if (firstItem)
-						firstItem = false;
-					else
-						out.writeUTFBytes(delimiter);
-
-					out.writeUTFBytes(createCSVToken(item));
-				}
-			}
-			out.position = 0;
-			return out.readUTFBytes(out.length);
+				lines[i] = tokens.join(delimiter);
+			}
+			var csvData:String = lines.join(LF);
+			return csvData;
 		}

 		/**


organize imports

organize imports

--- WeaveUI/src/weave/menus/WindowMenu.as
+++ WeaveUI/src/weave/menus/WindowMenu.as
@@ -21,9 +21,6 @@
 	import mx.controls.Alert;

 	import weave.Weave;
-	import weave.api.core.ILinkableObject;
-	import weave.api.detectLinkableObjectChange;
-	import weave.compiler.StandardLib;
 	import weave.editors.WeavePropertiesEditor;
 	import weave.ui.DraggablePanel;

@@ -80,7 +77,7 @@
 				},
 				click: Weave.properties.dashboardMode
 			},
-			TYPE_SEPARATOR,
+			TYPE_SEPARATOR,
 			{
 				shown: Weave.properties.enableFullScreen,
 				label: function():String


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1252995 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/chartClasses/ChartElement.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/ChartElement.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 7163
Author:   aharui@adobe.com
Date:     2009-05-21T02:19:55.813792Z

Log Message:
-----------
Initial checkin of frame 1 cleanup.  In an RSL linkage, more classes will now come from the RSL because they are no longer needed in frame 1, and the size of the application SWF will be smaller.

QE Notes: None
Doc Notes: Maybe.  All new classes should be undocumented, but it might be worth checking that and any changes to interfaces
Bugs:
Reviewer: darrell
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/MarshalPopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ResourceModuleRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IMarshalSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/ToolTipManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/MustellaResultsParser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/DragManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IActiveWindowManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/PopUpManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/messaging/config/LoaderConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManagerChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/CursorManagerMarshalMixin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262237 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
+++ frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
@@ -23,8 +23,10 @@
 import mx.core.IFlexModuleFactory;
 import mx.core.mx_internal;
 import mx.core.Singleton;
+import mx.events.FlexEvent;
 import mx.events.ModuleEvent;
 import mx.events.ResourceEvent;
+import mx.managers.SystemManagerGlobals;
 import mx.modules.IModuleInfo;
 import mx.modules.ModuleManager;
 import mx.utils.StringUtil;
@@ -111,6 +113,12 @@
     public function ResourceManagerImpl()
     {
         super();
+
+		var info:Object = SystemManagerGlobals.info;
+		processInfo(info);
+
+		SystemManagerGlobals.topLevelSystemManagers[0].
+			addEventListener(FlexEvent.NEW_CHILD_APPLICATION, newChildApplicationHandler, true);
     }

     //--------------------------------------------------------------------------
@@ -252,7 +260,7 @@
             {
                 var bundleName:String = bundleNames[j];

-                mx_internal::installCompiledResourceBundle(
+                installCompiledResourceBundle(
                     applicationDomain, locale, bundleName);
             }
         }
@@ -261,7 +269,7 @@
     /**
      *  @private
      */
-    mx_internal function installCompiledResourceBundle(
+    private function installCompiledResourceBundle(
                                 applicationDomain:ApplicationDomain,
                                 locale:String, bundleName:String):void
     {
@@ -274,11 +282,6 @@
             localName = bundleName.substring(colonIndex + 1);
         }

-        // If a bundle with that locale and bundle name already exists
-        // in the ResourceManager, don't replace it.
-        if (getResourceBundle(locale, bundleName))
-            return;
-
         // The autogenerated resource bundle classes produced by the
         // mxmlc and compc compilers have names that incorporate
         // the locale and bundle name, such as "en_US$core_properties".
@@ -341,6 +344,55 @@
         addResourceBundle(resourceBundle);
     }

+    // parameter is Event because we can get FlexEvents from other applicationDomains
+	private function newChildApplicationHandler(event:Event):void
+	{
+        // ignore if from some other ApplicationDomain
+        if (event is FlexEvent)
+        {
+		    var info:Object = event.target.info();
+            processInfo(info);
+        }
+    }
+
+    private function processInfo(info:Object):void
+    {
+		var compiledLocales:Array = info["compiledLocales"];
+
+		ResourceBundle.mx_internal::locale =
+			compiledLocales != null && compiledLocales.length > 0 ?
+			compiledLocales[0] :
+			"en_US";
+
+		// The FlashVars of the SWF's HTML wrapper,
+		// or the query parameters of the SWF URL,
+		// can specify the ResourceManager's localeChain.
+		var localeChainList:String =
+			SystemManagerGlobals.parameters["localeChain"];
+		if (localeChainList != null && localeChainList != "")
+			localeChain = localeChainList.split(",");
+
+		var applicationDomain:ApplicationDomain = info["currentDomain"];
+
+		var compiledResourceBundleNames:Array /* of String */ =
+			info["compiledResourceBundleNames"];
+
+		installCompiledResourceBundles(
+			applicationDomain, compiledLocales, compiledResourceBundleNames);
+
+		// If the localeChain wasn't specified in the FlashVars of the SWF's
+		// HTML wrapper, or in the query parameters of the SWF URL,
+		// then initialize it to the list of compiled locales,
+        // sorted according to the system's preferred locales as reported by
+        // Capabilities.languages or Capabilities.language.
+		// For example, if the applications was compiled with, say,
+		// -locale=en_US,ja_JP and Capabilities.languages reports [ "ja-JP" ],
+        // set the localeChain to [ "ja_JP" "en_US" ].
+		if (!localeChain)
+			initializeLocaleChain(compiledLocales);
+
+	}
+
     /**
      *  @copy mx.resources.IResourceManager#initializeLocaleChain()
      *


Implementing clone() is apparently "required" for subclasses of Event.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4163 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/events/ControllerEvent.as
+++ src/as/com/threerings/events/ControllerEvent.as
@@ -17,6 +17,11 @@
         this.arg = arg;
     }

+    public override function clone () :Event
+    {
+        return new ControllerEvent(command, arg);
+    }
+
     public override function toString () :String
     {
         return "ControllerEvent[" + command + " (" + arg + ")]";


Transferred from the Adobe Open Source Subversion Repository

Revision: 11247
Author:   klin@adobe.com
Date:     2009-10-28T21:59:11.963883Z

Log Message:
-----------
Fix for https://bugs.adobe.com/jira/browse/SDK-23184.

Updated a bunch of Style metadata ASDocs to describe different defaults between the Halo and Spark themes. Also, fixed a few typos along the way.

defaults.css - rearranged a few styles to be in alphabetical order
Button.as - removed extra emphasizedSkin style metadata
Panel.as - added spark theme to borderAlpha metadata

QE notes: None
Doc notes: None
Bugs: SDK-23184
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerNative.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpMenuIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/PaddingStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/GapStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/fl/video/NCManagerDynamicStream.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/FocusStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1270005 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/styles/metadata/FocusStyles.as
+++ frameworks/projects/mx/src/mx/styles/metadata/FocusStyles.as
@@ -12,7 +12,8 @@
 /**
  *  Specifies the alpha transparency value of the focus skin.
  *
- *  @default 0.4
+ *  The default value for the Halo theme is 0.4.
+ *  The default value for the Spark theme is 0.55.
  *
  *  @langversion 3.0
  *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 1098
Author:   jimurphy@adobe.com
Date:     2008-04-03T21:50:39.896200Z

Log Message:
-----------
Merge 3.0.x -- 362:394, 427:429, 603:608, 644:645, 651:663, 672:676, 755:756, 763:766, 785:790, 812:814, 854:861, 862:866, 866:933,971:1009, 1050:1056 --> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/DefaultDataDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VRule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/IList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IRepeaterClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/VideoError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/Locale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Responder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessageSerializationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/SOAPMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IBrowserManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ComponentDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/IViewCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/IMenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ILayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Spacer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Fault.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/XMLListCollection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SliderEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ScrollEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/CuePointManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/CrossDomainRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/NumericStepperEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/BrowserManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/events/ChannelFaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/CursorBookmark.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/WSDLLoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/LoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/FlexClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/SubscriptionInfo.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/DescribeTypeCache.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/logging/LogLogger.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/build_framework.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/HeaderEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/DownloadProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/ITreeDataDescriptor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1273575 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/SubscriptionInfo.as
+++ frameworks/projects/rpc/src/mx/messaging/SubscriptionInfo.as
@@ -29,7 +29,13 @@
      */
     public var selector:String;

-    /** Builds a new SubscriptionInfo with the specified subtopic and selector */
+    /** Builds a new SubscriptionInfo with the specified subtopic and selector.
+     *
+     *  @param st The subtopic for the subscription. If null, represents a subscription
+     *  for messages directed to the destination with no subtopic.
+     *
+     *  @param sel The selector. If null, inidcates all messages should be sent.
+     */
     public function SubscriptionInfo(st:String, sel:String)
     {
         subtopic = st;


Don't remove and re-add children, that's much more expensive
and will trigger events. Instead, sort the children and then
set their indicies.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@461 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/DisplayUtil.as
+++ src/as/com/threerings/flash/DisplayUtil.as
@@ -36,26 +36,26 @@
      *
      * comp is a function that takes two DisplayObjects, and returns int -1 if the first
      * object should appear before the second in the container, 1 if it should appear after,
-     * and 0 if the order does not matter.
-     */
-    public static function sortDisplayChildren (container :DisplayObjectContainer, comp :Function) :void
+     * and 0 if the order does not matter. If omitted, Comparators.COMPARABLE
+     * will be used- all the children should implement Comparable.
+     */
+    public static function sortDisplayChildren (
+        container :DisplayObjectContainer, comp :Function = null) :void
     {
         var numChildren :int = container.numChildren;
+        // put all children in an array
         var children :Array = new Array(numChildren);
-
-        // pull the display children into an array.
-        // guess that removing children from the end of a DisplayObjectContainer
-        // is more efficient than removing them from the beginning.
-        for (var i :int = numChildren - 1; i >= 0; --i) {
-            children[i] = container.removeChildAt(i);
+        var ii :int;
+        for (ii = 0; ii < numChildren; ii++) {
+            children[ii] = container.getChildAt(ii);
         }

         // stable sort the array
         ArrayUtil.stableSort(children, comp);

-        // add children back to the container
-        for each (var child :DisplayObject in children) {
-            container.addChild(child);
+        // set their new indexes
+        for (ii = 0; ii < numChildren; ii++) {
+            container.setChildIndex(DisplayObject(children[ii]), ii);
         }
     }


修复当某一项为 null 时，toString 出错的 bug

修复当某一项为 null 时，toString 出错的 bug

--- as3/com/netease/protobuf/messageToString.as
+++ as3/com/netease/protobuf/messageToString.as
@@ -35,8 +35,8 @@
 		return ""
 	}
 	var field:* = message[name]
-	if (field.constructor == Array && field.length == 0) {
+	if (field != null && field.constructor == Array && field.length == 0) {
 		return ""
 	}
-	return name + "=" + message[name] + ";\n"
+	return name + "=" + field + ";\n"
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 10951
Author:   klin@adobe.com
Date:     2009-10-09T17:15:44.211985Z

Log Message:
-----------
TitleWindow initial checkin. This is the spark equivalent of the mx:TitleWindow. One major difference is that we support a new skinstate called active. In this state, the titlebar of the window that is in focus or if one of that window's children is in focus.

-Added TitleWindow component to spark framework.
-Added new TitleWindowBoundsEvent to define events when you drag a TitleWindow.
-Added TitleWindow default skin and wireframe skin.
-Included TitleWindow to manifests and stylesheets.
-Added TitleWindow checkin test.
-Modified Panel's controlBarGroupProperties and related constants to be mx_internal in order for titlewindow to have the correct state when the controlBar is present and visible.
-Added ASDoc example for TW.
-Added icon for FB integration.
-Changed mx:TitleWindow's Alternative metadata to point to the spark TitleWindow.

SDK-23648 - small cosmetic fix on TitleWindow skin for titleDisplay overlapping with the closeButton

QE notes: TitleWindow ready for testing.
Doc notes: Yes
Bugs: SDK-23648
Reviewer: Ryan
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.png</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TitleWindowSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/WireframeClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/TitleWindowSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults-3.0.0.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/SimpleTitleWindowExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TitleWindowBoundsEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TitleWindowCloseButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/TitleWindowApp.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/TitleWindowCloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/TitleWindowTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/views/TitleWindowTests.mxml</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1277789 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/SparkClasses.as
+++ frameworks/projects/spark/src/SparkClasses.as
@@ -67,6 +67,8 @@
 import spark.skins.spark.SpinnerSkin; SpinnerSkin;
 import spark.skins.spark.TextAreaSkin; TextAreaSkin;
 import spark.skins.spark.TextInputSkin; TextInputSkin;
+import spark.skins.spark.TitleWindowSkin; TitleWindowSkin;
+import spark.skins.spark.TitleWindowCloseButtonSkin; TitleWindowCloseButtonSkin;
 import spark.skins.spark.ToggleButtonSkin; ToggleButtonSkin;
 import spark.skins.spark.VideoPlayerSkin; VideoPlayerSkin;
 import spark.skins.spark.VScrollBarSkin; VScrollBarSkin;


Small adjustment so the emulator will run at infinite speeds when the LCD is disabled

--- index.as
+++ index.as
@@ -5273,14 +5273,16 @@
     let vblank = gpu_step(cycles);

     if vblank {
-      // Rasterize framebuffer
-      gpu_present();
-
       // Poll window events
       sdl_step();

-      // Blit pixels
-      sdl_render();
+      if gpu_lcd_enable {
+        // Rasterize framebuffer
+        gpu_present();
+
+        // Blit pixels
+        sdl_render();
+      }
     }
   }
 }


add 外框線

add 外框線

--- flash/src/lambmei/starling/display/HandleSheet.as
+++ flash/src/lambmei/starling/display/HandleSheet.as
@@ -2,16 +2,19 @@
 {
 	import flash.display.MovieClip;
 	import flash.geom.Point;
+	import flash.system.System;

 	import starling.display.Button;
 	import starling.display.DisplayObject;
 	import starling.display.DisplayObjectContainer;
+	import starling.display.Shape;
 	import starling.display.Sprite;
 	import starling.events.Event;
 	import starling.events.Touch;
 	import starling.events.TouchEvent;
 	import starling.events.TouchPhase;
 	import starling.textures.Texture;
+	import starling.utils.Line;

 	public class HandleSheet extends Sprite
 	{
@@ -55,6 +58,7 @@
 		protected var _contents:DisplayObject
 		protected var _ctrlButton:DisplayObject
 		protected var _selectedGroup:Sprite
+		protected var _shape:Shape

 		public function HandleSheet(contents:DisplayObject=null)
@@ -78,12 +82,51 @@

 			}
 			//init SelectGroup
-			_selectedGroup = new Sprite()
+			initSelectedGroup()
+		}
+
+		/** 初始化選擇的群組**/
+		protected function initSelectedGroup():void
+		{
+
+			_selectedGroup = new Sprite()
 			this.addChild(this._selectedGroup);

+			_shape = new Shape()
+			updateLine()
+			_selectedGroup.addChild(_shape)
 			_selectedGroup.visible = _selected
-		}
-
+
+		}
+
+		/**重新計算**/
+		protected function render(scale=1):void
+		{
+			updateLine(scale)
+		}
+
+		/**更新框線**/
+		protected function updateLine(scale=1):void
+		{
+			if(_contents && _shape){
+				_shape.graphics.lineStyle(10,0xFFffFF);
+					_shape.graphics.clear();
+
+					System.gc();
+
+					var _w:Number = _contents.width
+					var _h:Number = _contents.height
+					var _halfW:Number = _w/2
+					var _halfH:Number= _h/2
+
+					_shape.graphics.lineStyle(2 * scale,0xFFFFFF);
+					//_shape.graphics.drawRoundRect( -_halfW, -_halfH, _w, _h, 10 );
+					_shape.graphics.drawRect(-_halfW, -_halfH, _w, _h);
+
+					//trace("scale",scale)
+
+			}
+		}

@@ -94,7 +137,7 @@

 			if ( upTexture !=null)
 			{
-				_ctrlButton = new Button(upTexture,CTRL_BUTTON_NAME,downTexture);
+				_ctrlButton = new Button(upTexture,"",downTexture);

 				setCtrlButtonInitByObject(_ctrlButton )
 			}else{
@@ -165,6 +208,8 @@
 			touch  = event.getTouch(this, TouchPhase.ENDED);
 			onTouchEnd(touch)

+
+
 		}

 		/**當touch開始**/
@@ -213,7 +258,7 @@

 			var touchA:Touch = touches[0];
 			var touchB:Touch = touchA.clone();		//模擬B點
-			var n = touchA.getLocation(this);
+			var n:Point = touchA.getLocation(this);
 			//鏡射A點坐標
 			touchB.globalX = n.x * 1
 			touchB.globalY = n.y * -1
@@ -252,7 +297,7 @@
 				_ctrlButton.scaleY /= sizeDiff
 			}

-
+			render(_ctrlButton.scaleX)

 		}

@@ -295,6 +340,8 @@
 			var sizeDiff:Number = currentVector.length / previousVector.length;
 			scaleX *= sizeDiff;
 			scaleY *= sizeDiff;
+
+			render(_ctrlButton.scaleX)
 		}

@@ -308,5 +355,4 @@
 		}
 	}
 }
-import lambmei.starling.display.HandleSheet;


declare function return value type

declare function return value type

--- src/model/ImportDataProxy.as
+++ src/model/ImportDataProxy.as
@@ -105,7 +105,7 @@
 		{
 			return _skeletonData;
 		}
-		private function set skeletonData(value:SkeletonData)
+		private function set skeletonData(value:SkeletonData):void
 		{
 			_skeletonData = value;
 		}


That should be private.

That should be private.

If it's public, we try to shadow it in a subclass & wind up still
getting THIS one.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@6083 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/io/ObjectInputStream.as
+++ src/as/com/threerings/io/ObjectInputStream.as
@@ -35,8 +35,6 @@
 {
     /** Enables verbose object I/O debugging. */
     public static const DEBUG :Boolean = false;
-
-    public static const log :Log = Log.getLog(ObjectInputStream);

     public function ObjectInputStream (source :IDataInput = null, clientProps :Object = null)
     {
@@ -287,5 +285,7 @@
     protected var _classMap :Array = new Array();

     private static var _debugObjectCounter :int = 0;
+
+    private static const log :Log = Log.getLog(ObjectInputStream);
 }
 }


Made _selected a protected param rather than a private one.

--- src/org/openPyro/controls/listClasses/DefaultListRenderer.as
+++ src/org/openPyro/controls/listClasses/DefaultListRenderer.as
@@ -119,7 +119,7 @@
 			return _data;
 		}

-		private var _selected:Boolean = false;
+		protected var _selected:Boolean = false;
 		public function set selected(b:Boolean):void
 		{
 			_selected = b;


Transferred from the Adobe Open Source Subversion Repository

Revision: 14443
Author:   sameer@adobe.com
Date:     2010-02-26T06:59:48.156260Z

Log Message:
-----------
Merge AdvancedDataGrid mirroring changes from 4.x branch to trunk - revision 14442

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run:checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/AdvancedDataGridBaseEx.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/AdvancedDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/listClasses/AdvancedListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/controls/advancedDataGridClasses/AdvancedDataGridDragProxy.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1290318 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
@@ -8161,6 +8161,10 @@
      */
     override protected function headerNavigationHandler(event:KeyboardEvent):void
     {
+       // If rtl layout, need to swap LEFT and RIGHT so correct action
+       // is done.
+       var keyCode:uint = mapKeycodeForLayoutDirection(event);
+
        if (!columnGrouping || headerIndex == -1 || selectedHeaderInfo == null)
        {
           super.headerNavigationHandler(event);
@@ -8172,7 +8176,7 @@

           var newSelectedHeaderInfo:AdvancedDataGridHeaderInfo;
           var siblings:Array;
-          if (event.keyCode == Keyboard.UP)
+          if (keyCode == Keyboard.UP)
           {
              if (selectedHeaderInfo.parent != null)
              {
@@ -8185,7 +8189,7 @@
              }

           }
-          else if (event.keyCode == Keyboard.DOWN)
+          else if (keyCode == Keyboard.DOWN)
           {
              //Check if we are a leaf-header
              if (selectedHeaderInfo.visibleChildren == null || selectedHeaderInfo.visibleChildren.length == 0)
@@ -8203,7 +8207,7 @@
                  selectColumnGroupHeader(newSelectedHeaderInfo);
              }
           }
-          else if (event.keyCode == Keyboard.LEFT)
+          else if (keyCode == Keyboard.LEFT)
           {
              siblings = (selectedHeaderInfo.parent !=null)? selectedHeaderInfo.parent.visibleChildren : visibleHeaderInfos;
              if (selectedHeaderInfo.visibleIndex > 0)
@@ -8217,7 +8221,7 @@
                  selectColumnGroupHeader(newSelectedHeaderInfo);
              }
           }
-          else if (event.keyCode == Keyboard.RIGHT)
+          else if (keyCode == Keyboard.RIGHT)
           {
              siblings = (selectedHeaderInfo.parent !=null)? selectedHeaderInfo.parent.visibleChildren : visibleHeaderInfos;
              if (selectedHeaderInfo.visibleIndex < siblings.length - 1)
@@ -8232,7 +8236,7 @@
                 selectColumnGroupHeader(newSelectedHeaderInfo);
              }
           }
-          else if (event.keyCode == Keyboard.SPACE)
+          else if (keyCode == Keyboard.SPACE)
           {
               if (sortableColumns &&
                   selectedHeaderInfo.column.colNum != -1 && !isNaN(selectedHeaderInfo.column.colNum)
@@ -8254,10 +8258,10 @@
           }
           // horizontal scrolling when focus is on header
           else if ( event.shiftKey
-                  && (event.keyCode == Keyboard.PAGE_UP
-                     || event.keyCode == Keyboard.PAGE_DOWN) )
+                  && (keyCode == Keyboard.PAGE_UP
+                     || keyCode == Keyboard.PAGE_DOWN) )
           {
-             moveSelectionHorizontally(event.keyCode, event.shiftKey, event.ctrlKey);
+             moveSelectionHorizontally(keyCode, event.shiftKey, event.ctrlKey);
           }

           // don't we allow vertical scrolling when focus is on the header?
@@ -8738,8 +8742,12 @@
         // get the item renderer to be passed in the ITEM_OPENING events
         if (listItems[visibleRowIndex])
             treeItemRenderer = listItems[visibleRowIndex][treeColumnIndex];
-
-        if (event.ctrlKey && event.shiftKey && event.keyCode == Keyboard.SPACE)
+
+		// If rtl layout, need to swap LEFT and RIGHT so correct action
+		// is done.
+		var keyCode:uint = mapKeycodeForLayoutDirection(event);
+
+        if (event.ctrlKey && event.shiftKey && keyCode == Keyboard.SPACE)
         {
             // if user has moved the caret cursor from the selected item
             // move the cursor back to selected item
@@ -8766,7 +8774,7 @@
             }
             event.stopImmediatePropagation();
         }
-        else if (event.ctrlKey && event.shiftKey && event.keyCode == Keyboard.LEFT)
+        else if (event.ctrlKey && event.shiftKey && keyCode == Keyboard.LEFT)
         {
             // Left Arrow closes an open item. Otherwise selects the parent item.
             if (isItemOpen(item))
@@ -8804,7 +8812,7 @@
             }
             event.stopImmediatePropagation();
         }
-        else if (event.ctrlKey && event.shiftKey && event.keyCode == Keyboard.RIGHT)
+        else if (event.ctrlKey && event.shiftKey && keyCode == Keyboard.RIGHT)
         {
             // Right Arrow has no effect on leaf items. Closed branch items are opened.
             //Opened branch items select the first child.
@@ -8851,11 +8859,11 @@
             }
             event.stopImmediatePropagation();
         }
-        else if (event.keyCode == Keyboard.NUMPAD_MULTIPLY)
+        else if (keyCode == Keyboard.NUMPAD_MULTIPLY)
         {
             expandChildrenOf(item, !isItemOpen(item));
         }
-        else if (event.keyCode == Keyboard.NUMPAD_ADD)
+        else if (keyCode == Keyboard.NUMPAD_ADD)
         {
             if (isBranch(item))
             {
@@ -8871,7 +8879,7 @@
                 }
             }
         }
-        else if (event.keyCode == Keyboard.NUMPAD_SUBTRACT)
+        else if (keyCode == Keyboard.NUMPAD_SUBTRACT)
         {
             if (isItemOpen(item))
             {
@@ -8899,6 +8907,10 @@
      */
     protected function cellNavigationHandler(event:KeyboardEvent):void
     {
+		// If rtl layout, need to swap LEFT and RIGHT so correct action
+		// is done.
+		var keyCode:uint = mapKeycodeForLayoutDirection(event);
+
         // Can't use a straight-forward Object/Dictionary
         // because they don't allow integer keys.
         const validKeys:Array = [
@@ -8918,7 +8930,7 @@
         var n:int = validKeys.length;
         for (var i:int = 0; i < n; i++)
         {
-            if (event.keyCode == validKeys[i])
+            if (keyCode == validKeys[i])
             {
                 isValidKey = true;
                 break;
@@ -8928,7 +8940,7 @@
         if (!isValidKey)
         {
             // Handles single-character type-ahead lookup for data in the rows.
-            if (findKey(event.keyCode))
+            if (findKey(keyCode))
                 event.stopPropagation();

             return;
@@ -8956,7 +8968,7 @@

         var newCaretColumnIndex:int;

-        switch (event.keyCode)
+        switch (keyCode)
         {
             case Keyboard.UP:
             {
@@ -9041,7 +9053,7 @@
             case Keyboard.PAGE_UP:
             case Keyboard.PAGE_DOWN:
             {
-                moveSelectionVertically(event.keyCode, event.shiftKey, event.ctrlKey);
+                moveSelectionVertically(keyCode, event.shiftKey, event.ctrlKey);
                 break;
             }

@@ -9117,7 +9129,7 @@

         bShiftKey = event.shiftKey;
         bCtrlKey  = event.ctrlKey;
-        lastKey   = event.keyCode;
+        lastKey   = keyCode;

         finishCellKeySelection();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1273722 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXContext.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXContext.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package mx.messaging.channels.amfx
 {


fix Geometry.setVertexStream() to avoid executing the Geometry.changed signal when a VertexStream is simply replaced by the equivalent VertexStreamList

--- src/aerys/minko/render/geometry/Geometry.as
+++ src/aerys/minko/render/geometry/Geometry.as
@@ -245,24 +245,32 @@

 		public function setVertexStream(vertexStream : IVertexStream, index : uint = 0) : void
 		{
-			if (index < _vertexStreams.length)
-			{
-				var oldStream : IVertexStream = _vertexStreams[index] as IVertexStream;
-
+			doSetVertexStream(vertexStream, index);
+		}
+
+        protected function doSetVertexStream(vertexStream   : IVertexStream,
+                                             index          : uint  = 0,
+                                             executeChanged : Boolean = true) : void
+        {
+            if (index < _vertexStreams.length)
+            {
+                var oldStream : IVertexStream = _vertexStreams[index] as IVertexStream;
+
                 if (oldStream.changed.hasCallback(vertexStreamChangedHandler))
                     oldStream.changed.remove(vertexStreamChangedHandler);

                 if (oldStream.boundsChanged.hasCallback(vertexStreamBoundsChangedHandler))
                     oldStream.boundsChanged.remove(vertexStreamBoundsChangedHandler);
-			}
-
+            }
+
             if (vertexStream.format.hasComponent(VertexComponent.XYZ))
-    			vertexStream.boundsChanged.add(vertexStreamBoundsChangedHandler);
-			vertexStream.changed.add(vertexStreamChangedHandler);
-			_vertexStreams[index] = vertexStream;
-
-			_changed.execute(this);
-		}
+                vertexStream.boundsChanged.add(vertexStreamBoundsChangedHandler);
+            vertexStream.changed.add(vertexStreamChangedHandler);
+            _vertexStreams[index] = vertexStream;
+
+            if (executeChanged)
+                _changed.execute(this);
+        }

 		/**
 		 * Apply matrix transformation to all vertices
@@ -796,7 +804,7 @@
 			if (!(stream is VertexStreamList))
 			{
 				stream = new VertexStreamList(stream);
-				setVertexStream(stream, index);
+                doSetVertexStream(stream, index, false);
 			}

 			(stream as VertexStreamList).pushVertexStream(vertexStream, force);


add Geometry.invertWinding() to invert triangles

--- src/aerys/minko/render/geometry/Geometry.as
+++ src/aerys/minko/render/geometry/Geometry.as
@@ -1072,5 +1072,36 @@

 			return triangleIndice / 3;
 		}
+
+		public function invertWinding(flipNormals : Boolean = true, flipTangents : Boolean = true) : Geometry
+		{
+			var numIndices		: uint		= indexStream.length;
+			var numTriangles	: uint		= numIndices / 3;
+			var indices			: ByteArray	= indexStream.lock();
+
+			for (var i : uint = 0; i < numTriangles; ++i)
+			{
+				var i0 : uint = indices.readUnsignedShort();
+				var i1 : uint = indices.readUnsignedShort();
+				var i2 : uint = indices.readUnsignedShort();
+
+				indices.position -= 6;
+				indices.writeShort(i2);
+				indices.writeShort(i1);
+				indices.writeShort(i0);
+			}
+
+			indexStream.unlock();
+
+			if (numVertexStreams)
+			{
+				if (flipNormals && getVertexStream(0).format.hasComponent(VertexComponent.NORMAL))
+					computeNormals();
+				if (flipTangents && getVertexStream(0).format.hasComponent(VertexComponent.TANGENT))
+					computeTangentSpace();
+			}
+
+			return this;
+		}
 	}
 }