Transferred from the Adobe Open Source Subversion Repository

Revision: 18635
Author:   aharui@adobe.com
Date:     2010-11-17T00:18:36.469040Z

Log Message:
-----------
Add estimatedSizes to the layout infrastructure to better deal with text reflow.
Add new events to layout infrastructure to deal with caching of size information

QE notes: New APIs and Interfaces
Doc notes: New APIs and interfaces
Bugs: SDK-27226, SDK-26155, SDK-25483, SDK-23621, SDK-27225, SDK-26993, SDK-25535, SDK-25521
Reviewer: Evtim
Tests run: checkintests mustella full run
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Application.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/IContainerInvalidating.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/FormTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ILayoutManagerContainerClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/IStyleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Container.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -19,15 +19,18 @@
 import flash.utils.getQualifiedClassName;

 import mx.collections.IList;
+import mx.core.FlexVersion;
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
 import mx.core.IInvalidating;
 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
+import mx.core.UIComponentGlobals;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.PropertyChangeEvent;
+import mx.managers.ILayoutManagerClient;
 import mx.utils.MatrixUtil;

 import spark.components.supportClasses.GroupBase;
@@ -257,6 +260,23 @@
     {
         if (_typicalItem === value)
             return;
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+        {
+            if (_typicalItem)
+            {
+                if (layout && layout.typicalLayoutElement)
+                {
+                    // we already removed it from the display
+                    // object tree in initializeTypicalElement
+                    // so that it doesn't affect bounds
+                    // calculations, but we left it in the
+                    // styles and layout heirarchy.  Remove
+                    // from those hierarchies now.
+                    removingChild(DisplayObject(layout.typicalLayoutElement));
+                    childRemoved(DisplayObject(layout.typicalLayoutElement));
+                }
+            }
+        }
         _typicalItem = explicitTypicalItem = value;
         typicalItemChanged = true;
         invalidateProperties();
@@ -285,12 +305,30 @@
             return;
         }

-        super.addChild(obj);
+        super.addChild(obj);
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+        {
+            if (obj is ILayoutElement && layout)
+                layout.computeEstimatedSizeOfElement(ILayoutElement(obj));
+        }
+
         setUpItemRenderer(renderer, 0, _typicalItem);
-        if (obj is IInvalidating)
-            IInvalidating(obj).validateNow();
+		if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+		{
+			if (renderer is ILayoutManagerClient)
+				UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(renderer), true);
+			renderer.setLayoutBoundsSize(NaN, NaN);
+		}
+		else
+		{
+        	if (obj is IInvalidating)
+            	IInvalidating(obj).validateNow();
+		}
         setTypicalLayoutElement(renderer);
