Removed listener for stage_added event

Removed listener for stage_added event

--- src/com/jabbypanda/controls/InputAssist.as
+++ src/com/jabbypanda/controls/InputAssist.as
@@ -87,7 +87,6 @@
         public function InputAssist() {
             super();
             this.mouseEnabled = true;
-            this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
             dataProvider = null;
         }

@@ -232,10 +231,10 @@
             if (instance == inputTxt) {
                 inputTxt.text = _enteredText;

-                inputTxt.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocusIn);
-                inputTxt.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut);
-                inputTxt.addEventListener(TextOperationEvent.CHANGE, onInputFieldChange);
-                inputTxt.addEventListener(KeyboardEvent.KEY_DOWN, onInputFieldKeyDown);
+                inputTxt.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocusIn, false, 0, true);
+                inputTxt.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut, false, 0, true);
+                inputTxt.addEventListener(TextOperationEvent.CHANGE, onInputFieldChange, false, 0, true);
+                inputTxt.addEventListener(KeyboardEvent.KEY_DOWN, onInputFieldKeyDown, false, 0, true);
             }

             if (instance == list) {
@@ -246,7 +245,7 @@
                 list.requireSelection = requireSelection;
                 list.styleName = new StyleProxy(this, {});

-                list.addEventListener(HighlightItemListEvent.ITEM_CLICK, onListItemClick);
+                list.addEventListener(HighlightItemListEvent.ITEM_CLICK, onListItemClick, false, 0, true);
             }
         }

@@ -485,17 +484,7 @@
                 showPreviousTextAndHidePopUp(!_completionAccepted);
             }
         }
-
-        private function onAddedToStage(event : Event) : void {
-            focusManager.addEventListener(FlexEvent.FLEX_WINDOW_ACTIVATE, onFlexWindowActivate);
-        }
-
-        private function onFlexWindowActivate(event : FlexEvent) : void {
-            /* reset lastFocus value to prevent shifting focus
-            to previously selected component
-            */
-            (focusManager as FocusManager).lastFocus = null;
-        }
+

         private var _collection : ArrayCollection = new ArrayCollection();


Transferred from the Adobe Open Source Subversion Repository

Revision: 8723
Author:   chaase@adobe.com
Date:     2009-07-21T23:19:39.441122Z

Log Message:
-----------
Fixed 2 areas of effects bugs (playheadTime and transform effects shared instances). Also fixed bug in GraphicElement.localToGlobal(). Fixes remaining transform effects bugs prior to feature signoff.

