Transferred from the Adobe Open Source Subversion Repository

Revision: 6407
Author:   egeorgie@adobe.com
Date:     2009-04-30T03:50:59.993576Z

Log Message:
-----------
Updates to the IGraphicElement interface.
Code generation for FXG text element has been updated.

QE Notes: None
Doc Notes: None
Bugs:
Reviewer: Ely, Pete
tests: checkintests, mustella (components, group, dataGroup, layout)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexTextGraphicNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/InvalidatingSprite.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/ISharedGraphicsDisplayObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -28,7 +28,6 @@
 import spark.events.ElementExistenceEvent;
 import spark.core.IGraphicElement;
 import spark.core.ISharedDisplayObject;
-import spark.primitives.supportClasses.ISharedGraphicsDisplayObject;
 import spark.primitives.supportClasses.TextGraphicElement;
 import spark.layouts.supportClasses.LayoutBase;
 import mx.styles.ISimpleStyleClient;
@@ -135,7 +134,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class Group extends GroupBase implements IVisualElementContainer, ISharedGraphicsDisplayObject
+public class Group extends GroupBase implements IVisualElementContainer, ISharedDisplayObject
 {
     /**
      *  Constructor.
@@ -150,7 +149,7 @@
         super();
     }

-    //--------------------------------------------------------------------------
+	//--------------------------------------------------------------------------
     //
     //  Variables
     //
@@ -174,14 +173,14 @@
      */
     override public function set resizeMode(stringValue:String):void
     {
-        if (isValidScaleGrid())
-        {
-            // Force the resize mode to be scale if we
-            // have set scaleGrid properties
-            stringValue = ResizeMode.SCALE;
+    	if (isValidScaleGrid())
+        {
+        	// Force the resize mode to be scale if we
+        	// have set scaleGrid properties
+        	stringValue = ResizeMode.SCALE;
         }

-        super.resizeMode = stringValue;
+    	super.resizeMode = stringValue;
     }

     /**
@@ -198,7 +197,7 @@
             invalidateDisplayObjectOrdering();
     }

-    //--------------------------------------------------------------------------
+	//--------------------------------------------------------------------------
     //
     //  Properties
     //
@@ -423,7 +422,7 @@
     // store the scaleGrid into a rectangle to save space (top, left, bottom, right);
     private var scaleGridStorageVariable:Rectangle;

-    //----------------------------------
+	//----------------------------------
     //  scale9Grid
     //----------------------------------

@@ -431,22 +430,22 @@
      *  @private
      */
     override public function set scale9Grid(value:Rectangle):void
-    {
-        if (value != null)
-        {
-            scaleGridTop = value.top;
-            scaleGridBottom = value.bottom;
-            scaleGridLeft = value.left;
-            scaleGridRight = value.right;
-        }
-        else
-        {
-            scaleGridTop = NaN;
-            scaleGridBottom = NaN;
-            scaleGridLeft = NaN;
-            scaleGridRight = NaN;
-        }
-    }
+	{
+		if (value != null)
+		{
+			scaleGridTop = value.top;
+			scaleGridBottom = value.bottom;
+			scaleGridLeft = value.left;
+			scaleGridRight = value.right;
+		}
+		else
+		{
+			scaleGridTop = NaN;
+			scaleGridBottom = NaN;
+			scaleGridLeft = NaN;
+			scaleGridRight = NaN;
+		}
+	}

     //----------------------------------
     //  scaleGridBottom
@@ -596,10 +595,10 @@

     private function isValidScaleGrid():Boolean
     {
-        return !isNaN(scaleGridLeft) &&
-               !isNaN(scaleGridTop) &&
-               !isNaN(scaleGridRight) &&
-               !isNaN(scaleGridBottom);
+    	return !isNaN(scaleGridLeft) &&
+        	   !isNaN(scaleGridTop) &&
+        	   !isNaN(scaleGridRight) &&
+        	   !isNaN(scaleGridBottom);
     }

     //--------------------------------------------------------------------------
@@ -654,9 +653,9 @@

         if (scaleGridChanged)
         {
-            // Don't reset scaleGridChanged since we also check it in updateDisplayList
-            if (isValidScaleGrid())
-                resizeMode = ResizeMode.SCALE; // Force the resizeMode to scale
+        	// Don't reset scaleGridChanged since we also check it in updateDisplayList
+        	if (isValidScaleGrid())
+        		resizeMode = ResizeMode.SCALE; // Force the resizeMode to scale
         }

         // TODO EGeorgie: we need to optimize this, iterating through all the elements is slow.
@@ -701,7 +700,7 @@
      *  @private
      */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-    {
+    {
         super.updateDisplayList(unscaledWidth, unscaledHeight);

         // Clear the group's graphic because graphic elements might be drawing to it
@@ -716,70 +715,70 @@
         // the element with the shared displayObject and the next element that has a displayObject.
         if (numGraphicElements > 0)
         {
-            var length:int = numElements;
-            for (var i:int = 0; i < length; i++)
-            {
-                var element:IGraphicElement = getElementAt(i) as IGraphicElement;
-                if (!element)
-                   continue;
-
-                // Do a special check for layer, we may stumble upon an element with layer != 0
-                // before we're done with the current shared sequence and we don't want to mark
-                // the sequence as valid, until we reach the next sequence.
+	        var length:int = numElements;
+	        for (var i:int = 0; i < length; i++)
+	        {
+	            var element:IGraphicElement = getElementAt(i) as IGraphicElement;
+	            if (!element)
+	               continue;
+
+	            // Do a special check for layer, we may stumble upon an element with layer != 0
+	            // before we're done with the current shared sequence and we don't want to mark
+	            // the sequence as valid, until we reach the next sequence.
                 if (element.layer == 0)
                 {
-                    // Is this the start of a new shared sequence?
-                    if (element.shareIndex <= 0)
-                    {
-                        // We have finished redrawing the previous sequence
-                        if (sharedDisplayObject)
-                            sharedDisplayObject.redrawRequested = false;
-
-                        // Start the new sequence
+                    // Is this the start of a new shared sequence?
+	            	if (element.sharedIndex <= 0)
+	            	{
+	            	    // We have finished redrawing the previous sequence
+	            	    if (sharedDisplayObject)
+	            	        sharedDisplayObject.redrawRequested = false;
+
+	            	    // Start the new sequence
                         sharedDisplayObject = element.displayObject as ISharedDisplayObject;
-                    }
-
-                    if (!sharedDisplayObject || sharedDisplayObject.redrawRequested)
-                        element.validateDisplayList();
-                }
-                else
-                {
-                    // If we have layering, we don't share the display objects.
-                    // Don't update the current sharedDisplayObject
-                    var elementDisplayObject:ISharedDisplayObject = element.displayObject as ISharedDisplayObject;
-                    if (!elementDisplayObject || elementDisplayObject.redrawRequested)
-                    {
-                       element.validateDisplayList();
-
-                       if (elementDisplayObject)
+	            	}
+
+	            	if (!sharedDisplayObject || sharedDisplayObject.redrawRequested)
+	            		element.validateDisplayList();
+	            }
+	            else
+	            {
+	                // If we have layering, we don't share the display objects.
+	                // Don't update the current sharedDisplayObject
+	                var elementDisplayObject:ISharedDisplayObject = element.displayObject as ISharedDisplayObject;
+	                if (!elementDisplayObject || elementDisplayObject.redrawRequested)
+	                {
+	                   element.validateDisplayList();
+
+	                   if (elementDisplayObject)
                            elementDisplayObject.redrawRequested = false;
-                    }
-                }
-            }
-        }
-
+	                }
+	            }
+	        }
+        }
+
         // Mark the last shared displayObject valid
         if (sharedDisplayObject)
             sharedDisplayObject.redrawRequested = false;

         if (scaleGridChanged)
         {
-            scaleGridChanged = false;
-
-            if (isValidScaleGrid())
-            {
-                if (numChildren > 0)
-                    throw new Error(resourceManager.getString("components", "scaleGridGroupError"));
-
-                super.scale9Grid = new Rectangle(scaleGridLeft,
-                                           scaleGridTop,
-                                           scaleGridRight - scaleGridLeft,
-                                           scaleGridBottom - scaleGridTop);
-            }
-            else
-            {
-                super.scale9Grid = null;
-            }
+        	scaleGridChanged = false;
+
+        	if (isValidScaleGrid())
+        	{
+	        	if (numChildren > 0)
+	        		throw new Error(resourceManager.getString("components", "scaleGridGroupError"));
+
+	        	super.scale9Grid = new Rectangle(scaleGridLeft,
+	        							   scaleGridTop,
+	        							   scaleGridRight - scaleGridLeft,
+	        							   scaleGridBottom - scaleGridTop);
+	        }
+	        else
+	        {
+	        	super.scale9Grid = null;
+	        }
         }
     }

@@ -1203,6 +1202,15 @@
      */
     mx_internal function addingGraphicElementChild(child:IGraphicElement):void
     {
+        // Special case (defensive coding) - if the element was previously
+        // a child of this Group, and it didn't release its previously assigned
+        // DisplayObject when its parent changed, and there's the possibility that
+        // the Group may assign it the same DisplayObject and the same sharedIndex,
+        // we still need to invalidate and redraw as the displayObject likely has
+        // been redrawn while the element was not a child of this Group.
+        if (child.displayObject && child.sharedIndex > 0)
+            graphicElementChanged(child);
+
         child.parentChanged(this);

         // Sets up the inheritingStyles and nonInheritingStyles objects
@@ -1234,18 +1242,21 @@
      */
     mx_internal function removingGraphicElementChild(child:IGraphicElement):void
     {
+        // First discard the displayObject, as child may decide to destroy it
+        // when parent changes.
+        discardDisplayObject(child);
         child.parentChanged(null);
-        discardDisplayObject(child);
     }

     /**
      *  Removes the element's DisplayObject from this Group's
-     *  display list and sets the element's displayObject property to null.
+     *  display list.
      *
      *  The Group also ensures any elements that share the
      *  DisplayObject will be redrawn.
      *
-     *
This method doesn't trigger new DisplayObject reassignment.
+     *
This method doesn't necessarily trigger new DisplayObject
+     *  reassignment for the passed in element.
      *  To request new display object reassignment, call the
      *  graphicElementLayerChanged method.

      *
@@ -1260,13 +1271,11 @@
     public function discardDisplayObject(element:IGraphicElement):void
     {
         var oldDisplayObject:DisplayObject = element.displayObject;
-        element.displayObject = null;
-
         if (!oldDisplayObject)
             return;

         // If the element created the display object
-        if (element.shareIndex <= 0)
+        if (element.sharedIndex <= 0 && oldDisplayObject.parent == this)
         {
             super.removeChild(oldDisplayObject);

@@ -1439,7 +1448,7 @@
      *  is at insertIndex in the display object list.
      *
      *  If curElement implements IGraphicElement, then both its
-     *  DisplayObject and shareIndex will be updated.
+     *  DisplayObject and sharedIndex will be updated.
      *
      *  @curElement The current element to assign DisplayObject to
      *  @prevEelement The previous element in the list of elements or null.
@@ -1458,37 +1467,33 @@
         {
             var current:IGraphicElement = IGraphicElement(curElement);
             var previous:IGraphicElement = prevElement as IGraphicElement;
-
-            // Previous IGraphicElement can share with us if it's already sharing
-            // the DisplayObject in a sequence, or if it can share its DisplayObject.
-            var previousCanDrawToShared:Boolean = previous && !previous.closeSequence() &&
-                (previous.shareIndex > 0 ||
-                 (previous.displayObject is ISharedDisplayObject &&
-                 previous.canDrawToShared(previous.displayObject)));
-
-            // Can we share the display object of the previous IGraphicElement?
-            if (previousCanDrawToShared && current.canDrawToShared(previous.displayObject))
+
+            var oldDisplayObject:DisplayObject = current.displayObject;
+            var oldSharedIndex:int = current.sharedIndex;
+
+            if (previous && previous.canShareWithNext(current) && current.canShareWithPrevious(previous) &&
+                current.setSharedDisplayObject(previous.displayObject))
             {
                 // If we are the second element in the shared sequence,
                 // make sure that the first element has the correct sharedIndex
-                if (previous.shareIndex == -1)
-                    previous.shareIndex = 0;
-
-                setSharedDisplayObject(current, previous.shareIndex + 1, previous.displayObject);
+                if (previous.sharedIndex == -1)
+                    previous.sharedIndex = 0;
+
+                current.sharedIndex = previous.sharedIndex + 1;
             }
-            else if (prevElement == this && current.canDrawToShared(this))
+            else if (prevElement == this && current.setSharedDisplayObject(this))
             {
-                setSharedDisplayObject(current, 1, this);
+                current.sharedIndex = 1;
             }
             else
             {
                 // We don't want to create new DisplayObjects for elements that
                 // already have created their own their display objects.
-                var ownsDisplayObject:Boolean = current.shareIndex <= 0;
+                var ownsDisplayObject:Boolean = oldSharedIndex <= 0;

                 // If the element doesn't have a DisplayObject or it doesn't own
                 // the DisplayObject it currently has, then create a new one
-                var displayObject:DisplayObject = current.displayObject;
+                var displayObject:DisplayObject = oldDisplayObject;
                 if (!ownsDisplayObject || !displayObject)
                     displayObject = current.createDisplayObject();

@@ -1498,39 +1503,34 @@
                 if (displayObject)
                     addItemToDisplayList(displayObject, current, insertIndex++);

-                setSharedDisplayObject(current, -1, displayObject);
+                current.sharedIndex = -1;
             }
+            invalidateAfterAssignment(current, oldSharedIndex, oldDisplayObject);
         }
         return insertIndex;
     }

     /**
      *  @private
-     *  Assigns the specified shareIndex and displayObject to the element.
      *  Performs invalidation of the old and new shared sequenences.
      *  If necesary, removes the old display object from the list.
-     *  Does not invalidate the Group's display list.
-     */
-    private function setSharedDisplayObject(element:IGraphicElement,
-                                            shareIndex:int,
-                                            displayObject:DisplayObject):void
+     */
+    private function invalidateAfterAssignment(element:IGraphicElement,
+                                               oldSharedIndex:int,
+                                               oldDisplayObject:DisplayObject):void
     {
         // Make sure we remove or mark for redraw the old displayObject
-        var oldDisplayObject:DisplayObject = element.displayObject;
-        var oldShareIndex:int = element.shareIndex;
-
-        if (oldDisplayObject == displayObject && oldShareIndex == shareIndex)
+        var displayObject:DisplayObject = element.displayObject;
+        var sharedIndex:int = element.sharedIndex;
+
+        if (oldDisplayObject == displayObject && oldSharedIndex == sharedIndex)
             return;

-        // Set the new index and DisplayObject
-        element.shareIndex = shareIndex;
-        element.displayObject = displayObject;
-
         // We don't care about changes from -1 to 0
-        var shareIndexChanged:Boolean = (shareIndex != oldShareIndex && (oldShareIndex > 0 || shareIndex > 0 ));
+        var sharedIndexChanged:Boolean = (sharedIndex != oldSharedIndex && (oldSharedIndex > 0 || sharedIndex > 0 ));

         // Make sure we redraw the display object
-        if (shareIndexChanged || displayObject != oldDisplayObject)
+        if (sharedIndexChanged || displayObject != oldDisplayObject)
         {
             if (displayObject is ISharedDisplayObject)
                 ISharedDisplayObject(displayObject).redrawRequested = true;
@@ -1541,7 +1541,8 @@
         }

         // Make sure we remove the old display object, if needed
-        if (oldDisplayObject && oldDisplayObject != displayObject && oldShareIndex <= 0)
+        if (oldDisplayObject && oldDisplayObject.parent == this &&
+            oldDisplayObject != displayObject && oldSharedIndex <= 0)
             super.removeChild(oldDisplayObject);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2846
Author:   hmuller@adobe.com
Date:     2008-08-14T18:55:21.991879Z

Log Message:
-----------
Partial commit of the "Group as Viewport" feature.  Enables
simple scrolling for Groups with VerticalLayout.

Doc: No
Checkintests: Pass
Reviewer: Evtim

- Group.as
Adde vertical,horizontalScrollPosition properties.
They're default 0 and they're mapped to the origin of the Group's
scrollRect.  Added Number type contentWidth,Height properties.

Changed the layout property type and implementation.  The type is now
Object (was Class) to allow one to specify one of the predefined
layout class names, or a layout instance.

Currently only flex.layout.Basic,Horizontal,VerticalLayout can be
named using the (string class name valued) layout attribute.

- ItemsComponent.as
Changed the type of the layout property to Object to match the
similar change in Group.

- VerticalLayout.as
Replaced private static GAP:int constant with a similar "gap"
property.  Gap is the vertical space between rows, default is 6.

Added a rowCount:int property and a protected explicitRowCount var.
The rowCount property specifies the number of visible rows, which
implies the layoutTarget's height.  The default is -1 which means
that all rows should be visible.

Added rowHeight:Number and colWidth:Number properties, along with
their protected explicitFoo counterparts.  Currently unused.

Changed the measure function: if rowCount wasn't explicitly set
to -1, then the layoutTarget's height is the height of the first
rowCount items (plus the gap).  The layoutTarget's contentHeight
is set to the items' total height.

Changed the updateDisplayList function to set the scrollRect
to the layoutTarget's width/height.

- manifests
Added the layout classes to frameworks/projejcts/flex4/manifest.xml and to
frameworks/gumbo-manifest.xml, mxml-2009-manifest.xml.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/.actionScriptProperties</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/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -133,18 +133,38 @@
         return _content;
     }

-    public function get layout():Class
-    {
-        return _layoutClass;
-    }
-
-    public function set layout(value:Class):void
-    {
-        _layoutClass = value;
-
+    public function get layout():Object
+    {
+    	return _layout;
+    }
+
+    // TBD: HACK for the sake of getDefinitionByName
+    private static const forceLoad0:Class = flex.layout.BasicLayout;
+    private static const forceLoad1:Class = flex.layout.HorizontalLayout;
+    private static const forceLoad2:Class = flex.layout.VerticalLayout;
+
+    public function set layout(value:Object):void
+    {
+    	if (value is ILayout) {
+    		_layout = ILayout(value);
+    	    _layoutClass = null;
+    	}
+    	else if (value is String) {
+    		_layout = null;
+		    _layoutClass = flash.utils.getDefinitionByName(String(value)) as Class;
+    	}
+    	else if (value is Class) {
+    		_layout = null;
+    		_layoutClass = Class(value);
+    	}
+    	else {
+    		_layout = null;
+    		_layoutClass = null;
+    	}
         layoutChanged = true;
-        invalidateProperties();
-    }
+        invalidateProperties();
+    }
+

     protected function initializeChildrenArray():void
     {
@@ -445,8 +465,54 @@
             UIComponent(parent).invalidateDisplayList();
         }
     }
-
-        //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  horizontal,verticalScrollPosition
+    //----------------------------------
+
+
+    private var _horizontalScrollPosition:Number = 0;
+    private var _verticalScrollPosition:Number = 0;
+
+    private function getScrollRect():Rectangle {
+        var r:Rectangle = scrollRect;
+        return (r == null) ? new Rectangle(0,0,width,height) : r;
+    }
+
+    public function get horizontalScrollPosition():Number {
+            return _horizontalScrollPosition;
+    }
+
+    [Bindable]
+    public function set horizontalScrollPosition(value:Number):void {
+        _horizontalScrollPosition = value;
+        var r:Rectangle = getScrollRect();
+        r.x = _horizontalScrollPosition;
+        scrollRect = r;
+    }
+
+    public function get verticalScrollPosition():Number {
+            return _verticalScrollPosition;
+    }
+
+    [Bindable]
+    public function set verticalScrollPosition(value:Number):void {
+        _verticalScrollPosition = value;
+        var r:Rectangle = getScrollRect();
+        r.y = _verticalScrollPosition;
+        scrollRect = r;
+    }
+
+
+    //----------------------------------
+    //  contentWidth,Height
+    //----------------------------------
+
+    [Bindable] public var contentWidth:Number;
+    [Bindable] public var contentHeight:Number;
+
+
+    //--------------------------------------------------------------------------
     //
     //  Properties: Overriden Focus management
     //
@@ -857,19 +923,18 @@
     //  Layout
     //
     //--------------------------------------------------------------------------
-
+
     protected function initializeLayoutObject():void
     {
-        if (_layoutClass == null)
-            _layout = new BasicLayout();
-        else
-            _layout = new _layoutClass();
-
-        _layout.target = this;
+		if (_layout == null) {
+			_layout = (_layoutClass) ? new _layoutClass() : new BasicLayout();
+		}
+        ILayout(_layout).target = this;

         invalidateSize();
         invalidateDisplayList();
     }
+

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


- change: removed unnerving log

- change: removed unnerving log

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@566 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/css/transitions/CSSPropertyTransition.as
+++ src/reprise/css/transitions/CSSPropertyTransition.as
@@ -159,7 +159,6 @@
 			{
 				var bak : int = m_startTime;
 				m_startTime += time - m_lastUpdateTime - frameDuration;
-				log("adjust: " + (m_startTime - bak));
 			}
 			m_lastUpdateTime = time;
 			var currentTime : int = time - m_startTime - delayValue;


Transferred from the Adobe Open Source Subversion Repository

Revision: 12787
Author:   mhorn@adobe.com
Date:     2009-12-10T15:41:17.889108Z

Log Message:
-----------
asdoc updates for l10n

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/HueShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLightShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurnShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ExclusionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SaturationShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityShader.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/shaderClasses/SaturationShader.as
+++ frameworks/projects/framework/src/mx/graphics/shaderClasses/SaturationShader.as
@@ -14,14 +14,14 @@
 import flash.display.Shader;

 /**
- *  The SaturationShader class creates a blend shader that is equivalent to
+ *  Creates a blend shader that is equivalent to
  *  the 'Saturation' blend mode for RGB premultiplied colors available
  *  in Adobe Creative Suite tools. This blend mode is not native to Flash,
  *  but is available in tools like Adobe Illustrator and Adobe Photoshop.
  *
- *  The 'saturation' blend mode can be set on Flex groups and graphic
- *  elements and the visual appearance in tools like Adobe Illustrator and
- *  Adobe Photoshop will be mimicked through this blend shader.
+ *
The 'saturation' blend mode can be set on Flex groups and graphic
+ *  elements. The visual appearance in tools like Adobe Illustrator and
+ *  Adobe Photoshop will be mimicked through this blend shader.

  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 21811
Author:   chiedozi@adobe.com
Date:     2011-08-04T04:12:41.617040Z

Log Message:
-----------
Added a divider to SplitViewNavigatorSkin.  Added a getViewNavigatorAt() method to SplitViewNavigator and removed the firstViewNavigator and secondViewNavigator properties.

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests, mustella-mobile
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SplitViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as
@@ -79,9 +79,9 @@
  *  that container.  This means using IVisualElementContainer methods such as
  *  getElementAt() on SplitViewNavigator may not return the
  *  expected results.  If a developer wants to access the first or second
- *  navigator, it is recommended that they use the firstViewNavigator
- *  and secondViewNavigator properties.  These will always return
- *  the correct navigator regardless of whether a navigator is in a callout or not.

+ *  navigator, it is recommended that they use the getViewNavigatorAt()
+ *  method.  These will always return the correct navigator regardless of whether
+ *  a navigator is in a callout or not.

  *
  *  @see spark.components.ViewNavigatorBase
  *  @see spark.components.ViewNavigator
@@ -195,45 +195,7 @@

         _autoHideFirstViewNavigator = value;
     }
-
-    //----------------------------------
-    //  firstViewNavigator
-    //----------------------------------
-
-    /**
-     *  The first ViewNavigator of this component.
-     *
-     *  @return Returns the first navigator being managed by the container, or
-     *  null if there are no children.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    public function get firstViewNavigator():ViewNavigatorBase
-    {
-        return getViewNavigatorAt(0);
-    }
-
-    //----------------------------------
-    //  secondViewNavigator
-    //----------------------------------
-
-    /**
-     *  The second ViewNavigator of this component.
-     *
-     *  @return Returns the second navigator being managed by the container, or
-     *  null if there are fewer than two children.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
-     */
-    public function get secondViewNavigator():ViewNavigatorBase
-    {
-        return getViewNavigatorAt(1);
-    }
-
+
     //--------------------------------------------------------------------------
     //
     //  Overridden Properties
@@ -268,11 +230,27 @@
         FlexGlobals.topLevelApplication.addEventListener(ResizeEvent.RESIZE,
             application_resizeHandler, false, EventPriority.DEFAULT, true);

-        // Toggle visibility of the firstViewNavigator if autoHideFirstViewNavigator is true
-        if (firstViewNavigator && autoHideFirstViewNavigator)
+        // Toggle visibility of the first ViewNavigator if autoHideFirstViewNavigator is true
+        if (numViewNavigators > 0 && autoHideFirstViewNavigator)
             application_resizeHandler(null);

         super.initialized = value;
+    }
+
+
+    //----------------------------------
+    //  numViewNavigators
+    //----------------------------------
+    /**
+     *  The number of navigators managed by this container
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public function get numViewNavigators():int
+    {
+        return _calloutNavigatorIndex == -1 ? numElements : numElements + 1;
     }

     //--------------------------------------------------------------------------
@@ -282,13 +260,49 @@
     //--------------------------------------------------------------------------

     /**
+     *  This method returns a specific child navigator independent of the container's
+     *  child display hierarchy.  Since a child navigator is not parented by this
+     *  container when visible inside a callout, this method should be used instead of
+     *  getElementAt().
+     *
+     *
When a callout is open, the navigator at index 0 will refer to the
+     *  navigator in the callout.

+     *
+     *  @param index Index of the navigator to retrieve
+     *
+     *  @return The navigator at the specified index, null if one does not exist
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public function getViewNavigatorAt(index:int):ViewNavigatorBase
+    {
+        // If the index is the navigator currently in the callout, return it
+        if (_calloutNavigatorIndex == index)
+            return _calloutNavigator;
+
+        // Since a callout is visible, one of the navigators has been removed
+        // from this display tree.  If the index of the navigator in the callout
+        // is before the passed index, decrement it by 1 so that it reflects
+        // the current indicies of the child navigatos.
+        if (_calloutNavigatorIndex != -1 && _calloutNavigatorIndex < index)
+            index--;
+
+        if (index >= numElements)
+            return null;
+
+        return getElementAt(index) as ViewNavigatorBase;
+    }
+
+    /**
      *  Displays the child navigator at index 0 inside a callout.  The navigator
      *  is reparented as a child of the callout.
      *
      *
Since the navigator is reparented, using getElementAt(0)
      *  will not return the first navigator, but will return the second one.
-     *  It is recommended that developers use firstViewNavigator and
-     *  secondViewNavigator properties to access the navigators.

+     *  It is recommended that developers use the getViewNavigatorAt()
+     *  method to access the navigators.

      *
      *
The callout height is fixed by the component but can be changed by
      *  reskinning or by manually setting the height property on the
@@ -337,32 +351,6 @@

     /**
      *  @private
-     *  This method is used to get a reference to a specific navigator.  Since
-     *  a navigator can be visible inside a callout, getElementAt() is not
-     *  sufficient because one of the navigators is no longer a child of the
-     *  container.
-     */
-    mx_internal function getViewNavigatorAt(index:int):ViewNavigatorBase
-    {
-        // If the index is the navigator currently in the callout, return it
-        if (_calloutNavigatorIndex == index)
-            return _calloutNavigator;
-
-        // Since a callout is visible, one of the navigators has been removed
-        // from this display tree.  If the index of the navigator in the callout
-        // is before the passed index, decrement it by 1 so that it reflects
-        // the current indicies of the child navigatos.
-        if (_calloutNavigatorIndex != -1 && _calloutNavigatorIndex < index)
-            index--;
-
-        if (index >= numElements)
-            return null;
-
-        return getElementAt(index) as ViewNavigatorBase;
-    }
-
-    /**
-     *  @private
      *  Shows the navigator at the specified index in the callout component.
      */
     mx_internal function showNavigatorAtIndexInCallout(index:int, owner:DisplayObjectContainer):void