-        super.removeChild(obj);
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+            $removeChild(obj);
+        else
+            super.removeChild(obj);
     }

     /**
@@ -363,6 +401,9 @@
         if (value == oldLayout)
             return;

+		if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+			typicalItem = null;
+
         if (oldLayout)
         {
             oldLayout.typicalLayoutElement = null;
@@ -1246,7 +1287,8 @@
                 // Reset back to (0,0), otherwise when the element is reused
                 // it will be validated at its last layout size which causes
                 // problems with text reflow.
-                elt.setLayoutBoundsSize(0, 0, false);
+                if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+                    elt.setLayoutBoundsSize(0, 0, false);

                 freeRenderers.push(elt);
             }
@@ -1392,10 +1434,13 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    override public function getVirtualElementAt(index:int, eltWidth:Number=NaN, eltHeight:Number=NaN):IVisualElement
+    override public function getVirtualElementAt(index:int, eltWidth:Number=NaN, eltHeight:Number=NaN, skipValidation:Boolean = false):IVisualElement
     {
         if ((index < 0) || (dataProvider == null) || (index >= dataProvider.length))
             return null;
+
+        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+            skipValidation = false;

         var elt:IVisualElement = indexToRenderer[index];

@@ -1432,12 +1477,12 @@
                 // If we're going to set the width or height of this
                 // layout element, first force it to initialize its
                 // measuredWidth,Height.
-                if (elt is IInvalidating)
+                if (elt is IInvalidating && !skipValidation)
                     IInvalidating(elt).validateNow();
                 elt.setLayoutBoundsSize(eltWidth, eltHeight);
             }

-            if (elt is IInvalidating)
+            if (elt is IInvalidating && !skipValidation)
                 IInvalidating(elt).validateNow();

             if (createdIR)
@@ -1650,7 +1695,29 @@

         if (childParent == this)
         {
-            super.setChildIndex(child, childIndex - 1);
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+            {
+                // test to see if we're truly parented
+                try
+                {
+                    var curIndex:int = getChildIndex(child)
+                }
+                catch (e:Error)
+                {
+                    curIndex = -1;
+                }
+                if (child == typicalLayoutElement && curIndex == -1)
+                {
+                    // we removed it from the display list but not
+                    // from the parent chain so it can be re-validated.
+                    // add it back
+                    $addChildAt(child, childIndex)
+                }
+                else
+                    super.setChildIndex(child, childIndex - 1);
+            }
+            else
+                super.setChildIndex(child, childIndex - 1);
             return;
         }

@@ -1662,6 +1729,10 @@
             invalidateLayering();

         super.addChildAt(child, childIndex);
+
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+            if (layout && child is ILayoutElement)
+                layout.computeEstimatedSizeOfElement(ILayoutElement(child));
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 11660
Author:   rfrishbe@adobe.com
Date:     2009-11-11T18:42:54.860139Z

Log Message:
-----------
Change IItemRendererOwner’s updateRenderer() method definition to:

/**
 *  Updates the renderer for re-use. This first prepares the item
 *  renderer for re-use by clearing out any stale properties
 *  as well as updating it with new properties.
 *
 *
The last thing this method should do is set the data property
 *  on the renderer.

 *
 *  @param renderer The item renderer.
 *  @param itemIndex The index of the data in the data provider
 *  @param data The data object this item renderer is representing
 *
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void;

Before, it only took one parameter, the renderer.  Now it takes 3.

The reason for this change is to make the code a little cleaner in terms of the separation between DataGroup and List.  Now DataGroup won’t do any work if the mx_internal _rendererUpdateDelegate is set.  If it is set (to a List for instance), then _rendererUpdateDelegate.updateRenderer(renderer, itemIndex, data) will be called.  This makes the updateRenderer() pass more clear because it’s all done in the rendererUpdateDelegate (rather than splitting it in DataGroup and ListBase).  It also makes it easier to get the ordering of properties correctly as we want the “data” property to be the last set property as part of the “item renderer contract”.

As part of this change, DataGroup is the default _rendererUpdateDelegate, and because of this it now implements IItemRendererOwner.  The only other method on IItemRendererOwner besides updateRenderer() is itemToLabel().  DataGroup already had a private itemToLabel() method, so I’m just making it public.

Also, I'm making label and itemIndex bindable to the "dataChange" event now.

QE notes: Please test that the data property is the last thing set
Doc notes: You could update the documentation around item renderers to mention that the data property should be the last thing set.
Bugs: SDK-19870, SDK-24086
Reviewer: Deepa
Tests run: checkintest, mustella list, listdragdrop, dropdownlist, combobox, buttonbar
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/IItemRendererOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.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/supportClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -138,7 +138,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class DataGroup extends GroupBase
+public class DataGroup extends GroupBase implements IItemRendererOwner
 {
     /**
      *  Constructor.
@@ -151,6 +151,8 @@
     public function DataGroup()
     {
         super();
+
+        _rendererUpdateDelegate = this;
     }

     /**
@@ -243,7 +245,7 @@
         }

         super.addChild(obj);
-        updateRenderer(renderer, 0, _typicalItem);
+        setUpItemRenderer(renderer, 0, _typicalItem);
         if (obj is IInvalidating)
             IInvalidating(obj).validateNow();
         setTypicalLayoutElement(renderer);
@@ -613,13 +615,13 @@
     }

     /**
-     *  @private
+     *  @inheritDoc
+     *
      *  Given a data item, return the toString() representation
      *  of the data item for an item renderer to display. Null
      *  data items return the empty string.
-     *
-     */
-    private function itemToLabel(item:Object):String
+     */
+    public function itemToLabel(item:Object):String
     {
         if (item !== null)
             return item.toString();
@@ -765,16 +767,17 @@
     /**
      *  @private
      *  Sets the renderer's data, owner and label properties.
-     *  Then, gives the "true" owner a chance to call update the
-     *  renderer if this DataGroup is not the owner. "True" owners
-     *  would use their impl of updateRenderer to clear out stale
-     *  properties for when the renderer is being recycled, and set
-     *  new properties like owner, label, selected, etc.
-     *
-     */
-    private function updateRenderer(renderer:IVisualElement, index:int, data:Object):void
-    {
-        // THIS NEEDS TO STAY IN SYNCH WITH ListItemDragProxy.as
+     *  It does this by calling rendererUpdateDelegate.updateRenderer().
+     *  By default, rendererUpdateDelegate points to ourselves, but if
+     *  the "true owner" of the item renderer is a List, then the
+     *  rendererUpdateDelegate points to that object.  The
+     *  rendererUpdateDelegate.updateRenderer() call is in charge of
+     *  setting all the properties on the renderer, like owner, itemIndex,
+     *  data, selected, etc...  Note that data should be the last property
+     *  set in this lifecycle.
+     */
+    private function setUpItemRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
+    {
         if (!renderer)
            return;

@@ -782,35 +785,40 @@
         // so we can ignore any collectionChange.UPDATE events
         renderersBeingUpdated = true;

-        // Set the data
-        if ((renderer is IDataRenderer) && (renderer !== data))
-            IDataRenderer(renderer).data = data;
-
-        // Newly created renderer with no owner, set owner to this
-        if (!renderer.owner)
-            renderer.owner = this;
-
-        // Set the index
-        if (renderer is IItemRenderer)
-            IItemRenderer(renderer).itemIndex = index;
-
-        // If a delegate is specified defer to the rendererUpdateDelegate
-        // to update the renderer.
-        if (_rendererUpdateDelegate)
-            _rendererUpdateDelegate.updateRenderer(renderer);
-
-        // Else if we're the owner, set the label to the toString()
-        // of the data
-        else if (renderer.owner == this && renderer is IItemRenderer)
-            IItemRenderer(renderer).label = itemToLabel(data);
+        // Defer to the rendererUpdateDelegate
+        // to update the renderer.  By default, the delegate is DataGroup
+        _rendererUpdateDelegate.updateRenderer(renderer, itemIndex, data);

         // technically if this got called "recursively", this renderersBeingUpdated flag
         // would be prematurely set to false, but in most cases, this check should be
         // good enough.
         renderersBeingUpdated = false;
     }
-
-
+
+    /**
+     *  @inheritDoc
+     */
+    public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
+    {
+        // set the owner
+        renderer.owner = this;
+
+        // Set the index
+        if (renderer is IItemRenderer)
+            IItemRenderer(renderer).itemIndex = itemIndex;
+
+        // set the label to the toString() of the data
+        if (renderer is IItemRenderer)
+            IItemRenderer(renderer).label = itemToLabel(data);
+
+        // always set the data last
+        if ((renderer is IDataRenderer) && (renderer !== data))
+            IDataRenderer(renderer).data = data;
+    }
+
+    /**
+     *  @private
+     */
     private function manageDisplayObjectLayers():void
     {
         // itemRenderers should be both DisplayObjects and IVisualElements
@@ -1175,7 +1183,7 @@

             if (createdIR || recycledIR)
             {
-                updateRenderer(elt, index, item);
+                setUpItemRenderer(elt, index, item);
                 if (!isNaN(eltWidth) || !isNaN(eltHeight))
                 {
                     // If we're going to set the width or height of this
@@ -1302,7 +1310,7 @@
         var myItemRenderer:IVisualElement = createRendererForItem(item);
         indexToRenderer.splice(index, 0, myItemRenderer);
         addItemRendererToDisplayList(myItemRenderer as DisplayObject, index);
-        updateRenderer(myItemRenderer, index, item);
+        setUpItemRenderer(myItemRenderer, index, item);
         dispatchEvent(new RendererExistenceEvent(
                       RendererExistenceEvent.RENDERER_ADD, false, false,
                       myItemRenderer, index, item));
@@ -1486,7 +1494,7 @@
                     {
                         var index:int = dataProvider.getItemIndex(pe.source);
                         var renderer:IVisualElement = indexToRenderer[index];
-                        updateRenderer(renderer, index, pe.source);
+                        setUpItemRenderer(renderer, index, pe.source);
                     }
                 }
                 break;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3483
Author:   rfrishbe@adobe.com
Date:     2008-10-04T00:27:35.945772Z

Log Message:
-----------
Few different changes, most to Group and DataGroup:

1.  GroupBase - added simple class ASDoc so it'll hopefully be included in the nightly ASDoc builds

2.  Group - Removed support for ILists from Group.

3.  ToggleButton - Moved around a method from skinLoaded to the constructor since it was just adding an event listener to the object and not the skin instance

4.  DataGroup - Cleaned up a lot of the logic when a collectionChange event happens so that we don't just remove everything and add everything all the time. This also fixes a bug.  Will work with QA to make sure this gets tested for all scenarios.

QE: Yes
Doc: Yes
Bugs: SDK-17179
Reviewer: Evtim, Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -428,7 +428,7 @@
             childDO = createVisualForItem(item);
         }

-        addItemToDisplayList(childDO, item);
+        addItemToDisplayList(childDO, item, index);

         dispatchEvent(new ItemExistenceChangedEvent(
                       ItemExistenceChangedEvent.ITEM_ADD, false, false, item));
@@ -437,9 +437,8 @@
         invalidateDisplayList();
     }

-    protected function itemRemoved(index:int):void
+    protected function itemRemoved(item:Object, index:int):void
     {
-        var item:* = _dataProvider.getItemAt(index);
         var skin:* = getItemSkin(item);
         var childDO:DisplayObject = item as DisplayObject;

@@ -450,7 +449,7 @@
             item.elementHost = null;
             item.sharedDisplayObject = null;
             childDO = GraphicElement(item).displayObject;
-        }
+        }
         else if (skin && skin is DisplayObject)
         {
             childDO = skin as DisplayObject;
@@ -520,40 +519,121 @@
         {
             var ce:CollectionEvent = CollectionEvent(event);

-            if (ce.kind == CollectionEventKind.ADD)
+            switch (ce.kind)
             {
+                case CollectionEventKind.ADD:
+                {
+                    // items are added
+                    // figure out what items were added and where
+                    // for virtualization also figure out if items are now in view
+                    adjustAfterAdd(ce.items, ce.location);
+                    break;
+                }
+
+                case CollectionEventKind.REPLACE:
+                {
+                    // items are replaced
+                    adjustAfterReplace(ce.items, ce.location);
+                    break;
+                }
+
+                case CollectionEventKind.REMOVE:
+                {
+                    // items are added
+                    // figure out what items were removed
+                    // for virtualization also figure out what items are now in view
+                    adjustAfterRemove(ce.items, ce.location);
+                    break;
+                }

+                case ce.kind == CollectionEventKind.MOVE:
+                {
+                    // one item is moved
+                    adjustAfterMove(ce.items[0], ce.location, ce.oldLocation);
+                    break;
+                }
+
+                case CollectionEventKind.REFRESH:
+                {
+                    // from a filter or sort...let's just reset everything
+                    dataProviderChanged = true;
+                    invalidateProperties();
+                    break;
+                }
+
+                case CollectionEventKind.RESET:
+                {
+                    // reset everything
+                    dataProviderChanged = true;
+                    invalidateProperties();
+                    break;
+                }
+
+                case CollectionEventKind.UPDATE:
+                {
+                    // update event, do nothing
+                    // TODO: maybe we need to do something here, like recreate renderer?
+                    break;
+                }
             }
-            else if (ce.kind == CollectionEventKind.REPLACE)
-            {
-
-            }
-            else if (ce.kind == CollectionEventKind.REMOVE)
-            {
-
-            }
-            else if (ce.kind == CollectionEventKind.MOVE)
-            {
-
-            }
-            else if (ce.kind == CollectionEventKind.REFRESH)
-            {
-
-            }
-            else if (ce.kind == CollectionEventKind.RESET)
-            {
-            }
-            else if (ce.kind == CollectionEventKind.UPDATE)
-            {
-                return;
-            }
-
-            // TODO!! Fow now, always reapply the content. This needs to
-            // be optimized in the future
-           dataProviderChanged = true;
-           invalidateProperties();
-        }
-
+        }
+
+    }
+
+    /**
+     *  @private
+     */
+    protected function adjustAfterAdd(items:Array, location:int):void
+    {
+        var length:int = items.length;
+        for (var i:int = 0; i < length; i++)
+        {
+            itemAdded(items[i], location + i);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    protected function adjustAfterRemove(items:Array, location:int):void
+    {
+        var length:int = items.length;
+        for (var i:int = length-1; i >= 0; i--)
+        {
+            itemRemoved(items[i], location + i);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    protected function adjustAfterMove(item:Object, location:int, oldLocation:int):void
+    {
+        itemRemoved(item, oldLocation);
+
+        // if item is removed before the newly added item
+        // then change index to account for this
+        if (location > oldLocation)
+            itemAdded(item, location-1);
+        else
+            itemAdded(item, location);
+    }
+
+    /**
+     *  @private
+     */
+    protected function adjustAfterReplace(items:Array, location:int):void
+    {
+        var length:int = items.length;
+        for (var i:int = length-1; i >= 0; i--)
+        {
+            itemRemoved(items[i].oldValue, location + i);
+        }
+
+        for (var k:int = length-1; k >= 0; k--)
+        {
+            itemAdded(items[k].newValue, location);
+        }
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 3516
Author:   jimurphy@adobe.com
Date:     2008-10-08T00:32:26.683603Z

Log Message:
-----------
various fixes caused during the rename:
-gumbo manifest,fixed typo
-halo-manifest.xml, fixed flex 4 graphics section with updated mx.graphics package names
-mxml-2009-manifest.xml, fixed FxVGroup to be VGroup
-removed flex directory
-fixed bad rename of AnimationEvent and updated with FlexEvent

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxFadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/halo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.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/gumbo-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/components/TextInput.as
+++ frameworks/projects/spark/src/spark/components/TextInput.as
@@ -29,7 +29,7 @@
 /**
  *  Dispatched when the user pressed the Enter key.
  */
-[Event(name="enter", type="mx.events.AnimationEvent")]
+[Event(name="enter", type="mx.events.FlexEvent")]

 //--------------------------------------
 //  Other metadata


Issue #73: Wait for startup getCredential() outcome before proceeding.

--- src/com/esri/builder/controllers/ApplicationCompleteController.as
+++ src/com/esri/builder/controllers/ApplicationCompleteController.as
@@ -86,31 +86,6 @@
         XML.ignoreWhitespace = true;
         XML.prettyIndent = 4;

-        var portalURL:String = PortalModel.getInstance().portalURL;
-        var idManager:IdentityManager = IdentityManager.instance;
-
-        idManager.enabled = true;
-
-        if (PortalModel.getInstance().isAGO(portalURL))
-        {
-            idManager.addEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
-            PortalModel.getInstance().registerOAuthPortal(portalURL);
-            idManager.getCredential(portalURL, false, new Responder(getCredentialOutcomeHandler,
-                                                                    getCredentialOutcomeHandler));
-
-            function getCredentialOutcomeHandler(outcome:Object):void
-            {
-                idManager.removeEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
-            }
-
-            function showOAuthWebViewHandler(event:IdentityManagerEvent):void
-            {
-                idManager.removeEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
-                event.preventDefault();
-                idManager.setCredentialForCurrentSignIn(null);
-            }
-        }
-
         ToolTipManager.toolTipClass = ToolTip;

         // Can only have access to 'loaderInfo' when the app is complete.
@@ -354,7 +329,41 @@
     protected function widgetTypeLoader_completeHandler(event:Event):void
     {
         (event.currentTarget as StartupWidgetTypeLoader).removeEventListener(Event.COMPLETE, widgetTypeLoader_completeHandler);
-        validateSettings();
+        initIdentityManager();
+    }
+
+    private function initIdentityManager():void
+    {
+        var portalURL:String = PortalModel.getInstance().portalURL;
+        var idManager:IdentityManager = IdentityManager.instance;
+
+        idManager.enabled = true;
+
+        if (PortalModel.getInstance().isAGO(portalURL))
+        {
+            idManager.addEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
+            PortalModel.getInstance().registerOAuthPortal(portalURL);
+            idManager.getCredential(portalURL, false, new Responder(getCredentialOutcomeHandler,
+                                                                    getCredentialOutcomeHandler));
+
+            function getCredentialOutcomeHandler(outcome:Object):void
+            {
+                idManager.removeEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
+                validateSettings();
+            }
+
+            function showOAuthWebViewHandler(event:IdentityManagerEvent):void
+            {
+                idManager.removeEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
+                event.preventDefault();
+                idManager.setCredentialForCurrentSignIn(null);
+                validateSettings();
+            }
+        }
+        else
+        {
+            validateSettings();
+        }
     }

     private function validateSettings():void


code cleanup

code cleanup

--- WeaveData/src/weave/data/DataSources/CensusDataSource.as
+++ WeaveData/src/weave/data/DataSources/CensusDataSource.as
@@ -21,21 +21,17 @@
     import weave.api.data.IDataSource;
     import weave.api.data.IDataSource_Service;
     import weave.api.data.IWeaveTreeNode;
-    import weave.api.getCallbackCollection;
     import weave.api.newLinkableChild;
     import weave.api.registerLinkableChild;
     import weave.api.reportError;
-    import weave.compiler.Compiler;
     import weave.compiler.StandardLib;
-    import weave.core.LinkablePromise;
     import weave.core.LinkableString;
     import weave.core.LinkableVariable;
     import weave.data.AttributeColumns.ProxyColumn;
     import weave.data.hierarchy.ColumnTreeNode;
     import weave.services.JsonCache;
     import weave.utils.DataSourceUtils;
-    import weave.utils.VectorUtils;
-    import weave.utils.WeavePromise;
+    import weave.utils.VectorUtils;

     public class CensusDataSource extends AbstractDataSource implements IDataSource_Service
     {
@@ -47,10 +43,8 @@
         private static const VARIABLES_DATA:String = "__CensusDataSource__variablesData";
         private static const GEOGRAPHY_DATA:String = "__CensusDataSource__geographyData";

-
         private static const GEOGRAPHY_LINK:String = "__CensusDataSource__geographyLink";
         private static const VARIABLES_LINK:String = "__CensusDataSource__variablesLink";
-

         private static const GEOGRAPHY_REQUIRES:String = "__CensusDataSource__geographyRequires";
         private static const GEOGRAPHY_NAME:String = "__CensusDataSource__geographyName";
@@ -63,8 +57,6 @@
         public function CensusDataSource()
         {
         }
-
-

         override protected function initialize():void
         {
@@ -93,14 +85,6 @@
 				paramsStr += (paramsStr ? '&' : '?') + key + '=' + params[key];
 			return serviceUrl + paramsStr;
 		}
-		/**
-		 * @param method Examples: "category", "category/series"
-		 * @param params Example: {category_id: 125}
-		 */
-		private function getJson(method:String, params:Object, handler:Function):void
-		{
-			jsonCache.getJsonObject(getUrl(method, params), handler);
-		}

 		public function createTopLevelNode():ColumnTreeNode
 		{
@@ -113,7 +97,7 @@
 				label: data.name,
 				hasChildBranches: true,
 				children: function(node:ColumnTreeNode):Array {
-					jsonCache.getJsonObject(baseUrl+"data.json", function(result:Object):void
+					jsonCache.getJsonObject(baseUrl + "data.json", function(result:Object):void
 						{
 							data.result = result;
 							for each (var dataSet:Object in result)
@@ -125,7 +109,8 @@
 								metadata.label = dataSet.title;
 								children.push(createDataSetNode(metadata));
 							}
-						});
+						}
+					);
 					return children;
 				}
 			});
@@ -189,8 +174,6 @@

 								concepts[concept_name] = concepts[concept_name] || {};

-
-
 								var metadata:Object = VectorUtils.getItems(data, node.idFields);
 								metadata[VARIABLE_NAME] = key;
 								metadata[CONCEPT_NAME] = concept_name;
@@ -207,7 +190,7 @@
 							}
 							StandardLib.sortOn(children, "label");
 						}
-						);
+					);
 					return children;
 				}
 			})


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