QE Notes: None
Doc Notes: None
Bugs: SDK-22315, sdk-22304, sdk-22302, sdk-21931, sdk-21068, sdk-20179, sdk-21069
Reviewer: Hans, Jason (GraphicElement), Glenn (SharedObjectDepot)
API Change: None
Is noteworthy for integration: No
tests: checkintests mustella spark/effects,mx/effects (run locally and in cyclone by Matt)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/SharedObjectDepot.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/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as
@@ -142,16 +142,24 @@
      */
     override public function set playheadTime(value:Number):void
     {
-        var totalDur:Number = Parallel(effect).compositeDuration + repeatDelay;
-        var childPlayheadTime:Number = (totalDur > 0) ?
-            (value - startDelay) % totalDur :
-            value - startDelay;
+        var totalDur:Number = Parallel(effect).compositeDuration;
+        var firstCycleDur:Number = totalDur + startDelay + repeatDelay;
+        var laterCycleDur:Number = totalDur + repeatDelay;
+        var childPlayheadTime:Number;
+        if (value <= firstCycleDur) {
+            childPlayheadTime = Math.min(value - startDelay, totalDur);
+            playCount = 1;
+        }
+        else
+        {
+            var valueAfterFirstCycle:Number = value - firstCycleDur;
+            childPlayheadTime = valueAfterFirstCycle % laterCycleDur;
+            childPlayheadTime = Math.min(childPlayheadTime, totalDur);
+            playCount = 1 + valueAfterFirstCycle / laterCycleDur;
+        }

         // This will seek in the Parallel's instance
         super.playheadTime = childPlayheadTime;
-        playCount = (totalDur > 0) ?
-            1 + (value - startDelay) / totalDur :
-            1;

         // Tell all of our children to set their playheadTime
         for (var i:int = 0; i < childSets.length; i++)


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

--- frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as
+++ frameworks/projects/framework/src/mx/managers/systemClasses/PlaceholderData.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2006 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.managers.systemClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21618
Author:   smgilson@adobe.com
Date:     2011-07-19T17:27:07.633025Z

Log Message:
-----------
initial ASDoc pass on new splashscreen for 4.5.2

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as
+++ frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as
@@ -8,20 +8,57 @@

 /**
  *  Use the SplashScreenImage class to specify different splash screen
- *  images per device configurations like DPI, orientation, resolution.
+ *  images based on characteristics of a mobile device.
+ *  For example, you can use different images for a splashscreen based on the
+ *  DPI, orientation, or resolution of the device.
  *
- *
Developers typically define a SplashScreenImage class
- *  in a separate MXML file.  The different image choices and corresponding
- *  device configutaions are defined in that MXML file as SplahsScreenImageSource
- *  children.  The Developers set the Application's splashScreenImage
- *  property to the name of the SplashScreenImage definition.

+ *
You typically define a SplashScreenImage class
+ *  in an MXML file.
+ *  Use the SplahsScreenImageSource class to define the different
+ *  image choices and corresponding device configurations.
+ *  You then set the application's splashScreenImage
+ *  property to the name of the SplashScreenImage MXML component.

+ *
+ *
The procedure for determining the best match of an SplahsScreenImageSource
+ *  definition to a mobile device is as follows:

+ *
+ *

+ *
Determine all of the SplashScreenImageSource definitions
+ *      that match the settings of the mobile device.
+ *      A match occurs when:
+ *

+ *
The SplashScreenImageSource definition does not have that setting explicitly defined.
+ *              For example, no setting for the dpi property matches any device's DPI.

+ *
For the dpi or aspectRatio property, the property must exactly match
+ *              the corresponding setting of the mobile device.

+ *
For the minResolution property, the property matches a setting on
+ *              the device when the larger of the Stage.stageWidth and
+ *              Stage.stageHeight properties is equal to or greater than minResolution.

+ *

+ *

+ *
If there's more than one SplashScreenImageSource definition that matches the device then:
+ *

+ *
Choose the one with largest number of explicit settings.
+ *              For example, a SplashScreenImageSource definition that specifies both the
+ *              dpi and aspectRatio properties is a better match
+ *              than one that only species the dpi property.

+ *
If there is still more than one match, choose the one with highest
+ *              minResolution value.

+ *
If there is still more than one match, choose the first one defined in the component.

+ *

+ *

+ *

  *
- *
Note, this class can't be set inline in the Application MXML, it needs
- *  to be defined in a separate MXML file and referenced from the Application's
- *  splashScreenImage property.

+ *
Note: This class cannot be set inline in the MXML of the application.
+ *  You must define it in a separate MXML file and reference it by using the
+ *  application's splashScreenImage property.

  *
  *  @see spark.preloaders.SplashScreenImageSource
  *  @see spark.components.Application#splashScreenImage
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
  */
 public class SplashScreenImage
 {
@@ -33,6 +70,10 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
      */
     public function SplashScreenImage()
     {
@@ -57,11 +98,16 @@
     [ArrayElementType("spark.preloaders.SplashScreenImageSource")]

     /**
-     *  The SplashScreenImageSource sources for this
+     *  The SplashScreenImageSource sources for this
      *  SplashScreenImage.
      *
-     *  Typically developers don't use this method directly, instead they
-     *  define the SplashScreenImageSource inline in MXML.
+     *  Typically you do not call this method directly.
+     *  Instead, you add SplashScreenImageSource definitions
+     *  inline in the MXML file of the SplashScreenImage component.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
      */
     public function get mxmlContent():Array
     {
@@ -83,18 +129,28 @@
     //--------------------------------------------------------------------------

     /**
-     *  Returns the Class of the SplashScreenImageSource that matches best
+     *  Returns the Class of the SplashScreenImageSource that best matches
      *  the specified device parameters.
      *
-     *  Developers don't call this method directly, it is called internally by Flex.
+     *
You do not call this method directly; it is called internally by Flex.

      *
-     *  Developers may override this method in a subclass if they want to override
-     *  the default Flex logic of picking the best matching SplashScreenImageSource.
+     *
Override this method in a SplashScreenImage component if you want to override
+     *  the default Flex logic of picking the best matching SplashScreenImageSource instance.

      *
-     *  @param aspectRatio One of StageAspectRatio.PORTRAIT StageAspectRatio.LANDSCAPE.
-     *  @param dpi The dpi of the device.
-     *  @param resolution The resolution of the device's bigger dimension, in pixels.
+     *  @param aspectRatio Either flash.display.StageAspectRatio.PORTRAIT or
+     *  flash.display.StageAspectRatio.LANDSCAPE, whichever is greater.
+     *
+     *  @param dpi The DPI of the mobile device.
+     *
+     *  @param resolution The resolution of the mobile device's bigger dimension, in pixels.
+     *
      *  @return The Class for the image to be displayed as a splash screen image.
+     *
+     *  @see flash.display.StageAspectRatio
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
      */
     public function getImageClass(aspectRatio:String, dpi:Number, resolution:Number):Class
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12120
Author:   aharui@adobe.com
Date:     2009-11-23T21:19:13.695966Z

Log Message:
-----------
Change hacks in ButtonBar that force every renderer to update.  Suppress selectedIndex adjustment in ButtonBarBase if the dataProvider is a ViewStack

QE Notes: Some Mustella test will fail because there is a bug in the test media that is now exposed because we cleaned up the way we adjust selectedIndex.  ButtonBar/SWFs/Assets/TestComp.mxml does not add newVS to the display list (and should)
Doc Notes: None
Bugs: SDK-24087
Reviewer: Ryan
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/ButtonBar

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
@@ -89,6 +89,11 @@
         setCurrentCaretIndex(0);
     }

+    /**
+     *  @private
+     */
+    private var inCollectionChangeHandler:Boolean = false;
+
     //--------------------------------------------------------------------------
     //
     //  Overridden Properties
@@ -148,6 +153,37 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     *  if the collection is changing and the collection is a viewstack
+     *  the viewstack will also adjust the selection and notify us
+     *  via dataProvider_changeHandler so we want to
+     *  ignore calls to adjustSelection that the base class
+     *  calls so we don't increment or decrement
+     *  selectedIndex twice
+     */
+    override protected function dataProvider_collectionChangeHandler(event:Event):void
+    {
+        inCollectionChangeHandler = true;
+
+        super.dataProvider_collectionChangeHandler(event);
+
+        inCollectionChangeHandler = false;
+
+    }
+
+    /**
+     *  @private
+     */
+    override protected function adjustSelection(newIndex:int, add:Boolean=false):void
+    {
+        // see comment in dataProvider_collectionChangeHandler
+        if (inCollectionChangeHandler && dataProvider is ISelectableList)
+            return;
+
+        super.adjustSelection(newIndex, add);
+    }
+
     /**
      *  @private
      *  If false, don't show the focusRing for the tab at caretIndex, see


Transferred from the Adobe Open Source Subversion Repository

Revision: 13077
Author:   aharui@adobe.com
Date:     2009-12-17T22:13:40.312579Z

Log Message:
-----------
Take out some FIXME's, change a few others to TODO

QE Notes: None
Doc Notes: None
Bugs: FIXME
Reviewer: Corey
API Change: No
Is noteworthy for integration: No
tests: checkintests

Modified Paths:
--------------
<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/List.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/collections/ModifiedCollectionView.as</path>

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

--- frameworks/projects/mx/src/mx/controls/List.as
+++ frameworks/projects/mx/src/mx/controls/List.as
@@ -1349,8 +1349,6 @@
                 if (!listItems[rowNum])
                     listItems[rowNum] = [];

-                // FIXME (aharui): more code around renderer recycling should be shared with TileBase /
-                // moved to ListBase if possible
                 if (valid)
                 {
                     item = listItems[rowNum][colNum];


Note when flushing TSPacketParser is complete.

--- HLSPlugin/src/com/kaltura/hls/m2ts/TSPacketParser.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/TSPacketParser.as
@@ -277,6 +277,7 @@
             {
                 logger.debug("FLUSHING");
             }
+
             for (var idx:* in _streams)
             {
                 CONFIG::LOGGING
@@ -289,6 +290,11 @@
             pesProcessor.processAllNalus();

             pesProcessor.clear(true);
+
+            CONFIG::LOGGING
+            {
+                logger.debug("FLUSHING COMPLETE");
+            }
         }

         public function clear(clearAACConfig:Boolean = true):void


Fixed relation type left-left% and top-top%

--- source/fairygui/RelationItem.as
+++ source/fairygui/RelationItem.as
@@ -223,6 +223,13 @@

             switch (info.type) {
                 case RelationType.Left_Left:
+					if(info.percent && _target==_owner.parent)
+					{
+						v = _owner.x - targetX;
+						if (info.percent)
+							v = v / _targetWidth * _target._rawWidth;
+						_owner.x = targetX + v;
+					}
                     break;
                 case RelationType.Left_Center:
                     v = this._owner.x - (targetX + this._targetWidth / 2);
@@ -262,6 +269,13 @@
                     break;

                 case RelationType.Top_Top:
+					if(info.percent && _target==_owner.parent)
+					{
+						v = _owner.y - targetY;
+						if (info.percent)
+							v = v / _targetHeight * _target._rawHeight;
+						_owner.y = targetY + v;
+					}
                     break;
                 case RelationType.Top_Middle:
                     v = this._owner.y - (targetY + this._targetHeight / 2);


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@1273677 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 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
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8207
Author:   smgilson@adobe.com
Date:     2009-06-24T22:55:28.494485Z

Log Message:
-----------
Fix ASDoc version tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/DropDownEvent.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/spark/src/spark/events/TrackBaseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -145,13 +145,13 @@
      */
     private var _colorTransform:ColorTransform;

-	private var colorTransformChanged:Boolean;
-
-	/**
+    private var colorTransformChanged:Boolean;
+
+    /**
      *  @private The Sprite to draw into.
      *  If null, then we just use displayObject or sharedDisplayObject
      */
-	private var _drawnDisplayObject:InvalidatingSprite;
+    private var _drawnDisplayObject:InvalidatingSprite;

     /**
      *  @private
@@ -357,10 +357,10 @@
         if (_alpha == value)
             return;

-		var previous:Boolean = needsDisplayObject;
-	   	_alpha = value;
-    	if (previous != needsDisplayObject)
-			invalidateDisplayObjectSharing();
+        var previous:Boolean = needsDisplayObject;
+        _alpha = value;
+        if (previous != needsDisplayObject)
+            invalidateDisplayObjectSharing();

         alphaChanged = true;
         invalidateProperties();
@@ -467,10 +467,10 @@
             return;

         var previous:Boolean = needsDisplayObject;
-    	_blendMode = value;
-		if (previous != needsDisplayObject)
-			invalidateDisplayObjectSharing();
-
+        _blendMode = value;
+        if (previous != needsDisplayObject)
+            invalidateDisplayObjectSharing();
+
         blendModeExplicitlySet = true;
         blendModeChanged = true;
         invalidateProperties();
@@ -768,10 +768,10 @@
         var newLen:int = value ? value.length : 0;
         var edFilter:IEventDispatcher;

-		if (len == 0 && newLen == 0)
-			return;
-
-		// Remove the event listeners on the previous filters
+        if (len == 0 && newLen == 0)
+            return;
+
+        // Remove the event listeners on the previous filters
         for (i = 0; i < len; i++)
         {
             edFilter = _filters[i] as IEventDispatcher;
@@ -779,11 +779,11 @@
                 edFilter.removeEventListener(BaseFilter.CHANGE, filterChangedHandler);
         }

-		var previous:Boolean = needsDisplayObject;
-	   	_filters = value;
-    	if (previous != needsDisplayObject)
-			invalidateDisplayObjectSharing();
-
+        var previous:Boolean = needsDisplayObject;
+        _filters = value;
+        if (previous != needsDisplayObject)
+            invalidateDisplayObjectSharing();
+
         _clonedFilters = [];

         for (i = 0; i < newLen; i++)
@@ -969,15 +969,15 @@

         var oldMask:UIComponent = _mask as UIComponent;

-    	var previous:Boolean = needsDisplayObject;
-	   	_mask = value;
+        var previous:Boolean = needsDisplayObject;
+        _mask = value;

         // If the old mask was attached by us, then we need to
         // undo the attachment logic
- 		if (oldMask && oldMask.$parent === displayObject)
-        {
-        	if (oldMask.parent is UIComponent)
-            	UIComponent(oldMask.parent).childRemoved(oldMask);
+        if (oldMask && oldMask.$parent === displayObject)
+        {
+            if (oldMask.parent is UIComponent)
+                UIComponent(oldMask.parent).childRemoved(oldMask);
             oldMask.$parent.removeChild(oldMask);
         }

@@ -986,21 +986,21 @@
         // might be null in commitProperties
         if (!_mask || _mask.parent)
         {
-        	if (drawnDisplayObject)
-        		drawnDisplayObject.mask = null;
-
-        	if (_drawnDisplayObject)
-    		{
-    			if (_drawnDisplayObject.parent)
-    				_drawnDisplayObject.parent.removeChild(_drawnDisplayObject);
-    			_drawnDisplayObject = null;
-    		}
+            if (drawnDisplayObject)
+                drawnDisplayObject.mask = null;
+
+            if (_drawnDisplayObject)
+            {
+                if (_drawnDisplayObject.parent)
+                    _drawnDisplayObject.parent.removeChild(_drawnDisplayObject);
+                _drawnDisplayObject = null;
+            }
         }

         maskChanged = true;
         maskTypeChanged = true;
         if (previous != needsDisplayObject)
-			invalidateDisplayObjectSharing();
+            invalidateDisplayObjectSharing();

         invalidateProperties();
     }
@@ -1458,19 +1458,19 @@

     [Inspectable(category="General")]

-	/**
-	 * Indicates the x-axis rotation of the element instance, in degrees, from its original orientation
-	 * relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values
-	 * from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from
-	 * 360 to obtain a value within the range.
-	 *
-	 * This property is ignored during calculation by any of Flex's 2D layouts.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+    /**
+     * Indicates the x-axis rotation of the element instance, in degrees, from its original orientation
+     * relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values
+     * from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from
+     * 360 to obtain a value within the range.
+     *
+     * This property is ignored during calculation by any of Flex's 2D layouts.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public function get rotationX():Number
     {
         return (layoutFeatures == null)? 0:layoutFeatures.layoutRotationX;
@@ -1485,26 +1485,26 @@
             return;

         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
-	   	layoutFeatures.layoutRotationX = value;
-		invalidateTransform(previous != needsDisplayObject);
+        var previous:Boolean = needsDisplayObject;
+        layoutFeatures.layoutRotationX = value;
+        invalidateTransform(previous != needsDisplayObject);
     }

     [Inspectable(category="General")]

-	/**
-	 * Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation
-	 * relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values
-	 * from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from
-	 * 360 to obtain a value within the range.
-	 *
-	 * This property is ignored during calculation by any of Flex's 2D layouts.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+    /**
+     * Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation
+     * relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values
+     * from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from
+     * 360 to obtain a value within the range.
+     *
+     * This property is ignored during calculation by any of Flex's 2D layouts.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public function get rotationY():Number
     {
         return (layoutFeatures == null)? 0:layoutFeatures.layoutRotationY;
@@ -1518,9 +1518,9 @@
             return;

         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
-		layoutFeatures.layoutRotationY = value;
-		invalidateTransform(previous != needsDisplayObject);
+        var previous:Boolean = needsDisplayObject;
+        layoutFeatures.layoutRotationY = value;
+        invalidateTransform(previous != needsDisplayObject);
     }

     [Inspectable(category="General")]
@@ -1546,11 +1546,11 @@
     {
         if (rotationZ == value)
             return;
-
+
         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
-	   	layoutFeatures.layoutRotationZ = value;
-		invalidateTransform(previous != needsDisplayObject);
+        var previous:Boolean = needsDisplayObject;
+        layoutFeatures.layoutRotationZ = value;
+        invalidateTransform(previous != needsDisplayObject);
     }

     [Bindable("propertyChange")]
@@ -1605,11 +1605,11 @@
     {
         if (scaleX == value)
             return;
-
+
         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
-	   	layoutFeatures.layoutScaleX = value;
-		invalidateTransform(previous != needsDisplayObject);
+        var previous:Boolean = needsDisplayObject;
+        layoutFeatures.layoutScaleX = value;
+        invalidateTransform(previous != needsDisplayObject);
     }

     //----------------------------------
@@ -1641,9 +1641,9 @@
             return;

         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
-	   	layoutFeatures.layoutScaleY = value;
-		invalidateTransform(previous != needsDisplayObject);
+        var previous:Boolean = needsDisplayObject;
+        layoutFeatures.layoutScaleY = value;
+        invalidateTransform(previous != needsDisplayObject);
     }

     //----------------------------------
@@ -1673,11 +1673,11 @@
     {
         if (scaleZ == value)
             return;
-
+
         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
-	   	layoutFeatures.layoutScaleZ = value;
-		invalidateTransform(previous != needsDisplayObject);
+        var previous:Boolean = needsDisplayObject;
+        layoutFeatures.layoutScaleZ = value;
+        invalidateTransform(previous != needsDisplayObject);
     }

     //----------------------------------
@@ -1748,15 +1748,15 @@
      */
     public function set transform(value:flash.geom.Transform):void
     {
-    	// FIXME (jszeto): Add perspectiveProjection support
-
-    	var matrix:Matrix = value && value.matrix ? value.matrix.clone() : null;
-    	var matrix3D:Matrix3D = value && value.matrix3D ? value.matrix3D.clone() : null;
-    	var colorTransform:ColorTransform = value ? value.colorTransform : null;
-
+        // FIXME (jszeto): Add perspectiveProjection support
+
+        var matrix:Matrix = value && value.matrix ? value.matrix.clone() : null;
+        var matrix3D:Matrix3D = value && value.matrix3D ? value.matrix3D.clone() : null;
+        var colorTransform:ColorTransform = value ? value.colorTransform : null;
+
         setTransform(value);

-		var previous:Boolean = needsDisplayObject;
+        var previous:Boolean = needsDisplayObject;

         if (_transform)
         {
@@ -1771,8 +1771,8 @@
                 layoutFeatures.layoutMatrix3D = matrix3D;
             }
         }
-
-		setColorTransform(colorTransform);
+
+        setColorTransform(colorTransform);

         invalidateTransform(previous != needsDisplayObject);
     }
@@ -1785,52 +1785,52 @@
         // Clean up the old transform
         var oldTransform:mx.geom.Transform = _transform as mx.geom.Transform;
         if (oldTransform)
-        	oldTransform.target = null;
+            oldTransform.target = null;

         var newTransform:mx.geom.Transform = value as mx.geom.Transform;

         if (newTransform)
-        	newTransform.target = this;
+            newTransform.target = this;

         _transform = value;
     }

     public function setColorTransform(value:ColorTransform):void
     {
-    	if (_colorTransform != value)
-		{
-			var previous:Boolean = needsDisplayObject;
-			// Make a copy of the colorTransform
-			_colorTransform = new ColorTransform(value.redMultiplier, value.greenMultiplier, value.blueMultiplier, value.alphaMultiplier,
-												 value.redOffset, value.greenOffset, value.blueOffset, value.alphaOffset);
-
-			if (displayObject && displayObjectSharingMode == DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT)
+        if (_colorTransform != value)
+        {
+            var previous:Boolean = needsDisplayObject;
+            // Make a copy of the colorTransform
+            _colorTransform = new ColorTransform(value.redMultiplier, value.greenMultiplier, value.blueMultiplier, value.alphaMultiplier,
+                                                 value.redOffset, value.greenOffset, value.blueOffset, value.alphaOffset);
+
+            if (displayObject && displayObjectSharingMode == DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT)
             {
                 displayObject.transform.colorTransform = _colorTransform;
             }
             else
             {
-            	colorTransformChanged = true;
-            	invalidateProperties();
+                colorTransformChanged = true;
+                invalidateProperties();
                 if (previous != needsDisplayObject)
-                	invalidateDisplayObjectSharing();
-            }
+                    invalidateDisplayObjectSharing();
+            }
         }
     }

     /**
-	 * A utility method to update the rotation and scale of the transform while keeping a particular point, specified in the component's own coordinate space,
-	 * fixed in the parent's coordinate space.  This function will assign the rotation and scale values provided, then update the x/y/z properties
-	 * as necessary to keep tx/ty/tz fixed.
-	 * @param rx,ry,rz the new values for the rotation of the transform
-	 * @param sx,sy,sz the new values for the scale of the transform
-	 * @param tx,ty,tz the point, in the component's own coordinates, to keep fixed relative to its parent.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+     * A utility method to update the rotation and scale of the transform while keeping a particular point, specified in the component's own coordinate space,
+     * fixed in the parent's coordinate space.  This function will assign the rotation and scale values provided, then update the x/y/z properties
+     * as necessary to keep tx/ty/tz fixed.
+     * @param rx,ry,rz the new values for the rotation of the transform
+     * @param sx,sy,sz the new values for the scale of the transform
+     * @param tx,ty,tz the point, in the component's own coordinates, to keep fixed relative to its parent.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public function transformAround(transformCenter:Vector3D,
                                     scale:Vector3D = null,
                                     rotation:Vector3D = null,
@@ -1967,7 +1967,7 @@
             return;

         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
+        var previous:Boolean = needsDisplayObject;
         layoutFeatures.transformZ = value;
         invalidateTransform(previous != needsDisplayObject);
     }
@@ -2062,19 +2062,19 @@
     //----------------------------------
     //  depth
     //----------------------------------
-	/**
-	 * Determines the order in which items inside of groups are rendered. Groups order their items based on their depth property, with the lowest depth
-	 * in the back, and the higher in the front.  items with the same depth value will appear in the order they are added to the Groups item list.
-	 *
-	 * defaults to 0
-	 *
-	 * @default 0
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+    /**
+     * Determines the order in which items inside of groups are rendered. Groups order their items based on their depth property, with the lowest depth
+     * in the back, and the higher in the front.  items with the same depth value will appear in the order they are added to the Groups item list.
+     *
+     * defaults to 0
+     *
+     * @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public function get depth():Number
     {
         return (layoutFeatures == null)? 0:layoutFeatures.depth;
@@ -2196,11 +2196,11 @@
     {
         if (z == value)
             return;
-
+
         allocateLayoutFeatures();
-		var previous:Boolean = needsDisplayObject;
-	   	layoutFeatures.layoutZ = value;
-		invalidateTransform(previous != needsDisplayObject);
+        var previous:Boolean = needsDisplayObject;
+        layoutFeatures.layoutZ = value;
+        invalidateTransform(previous != needsDisplayObject);
     }

     //----------------------------------
@@ -2377,7 +2377,7 @@
      */
     protected function get hasComplexLayoutMatrix():Boolean
     {
-    	return (layoutFeatures == null ? false : !MatrixUtil.isDeltaIdentity(layoutFeatures.layoutMatrix))
+        return (layoutFeatures == null ? false : !MatrixUtil.isDeltaIdentity(layoutFeatures.layoutMatrix))
     }

     //----------------------------------
@@ -2534,18 +2534,18 @@
     // to captureBitmapData for hit testing.
     mx_internal function set alwaysCreateDisplayObject(value:Boolean):void
     {
-    	if (value != _alwaysCreateDisplayObject)
-    	{
-    		var previous:Boolean = needsDisplayObject;
-		    _alwaysCreateDisplayObject = value;
-	    	if (previous != needsDisplayObject)
-				invalidateDisplayObjectSharing();
-    	}
+        if (value != _alwaysCreateDisplayObject)
+        {
+            var previous:Boolean = needsDisplayObject;
+            _alwaysCreateDisplayObject = value;
+            if (previous != needsDisplayObject)
+                invalidateDisplayObjectSharing();
+        }
     }

     mx_internal function get alwaysCreateDisplayObject():Boolean
     {
-    	return _alwaysCreateDisplayObject;
+        return _alwaysCreateDisplayObject;
     }

     /**
@@ -2623,7 +2623,7 @@

     protected function get drawnDisplayObject():DisplayObject
     {
-    	// _drawnDisplayObject is non-null if we needed to create a mask
+        // _drawnDisplayObject is non-null if we needed to create a mask
         return _drawnDisplayObject ? _drawnDisplayObject : displayObject;
     }

@@ -2674,12 +2674,12 @@

             var topLevel:Sprite = Sprite(IUIComponent(parent).systemManager);
             var rectBounds:Rectangle = useLocalSpace ?
-            			new Rectangle(getLayoutBoundsX(), getLayoutBoundsY(), getLayoutBoundsWidth(), getLayoutBoundsHeight()) :
-            			displayObject.getBounds(topLevel);
+                        new Rectangle(getLayoutBoundsX(), getLayoutBoundsY(), getLayoutBoundsWidth(), getLayoutBoundsHeight()) :
+                        displayObject.getBounds(topLevel);
             var bitmapData:BitmapData = new BitmapData(Math.ceil(rectBounds.width), Math.ceil(rectBounds.height), transparent, fillColor);

-           	var m:Matrix = useLocalSpace ? displayObject.transform.matrix : displayObject.transform.concatenatedMatrix;
+            var m:Matrix = useLocalSpace ? displayObject.transform.matrix : displayObject.transform.concatenatedMatrix;

             if (m)
                 m.translate(-rectBounds.x, -rectBounds.y);
@@ -2709,11 +2709,11 @@
      */
     private function get3DSnapshot(transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF, useLocalSpace:Boolean = true):BitmapData
     {
-    	var topLevel:Sprite = Sprite(IUIComponent(parent).systemManager);
-    	var dispObjParent:DisplayObjectContainer = displayObject.parent;
-    	var drawSprite:Sprite = new Sprite();
+        var topLevel:Sprite = Sprite(IUIComponent(parent).systemManager);
+        var dispObjParent:DisplayObjectContainer = displayObject.parent;
+        var drawSprite:Sprite = new Sprite();

-    	// Get the visual bounds of the target in both local and global coordinates
+        // Get the visual bounds of the target in both local and global coordinates
         var topLevelRect:Rectangle = displayObject.getBounds(topLevel);
         var displayObjectRect:Rectangle = displayObject.getBounds(dispObjParent);

@@ -2726,48 +2726,48 @@

         // Remove the target from its current parent, making sure to store the child index
-    	var childIndex:int = dispObjParent.getChildIndex(displayObject);
-    	if (dispObjParent is Group)
-    		Group(dispObjParent).$removeChild(displayObject);
-    	else
-    		dispObjParent.removeChild(displayObject);
+        var childIndex:int = dispObjParent.getChildIndex(displayObject);
+        if (dispObjParent is Group)
+            Group(dispObjParent).$removeChild(displayObject);
+        else
+            dispObjParent.removeChild(displayObject);

         // Parent the target to the drawSprite and then attach the drawSprite to the stage
         topLevel.addChild(drawSprite);
         drawSprite.addChild(displayObject);

-		// Assign the globally translated matrix to the target
-		if (useLocalSpace)
-		{
-	        newMat3D.position = globalMat3D.position;
-	        displayObject.transform.matrix3D = newMat3D;
+        // Assign the globally translated matrix to the target
+        if (useLocalSpace)
+        {
+            newMat3D.position = globalMat3D.position;
+            displayObject.transform.matrix3D = newMat3D;
         }
-  		else
-  		{
-  			displayObject.transform.matrix3D = globalMat3D;
-    	}
+        else
+        {
+            displayObject.transform.matrix3D = globalMat3D;
+        }
         // Translate the bitmap so that the left-top bounds ends up at (0,0)
-		var m:Matrix = new Matrix();
-		m.translate(-topLevelRect.left, - topLevelRect.top);
-
+        var m:Matrix = new Matrix();
+        m.translate(-topLevelRect.left, - topLevelRect.top);
+
         // Draw to the bitmapData
         var snapshot:BitmapData = new BitmapData( topLevelRect.width, topLevelRect.height, transparent, fillColor);
         snapshot.draw(drawSprite, m, null, null, null, true);

-       	// Remove target from temporary sprite and remove temp sprite from stage
+        // Remove target from temporary sprite and remove temp sprite from stage
         drawSprite.removeChild(displayObject);
         topLevel.removeChild(drawSprite);
-
-    	// Reattach the target to its original parent at its original child position
-    	if (dispObjParent is Group)
-    		Group(dispObjParent).$addChildAt(displayObject, childIndex);
-    	else
-    		dispObjParent.addChildAt(displayObject, childIndex);
-
+
+        // Reattach the target to its original parent at its original child position
+        if (dispObjParent is Group)
+            Group(dispObjParent).$addChildAt(displayObject, childIndex);
+        else
+            dispObjParent.addChildAt(displayObject, childIndex);
+
         // Restore the original 3D matrix
         displayObject.transform.matrix3D = oldMat3D;

-    	return snapshot;
+        return snapshot;
     }

     /**
@@ -3002,12 +3002,12 @@
         // If we are the first in the sequence, setup the displayObject properties
         if (displayObjectSharingMode != DisplayObjectSharingMode.USES_SHARED_OBJECT && displayObject)
         {
-			if (colorTransformChanged || displayObjectChanged)
-			{
-				colorTransformChanged = false;
-				if (_colorTransform)
-					displayObject.transform.colorTransform = _colorTransform;
-			}
+            if (colorTransformChanged || displayObjectChanged)
+            {
+                colorTransformChanged = false;
+                if (_colorTransform)
+                    displayObject.transform.colorTransform = _colorTransform;
+            }

             if (alphaChanged || displayObjectChanged)
             {
@@ -3037,51 +3037,51 @@

                 if (_mask)
                 {
-                	// If the mask is not parented, then we need to parent it.
-                	// Since a mask can not be a child of the maskee,
-                	// we make the mask and maskee siblings. We create a new maskee
-                	// called _drawnDisplayObject. Then we attach both the mask
-                	// and maskee to displayObject.
-	                if (!_mask.parent)
-	                {
-	                	Sprite(displayObject).addChild(_mask);
-	                	var maskComp:UIComponent = _mask as UIComponent;
-		                if (maskComp)
-		                {
-		                	if (parent)
-		                	{
-		                		// Add the mask to the UIComponent document tree.
-		                		// This is required to properly render the mask.
-		                		UIComponent(parent).addingChild(maskComp);
-		                		UIComponent(parent).childAdded(maskComp);
-		                	}
-
-		                	// Size the mask so that it actually renders
-		                    maskComp.validateProperties();
-		                    maskComp.validateSize();
-		                    // Call this to force the mask to complete initialization
-		                    maskComp.invalidateDisplayList();
-		                    maskComp.setActualSize(maskComp.getExplicitOrMeasuredWidth(),
-		                                           maskComp.getExplicitOrMeasuredHeight());
-
-		                }
-
-		                if (!_drawnDisplayObject)
-						{
-							// Clear the original displayObject because it might have previously
-							// drawn the shape.
-							if (displayObject is Sprite)
-								Sprite(displayObject).graphics.clear();
-							else if (displayObject is Shape)
-								Shape(displayObject).graphics.clear();
-
-							// Create a new target for the drawing commands
-							_drawnDisplayObject = new InvalidatingSprite();
-							Sprite(displayObject).addChild(_drawnDisplayObject);
-						}
-	                }
-
-	                drawnDisplayObject.mask = _mask;
+                    // If the mask is not parented, then we need to parent it.
+                    // Since a mask can not be a child of the maskee,
+                    // we make the mask and maskee siblings. We create a new maskee
+                    // called _drawnDisplayObject. Then we attach both the mask
+                    // and maskee to displayObject.
+                    if (!_mask.parent)
+                    {
+                        Sprite(displayObject).addChild(_mask);
+                        var maskComp:UIComponent = _mask as UIComponent;
+                        if (maskComp)
+                        {
+                            if (parent)
+                            {
+                                // Add the mask to the UIComponent document tree.
+                                // This is required to properly render the mask.
+                                UIComponent(parent).addingChild(maskComp);
+                                UIComponent(parent).childAdded(maskComp);
+                            }
+
+                            // Size the mask so that it actually renders
+                            maskComp.validateProperties();
+                            maskComp.validateSize();
+                            // Call this to force the mask to complete initialization
+                            maskComp.invalidateDisplayList();
+                            maskComp.setActualSize(maskComp.getExplicitOrMeasuredWidth(),
+                                                   maskComp.getExplicitOrMeasuredHeight());
+
+                        }
+
+                        if (!_drawnDisplayObject)
+                        {
+                            // Clear the original displayObject because it might have previously
+                            // drawn the shape.
+                            if (displayObject is Sprite)
+                                Sprite(displayObject).graphics.clear();
+                            else if (displayObject is Shape)
+                                Shape(displayObject).graphics.clear();
+
+                            // Create a new target for the drawing commands
+                            _drawnDisplayObject = new InvalidatingSprite();
+                            Sprite(displayObject).addChild(_drawnDisplayObject);
+                        }
+                    }
+
+                    drawnDisplayObject.mask = _mask;
                 }
             }

@@ -3312,8 +3312,8 @@
      */
     mx_internal function doUpdateDisplayList():void
     {
-		if (visible || displayObjectSharingMode == DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT)
-    		updateDisplayList(_width, _height);
+        if (visible || displayObjectSharingMode == DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT)
+            updateDisplayList(_width, _height);
     }

     /**
@@ -3449,9 +3449,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
     {
@@ -3484,9 +3484,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
     {
@@ -3852,49 +3852,49 @@
     mx_internal function applyComputedTransform():void
     {
         if (layoutFeatures != null)
-	        layoutFeatures.updatePending = false;
+            layoutFeatures.updatePending = false;

         // Only the first elment in the sequence updates the transform
         if (displayObjectSharingMode == DisplayObjectSharingMode.USES_SHARED_OBJECT || !displayObject)
             return;

         if (layoutFeatures != null)
-        {
-	        if (layoutFeatures.is3D)
-	        {
-	            displayObject.transform.matrix3D = layoutFeatures.computedMatrix3D;
-	        }
-	        else
-	        {
-	        	var m:Matrix = layoutFeatures.computedMatrix.clone();
-	        	// If the displayObject is shared, then put it at 0,0
-	        	if (displayObjectSharingMode == DisplayObjectSharingMode.OWNS_SHARED_OBJECT)
-	        	{
-	        		m.tx = 0;
-	        		m.ty = 0;
-	        	}
-	            displayObject.transform.matrix = m;
-	        }
+        {
+            if (layoutFeatures.is3D)
+            {
+                displayObject.transform.matrix3D = layoutFeatures.computedMatrix3D;
+            }
+            else
+            {
+                var m:Matrix = layoutFeatures.computedMatrix.clone();
+                // If the displayObject is shared, then put it at 0,0
+                if (displayObjectSharingMode == DisplayObjectSharingMode.OWNS_SHARED_OBJECT)
+                {
+                    m.tx = 0;
+                    m.ty = 0;
+                }
+                displayObject.transform.matrix = m;
+            }
         }
         else
         {
-        	// If the displayObject is shared, then put it at 0,0
-        	if (displayObjectSharingMode == DisplayObjectSharingMode.OWNS_SHARED_OBJECT)
-        	{
+            // If the displayObject is shared, then put it at 0,0
+            if (displayObjectSharingMode == DisplayObjectSharingMode.OWNS_SHARED_OBJECT)
+            {
                 displayObject.x = 0;
                 displayObject.y = 0;
-        	}
-        	else
-        	{
+            }
+            else
+            {
                 displayObject.x = _x;
                 displayObject.y = _y;
-        	}
+            }
         }
     }

     mx_internal function getComplexMatrix(performCheck:Boolean):Matrix
     {
-    	return performCheck && hasComplexLayoutMatrix ? layoutFeatures.layoutMatrix : null;
+        return performCheck && hasComplexLayoutMatrix ? layoutFeatures.layoutMatrix : null;
     }

     static private var _strokeExtents:Point = new Point();
@@ -3904,7 +3904,7 @@
     // now we assume they are the same on both sides.
     protected function getStrokeExtents(postLayoutTransform:Boolean = true):Point
     {
-		return _strokeExtents;
+        return _strokeExtents;
     }

     //--------------------------------------------------------------------------


- allows Flash controls to work with JavaScript

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -148,9 +148,8 @@
 			_pauseButton.visible = false;
 			_duration = _controlBar.getChildByName("duration_txt") as TextField;
 			_currentTime = _controlBar.getChildByName("currentTime_txt") as TextField;
-			if (!_showControls) {
-				_controlBar.visible = false;
-			}
+
+			_controlBar.visible = _showControls;
 			addChild(_controlBar);

 						// put back on top
@@ -181,7 +180,7 @@
 			positionControls();

-			if (ExternalInterface.available && !_showControls) {
+			if (ExternalInterface.available) { //  && !_showControls

 				_output.appendText("Adding callbacks...\n");
 				try {
@@ -434,9 +433,9 @@
 			*/

 			// use set timeout for performance reasons
-			if (!_showControls) {
+			//if (!_showControls) {
 				ExternalInterface.call("setTimeout", "mejs.MediaPluginBridge.fireEvent('" + ExternalInterface.objectID + "','" + eventName + "'," + eventValues + ")",0);
-			}
+			//}
 		}

 		function secondsToTimeCode(seconds:Number):String {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2724
Author:   egeorgie@adobe.com
Date:     2008-08-04T17:33:18.787713Z

Log Message:
-----------
Add target property to ILayoutItem
Make ILayoutItemUIC work with IUIComponent
Switch Group.GetLayoutItemAt() to return ILayoutItem

Reviewed by Ryan, Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemFDO.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/intf/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemUIC.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -2309,6 +2309,15 @@
     //--------------------------------------------------------------------------

     /**
+     *  @return Returns a reference to the object in the layout tree
+     *  represented by this interface.
+     */
+    public function get target():Object
+    {
+        return this;
+    }
+
+    /**
      *  @return Returns the transformation matrix for this element, or null
      *  if it is detla identity.
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

--- frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as
+++ frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.rpc
 {


Bug 542956 -  Add support for dumping pools to abcdump (r=stejohns)

--- utils/abcdump.as
+++ utils/abcdump.as
@@ -65,7 +65,8 @@
     "",
     " -abs Print the bytecode, but no information about the ABC",
     " -api Print the public API exposed by this abc/swf",
-    " -mdversions Use in conjunction with -api when the abc/swf uses old-style versioning"
+    " -mdversions Use in conjunction with -api when the abc/swf uses old-style versioning",
+    " -dumppools Print out the contents of the constant pools"
     ].join("\n");

     const TAB = "  "
@@ -267,6 +268,10 @@
         function Tuple(k:String, v:String) {
             key = k
             value = v
+        }
+
+        public function toString() {
+            return key + "=" + value
         }
     }

@@ -737,6 +742,22 @@
                 return result;
             return   result & 0x0fffffff | data.readUnsignedByte()<<28;
         }
+
+        function dumpPool(name:String, pool:Array)
+        {
+            if(!doDumpPools)
+                return
+
+            for(var i:int = 0; i<pool.length; i++)
+                infoPrint(name + "[" + i + "] = " + pool[i])
+        }
+
+        function padString(s:String, l:uint)
+        {
+            if(s.length < l)
+                return padString(s + " ", l)
+            return s
+        }

         function parseCpool()
         {
@@ -751,18 +772,21 @@
             ints = [0]
             for (i=1; i < n; i++)
                 ints[i] = readU32()
-
+            dumpPool("int", ints)
+
             // uints
             n = readU32()
             uints = [0]
             for (i=1; i < n; i++)
                 uints[i] = uint(readU32())
-
+            dumpPool("uint", uints)
+
             // doubles
             n = readU32()
             doubles = [NaN]
             for (i=1; i < n; i++)
                 doubles[i] = data.readDouble()
+            dumpPool("double", doubles)

             infoPrint("Cpool numbers size "+(data.position-start)+" "+int(100*(data.position-start)/data.length)+" %")
             start = data.position
@@ -772,6 +796,7 @@
             strings = [""]
             for (i=1; i < n; i++)
                 strings[i] = data.readUTFBytes(readU32())
+            dumpPool("string", strings)

             infoPrint("Cpool strings count "+ n +" size "+(data.position-start)+" "+int(100*(data.position-start)/data.length)+" %")
             start = data.position
@@ -780,7 +805,7 @@
             n = readU32()
             namespaces = [publicNs]
             var nskind = 0;
-            for (i=1; i < n; i++)
+            for (i=1; i < n; i++) {
                 switch (nskind = data.readByte())
                 {
                 case CONSTANT_Namespace:
@@ -798,6 +823,9 @@
                     namespaces[i] = new ABCNamespace("private", nskind)
                     break;
                 }
+                if(doDumpPools)
+                    infoPrint("namespace[" + i + "] = " + padString(constantKinds[nskind], 20) + ": " + namespaces[i].uri)
+            }

             infoPrint("Cpool namespaces count "+ n +" size "+(data.position-start)+" "+int(100*(data.position-start)/data.length)+" %")
             start = data.position
@@ -809,8 +837,14 @@
             {
                 var count:int = readU32()
                 var nsset = nssets[i] = []
-                for (j=0; j < count; j++)
-                    nsset[j] = namespaces[readU32()]
+                var nsids = []
+                for (j=0; j < count; j++) {
+                    var nsid = readU32()
+                    nsids.push(nsid)
+                    nsset[j] = namespaces[nsid]
+                }
+                if(doDumpPools)
+                    infoPrint("nsset[" + i + "] = {" + nsids.join(", ") + "}")
             }

             infoPrint("Cpool nssets count "+ n +" size "+(data.position-start)+" "+int(100*(data.position-start)/data.length)+" %")
@@ -821,8 +855,9 @@
             names = [null]
             namespaces[0] = anyNs
             strings[0] = "*" // any name
-            for (i=1; i < n; i++)
-                switch (data.readByte())
+            for (i=1; i < n; i++) {
+                var nametype = data.readByte()
+                switch (nametype)
                 {
                 case CONSTANT_Qname:
                 case CONSTANT_QnameA:
@@ -867,6 +902,9 @@
                 default:
                     throw new Error("invalid kind " + data[data.position-1])
                 }
+                if(doDumpPools)
+                    infoPrint("name[" + i + "] = " + padString(constantKinds[nametype], 12) + ": " + names[i])
+            }

             infoPrint("Cpool names count "+ n +" size "+(data.position-start)+" "+int(100*(data.position-start)/data.length)+" %")
             start = data.position
@@ -949,6 +987,9 @@

                 for(var q:int = 0; q < values_count; ++q)
                     m.addPair(keys[q], values[q])
+
+                if(doDumpPools)
+                    infoPrint("metadata[" + i + "] = {" + m.tuples.join(", ") + "}")
             }
             infoPrint("MetadataInfo count " +values_count+ " size "+(data.position-start)+" "+int(100*(data.position-start)/data.length)+" %")
         }
@@ -1428,6 +1469,8 @@
             doExtractInfo = false
         } else if (arg == '-mdversions') {
             useMetadataVersions = true
+        } else if (arg == '-pools') {
+            doDumpPools = true
         } else {
             print('Unknown option '+arg)
             help()
@@ -1448,6 +1491,7 @@
     var doExtractInfo = true
     var doExtractAbs = true
     var doDumpAPI = false
+    var doDumpPools = false
     var useMetadataVersions = false
     var currentFname = ''
     var currentFcount = 0


Bug 723448: abcdump: undo in readUTFBytes leading UTF BOM compensation (r=edwsmith).

--- utils/abcdump.as
+++ utils/abcdump.as
@@ -947,8 +947,28 @@
             // strings
             n = readU32()
             strings = [""]
-            for (i=1; i < n; i++)
-                strings[i] = data.readUTFBytes(readU32())
+            for (i=1; i < n; i++) {
+                var len = readU32();
+                var posPreRead = data.position;
+                strings[i] = data.readUTFBytes(len);
+                // Bugzilla 723448: ByteArray.readUTFBytes deliberately
+                // skips an initial UTF8 BOM in the input.  Compensate
+                // for this here.
+                if (len >= 3 && (data[posPreRead+0] == 0xEF &&
+                                 data[posPreRead+1] == 0xBB &&
+                                 data[posPreRead+2] == 0xBF)) {
+                    // First, double-check that readUTFBytes is still
+                    // compensating for UTF8 BOM.  (Presumed rare and
+                    // thus not worth caching or precomputing.)
+                    var tempByteArray = new ByteArray();
+                    tempByteArray.writeUTFBytes('\ufeff');
+                    tempByteArray.position = 0;
+                    var s = tempByteArray.readUTFBytes(tempByteArray.length);
+                    if (s == "") {
+                        strings[i] = '\ufeff'+strings[i];
+                    }
+                }
+            }
             dumpPool("string", strings)

             infoPrint("Cpool strings count "+ n +" size "+(data.position-start)+" "+int(100*(data.position-start)/data.length)+" %")


updateParts() while isPlaying

updateParts() while isPlaying

--- src/sssplayer/display/SSSPlayer.as
+++ src/sssplayer/display/SSSPlayer.as
@@ -121,6 +121,7 @@
 				}
 				this.dispatchEventWith(Event.COMPLETE);
 			}
+			this.updateParts();
 		}

 		private function prepareChildren():void {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19131
Author:   egeorgie@adobe.com
Date:     2010-12-08T01:57:27.424504Z

Log Message:
-----------
Fix issues with density scaling and transitions.

In this change:
- apply the inverse concatenated matrix to the transition bitmap snapshot
- use faster version of the bitmap snapshot function - draw only once, no read-back from the bitmap data for bounds detection.

QE notes:
Doc notes:
Bugs:
Reviewer: Corey
Tests run: checkintests, manual testing
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
@@ -26,6 +26,7 @@
 import mx.effects.Parallel;
 import mx.events.EffectEvent;
 import mx.events.FlexEvent;
+import mx.managers.SystemManager;

 import spark.components.Group;
 import spark.components.TabbedViewNavigator;
@@ -236,7 +237,7 @@
         // Snapshot the entire navigator.
         var oldVisibility:Boolean = endView.visible;
         endView.visible = false;
-        cachedNavigator = getSnapshot(targetNavigator);
+        cachedNavigator = getSnapshot(targetNavigator, 0);
         endView.visible = oldVisibility;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19485
Author:   smgilson@adobe.com
Date:     2010-12-20T20:53:01.165223Z

Log Message:
-----------
ASDoc updates

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

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
@@ -52,6 +52,8 @@

 /**
  *  Dispatched when the transition starts.
+ *
+ *  @eventType mx.events.FlexEvent.TRANSITION_START
  *
  *  @langversion 3.0
  *  @playerversion AIR 2.5
@@ -60,7 +62,9 @@
 [Event(name="transitionStart", type="mx.events.FlexEvent")]

 /**
- *  Dispatched when the transition is complete.
+ *  Dispatched when the transition completes.
+ *
+ *  @eventType mx.events.FlexEvent.TRANSITION_START
  *
  *  @langversion 3.0
  *  @playerversion AIR 2.5
@@ -73,7 +77,7 @@
  *  The ViewTransitionBase class is the base class for all view transitions.
  *  It is not intended to be used as a transition on its own.
  *  In addition to providing common convenience and helper methods used by
- *  view transitions this class also provides a default action bar transition
+ *  view transitions, this class provides a default action bar transition
  *  sequence.
  *
  *
When a view transition is initialized, the owning view navigator
@@ -82,28 +86,30 @@
  *  The navigator property is
  *  set to the view navigator.

  *
- *
The lifecycle of a transition starts with
- *  the captureStartValues() method.
- *  When this method is called, the navigator is currently in the
- *  start state.
- *  At this time, the transition should capture any start values
- *  or bitmaps that it requires.
- *  Afterwards, a validation pass on the pending
- *  view and captureEndValues() is called.
- *  At this time, the transition captures any properties or
- 8  bitmaps representations from the pending view.

- *
- *
The prepareForPlay() method is then called,
- *  which allows the transition  to perform any further preparation,
- *  such as preparing a Spark effects sequence,
- *  or positioning transient elements on the display list.

- *
- *
After a final validation pass, if necessary, the play() method
- *  is called by the navigator to perform the actual transition.
- *  Prior to any animation starting, the start event is dispatched.

- *
- *
When a transition completes, it is required to dispatch an
- *  end event.

+ *
The lifecycle of a transition is as follows:

+ *

+ *
The transition starts with
+ *        the captureStartValues() method.
+ *        When this method is called, the navigator is currently in the
+ *        start state.
+ *        At this time, the transition should capture any start values
+ *        or bitmaps that it requires.

+ *
A validation pass is performed on the pending
+ *        view, and the captureEndValues() method is called.
+ *        At this time, the transition captures any properties or
+ *        bitmaps representations from the pending view.

+ *
The prepareForPlay() method is then called,
+ *        which allows the transition to perform any further preparations,
+ *        such as preparing a Spark effects sequence,
+ *        or positioning transient elements on the display list.

+ *
After a final validation pass, if necessary,
+ *        the play() method is called by the navigator
+ *        to perform the actual transition.

+ *
Prior to any animation starting, the start
+ *        event is dispatched.

+ *
When a transition completes, it dispatches an
+ *        end event.

+ *

  *
  *
Note:Create and configure view transitions in ActionScript;
  *  you cannot create them in MXML.

@@ -247,6 +253,8 @@
      *  transition animation.
      *
      *  @default Sine(.5);
+     *
+     *  @see spark.effects.easing
      *
      *  @langversion 3.0
      *  @playerversion AIR 2.5
@@ -303,8 +311,8 @@
     private var _endView:View;

     /**
-     *  Reference to the view that the navigator is transitioning
-     *  to, set by the owning ViewNavigator itself.
+     *  The view that the navigator is transitioning
+     *  to, as set by the owning ViewNavigator object.
      *  This property can be null.
      *
      *  @default null
@@ -362,8 +370,8 @@
     private var _startView:View;

     /**
-     *  Reference to the currently active view of the view navigator,
-     *  set by the owning view navigator.
+     *  The currently active view of the view navigator,
+     *  as set by the owning view navigator.
      *  This property can be null.
      *
      *  @langversion 3.0
@@ -390,12 +398,17 @@
     private var _suspendBackgroundProcessing:Boolean = true;

     /**
-     *  When set to true,
UIComponent.suspendBackgroundProcessing()

-     *  is invoked prior to the transition playing. This has the effect of disabling Flex's
-     *  layout manager and improving performance. Upon completion of the transition,
-     *  full layout manager function is restored via
UIComponent.resumeBackgroundProcessing()

+     *  When set to true, the UIComponent.suspendBackgroundProcessing()
+     *  method is invoked prior to the transition playing.
+     *  This disables Flex's layout manager and improving performance.
+     *  Upon completion of the transition,
+     *  the layout manager function is restored by a call to the
+     *  UIComponent.resumeBackgroundProcessing() method.
      *
      *  @default false
+     *
+     *  @see mx.core.UIComponent#suspendBackgroundProcessing()
+     *  @see mx.core.UIComponent#resumeBackgroundProcessing()
      *
      *  @langversion 3.0
      *  @playerversion AIR 2.5
@@ -430,9 +443,8 @@
      *
      *
Note that even when set to false, there are cases
      *  where its not feasible to transition the action bar.
-     *  For example, when the action bar
-     *  does not exist in one of the two views, or
-     *  if the action bar changes size.

+     *  For example, when the action bar does not exist in one of
+     *  the two views, or if the action bar changes size.

      *
      *  @default false
      *
@@ -759,7 +771,7 @@
      *  Called by the default prepareForPlay() implementation,
      *  this method is responsible for creating the Spark effect
      *  played on the action bar when the transition starts.
-     *  This method should be overridden by sub classes if a custom action bar
+     *  This method should be overridden by subclasses if a custom action bar
      *  effect is required.
      *  By default, this method returns a basic action bar effect.
      *
@@ -1129,16 +1141,20 @@
     }

     /**
-     *  Helper method used to determine if we can safely transition our
-     *  control bar content independently of our views.
-     *
-     *
 We will not be able to transition our action bar independently if
-     *  our containing navigator is a TabbedViewNavigator and its tabBar's
-     *  visibility changes between views, if the value of the overlayControls
-     *  flag changes between views, or if the size/visibility of the action
-     *  bar changes between views.

-     *
-     *  @return false if we determine controls bars between views are
+     *  Determine if Flex can perform a transition on
+     *  action bar or tab bar content independently of the views.
+     *
+     *
Flex cannot perform a transition on the control bars independently:

+     *

+     *
If the containing view navigator is a TabbedViewNavigator
+     *        and its tab bar's visibility changes between views.

+     *
If the value of the view navigator's overlayControls
+     *        property changes between views.

+     *
If the size or visibility of the action bar changes
+     *        between views.

+     *

+     *
+     *  @return false if Flex determines controls bars between views are
      *  incompatible in some way.
      *
      *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 20537
Author:   chiedozi@adobe.com
Date:     2011-03-02T04:23:09.889338Z

Log Message:
-----------
Fixed a bug in FlipViewTransition and ZoomViewTransition where the transitions were incorrectly re-parenting the animated navigator

QE notes:
Doc notes:
Bugs: SDK-29784
Reviewer: Corey
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as
@@ -312,11 +312,13 @@
         cachedNavigatorGroup.addElement(cachedNavigator);
         cachedNavigator.includeInLayout = false;

+		var targetNavigatorIndex:int = getComponentChildIndex(targetNavigator, targetNavigator.parent as UIComponent);
+
         // Add our temporary transition group to our target navigator's parent
         // so we can make it and the original navigator siblings.
         if (mode == ZoomViewTransitionMode.OUT)
         {
-            addComponentToContainer(cachedNavigatorGroup, DisplayObjectContainer(targetNavigator).parent as UIComponent);
+            addComponentToContainerAt(cachedNavigatorGroup, DisplayObjectContainer(targetNavigator).parent as UIComponent, targetNavigatorIndex + 1);

             // We'll be zooming out our cachedNavigatorGroup.
             transitionGroup = cachedNavigatorGroup;
@@ -325,7 +327,7 @@
         {
             transitionGroup = new Group();
             transitionGroup.includeInLayout = false;
-            addComponentToContainer(cachedNavigatorGroup, DisplayObjectContainer(targetNavigator).parent as UIComponent);
+            addComponentToContainerAt(cachedNavigatorGroup, DisplayObjectContainer(targetNavigator).parent as UIComponent, targetNavigatorIndex);

             // We'll be zooming in our snapshot of the new navigator. Host our
             // snapshot and make sure it's rendered.


Transferred from the Adobe Open Source Subversion Repository

Revision: 7274
Author:   chaase@adobe.com
Date:     2009-05-26T17:35:32.210331Z

Log Message:
-----------
Fixed several feature-complete effects bugs, plus one ScrollBar bug.

QE Notes: None
Doc Notes: None
Bugs: sdk-21093, sdk-21130, sdk-21243, sdk-21128, sdk-20698, sdk-20125, sdk-21138
Reviewer: Jason
tests: checkintests mustella effects cyclone

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/AnimationTarget.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/spark/effects/AnimateTransform.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/AnimationTarget.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/AnimationTarget.as
@@ -18,6 +18,7 @@
 {
     public var updateFunction:Function;
     public var startFunction:Function;
+    public var stopFunction:Function;
     public var endFunction:Function;
     public var repeatFunction:Function;

@@ -38,6 +39,12 @@
             endFunction(animation);
     }

+    public function animationStop(animation:Animation):void
+    {
+        if (stopFunction != null)
+            stopFunction(animation);
+    }
+
     public function animationRepeat(animation:Animation):void
     {
         if (repeatFunction != null)


mapSubmachines, that

mapSubmachines, that

--- src/com/phylake/fsm/impl/Fsm.as
+++ src/com/phylake/fsm/impl/Fsm.as
@@ -8,26 +8,56 @@
     {
         public var unmappedEventException:Boolean;
         public var noTransitionException:Boolean;
-
+
         /*
           key: IEvent.name
         value: [ITransition]
         */
         protected var _eventMap:Object = {};
         protected var _events:Vector.<IEvent> = new Vector.<IEvent>;
+        protected var _states:Vector.<IState> = new Vector.<IState>;
         protected var _initialState:IState;
         protected var _currentState:IState;
         protected var _inEventLoop:Boolean;
+        protected var _that:IFsm;
+
+        /**
+         * An optional IFsm to use instead of this.
+         */
+        public function set that(value:IFsm):void
+        {
+            _that = value;
+        }

         public function init(value:IState):void
         {
             _initialState = _currentState = value;
         }

+        public function reset():void
+        {
+            mapSubmachines(function(value:Object):void {
+                if ("reset" in value)
+                {
+                    value.reset();
+                }
+            });
+
+            _currentState = _initialState;
+        }
+
         public function destroy():void
         {
+            mapSubmachines(function(value:Object):void {
+                if ("destroy" in value)
+                {
+                    value.destroy();
+                }
+            });
+
             _eventMap = null;
             _events = null;
+            _states = null;
             _initialState = null;
             _currentState = null;
         }
@@ -38,7 +68,10 @@
         }

         // TODO validate reachability of states
-        public function set states(value:Vector.<IState>):void {}
+        public function set states(value:Vector.<IState>):void
+        {
+            _states = value;
+        }

         public function mapEvent(event:String, it:ITransition):void
         {
@@ -56,11 +89,28 @@
             eventLoop();
         }

+        /**
+         * Map a function f over the submachines of all states
+         * @param f function(value:Fsm):void
+         */
+        public function mapSubmachines(f:Function):void
+        {
+            if (!_states) return;
+            for each (var state:IState in _states)
+            {
+                if (!state.subMachines) continue;
+                for each (var submachine:IFsm in state.subMachines)
+                {
+                    f(submachine);
+                }
+            }
+        }
+
         protected function executeAction(action:IAction, event:IEvent):void
         {
             if (action)
             {
-                action.execute(this, event);
+                action.execute(_that || this, event);
             }
         }

@@ -70,6 +120,11 @@
             {
                 for each (var fsm:IFsm in state.subMachines)
                 {
+                    if (fsm is Fsm)
+                    {
+                        Fsm(fsm).that = this._that;
+                    }
+
                     fsm.pushEvent(event);
                 }
             }
@@ -95,6 +150,8 @@
                     {
                         throw new IllegalOperationError("event " + event.name + " isn't mapped");
                     }
+
+                    executeSubmachines(currentState, event);
                     continue;
                 }