@@ -449,7 +437,7 @@
 	 */
 	mx_internal function application_resizeHandler(event:ResizeEvent):void
 	{
-		if (!firstViewNavigator)
+		if (numViewNavigators == 0)
 			return;

 		var aspectRatio:String = FlexGlobals.topLevelApplication.aspectRatio;
@@ -489,7 +477,11 @@
      */
     private function toggleFirstNavigatorVisibility():void
     {
+        if (numViewNavigators == 0)
+            return;
+
         var aspectRatio:String = FlexGlobals.topLevelApplication.aspectRatio;
+        var firstViewNavigator:ViewNavigatorBase = getViewNavigatorAt(0);

         if (aspectRatio == StageAspectRatio.PORTRAIT)
         {
@@ -572,12 +564,8 @@
         if (!dataArray)
             return;

-        // If the callout is visible, one of the navigators isn't a child
-        // of this component.  So the numElements parameter will be off by one.
-        var numNavigators:int = _calloutNavigatorIndex > -1 ? numElements + 1 : numElements;
-
         // Restore each navigators persistence data
-        for (var i:int = 0; i < numNavigators; i++)
+        for (var i:int = 0; i < numViewNavigators; i++)
         {
             if (i >= dataArray.length)
                 break;
@@ -598,12 +586,8 @@
         var object:Object = super.saveViewData();
         var dataArray:Array = new Array();

-        // If the callout is visible, one of the navigators isn't a child
-        // of this component.  So the numElements parameter will be off by one.
-        var numNavigators:int = _calloutNavigatorIndex > -1 ? numElements + 1 : numElements;
-
         // Push each navigator's persistence object to the data array
-        for (var i:int = 0; i < numNavigators; i++)
+        for (var i:int = 0; i < numViewNavigators; i++)
             dataArray.push(getViewNavigatorAt(i).saveViewData());

         object.dataArray = dataArray;


work around null pointer error

work around null pointer error

--- WeaveUI/src/weave/ui/CustomTree.as
+++ WeaveUI/src/weave/ui/CustomTree.as
@@ -20,7 +20,9 @@
 {
 	import flash.events.Event;

+	import mx.collections.ICollectionView;
 	import mx.collections.IList;
+	import mx.collections.IViewCursor;
 	import mx.controls.Tree;
 	import mx.core.ScrollPolicy;
 	import mx.core.mx_internal;
@@ -144,9 +146,13 @@
 		 */
 		override protected function configureScrollBars():void
 		{
+			var ac:ICollectionView = actualCollection;
+			var ai:IViewCursor = actualIterator;
 			var rda:Boolean = runningDataEffect;

 			runningDataEffect = true;
+			actualCollection = ac || collection; // avoids null pointer error
+			actualIterator = ai || iterator;

 			// This is not a perfect scrolling solution.  It looks ok when there is a partial row showing at the bottom.
 			var mvsp:int = Math.max(0, collection.length - listItems.length + 1);
@@ -156,6 +162,8 @@
 			super.configureScrollBars();

 			runningDataEffect = rda;
+			actualCollection = ac;
+			actualIterator = ai;
 		}

 		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void


corrected flag location

corrected flag location

--- src/com/phylake/fsm/impl/Fsm.as
+++ src/com/phylake/fsm/impl/Fsm.as
@@ -144,8 +144,9 @@
                 // execute submachines with current event
                 executeSubmachines(currentState, event);

-                _inEventLoop = false;
             }
+
+            _inEventLoop = false;
         }
     }
 }


expose SSSPlayer.parts as SSSPlayer.partPlayers

--- src/sssplayer/display/SSSPlayer.as
+++ src/sssplayer/display/SSSPlayer.as
@@ -32,7 +32,10 @@
 			this.updateParts();
 		}