--- frameworks/projects/charts/src/mx/charts/LegendItem.as
+++ frameworks/projects/charts/src/mx/charts/LegendItem.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 mx.charts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 16663
Author:   egeorgie@adobe.com
Date:     2010-06-24T21:23:01.776267Z

Log Message:
-----------
Tweak framework perf instrumentation

- Replace .toString() calls with name, since it's cheaper
- Add tolerance of 2 ms.

QE notes: None
Doc notes: None
Bugs: N/A
Reviewer: Ryan
Tests run: ant main, doc, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/PerfUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>

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

--- frameworks/projects/framework/src/mx/utils/PerfUtil.as
+++ frameworks/projects/framework/src/mx/utils/PerfUtil.as
@@ -1,6 +1,9 @@
 package mx.utils
 {
+import flash.display.DisplayObject;
 import flash.utils.getTimer;
+
+import mx.core.UIComponent;

 CONFIG::performanceInstrumentation
 public final class PerfUtil
@@ -101,7 +104,7 @@
 	 *  @param tolerance Tolerance in miliseconds. If the event took less than the tolerance,
 	 *  it will be omitted from the log.
 	 */
-	public function markEnd(name:String, token:int, tolerance:int = 0):void
+	public function markEnd(name:String, token:int, tolerance:int = 0, idObject:Object = null):void
 	{
 		if (startSamplingCount <= 0 || token < 0 )
 			return;
@@ -121,6 +124,14 @@
 				timeVector[token] = IGNORE;
 			return;
 		}
+
+        if (idObject)
+        {
+            if (idObject is DisplayObject)
+                name = (idObject as DisplayObject).name + name;
+            else
+                name = idObject.toString() + name;
+        }

 		idVector[token] = name; // Fix the start id
 		idVector.push(name);


Transferred from the Adobe Open Source Subversion Repository

Revision: 16697
Author:   cframpto@adobe.com
Date:     2010-06-28T14:52:07.262522Z

Log Message:
-----------
The following changes apply to Spark DataGrid only.   Code reviews have been deferred until the implementation is closer to completion.

Remove unused function redispatchMouseDownHandler().

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -2316,31 +2316,7 @@
                 ctrlKey, altKey, shiftKey, buttonDown, delta);
             dispatchEvent(event);
         }