@@ -109,7 +166,7 @@
                     {
                         for each (guard in transition.guards)
                         {
-                            if (guard.evaluate(this, event))
+                            if (guard.evaluate(_that || this, event))
                             {
                                 if (trueGuard)
                                 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8847
Author:   aharui@adobe.com
Date:     2009-07-28T02:07:59.326177Z

Log Message:
-----------
Fix an injection from Frame1 cleanup.  Also a side-effect of the tabChildren change

QE Notes: None
Doc Notes: None
Bugs: SDK-22222
Reviewer: Mustella
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/components/ComboBox, NumericStepper, DateField, PopUpButton, mustella/gumbo/DropDownList mustella/MarshallPlan

Modified Paths:
--------------
<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/spark/src/spark/components/DropDownList.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/framework/src/mx/managers/systemClasses/MarshallingSupport.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/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>

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

--- frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as
+++ frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as
@@ -141,6 +141,7 @@
 		systemManager.addEventListener("getScreen", Stage_resizeHandler);
 		var awm:ActiveWindowManager =
 			ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
+		awm.addEventListener("removeFocusManager", removeFocusManagerHandler);
 		awm.addEventListener("activateForm", activateFormHandler);
 		awm.addEventListener("activatedForm", activatedFormHandler);
 		awm.addEventListener("deactivateForm", deactivateFormHandler);
@@ -766,7 +767,7 @@
 	/**
 	 *  @inheritDoc
 	 */
-    public function removeFocusManager(event:FocusEvent):void
+    public function removeFocusManagerHandler(event:FocusEvent):void
 	{
 		dispatchDeactivatedWindowEvent(DisplayObject(event.relatedObject));
 	}


FLEX-35321 Refined tests, including checking for how many validation steps happen for size, properties and display list. Without the fix all those expected to fail fail (the last one is not expected to fail without the fix, because it's there just to make sure no regression is introduced by the fix), while with the fix all of them pass.

--- frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
+++ frameworks/projects/framework/tests/mx/managers/LayoutManager_FLEX_35321_Tests.as
@@ -5,6 +5,8 @@
     import mx.core.UIComponentGlobals;
     import mx.core.mx_internal;
     import mx.events.FlexEvent;
+
+    import org.flexunit.assertThat;

     import org.flexunit.asserts.assertEquals;
     import org.flexunit.asserts.assertNotNull;
@@ -28,7 +30,7 @@
             _creationCompleteCalls = 0;
             _objectWhichIsRemovedAtValidation = new SomeComponent();
             _objectWhichIsRemovedAtValidation.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
-            UIImpersonator.addChild(_objectWhichIsRemovedAtValidation);
+            UIImpersonator.addElement(_objectWhichIsRemovedAtValidation);
         }

         [After]
@@ -45,7 +47,6 @@
         //
         //--------------------------------------------------------------------------

-
         [Test]
         public function test_object_removed_from_stage_via_code_is_not_initialized():void
         {
@@ -54,10 +55,14 @@
             _objectWhichIsRemovedAtValidation.removeFromStageOnValidateProperties = true;

             //when
+            _objectWhichIsRemovedAtValidation.invalidateProperties();
+            _objectWhichIsRemovedAtValidation.invalidateSize();
+            _objectWhichIsRemovedAtValidation.invalidateDisplayList();
             _objectWhichIsRemovedAtValidation.validateNow();

             //then
             then_assert_not_initialized();
+            assert_validation_count(1, 0, 0);
         }

@@ -67,7 +72,6 @@
         //  Test method
         //
         //--------------------------------------------------------------------------
-

         [Test(async, timeout=500)]
         public function test_object_removed_from_stage_via_user_action_is_not_initialized():void
@@ -84,7 +88,7 @@
             //then wait 1 frame
             noEnterFramesRemaining = 1;
             UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
-            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_remove_from_stage_via_callLater, 300, then_assert_not_initialized);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_remove_from_stage_via_callLater, 300, {nextStep:then_assert_not_initialized_but_partially_validated, afterNumFrames:3});
         }