-		private var parts:Vector.<SSSPartPlayer>;
+		private var _partPlayers:Vector.<SSSPartPlayer>;
+		public function get partPlayers():Vector.<SSSPartPlayer> {
+			return this._partPlayers.concat();
+		}

 		private var _isPlaying:Boolean = false;
 		public function get isPlaying():Boolean {
@@ -75,7 +78,7 @@
 		}

 		public function set color(value:uint):void {
-			for each (var partPlayer:SSSPartPlayer in this.parts) {
+			for each (var partPlayer:SSSPartPlayer in this._partPlayers) {
 				partPlayer.color = value;
 			}
 		}
@@ -123,21 +126,21 @@

 		private function prepareChildren():void {
 			this.removeChildren();
-			this.parts = new Vector.<SSSPartPlayer>();
+			this._partPlayers = new Vector.<SSSPartPlayer>();
 			for each (var part:SSSPart in this.model.parts) {
 				var partAnime:SSSPartAnime = this._anime.partAnimes[part.name];
 				var parentPartPlayer:SSSPartPlayer = null;
 				if (part.parentIndex > -1) {
-					parentPartPlayer = this.parts[part.parentIndex];
+					parentPartPlayer = this._partPlayers[part.parentIndex];
 				}
 				var partPlayer:SSSPartPlayer = new SSSPartPlayer(this.project, this.model, part, partAnime, parentPartPlayer);
 				this.addChild(partPlayer);
-				this.parts.push(partPlayer);
+				this._partPlayers.push(partPlayer);
 			}
 		}

 		private function updateParts():void {
-			for each (var partPlayer:SSSPartPlayer in this.parts) {
+			for each (var partPlayer:SSSPartPlayer in this._partPlayers) {
 				partPlayer.currentFrame = this._currentFrame;
 			}
 			if (this._withFlatten) {
@@ -150,7 +153,7 @@
 			if (!hitObject) {
 				return null;
 			}
-			for each (var partPlayer:SSSPartPlayer in this.parts) {
+			for each (var partPlayer:SSSPartPlayer in this._partPlayers) {
 				if (hitObject.parent == partPlayer) {
 					return partPlayer;
 				}
@@ -162,5 +165,6 @@
 			var partPlayer:SSSPartPlayer = this.partPlayerAt(x, y);
 			return partPlayer ? partPlayer.name : null;
 		}
+
 	}
 }


Add height and width to Video ctor

Add height and width to Video ctor

--- sAS3Cam.as
+++ sAS3Cam.as
@@ -88,7 +88,7 @@
             var doSmoothing:Boolean = this.loaderInfo.parameters["smoothing"];
             var doDeblocking:Number = this.loaderInfo.parameters["deblocking"];

-            video = new Video();
+            video = new Video(camResolution[0],camResolution[1]);
             video.smoothing  = doSmoothing;
             video.deblocking = doDeblocking;
             video.attachCamera(useCamera);


BatchLoader IDs can be automatically generated if the caller has their own means of tracking what's what

--- raw/src/org/yellcorp/lib/net/batchloader/BatchLoader.as
+++ raw/src/org/yellcorp/lib/net/batchloader/BatchLoader.as
@@ -45,6 +45,8 @@

     private var _wasComplete:Boolean = true;

+    private var autoItemID:int = 0;
+
     public function BatchLoader(concurrent:uint = 1,
         order:String = BatchLoaderOrder.FIFO,
         loaderItemFactory:BatchLoaderItemFactory = null)
@@ -318,12 +320,18 @@
      * Adds an item to the BatchLoader queue, and associates it with an id
      * for later retrieval.
      *
-     * @param id A string id by which to associate the item.
+     * @param id A string id by which to associate the item. If null, a unique
+     *           id will be generated.
      * @param loader The BatchLoaderItem to add.
      * @throws ArgumentError if the specified id is already used.
      */
     public function addItem(id:String, item:BatchLoaderItem, estimatedBytesTotal:uint = 0):void
     {
+        if (id === null)
+        {
+            id = nextItemID();
+        }
+
         if (idToItemLookup.hasOwnProperty(id))
         {
             throw new ArgumentError("id already exists: " + id);
@@ -350,7 +358,23 @@
         fillQueue();
     }

-
+    private function nextItemID():String
+    {
+        return "$" + (autoItemID++);
+    }
+
+
+    /**
+     * Adds a request to the BatchLoader queue, and associates it with an id
+     * for later retrieval.  The request is turned into a BatchLoaderItem using
+     * the current loaderItemFactory.
+     *
+     * @param id A string id by which to associate the item. If null, a unique
+     *           id will be generated.
+     * @param request The URLRequest to add.
+     * @throws ArgumentError if the specified id is already used.
+     * @return The BatchLoaderItem that was created and added under the specified id.
+     */
     public function addRequest(id:String, request:URLRequest, estimatedBytesTotal:uint = 0):BatchLoaderItem
     {
         var item:BatchLoaderItem = getLoaderItemFactory().createItem(request);


Extract static private method Cloner.isTypeCloneable(type).

--- dolly-framework/src/main/actionscript/dolly/Cloner.as
+++ dolly-framework/src/main/actionscript/dolly/Cloner.as
@@ -12,6 +12,10 @@
 use namespace dolly_internal;

 public class Cloner {
+
+	private static function isTypeCloneable(type:Type):Boolean {
+		return type.hasMetadata(MetadataName.CLONEABLE);
+	}

 	private static function isVariableCloneable(variable:Variable, skipMetadataChecking:Boolean = true):Boolean {
 		return !variable.isStatic && (skipMetadataChecking || variable.hasMetadata(MetadataName.CLONEABLE));
@@ -28,7 +32,7 @@
 		var variable:Variable;
 		var accessor:Accessor;

-		const isClassCloneable:Boolean = type.hasMetadata(MetadataName.CLONEABLE);
+		const isClassCloneable:Boolean = isTypeCloneable(type);
 		if (isClassCloneable) {
 			for each(variable in type.variables) {
 				if (isVariableCloneable(variable)) {
@@ -74,4 +78,4 @@
 		return clone;
 	}
 }
-}+}


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

--- frameworks/projects/automation_flashflexkit/src/AutomationFlashFlexKitClasses.as
+++ frameworks/projects/automation_flashflexkit/src/AutomationFlashFlexKitClasses.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 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
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17308
Author:   dthakkar@adobe.com
Date:     2010-08-12T23:22:20.533632Z

Log Message:
-----------
Flex integration feature (includes spark formatters and related checkintests.)
UIComponent.as - Added API's to support non visual style client
IAdvancedStyleClient.as - Added setter for StyleParent method
StyleProtoChain.as - Added else loop to verify if the component is IAdvancedStyleClient
StyleProxy.as - added setter for styleParent method (this class inherits IAdvancedStyleClient interface)

QE notes: No
Doc notes: No
Bugs: No
Reviewer: Gordon , Darrell
Tests run: CheckinTests, Mustella
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/styleTest</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CollatorTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/SortingCollator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/StringToolsTestScript.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/AdvancedStyleClientTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/styleTest/ADVStyleTestEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/NumberFormatterTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyFormatterTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CollatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberFormatterTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/DateTimeFormatterTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyFormatterTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/DateTimeFormatterTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/AdvancedStyleClientTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/styleTest/ADVStyleTestClass.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/StringToolsTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/MatchingCollator.as</path>

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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
@@ -0,0 +1,704 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 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 spark.globalization.supportClasses
+{
+
+import flash.globalization.Collator;
+import flash.globalization.CollatorMode;
+
+import mx.core.mx_internal;
+import mx.utils.ObjectUtil;
+
+import spark.globalization.LastOperationStatus;
+import spark.globalization.supportClasses.GlobalizationBase;
+
+use namespace mx_internal;
+
+/**
+ * The CollatorBase class is a base class for the
+ * SortingCollator and MatchingCollator classes.
+ *
+ *
This class is a wrapper class around the
+ * flash.globalization.Collator.
+ * Therefore the locale-specific string comparison is provided by the
+ * flash.globalization.Collator.
+ * However this CollatorBase class can be used in MXML declartions, uses the
+ * locale style for the requested Locale ID name, and has methods and
+ * properties that are bindable.
+ *

+ *
+ *
The flash.globalization.Collator class uses the underlying operating
+ * system for the formatting functionality and to supply the locale
+ * specific data.
+ * On some operating systems, the flash.globalization classes are
+ * unsupported, this wrapper class provides a fallback functionality in
+ * this case.

+ *
+ * @see flash.globalization.Collator
+ */
+public class CollatorBase extends GlobalizationBase
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class Constants
+    //
+    //--------------------------------------------------------------------------
+
+    // Names of common basic properties of
+    // spark.utils.CollatorBase and flash.globalization.Collator
+    private static const IGNORE_CASE:String = "ignoreCase";
+    private static const IGNORE_CHARACTER_WIDTH:String = "ignoreCharacterWidth";
+    private static const IGNORE_DIACRITICS:String = "ignoreDiacritics";
+    private static const IGNORE_KANA_TYPE:String = "ignoreKanaType";
+    private static const IGNORE_SYMBOLS:String = "ignoreSymbols";
+    private static const NUMERIC_COMPARISON:String = "numericComparison";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructs a new CollatorBase object to provide string comparisons
+     *  according to the conventions of a specified locale.
+     *
+     *
The initialMode parameter sets various collation
+     *  options for general uses.
+     *  It can be set to one of the following values:

+     *
+     *

+     *
CollatorMode.SORTING: sets collation options for
+     *       general linguistic sorting usages such as sorting a list of
+     *       text strings that are displayed to an end user.
+     *       In this mode, differences in uppercase and lowercase letters,
+     *       accented characters, and other differences specific to the
+     *       locale are considered when doing string comparisons.

+     *
CollatorMode.MATCHING: sets collation options for
+     *       general usages such as determining if two strings are
+     *       equivalent.
+     *       In this mode, differences in uppercase and lower case letters,
+     *       accented characters, and so on are ignored when doing string
+     *       comparisons.

+     *

+     *
+     *
For more details and examples when using these two modes, please
+     *  see the documentation for the
+     *  flash.globalization.Collator class

+     *
+     *
The locale for this class is supplied by the locale style.
+     *  The locale style can be set in several ways:

+     *
+     *

+     *
Inheriting the style from a UIComponent by calling the
+     *          UIComponent's addStyleClient method.

+     *
By using the class in an MXML declaration and inheriting the
+     *          locale from the document that contains the declaration.
+     *  <listing version="3.0">
+     *  <fx:Declarations>
+     *         <s:StringTools id="st" />
+     *  </fx:Declarations>
+     *  </listing>
+     *

+     *
By using an MXML declaration and specifying the locale value
+     *              in the list of assignments.
+     *  <listing version="3.0">
+     *  <fx:Declarations>
+     *      <s:StringTools id="st_turkish" locale="tr-TR" />
+     *  </fx:Declarations>
+     *  </listing>
+     *

+     *
Calling the setStyle method, e.g.
+     *              st.setStyle("locale", "tr-TR")

+     *

+     *
+     *
If the locale style is not set by one of the above techniques, the
+     *  methods of this class that depend on the locale will throw an
+     *  error.

+     *
+     *  @see flash.globalization.Collator
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function CollatorBase(initialMode:String)
+    {
+        super();
+
+        this.initialMode = initialMode;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    // Actual instance of the working flash.globalization.Collator instance.
+    private var g11nWorkingInstance:flash.globalization.Collator;
+
+    /**
+     *  @private
+     *  Basic properies of the actual underlying working instance.
+     *
+     *  It can be flash.globalization.NumberFormatter/CurrencyFormatter OR
+     *  the fallback's propery set.
+     */
+    protected var properties:Object = null;
+
+    // Cache for the given initialMode through the constructor.
+    private var initialMode:String = null;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  actualLocaleIDName
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  @inheritDoc
+     *
+     *  @see flash.globalization.Collator.actualLocaleIDName
+     *  @see #CollatorBase()
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flash CS5
+     *  @productversion Flex 4.5
+     */
+    override public function get actualLocaleIDName():String
+    {
+        if (g11nWorkingInstance)
+            return g11nWorkingInstance.actualLocaleIDName;
+
+        if (!localeStyle)
+        {
+            fallbackLastOperationStatus
+                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+            return undefined;
+        }
+
+        fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+
+        return "en-US";
+    }
+
+    //----------------------------------
+    //  lastOperationStatus
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  @inheritDoc
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flash CS5
+     *  @productversion Flex 4.5
+     */
+    override public function get lastOperationStatus():String
+    {
+        return g11nWorkingInstance ?
+            g11nWorkingInstance.lastOperationStatus :
+            fallbackLastOperationStatus;
+    }
+
+    //----------------------------------
+    //  useFallback
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  @private
+     */
+    override mx_internal function get useFallback():Boolean
+    {
+        return g11nWorkingInstance == null;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  ignoreCase
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  When this property is set to true, identical strings and strings that
+     *  differ only in the case of the letters are evaluated as equal.
+     *
+     *  @default true when the CollatorBase()
+     *  constructor's initialMode parameter is set to
+     *          Collator.MATCHING.
+     *          false when the CollatorBase()
+     *  constructor's initialMode parameter is set to
+     *          Collator.SORTING.
+     *
+     *  @see flash.globalization.Collator.ignoreCase
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function get ignoreCase():Boolean
+    {
+        return getBasicProperty(properties, IGNORE_CASE);
+    }
+
+    public function set ignoreCase(value:Boolean):void
+    {
+        setBasicProperty(properties, IGNORE_CASE, value);
+    }
+
+    //----------------------------------
+    //  ignoreCharacterWidth
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  When this property is true, full-width and half-width forms of some
+     *  Chinese and Japanese characters are evaluated as equal.
+     *
+     *
For compatibility with existing standards for Chinese and Japanese
+     *  character sets, Unicode provides character codes for both full-width
+     *  and half width-forms of some characters.
+     *  For example, when the ignoreCharacterWidth property is
+     *  set to true,
+     *  compare("Ａｱ", "Aア")
+     *  returns true.

+     *
+     *
If the ignoreCharacterWidth property is set to
+     *  false, then full-width and half-width forms are not
+     *  equal to one another.

+     *
+     *  @default true when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.MATCHING.
+     *          false when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.SORTING.
+     *
+     *  @see #compare()
+     *  @see #equals()
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function get ignoreCharacterWidth():Boolean
+    {
+        return getBasicProperty(properties, IGNORE_CHARACTER_WIDTH);
+    }
+
+    public function set ignoreCharacterWidth(value:Boolean):void
+    {
+        setBasicProperty(properties, IGNORE_CHARACTER_WIDTH, value);
+    }
+
+    //----------------------------------
+    //  ignoreDiacritics
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  When this property is set to true, strings that use the same base
+     *  characters but different accents or other diacritic marks are
+     *  evaluated as equal.
+     *
+     *  For example compare("coté", "côte") returns
+     *  true when the ignoreDiacritics property is
+     *  set to true.
+     *
+     *
When the ignoreDiacritics is set to
+     *  false then base characters with diacritic marks or
+     *  accents are not considered equal to one another.

+     *
+     *
+     *  @default true when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.MATCHING.
+     *          false when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.SORTING.
+     *
+     *  @see #compare()
+     *  @see #equals()
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function get ignoreDiacritics():Boolean
+    {
+        return getBasicProperty(properties, IGNORE_DIACRITICS);
+    }
+
+    public function set ignoreDiacritics(value:Boolean):void
+    {
+        setBasicProperty(properties, IGNORE_DIACRITICS, value);
+    }
+
+    //----------------------------------
+    //  ignoreKanaType
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  When this property is set to true, strings that differ only by the
+     *  type of kana character being used are treated as equal.
+     *
+     *  For example,
+     *  compare("カナ", "かな")
+     *  returns true when the ignoreKanaType
+     *  property is set to true.
+     *
+     *
If the ignoreKanaType is set to false
+     *  then hiragana and katakana characters that refer to the same syllable
+     *  are not equal to one another.

+     *
+     *  @default true when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.MATCHING.
+     *          false when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.SORTING.
+     *
+     *  @see #compare()
+     *  @see #equals()
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function get ignoreKanaType():Boolean
+    {
+        return getBasicProperty(properties, IGNORE_KANA_TYPE);
+    }
+
+    public function set ignoreKanaType(value:Boolean):void
+    {
+        setBasicProperty(properties, IGNORE_KANA_TYPE, value);
+    }
+
+    //----------------------------------
+    //  ignoreSymbols
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  When this property is set to is true, symbol characters such as
+     *  spaces, currency symbols, math symbols, and other types of symbols
+     *  are ignored when sorting or matching.
+     *
+     *  For example the strings "OBrian", "O'Brian", and "O Brian" would all
+     *  be treated as equal when the ignoreSymbols property is
+     *  set to true.
+     *
+     *  @default true when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.MATCHING.
+     *          false when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.SORTING.
+     *
+     *  @see #compare()
+     *  @see #equals()
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function get ignoreSymbols():Boolean
+    {
+        return getBasicProperty(properties, IGNORE_SYMBOLS);
+    }
+
+    public function set ignoreSymbols(value:Boolean):void
+    {
+        setBasicProperty(properties, IGNORE_SYMBOLS, value);
+    }
+
+    //----------------------------------
+    //  numericComparison
+    //----------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  Controls how numeric values embedded in strings are handled during
+     *  string comparison.
+     *
+     *
When the numericComparison property is set to
+     *  true, the compare method converts numbers that appear in
+     *  strings to numerical values for comparison.

+     *
+     *
When this property is set to false, the comparison
+     *  treats numbers as character codes and sort them according to the
+     *  rules for sorting characters in the specified locale.

+     *
+     *
For example, when this property is true for the locale ID "en-US",
+     *  then the strings "version1", "version10", and "version2" are sorted
+     *  into the following order: version1 < version2 < version10.

+     *
+     *
When this property is false for "en-US", those same strings
+     *  are sorted into the following order: version1 < version10 <
+     *  version2.

+     *
+     *  @default true when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.MATCHING.
+     *          false when the CollatorBase()
+     *          constructor's initialMode parameter is set to
+     *          Collator.SORTING.
+     *
+     *  @see #compare()
+     *  @see #equals()
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function get numericComparison():Boolean
+    {
+        return getBasicProperty(properties, NUMERIC_COMPARISON);
+    }
+
+    public function set numericComparison(value:Boolean):void
+    {
+        setBasicProperty(properties, NUMERIC_COMPARISON, value);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override mx_internal function createWorkingInstance():void
+    {
+        if (!localeStyle)
+        {
+            fallbackLastOperationStatus
+                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+            g11nWorkingInstance = null;
+            properties = null;
+            return;
+        }
+
+        if (enforceFallback)
+        {
+            fallbackInstantiate();
+            g11nWorkingInstance = null;
+            return;
+        }
+
+        g11nWorkingInstance =
+                    new flash.globalization.Collator(localeStyle, initialMode);
+        if (g11nWorkingInstance
+                && (g11nWorkingInstance.lastOperationStatus
+                                    != LastOperationStatus.UNSUPPORTED_ERROR))
+        {
+            properties = g11nWorkingInstance;
+            propagateBasicProperties(g11nWorkingInstance);
+            return;
+        }
+
+        fallbackInstantiate();
+        g11nWorkingInstance = null;
+
+        if (fallbackLastOperationStatus == LastOperationStatus.NO_ERROR)
+        {
+            fallbackLastOperationStatus
+                                = LastOperationStatus.USING_FALLBACK_WARNING;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    [Bindable("change")]
+
+    /**
+     *  Compares two strings and returns an integer value indicating whether
+     *  the first string is less than, equal to, or greater than the second
+     *  string.
+     *
+     *  The comparison uses the sort order rules for the locale sytle that is
+     *  in effect when the compare method is called.
+     *
+     *  @param string1 First comparison string.
+     *  @param string2 Second comparison string.
+     *  @return An integer value indicating whether the first string is less
+     *         than, equal to, or greater than the second string.2
+     *

+     *
If the return value is negative, string1
+     *                  is less than string2.

+     *
If the return value is zero, string1 is
+     *                  equal to string2.

+     *
If the return value is positive, string1
+     *                  is larger than string2.

+     *

+     *
+     *  @see #CollatorBase()
+     *  @see #equals()
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function compare(string1:String, string2:String):int
+    {
+        if (g11nWorkingInstance)
+            return g11nWorkingInstance.compare(string1, string2);
+
+        if (!localeStyle)
+        {
+            fallbackLastOperationStatus
+                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+            return undefined;
+        }
+
+        fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+
+            return ObjectUtil.stringCompare(
+                                    string1, string2, properties.ignoreCase);
+    }
+
+    [Bindable("change")]
+
+    /**
+     *  Compares two strings and returns a Boolean value indicating whether
+     *  the strings are equal.
+     *
+     *  The comparison uses the sort order rules for the locale ID that was
+     *  specified in the CollatorBase() constructor.
+     *
+     *  @param string1 First comparison string.
+     *  @param string2 Second comparison string.
+     *  @return A Boolean value indicating whether the strings are equal
+     *         (true) or unequal (false).
+     *
+     *  @see #CollatorBase()
+     *  @see #compare
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flex 4.5
+     *  @productversion Flash CS5
+     */
+    public function equals(string1:String, string2:String):Boolean
+    {
+        if (g11nWorkingInstance)
+            return g11nWorkingInstance.equals(string1, string2);
+
+        if (!localeStyle)
+        {
+            fallbackLastOperationStatus
+                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+            return undefined;
+        }
+
+        fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+
+        return ObjectUtil.stringCompare(
+                                string1, string2, properties.ignoreCase) == 0;
+    }
+
+    /**
+     *  Lists all of the locale ID names supported by this class.
+     *
+     *  @return A vector of strings containing all of the locale ID names
+     *         supported by this class and operating system.
+     *
+     *  @playerversion Flash 10.1
+     *  @langversion 3.0
+     *  @productversion Flash CS5
+     *  @productversion Flex 4.5
+     */
+    public static function getAvailableLocaleIDNames():Vector.<String>
+    {
+        const locales:Vector.<String>
+                    = flash.globalization.Collator.getAvailableLocaleIDNames();
+
+        return locales ? locales : new Vector.<String>["en-US"];
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Imaginary constructor of FallbackCollator.
+     *
+     *  All it does is to check if the given parameters are correct and do
+     *  nothing.
+     */
+    private function fallbackInstantiate():void
+    {
+        const validInitialMode:Boolean =
+            (initialMode == CollatorMode.MATCHING)
+                                || (initialMode == CollatorMode.SORTING);
+
+        fallbackLastOperationStatus = validInitialMode ?
+            LastOperationStatus.NO_ERROR :
+            LastOperationStatus.INVALID_ATTR_VALUE;
+
+        properties =
+            {
+                ignoreCase: (initialMode == CollatorMode.MATCHING),
+                ignoreCharacterWidth: false,
+                ignoreDiacritics: false,
+                ignoreKanaType: false,
+                ignoreSymbols: false,
+                numericComparison: false
+            };
+
+        propagateBasicProperties(properties);
+    }
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17491
Author:   aharui@adobe.com
Date:     2010-08-26T18:31:34.581497Z

Log Message:
-----------
Handle clipped sub-apps

QE notes: none
Doc notes: New optional parameter to SystemManager.getVisibleApplicationRect
Bugs: SDK-26478
Reviewer: Darrell
Tests run: checkintests mustella/MarshallPlan
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/FTEAdvancedDataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>

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

--- frameworks/projects/mx/src/mx/controls/PopUpButton.as
+++ frameworks/projects/mx/src/mx/controls/PopUpButton.as
@@ -878,7 +878,7 @@
         var easingFunction:Function;
         var duration:Number;
         var sm:ISystemManager = systemManager.topLevelSystemManager;
-        var screen:Rectangle = sm.getVisibleApplicationRect();
+        var screen:Rectangle = sm.getVisibleApplicationRect(null, true);

         if (show)
         {


Actually, let's do that this way.

Actually, let's do that this way.

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

--- src/as/com/threerings/crowd/chat/client/ChatDirector.as
+++ src/as/com/threerings/crowd/chat/client/ChatDirector.as
@@ -619,7 +619,9 @@
         removeAuxiliarySource(_clobj);
         addAuxiliarySource(_clobj = event.getClient().getClientObject(), ChatCodes.USER_CHAT_TYPE);

-        clientLeftOrChanged();
+        if (clearChatOnClientExit()) {
+            clearDisplays();
+        }
     }

     // documentation inherited
@@ -635,6 +637,10 @@
         // in fact, clear out all auxiliary sources
         _auxes.clear();

+        if (clearChatOnClientExit()) {
+            clearDisplays();
+        }
+
         // clear out the list of people we've chatted with
         _chatters.length = 0;
         notifyChatterObservers();
@@ -644,16 +650,6 @@

         // clear our service
         _cservice = null;
-
-        clientLeftOrChanged();
-    }
-
-    /**
-     * Overridable.
-     */
-    protected function clientLeftOrChanged () :void
-    {
-        clearDisplays();
     }

     /**
@@ -987,6 +983,12 @@
         _cservice = (client.requireService(ChatService) as ChatService);
     }

+    /** Overrideable. */
+    protected function clearChatOnClientExit () :Boolean
+    {
+        return true;
+    }
+
     /** Our active chat context. */
     protected var _cctx :CrowdContext;


remove deprecated classes

remove deprecated classes

--- src/aerys/minko/type/animation/TimeLabel.as
+++ src/aerys/minko/type/animation/TimeLabel.as
@@ -1,39 +0,0 @@
-package aerys.minko.type.animation
-{
-	public final class TimeLabel
-	{
-		private var _name : String;
-		private var _time : Number;
-
-		public function set name(value : String) : void
-		{
-			_name = value;
-		}
-
-		public function set time(value : Number) : void
-		{
-			_time = value;
-		}
-
-		public function get name() : String
-		{
-			return _name;
-		}
-
-		public function get time() : Number
-		{
-			return _time;
-		}
-
-		public function TimeLabel(name : String, time : Number)
-		{
-			_name = name;
-			_time = time;
-		}
-
-		public static function sort(label1 : TimeLabel, label2 : TimeLabel) : int
-		{
-			return label2._time - label1._time;
-		}
-	}
-}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12478
Author:   gosmith@adobe.com
Date:     2009-12-04T01:03:50.724937Z

Log Message:
-----------
The partAdded() and partRemoved() methods of Spark components now dispatch new events named "partAdded" and "partRemoved", of type SkinPartEvent. The accessibility implementation classes will soon use these events to know when skin parts are added and removed so that they can attach and remove event handlers appropriately. This mechanism may change in a future release, so developers should not depend on these undocumented events.

I've made sure that all overrides of partAdded() and partRemoved() call the supermethod so that they dispatch these events.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.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/spark/src/spark/components/List.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/SkinPartEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.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/SkinnableDataContainer.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/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
@@ -537,9 +537,10 @@
             if (dropDownController)
                 dropDownController.openButton = openButton;
         }
-
-        if (instance == dropDown && dropDownController)
+        else if (instance == dropDown && dropDownController)
+		{
             dropDownController.dropDown = dropDown;
+		}
     }

     /**
@@ -555,7 +556,7 @@
             if (instance == dropDown)
                 dropDownController.dropDown = null;
         }
-
+
         super.partRemoved(partName, instance);
     }


fixed serialization problem with recursive data structures

--- src/src/com/backendless/data/store/Utils.as
+++ src/src/com/backendless/data/store/Utils.as
@@ -35,18 +35,28 @@

   public class Utils
   {
-    public static function prepareArgForSend( obj:Object ):Object
+    public static function prepareArgForSend( obj:Object, context:Dictionary = null ):Object
     {
+      if( context == null )
+        context = new Dictionary();
+
+      if( context[ obj ] != null )
+        return context[ obj ];
+
       if( obj is BackendlessGeoQuery || obj is ArrayCollection || obj is GeoPoint || obj is GeoCluster )
       {
         return obj;
       }
       else if( obj is Array )
       {
+        var arrayCopy:Array = new Array();
+        arrayCopy.length = (obj as Array).length;
+        context[ obj ] = arrayCopy;
+
         for( var prop:* in obj )
-          obj[ prop ] = prepareArgForSend( obj[ prop ] );
+          arrayCopy[ prop ] = prepareArgForSend( obj[ prop ], context );

-        return obj;
+        return arrayCopy;
       }
       else if( obj is BackendlessCollection )
       {
@@ -69,6 +79,7 @@
       else if( !ObjectUtil.isSimple( obj ) && !(obj is ByteArray))
       {
         var targetObject:Object = {};
+        context[ obj ] = targetObject;
         var objInfo:Object = ObjectUtil.getClassInfo( obj );

         //var xDesc:XML = describeType( Object( obj ).constructor );
@@ -82,7 +93,7 @@
           var objProp:* = obj[ item.localName ];

           if( objProp != null && (!ObjectUtil.isSimple( objProp ) || objProp is Array) )
-            targetObject[ item.localName ] = prepareArgForSend( objProp );
+            targetObject[ item.localName ] = prepareArgForSend( objProp, context );
           else
             targetObject[ item.localName ] = objProp;
         }


fixed null pointer errors.

fixed null pointer errors.

--- WeaveData/src/weave/data/ProjectionManager.as
+++ WeaveData/src/weave/data/ProjectionManager.as
@@ -29,9 +29,7 @@
 	import org.openscales.proj4as.ProjProjection;

 	import weave.api.WeaveAPI;
-	import weave.api.core.ILinkableObject;
 	import weave.api.data.IAttributeColumn;
-	import weave.api.data.IColumnReference;
 	import weave.api.data.IProjectionManager;
 	import weave.api.data.IProjector;
 	import weave.api.newDisposableChild;
@@ -424,8 +422,11 @@
 		for (var i:int = 0; i < keys.length; i++)
 		{
 			var value:Array = unprojectedColumn.getValueFromKey(keys[i]) as Array;
-			numGeoms += value.length;
-			values.push(value);
+			if (value)
+			{
+				numGeoms += value.length;
+				values.push(value);
+			}
 		}
 		keyIndex = 0;
 		coordsVectorIndex = 0;
@@ -531,7 +532,8 @@

 		// after all geometries have been reprojected, update the reprojected column
 		var geomColumn:GeometryColumn = reprojectedColumn.getInternalColumn() as GeometryColumn;
-		geomColumn.setGeometries(keysVector, geomVector);
+		if (geomColumn)
+			geomColumn.setGeometries(keysVector, geomVector);

 		reprojectedColumn.triggerCallbacks();
 		reprojectedColumn.resumeCallbacks();