-
-
-        //--------------------------------------------------------------------------
-        //
-        //  Down-Drag-Up Mouse Handling
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         *  This listener is run in the capture phase (before any other MouseEvent listeners)
-         *  so that it can redispatch a cancelable=true copy of the event.
-         */
-        private static function redispatchMouseDownHandler(e:MouseEvent):void
-        {
-            if (e.cancelable)
-                return;
-
-            e.stopImmediatePropagation();
-            const cancelableEvent:MouseEvent =
-                new MouseEvent(e.type, e.bubbles, true, e.localX, e.localY, e.relatedObject,
-                    e.ctrlKey, e.altKey, e.shiftKey, e.buttonDown, e.delta);
-            e.target.dispatchEvent(cancelableEvent);
-        }
-
+
         //--------------------------------------------------------------------------
         //
         //  IList listeners: columns, dataProvider


Transferred from the Adobe Open Source Subversion Repository

Revision: 6077
Author:   hmuller@adobe.com
Date:     2009-04-09T15:43:34.506603Z

Log Message:
-----------
Removed mirroring support.

QE Notes:
Doc Notes:
Bugs:
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</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/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.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/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -2347,47 +2347,7 @@
         invalidateTransform();
         //invalidateProperties();
     }
-
-    //----------------------------------
-    //  mirror
-    //----------------------------------
-
-    public function get mirror():Boolean
-    {
-        return _layoutFeatures && _layoutFeatures.mirror;
-    }
-
-    public function set mirror(value:Boolean):void
-    {
-        if (value == mirror)
-            return;
-
-        if (value == mirror)
-            return;
-
-        if (_layoutFeatures == null)
-            initAdvancedLayoutFeatures();
-        _layoutFeatures.mirror = value;
-        invalidateTransform();
-    }
-
-    //----------------------------------
-    //  dir
-    //----------------------------------
-
-    private var _dir:String;
-
-    public function get dir():String
-    {
-        return _dir;
-    }
-
-    public function set dir(value:String):void
-    {
-        _dir = value;
-        // TBD
-    }
-
+
     //--------------------------------------------------------------------------
     //
     //  IToolTipManagerClient properties
@@ -3222,7 +3182,6 @@
         features.layoutX = x;
         features.layoutY = y;
         features.layoutZ = z;
-	features.layoutWidth = width;
         _layoutFeatures = features;
         invalidateTransform();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4460
Author:   gosmith@adobe.com
Date:     2009-01-09T01:53:33.590972Z

Log Message:
-----------
Renamed UIComponentAccImpl to UIComponentAccProps because it extends AccessibilityProperties, not AccessibilityImplementation.

Added comments with the identifier for each magic role constant, so that it is easier to understand what roles our components are using.

Moved two static methods from UIComponentAccProperties to AccImpl because they make more sense there.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: None (no functional changes)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as" copyfrom-rev="4437" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/ColorPickerAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/ColorPickerAccImpl.as
@@ -130,11 +130,14 @@
 	public function ColorPickerAccImpl(master:UIComponent)
 	{
 		super(master);
+
+		//role = 0x2E; // ROLE_SYSTEM_COMBOBOX
+
 		master.accessibilityProperties.description = "Color Picker";
 		Accessibility.updateProperties();
+
 		ColorPicker(master).addEventListener(DropdownEvent.OPEN, openHandler);
 		ColorPicker(master).addEventListener(DropdownEvent.CLOSE, closeHandler);
-		//role = 0x2E;
 	}

 	private function openHandler(event:Event):void