@@ -111,7 +115,7 @@
             //then wait 1 frame
             noEnterFramesRemaining = 1;
             UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
-            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_remove_from_stage_via_callLater, 300, then_readd_object);
+            Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_remove_from_stage_via_callLater, 300, {nextStep:then_readd_object, afterNumFrames:1});
         }

         private function then_readd_object(event:Event, passThroughData:Object):void
@@ -122,8 +126,8 @@
             //when
             UIImpersonator.addElement(_objectWhichIsRemovedAtValidation);

-            //then wait 4 frames, to make sure validation is done
-            noEnterFramesRemaining = 4;
+            //then wait 3 frames, to make sure validation is done
+            noEnterFramesRemaining = 3;
             UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
             Async.handleEvent(this, _finishNotifier, Event.COMPLETE, then_assert_one_initialization_only, 400);
         }
@@ -132,7 +136,9 @@
         {
             //then
             assertNotNull("The object should be on stage...", _objectWhichIsRemovedAtValidation.parent);
+            assertThat("If it's on stage, the nestLevel should be positive", _objectWhichIsRemovedAtValidation.nestLevel > 0);
             assertEquals("When validation is interrupted half-way it should be complete once the object is re-added to stage", 1, _creationCompleteCalls);
+            assert_validation_count(2, 2, 1);
         }