@@ -238,7 +241,9 @@
 				null;
 		}
 		else
+		{
 			return ColorPicker(master).selectedColor.toString(16);
+		}
 	}

 	/**
@@ -250,6 +255,7 @@
 	override public function getChildIDArray():Array
 	{
 		var childIDs:Array = [];
+
 		if (ColorPicker(master).dropdown)
 		{
 			var n:uint= ColorPicker(master).dropdown.length;
@@ -258,6 +264,7 @@
 				childIDs[i] = i + 1;
 			}
 		}
+
 		return childIDs;
 	}


Replace JSON ref

Replace JSON ref

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -546,7 +546,7 @@
 				var injectTag:String =
 					'function () {' +
 					'var tag = document.createElement("script");' +
-					'tag.src = ' + JSON.stringify(tagUrl) + ';' +
+                    'tag.src = "' + tagUrl.replace(/"/g, '%22') + '";' +
 					'tag.type="text/javascript";' +
 					'document.getElementsByTagName("body")[0].appendChild(tag); }';
 				ExternalInterface.call( injectTag );


Slight speed improvements

Slight speed improvements

--- WeaveAPI/src/JavaScript.as
+++ WeaveAPI/src/JavaScript.as
@@ -34,7 +34,8 @@
 	 * The same problem occurs when returning an Object from an ActionScript function that was invoked
 	 * from JavaScript. This class works around the limitation by using JSON.stringify() and JSON.parse()
 	 * and escaping backslashes in resulting JSON strings. The values NaN, Infinity, -Infinity
-	 * are preserved.
+	 * are preserved, as well as function pointers. When a JavaScript function is called from ActionScript,
+	 * it uses a property called "this" as the this argument for the function.
 	 *
 	 * This class also provides an objectID accessor which is more reliable than ExternalInterface.objectID,
 	 * which may be null if the Flash object was created using jQuery.flash() even if the Flash object
@@ -365,31 +366,37 @@
 			{
 				if (_jsonLookup.hasOwnProperty(value))
 					value = _jsonLookup[value];
-				// ID -> Function
 				else if ((value as String).substr(0, JSON_FUNCTION_PREFIX.length) == JSON_FUNCTION_PREFIX)
-				{
-					var id:String = value as String;
-					var func:Function = function():*{
-						return exec(
-							{
-								"JSON_REVIVER": JSON_REVIVER,
-								"id": id,
-								"args": arguments,
-								"catch": false
-							},
-							"var func = this[JSON_REVIVER]('', id);",
-							"return func.apply(func['this'], args);"
-						);
-					} as Function;
-					_jsonLookup[func] = id;
-					_jsonLookup[id] = func;
-					value = func as Function;
-				}
+					value = _cacheProxyFunction(value as String); // ID -> Function
 			}
 			for each (var extension:Object in _jsonExtensions)
 				if (extension[JSON_REVIVER] is Function)
 					value = extension[JSON_REVIVER](key, value);
 			return value;
+		}
+
+		/**
+		 * Caches a new proxy function for a JavaScript function in _jsonLookup.
+		 * @param id The ID of the JavaScript function.
+		 * @return The proxy function.
+		 */
+		private static function _cacheProxyFunction(id:String):Function
+		{
+			var params:Object = {"id": id, "catch": false };
+			var script:String = [
+				"var func = this." + JSON_REVIVER + "('', id);",
+				"return func.apply(func['this'], args);"
+			].join('\n');
+
+			var func:Function = function():*{
+				params['args'] = arguments;
+				return exec(params, script);
+			} as Function;
+
+			_jsonLookup[func] = id;
+			_jsonLookup[id] = func;
+
+			return func;
 		}

 		/**


Moving code into constructor

Moving code into constructor

--- WeaveUI/src/weave/visualization/layers/InteractiveVisualization.as
+++ WeaveUI/src/weave/visualization/layers/InteractiveVisualization.as
@@ -57,12 +57,6 @@
 	{
 		public function InteractiveVisualization()
 		{
-			super();
-			init();
-		}
-
-		private function init():void
-		{
 			doubleClickEnabled = true;

 			enableZoomAndPan.value = true;


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

--- frameworks/projects/charts/src/mx/styles/metadata/BorderStyles.as
+++ frameworks/projects/charts/src/mx/styles/metadata/BorderStyles.as
@@ -1,4 +1,26 @@
-
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Background color of the component when it is disabled.
+ *  The global default value is undefined.
+ *  The default value for List controls is 0xDDDDDD (light gray).
+ *  If a container is disabled, the background is dimmed, and the degree of
+ *  dimming is controlled by the disabledOverlayAlpha style.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="backgroundDisabledColor", type="uint", format="Color", inherit="yes", theme="halo")]

 /**


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

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

 package mx.collections
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 3057
Author:   jimurphy@adobe.com
Date:     2008-09-02T15:18:38.819662Z

Log Message:
-----------
Merged 3.0.x revisions [2966,2969,2995,3004,3018-3019,3023,3029-3030,3046,3049,3052] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/ModalWindowRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/PopUpRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/EventProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/SliderThumb.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SizeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/InterManagerRequest.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FocusRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.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/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/dividedBoxClasses/BoxDivider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootDragEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as" copyfrom-rev="3052" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SandboxRootMouseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>

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

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -45,18 +45,16 @@
 import mx.events.EffectEvent;
 import mx.events.FlexEvent;
 import mx.events.FlexMouseEvent;
-import mx.events.ModalWindowRequest;
-import mx.events.PopUpRequest;
-import mx.events.SizeRequest;
+import mx.events.MoveEvent;
+import mx.events.SWFBridgeRequest;
 import mx.managers.ISystemManager;
 import mx.managers.SystemManager;
 import mx.managers.SystemManagerProxy;
 import mx.styles.IStyleClient;
 import mx.utils.NameUtil;
-import mx.events.ModalWindowRequest;
-import mx.events.SandboxRootRequest;
+import mx.events.InterManagerRequest;
 import mx.core.UIComponent;
-import mx.events.SandboxRootMouseEvent;
+import mx.events.SandboxMouseEvent;

 use namespace mx_internal;

@@ -124,9 +122,9 @@

         var sm:ISystemManager = ISystemManager(SystemManagerGlobals.topLevelSystemManagers[0]);

-        sm.addEventListener(ModalWindowRequest.CREATE_MODAL_WINDOW_REQUEST, createModalWindowRequestHandler, false, 0, true);
-        sm.addEventListener(ModalWindowRequest.SHOW_MODAL_WINDOW_REQUEST, showModalWindowRequest, false, 0, true);
-        sm.addEventListener(ModalWindowRequest.HIDE_MODAL_WINDOW_REQUEST, hideModalWindowRequest, false, 0, true);
+        sm.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, createModalWindowRequestHandler, false, 0, true);
+        sm.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, showModalWindowRequest, false, 0, true);
+        sm.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, hideModalWindowRequest, false, 0, true);
     }

     //--------------------------------------------------------------------------
@@ -281,17 +279,17 @@
 		// added to the top-level system manager's children, not
 		// the popup itself.
 		var sbRoot:DisplayObject = sm.getSandboxRoot();
-		var request:PopUpRequest = null;
+		var request:SWFBridgeRequest = null;
 		if (sm.useSWFBridge())
 		{
 			if (sbRoot != sm)
 			{
 				smp = new SystemManagerProxy(sm);
-				request = new PopUpRequest(PopUpRequest.ADD_POP_UP_REQUEST, false, false,
-										  DisplayObject(smp),
-										  parent,
-										  modal,
-										  childList);
+				request = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_REQUEST, false, false, null,
+													{ window: DisplayObject(smp),
+														parent: parent,
+														modal: modal,
+														childList: childList});
 				request.requestor = sm.swfBridgeGroup.parentBridge;
 				sm.swfBridgeGroup.parentBridge.dispatchEvent(request);
 			}
@@ -335,9 +333,9 @@
 		// is hosting the popup.
 		if (!sm.isTopLevelRoot() && sbRoot && sm == sbRoot)
 		{
-			request = new PopUpRequest(PopUpRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, DisplayObject(window));
+			request = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, false, false, null, { window: DisplayObject(window)});
 			request.requestor = sm.swfBridgeGroup.parentBridge;
-			request.placeHolderId = NameUtil.displayObjectToString(DisplayObject(window));
+			request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(window));
 			sm.dispatchEvent(request);
 		}

@@ -460,7 +458,7 @@
             // Otherwise the alert will float over the entire application.
             if (systemManager != sbRoot)
             {
-                var request:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST, false, false,
+                var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
                                                             "isTopLevelRoot");
                 sbRoot.dispatchEvent(request);
                 isTopLevelRoot = Boolean(request.value);
@@ -480,7 +478,7 @@
             {
                 if (systemManager != sbRoot)
                 {
-                    request = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST, false, false,
+                    request = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
                                             "getVisibleApplicationRect");
                     sbRoot.dispatchEvent(request);
                     rect = Rectangle(request.value);
@@ -681,6 +679,11 @@
             updateModalMask(realSm, modalWindow, o.exclude, o.excludeRect, o.modalMask);
             modalWindow.mask = o.modalMask;
             childrenList.addChild(o.modalMask);
+
+            // update the modal window mask when the size or position of the area
+            // we are excluding changes.
+            o.exclude.addEventListener(Event.RESIZE, o.resizeHandler);
+            o.exclude.addEventListener(MoveEvent.MOVE, o.resizeHandler);
         }

         // a modal mousedownoutside handler just dispatches the event
@@ -714,7 +717,7 @@
                 o.modalTransparencyBlur = popupStyleClient.getStyle("modalTransparencyBlur");
             }

-            dispatchModalWindowRequest(ModalWindowRequest.CREATE_MODAL_WINDOW_REQUEST, realSm, sbRoot, o, visibleFlag);
+            dispatchModalWindowRequest(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, realSm, sbRoot, o, visibleFlag);
         }
     }

@@ -729,23 +732,22 @@
         // then we don't need to send a modal request.
         if (!o.isRemoteModalWindow && sm != sbRoot)
         {
-            var request:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST, false, false,
+            var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
                                                         "isTopLevelRoot");
             sbRoot.dispatchEvent(request);
             if (Boolean(request.value))
                 return;
         }
-        var modalRequest:ModalWindowRequest = new ModalWindowRequest(type, false, false,
-                                                                 !o.isRemoteModalWindow && sm != sbRoot,
-                                                                 visibleFlag,
-                                                                 false,
-                                                                 o.modalTransparencyDuration,
-                                                                 o.modalTransparency,
-                                                                 o.modalTransparencyColor,
-                                                                 o.modalTransparencyBlur);
+        var modalRequest:SWFBridgeRequest = new SWFBridgeRequest(type, false, false, null,
+												{ skip: !o.isRemoteModalWindow && sm != sbRoot,
+													show: visibleFlag,
+													remove: false,
+													transparencyDuration: o.modalTransparencyDuration,
+													transparency: o.modalTransparency,
+													transparencyColor: o.modalTransparencyColor,
+													transparencyBlur: o.modalTransparencyBlur});
         var bridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;;
         modalRequest.requestor = bridge;
-        modalRequest.data = null;
         bridge.dispatchEvent(modalRequest);
     }

@@ -892,7 +894,7 @@
         showModalWindowInternal(o, duration, alpha, transparencyColor, blurAmount, sm, sbRoot);

         if (sendRequest && sm.useSWFBridge())
-            dispatchModalWindowRequest(ModalWindowRequest.SHOW_MODAL_WINDOW_REQUEST, sm, sbRoot, o, true);
+            dispatchModalWindowRequest(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, sm, sbRoot, o, true);
     }

     /**
@@ -943,7 +945,7 @@

                 if (sm != sbRoot)
                 {
-                    var applicationRequest:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST,
+                    var applicationRequest:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
                                                                        false, false,
                                                                        "application",
                                                                        sbRootApp);
@@ -978,6 +980,12 @@
      */
     private function hideModalWindow(o:PopUpData, destroy:Boolean = false):void
     {
+        if (destroy && o.exclude)
+        {
+            o.exclude.removeEventListener(Event.RESIZE, o.resizeHandler);
+            o.exclude.removeEventListener(MoveEvent.MOVE, o.resizeHandler);
+        }
+
         const popUpStyleClient:IStyleClient = o.owner as IStyleClient;

         var duration:Number = 0;
@@ -1031,17 +1039,17 @@
             // then we don't need to send a modal request.
             if (!o.isRemoteModalWindow && sm != sbRoot)
             {
-                var request:SandboxRootRequest = new SandboxRootRequest(SandboxRootRequest.SYSTEM_MANAGER_REQUEST, false, false,
+                var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
                                                             "isTopLevelRoot");
                 sbRoot.dispatchEvent(request);
                 if (Boolean(request.value))
                     return;
             }

-            var modalRequest:ModalWindowRequest = new ModalWindowRequest(ModalWindowRequest.HIDE_MODAL_WINDOW_REQUEST, false, false,
-                                                                         !o.isRemoteModalWindow && sm != sbRoot,
-                                                                         false,
-                                                                         destroy);
+            var modalRequest:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, false, false, null,
+														{ skip: !o.isRemoteModalWindow && sm != sbRoot,
+															show: false,
+															remove: destroy});
             var bridge:IEventDispatcher = sm.swfBridgeGroup.parentBridge;
             var target:IEventDispatcher;
             modalRequest.requestor = bridge;