@@ -150,13 +156,14 @@
             assertEquals("Nor validateDisplayList()", 0, _objectWhichIsRemovedAtValidation.numValidateDisplayListCalls);

             //given
-            const whereToGoNext:Function = passThroughData as Function;
+            const whereToGoNext:Function = passThroughData.nextStep as Function;
+            const afterHowManyFrames:int = passThroughData.afterNumFrames as int;

             //when
             _objectWhichIsRemovedAtValidation.pretendUserAskedForComponentRemovalInNextFrame();

-            //then wait 2 frames
-            noEnterFramesRemaining = 3;
+            //then wait
+            noEnterFramesRemaining = afterHowManyFrames;
             UIImpersonator.testDisplay.addEventListener(Event.ENTER_FRAME, onEnterFrame);
             Async.handleEvent(this, _finishNotifier, Event.COMPLETE, whereToGoNext, 300);
         }
@@ -166,6 +173,21 @@
             //then
             assertNull("The object was actually not removed from stage. Huh?", _objectWhichIsRemovedAtValidation.parent);
             assertEquals("Yep, this is the bug. Why call initialized=true on an object that's not on stage?", 0, _creationCompleteCalls);
+        }
+
+        private function then_assert_not_initialized_but_partially_validated(event:Event = null, passThroughData:Object = null):void
+        {
+            //then
+            then_assert_not_initialized(event, passThroughData);
+            assert_validation_count(1, 1, 0);
+        }
+
+        private function assert_validation_count(numPropertiesValidations:int = 1, numSizeValidations:int = 1, numDisplayListValidations:int = 1):void
+        {
+            //then
+            assertEquals("Properties should have been validated", numPropertiesValidations, _objectWhichIsRemovedAtValidation.numValidatePropertiesCalls);
+            assertEquals("Size should have been validated", numSizeValidations, _objectWhichIsRemovedAtValidation.numValidateSizeCalls);
+            assertEquals("Display list should have been validated", numDisplayListValidations, _objectWhichIsRemovedAtValidation.numValidateDisplayListCalls);
         }