@@ -1101,8 +1109,8 @@
             sbRoot.addEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
         }

-        sbRoot.addEventListener(SandboxRootMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
-        sbRoot.addEventListener(SandboxRootMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
+        sbRoot.addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
+        sbRoot.addEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
     }

     /**
@@ -1123,8 +1131,8 @@
             sbRoot.removeEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
         }

-        sbRoot.removeEventListener(SandboxRootMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
-        sbRoot.removeEventListener(SandboxRootMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
+        sbRoot.removeEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE,  o.marshalMouseOutsideHandler);
+        sbRoot.removeEventListener(SandboxMouseEvent.MOUSE_WHEEL_SOMEWHERE, o.marshalMouseOutsideHandler, true);
     }

     //--------------------------------------------------------------------------
@@ -1188,12 +1196,12 @@
      */
     private function createModalWindowRequestHandler(event:Event):void
     {
-        var request:ModalWindowRequest;
-
-        if (event is ModalWindowRequest)
-            request = ModalWindowRequest(event);
+        var request:SWFBridgeRequest;
+
+        if (event is SWFBridgeRequest)
+            request = SWFBridgeRequest(event);
         else
-            request = ModalWindowRequest.marshal(event);
+            request = SWFBridgeRequest.marshal(event);

         var sm:ISystemManager = getTopLevelSystemManager(DisplayObject(ApplicationGlobals.application));
         var sbRoot:DisplayObject = sm.getSandboxRoot();
@@ -1202,26 +1210,26 @@
         var popUpData:PopUpData = new PopUpData();
         popUpData.isRemoteModalWindow = true;
         popUpData.systemManager = sm;
-        popUpData.modalTransparency = request.transparency;
+        popUpData.modalTransparency = request.data.transparency;

         // disable blur because we can mask the application and blur is not
         // working if we blur the modalWindow.
         popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
-        popUpData.modalTransparencyColor = request.transparencyColor;
-        popUpData.modalTransparencyDuration = request.transparencyDuration;
+        popUpData.modalTransparencyColor = request.data.transparencyColor;
+        popUpData.modalTransparencyDuration = request.data.transparencyDuration;

         // Get the SWFLoader to exclude.
         // The requestor may be a real SWFLoader or a sandbox bridge that
         // requires a look up to get the SWFLoader.
         popUpData.exclude = sm.swfBridgeGroup.getChildBridgeProvider(request.requestor) as IUIComponent;
-        popUpData.excludeRect = Rectangle(request.data);
+        popUpData.excludeRect = Rectangle(request.data.excludeRect);

         if (!popupInfo)
             popupInfo = [];

         popupInfo.push(popUpData);

-        createModalWindow(null, popUpData, sm.popUpChildren, request.show, sm, sbRoot);
+        createModalWindow(null, popUpData, sm.popUpChildren, request.data.show, sm, sbRoot);
     }

     /**
@@ -1231,12 +1239,12 @@
      */
     private function showModalWindowRequest(event:Event):void
     {
-        var request:ModalWindowRequest = ModalWindowRequest.marshal(event);
-
-        if (event is ModalWindowRequest)
-            request = ModalWindowRequest(event);
+        var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
+
+        if (event is SWFBridgeRequest)
+            request = SWFBridgeRequest(event);
         else
-            request = ModalWindowRequest.marshal(event);
+            request = SWFBridgeRequest.marshal(event);

         var sm:ISystemManager = getTopLevelSystemManager(DisplayObject(ApplicationGlobals.application));
         var sbRoot:DisplayObject = sm.getSandboxRoot();
@@ -1246,13 +1254,13 @@
         // parent and popup window.
         var popUpData:PopUpData = findHighestRemoteModalPopupInfo();
         popUpData.excludeRect = Rectangle(request.data);
-        popUpData.modalTransparency = request.transparency;
+        popUpData.modalTransparency = request.data.transparency;

         // disable blur because we can mask the application and blur is not
         // working if we blur the modalWindow.
         popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
-        popUpData.modalTransparencyColor = request.transparencyColor;
-        popUpData.modalTransparencyDuration = request.transparencyDuration;
+        popUpData.modalTransparencyColor = request.data.transparencyColor;
+        popUpData.modalTransparencyDuration = request.data.transparencyDuration;

         if (popUpData.owner || popUpData.parent)
             throw new Error();              // not popUpData for a modal window
@@ -1267,15 +1275,15 @@
      */
     private function hideModalWindowRequest(event:Event):void
     {
-        var request:ModalWindowRequest;
+        var request:SWFBridgeRequest;

         // If the event is redispatched from the SystemManger it will be
         // marshalled. If the PopUpManager dispatches the event using
         // the sandbox root it will come here directly.
-        if (event is ModalWindowRequest)
-            request = ModalWindowRequest(event);
+        if (event is SWFBridgeRequest)
+            request = SWFBridgeRequest(event);
         else
-            request = ModalWindowRequest.marshal(event);
+            request = SWFBridgeRequest.marshal(event);

         var sm:ISystemManager = getTopLevelSystemManager(DisplayObject(ApplicationGlobals.application));
         var sbRoot:DisplayObject = sm.getSandboxRoot();
@@ -1287,10 +1295,10 @@
         if (!popUpData || popUpData.owner || popUpData.parent)
             throw new Error();              // not popUpData for a modal window

-        hideModalWindow(popUpData, request.remove);
+        hideModalWindow(popUpData, request.data.remove);

         // handle removing popup window
-        if (request.remove)
+        if (request.data.remove)
         {
             popupInfo.splice(popupInfo.indexOf(popUpData), 1);
             sm.numModalWindows--;
@@ -1339,10 +1347,10 @@
 				if (sm is SystemManagerProxy)
 				{
 					var parentBridge:IEventDispatcher = realSm.swfBridgeGroup.parentBridge;
-					var request:PopUpRequest = new PopUpRequest(PopUpRequest.REMOVE_POP_UP_REQUEST, false, false,
-													DisplayObject(sm),
-													o.parent,
-													o.modalWindow != null);
+					var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, false, false, null,
+																		{ window: DisplayObject(sm),
+																			parent:	o.parent,
+																			modal: o.modalWindow != null});
 					request.requestor = parentBridge;
 					parentBridge.dispatchEvent(request);
 				}
@@ -1350,10 +1358,10 @@
 				{
 					// Must be locally hosted popup.
 					// We need to remove the placeholder at the top level root
-					request = new PopUpRequest(PopUpRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false,
-											   DisplayObject(popUp));
+					request = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, false, false, null,
+																	{ window: DisplayObject(popUp)});
 					request.requestor = sm.swfBridgeGroup.parentBridge;
-					request.placeHolderId = NameUtil.displayObjectToString(DisplayObject(popUp));
+					request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(popUp));
 					sm.dispatchEvent(request);
 				}

@@ -1570,7 +1578,7 @@
 import mx.core.IUIComponent;
 import mx.core.mx_internal;
 import mx.effects.Effect;
-import mx.events.SandboxRootMouseEvent;
+import mx.events.SandboxMouseEvent;
 import mx.managers.ISystemManager;
 import mx.managers.PopUpManagerImpl;

@@ -1748,8 +1756,8 @@
      */
     public function marshalMouseOutsideHandler(event:Event):void
     {
-        if (!(event is SandboxRootMouseEvent))
-            event = SandboxRootMouseEvent.marshal(event);
+        if (!(event is SandboxMouseEvent))
+            event = SandboxMouseEvent.marshal(event);

         if (owner)
             owner.dispatchEvent(event);
@@ -1761,8 +1769,6 @@
      */
     public function resizeHandler(event:Event):void
     {
-        var s:Rectangle = ISystemManager(event.target).screen;
-
         // Resize the modal window if either the popup or the modal window are on the
         // same stage as the resize event target.
         // A modal window may have no popup in the case where the popup originated
@@ -1770,6 +1776,8 @@
         if ((owner && owner.stage == DisplayObject(event.target).stage) ||
             (modalWindow && modalWindow.stage == DisplayObject(event.target).stage))
         {
+            var s:Rectangle = systemManager.screen;
+
             modalWindow.width = s.width;
             modalWindow.height = s.height;
             modalWindow.x = s.x;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17703
Author:   dthakkar@adobe.com
Date:     2010-09-14T21:06:11.351066Z

Log Message:
-----------
Added errorText property for spark formatters and included some bug fixes.

QE notes: This changelist has some behavior changes for spark formatters and will cause some failures to existing spark formatter mustell test cases. Globalization QE team knows about this and will update test cases after this submission.
Doc notes:
Bugs: SDK-27420,SDK-27449,SDK-26939,SDK-27240,SDK-27340,SDK-27341,SDK-26937,SDK-27038,SDK-26969,SDK-26970,SDK-26971,SDK-27036,SDK-27491,SDK-27037,SDK-26968,SDK-27450
Reviewer: Gordon, Craig, Dipti
Tests run: Checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/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/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/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/tests/basicTests/spark/scripts/NumberFormatterTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyFormatterTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/Formatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberFormatterTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/DateTimeFormatterTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyFormatterTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/DateTimeFormatterTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as</path>

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

--- frameworks/projects/spark/src/spark/formatters/NumberFormatter.as
+++ frameworks/projects/spark/src/spark/formatters/NumberFormatter.as
@@ -336,22 +336,44 @@

         const number:Number = Number(value);

+        if (isNaN(number))
+        {
+            if (g11nWorkingInstance)
+            {
+                // Have g11nFormatter.lastOperationStatus property hold
+                // ILLEGAL_ARGUMENT_ERROR value.
+                (g11nWorkingInstance as
+                    flash.globalization.NumberFormatter).fractionalDigits = -1;
+            }
+            else
+            {
+                fallbackLastOperationStatus
+                = LastOperationStatus.ILLEGAL_ARGUMENT_ERROR;
+            }
+            return errorText;
+        }
+
         if (g11nWorkingInstance)
         {
-            return (g11nWorkingInstance
-                as flash.globalization.NumberFormatter).formatNumber(number);
+            const g11nFormatter:flash.globalization.NumberFormatter
+                = (g11nWorkingInstance as flash.globalization.NumberFormatter);
+
+            const retVal:String = g11nFormatter.formatNumber(number);
+
+            return errorText && LastOperationStatus.isFatalError(
+                        g11nFormatter.lastOperationStatus) ? errorText : retVal;
         }

         if ((localeStyle === undefined) || (localeStyle === null))
         {
             fallbackLastOperationStatus
                                 = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
-            return undefined;
+            return errorText;
         }

         fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;

-        return fallbackFormat(number);
+        return number.toFixed(properties.fractionalDigits);
     }

     [Bindable("change")]
@@ -365,7 +387,7 @@
      *  starting index for the number within the string, and the index
      *  of the first character after the number in the string.

      *
-     *
 If the string does not contain a number, the value property of
+     *
If the string does not contain a number, the value property of
      *  the NumberParseResult is set to NaN and the
      *  startIndex and endIndex properties are
      *  set to the hexadecimal value 0x7fffffff.
@@ -427,12 +449,12 @@
      *  parsing of the number.
      *

      *
-     *
 If numbers are preceded or followed in the string by a
+     *
If numbers are preceded or followed in the string by a
      *  plus sign '+', the plus sign is treated as
      *  a character that is not part of the number.
      *

      *
-     *
 This function does not parse strings containing numbers
+     *
This function does not parse strings containing numbers
      *  in scientific notation (e.g. 1.23e40).

      *
      *
@@ -497,12 +519,12 @@
      *  character is a character that has a Space Separator (Zs) property
      *  in the Unicode Character Database (see http://www.unicode.org/ucd/).
      *
-     *
 If the numeric digit is preceded or followed by a
+     *
If the numeric digit is preceded or followed by a
      *  plus sign '+' it is treated as a non-whitespace character.
      *  The return value is NaN.
      *

      *
-     *
 See the description of the parse function for more information
+     *
See the description of the parse function for more information
      *  about number parsing and what constitutes a valid number.
      *

      *
@@ -537,7 +559,7 @@
     }

     /**
-     *  @copy spark.utils.Collator#getAvailableLocaleIDNames
+     *  @copy spark.globalization.supportClasses.CollatorBase#getAvailableLocaleIDNames
      *
      *  @playerversion Flash 10.1
      *  @langversion 3.0
@@ -558,19 +580,19 @@
     //
     //--------------------------------------------------------------------------

-    private function fallbackFormat(value:Number): String
-    {
-        return value.toString();
-    }
-
     private function fallbackParse(parseString:String):NumberParseResult
     {
-        return new NumberParseResult();
+        return parseToNumberParseResult(parseString);
     }

     private function fallbackParseNumber(value:String):Number
     {
-        return Number(value);
+        const res:NumberParseResult = parseToNumberParseResult(value);
+
+        if (!res.startIndex && (res.endIndex == value.length))
+            return res.value;
+
+        return NaN;
     }

     private function fallbackInstantiate():void


Transferred from the Adobe Open Source Subversion Repository

Revision: 19797
Author:   klin@adobe.com
Date:     2011-01-19T00:06:54.932970Z

Log Message:
-----------
Initial checkin of override default density mapping feature. Application and other classes delegate calculating runtimeDPI to a RuntimeDPIProvider class. Developers that wish to override how the runtimeDPI is calculated should subclass RuntimeDPIProvider and set it to the runtimeDPIProvider property on Application. Application actually calls DensityUtil.getRuntimeDPI() which creates the instance of the runtimeDPIProvider class and caches the runtimeDPI. I've also modified the compiler so that runtimeDPIProvider is recognized as a special attribute on Application. This checkin includes the PARB updates for changing DPI related properties and variables from ints to Numbers.

QE notes: Update tests
Doc notes: N/A
Bugs: SDK-28731
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.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/framework/src/mx/utils/DensityUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DPIClassification.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MediaQueryParser.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
+++ frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
@@ -69,7 +69,7 @@
      *  @playerversion AIR 2.6
      *  @productversion Flex 4.5
      */
-    public function getSource(desiredDPI:int):Object
+    public function getSource(desiredDPI:Number):Object
     {
         var source:Object = source160dpi;
         switch (desiredDPI)


Seek fixes for DVR streams.

Seek fixes for DVR streams.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -575,7 +575,7 @@
 			if(indexHandler)
 			{
 				if(indexHandler.liveEdge != Number.MAX_VALUE)
-					pubTime += indexHandler.liveEdge - indexHandler.windowDuration;
+					pubTime += _timeCache_liveEdgeMinusWindowDuration;
 				else
 					pubTime += indexHandler.streamStartAbsoluteTime;
 			}
@@ -690,7 +690,7 @@
 			}

 			// Make sure we don't go past the buffer for the live edge.
-			if(indexHandler && seekTarget > indexHandler.liveEdge)
+			if(indexHandler && indexHandler.isLiveEdgeValid && seekTarget > indexHandler.liveEdge)
 			{
 				CONFIG::LOGGING
 				{


- change: DuplicateFieldValidator now checks if the duplicated field is valid before positing as valid itself

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

--- src/reprise/data/validators/DuplicateFieldValidator.as
+++ src/reprise/data/validators/DuplicateFieldValidator.as
@@ -35,7 +35,7 @@

 		public override function execute(...args) : void
 		{
-			m_didSucceed = m_field.value() == m_value;
+			m_didSucceed = m_field.didSucceed() && m_field.value() == m_value;
 			if (!m_didSucceed)
 			{
 				m_field.markAsInvalid();


remove disabling scrub bar on ads

remove disabling scrub bar on ads

--- src/ru/kutu/grindplayer/views/mediators/ScrubBarMediator.as
+++ src/ru/kutu/grindplayer/views/mediators/ScrubBarMediator.as
@@ -8,7 +8,6 @@

 	public class ScrubBarMediator extends ScrubBarBaseMediator {

-		private var isAdvertisement:Boolean;
 		private var hideScrubBarWhileAdvertisement:Boolean;

 		override protected function processMediaElementChange(oldMediaElement:MediaElement):void {
@@ -26,13 +25,12 @@
 		}

 		override protected function updateEnabled():void {
-			view.enabled = isStartPlaying && !isAdvertisement;
+			view.enabled = isStartPlaying;
 			view.visible = streamType != StreamType.LIVE && !hideScrubBarWhileAdvertisement;
 		}

 		private function onMediaMetadataChange(event:MetadataEvent):void {
 			if (event.key != "Advertisement") return;
-			isAdvertisement = event.type != MetadataEvent.VALUE_REMOVE;
 			hideScrubBarWhileAdvertisement = false;
 			if (event.value && event.value is Array) {
 				for each (var item:Object in event.value) {