Transferred from the Adobe Open Source Subversion Repository

Revision: 3243
Author:   rfrishbe@adobe.com
Date:     2008-09-17T16:14:14.399661Z

Log Message:
-----------
DataGroup/Group split work.  DataGroup is for holding data items that may require item rendering. Group only holds visual items now.  The Group APIs stay the same (numItems, addItem, etc...).  DataGroup uses the IList APIs through its dataProvider.  So the equivalent methods are now dataProvider.length, dataProvider, addItem, etc...  This is just the initial split work as there's more to come to get the files up to spec.  We will also have to visit how we deal with graphic elements in DataGroup vs. Group.  For now the implementations are roughly the same.

QE: Yes - tests may break.  please update them.
Doc: Yes
Bugs: -
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DataComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="A">/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/component/Selector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SelectorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/intf/ILayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ComplexPanelSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -0,0 +1,652 @@
+package flex.core
+{
+import flash.display.DisplayObject;
+import flash.display.Sprite;
+import flash.events.Event;
+import flash.geom.ColorTransform;
+import flash.geom.Matrix;
+import flash.geom.Rectangle;
+import flash.geom.Transform;
+import flash.utils.Dictionary;
+
+import flex.events.FlexEvent;
+import flex.events.ItemExistenceChangedEvent;
+import flex.geom.Transform;
+import flex.graphics.Graphic;
+import flex.graphics.IGraphicElement;
+import flex.graphics.IGraphicElementHost;
+import flex.graphics.MaskType;
+import flex.graphics.TransformUtil;
+import flex.graphics.graphicsClasses.GraphicElement;
+import flex.intf.ILayout;
+import flex.intf.ILayoutItem;
+import flex.layout.BasicLayout;
+import flex.layout.LayoutItemFactory;
+
+import mx.collections.ICollectionView;
+import mx.collections.IList;
+import mx.collections.ListCollectionView;
+import mx.controls.Label;
+import mx.core.IDataRenderer;
+import mx.core.IDeferredInstance;
+import mx.core.IFactory;
+import mx.core.UIComponent;
+import mx.events.CollectionEvent;
+import mx.events.PropertyChangeEvent;
+import mx.events.PropertyChangeEventKind;
+import mx.collections.ArrayCollection;
+import mx.styles.IStyleClient;
+
+/**
+ *  Dispatched prior to the dataProvider being changed.
+ */
+[Event(name="dataProviderChanging", type="flex.events.FlexEvent")]
+
+/**
+ *  Dispatched after the dataProvider has changed.
+ */
+[Event(name="dataProviderChanged", type="flex.events.FlexEvent")]
+
+[DefaultProperty("dataProvider")]
+public class DataGroup extends GroupBase
+{
+    public function DataGroup()
+    {
+        super();
+
+        // TODO (rfrishbe): work on initialization of dataProvider
+        _dataProvider = new ArrayCollection();
+        _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);
+    }
+
+    private var skinRegistry:Dictionary;
+
+    // item renderer
+    public var itemRenderer:IFactory;
+    public var itemRendererFunction:Function; // signature: itemRendererFunction(item:*):IFactory
+
+    // TODO (rfrishbe): be smarter about initialization
+    private var _dataProvider:IList;
+    private var dataProviderChanged:Boolean = false;
+    private var needsDisplayObjectAssignment:Boolean = false;
+
+    public function set dataProvider(value:IList):void
+    {
+        if (_dataProvider)
+        {
+            _dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
+        }
+
+        _dataProvider = value;
+
+        // Need to convert null to undefined here, since subsequent content checks test for undefined
+        if (_dataProvider === null)
+            _dataProvider = undefined;
+
+        if (_dataProvider is IList)
+        {
+            _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);
+        }
+
+        dataProviderChanged = true;
+        invalidateProperties();
+    }
+
+    public function get dataProvider():IList
+    {
+        return _dataProvider;
+    }
+
+    protected function initializeChildrenArray():void
+    {
+        dispatchEvent(new FlexEvent(FlexEvent.CONTENT_CHANGING));
+
+        // Get rid of existing display object children.
+        // !!!!! This should probably be done through change notification
+        // TODO!! This should be removing the last child b/c we want to
+        // send an event for each content child. This logic will send
+        // remove event for the 0th content child x times.
+        for (var idx:int = numChildren; idx > 0; idx--)
+            //itemRemoved(0);
+            super.removeChildAt(0);
+
+        if (_dataProvider !== null)
+        {
+            for (var i:int = 0; i < _dataProvider.length; i++)
+            {
+                itemAdded(_dataProvider.getItemAt(i), i);
+            }
+        }
+
+        assignDisplayObjects();
+        needsDisplayObjectAssignment = false;
+
+        /* if (maskElements)
+        {
+            for (var k:Object in maskElements)
+            {
+                var maskElement:DisplayObject = k as DisplayObject;
+                if (maskElement && (!maskElement.parent || maskElement.parent !== this))
+                {
+                    super.addChild(maskElement);
+                    var maskComp:UIComponent = maskElement as UIComponent;
+                    if (maskComp)
+                    {
+                        maskComp.validateNow();
+                        maskComp.setActualSize(maskComp.getExplicitOrMeasuredWidth(),
+                                               maskComp.getExplicitOrMeasuredHeight());
+                    }
+
+                    var maskTarget:IGraphicElement = maskElements[k] as IGraphicElement;
+                    if (maskTarget)
+                    {
+                        maskTarget.applyMask();
+                    }
+                }
+            }
+        } */
+
+        dispatchEvent(new FlexEvent(FlexEvent.CONTENT_CHANGED));
+    }
+
+    protected function createVisualForItem(item:*):DisplayObject
+    {
+        var itemSkin:DisplayObject;
+
+        if (item === undefined || item === null)
+            throw new Error("DataGroup content can not contain null or undefined items.");
+
+        // Rules for skin lookup:
+        // 0. if the item is a deferred instance, instantiate it and fall through to the other item(s)
+        // 1. if the item is a display object, use it directly
+        // 2. if itemRendererFunction is defined, call it to get the renderer factory and instantiate it
+        // 3. if itemRenderer is defined, instantiate one
+        // 4. create a Label component and call toString() on the item
+
+        // 0. if the item is a deferred instance, instantiate it and fall through to the other item(s)
+        if (item is IDeferredInstance)
+            item = IDeferredInstance(item).getInstance();
+        // TODO (rfrishbe): do deferred instantiation in DataGroup?
+
+        // 1. if the item is a display object, use it directly unless the alwaysUseItemRenderer
+        // flag is set.
+        if (item is DisplayObject && itemRendererFunction == null)
+            itemSkin = item;
+
+        // 2. if itemRendererFunction is defined, call it to get the renderer factory and instantiate it
+        if (!itemSkin && itemRendererFunction != null)
+        {
+            var rendererFactory:IFactory = itemRendererFunction(item);
+
+            if (rendererFactory)
+                itemSkin = rendererFactory.newInstance();
+            else if (item is DisplayObject)
+                itemSkin = item;
+        }
+
+        // 3. if itemRenderer is defined, instantiate one
+        if (!itemSkin && itemRenderer != null)
+            itemSkin = itemRenderer.newInstance();
+
+        // 4. create a Label component and call toString() on the item
+        if (!itemSkin)
+        {
+            // No custom skin, use a Label
+            itemSkin = new Label();
+            Label(itemSkin).condenseWhite = true;
+            Label(itemSkin).htmlText = item.toString();
+        }
+
+        // Set the skin data to the item, but only if the item and skin are different
+        if (itemSkin is IDataRenderer && itemSkin != item)
+            IDataRenderer(itemSkin).data = item;
+
+        registerSkin(item, itemSkin);
+
+        return itemSkin;
+    }
+
+    protected function registerSkin(item:*, itemSkin:DisplayObject):void
+    {
+        if (!skinRegistry)
+            skinRegistry = new Dictionary(true);
+
+        skinRegistry[item] = itemSkin;
+    }
+
+    protected function unregisterSkin(item:*, itemSkin:DisplayObject):void
+    {
+        if (!skinRegistry)
+            return;
+
+        delete skinRegistry[item];
+    }
+
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (dataProviderChanged)
+        {
+            dataProviderChanged = false;
+            initializeChildrenArray();
+
+            // maskChanged = true; TODO (rfrishbe): need this maskChanged?
+        }
+
+        // Check whether we manage the elements, or are they managed by an ItemRenderer
+        // TODO EGeorgie: we need to optimize this, iterating through all the elements is slow.
+        // Validate element properties
+        var length:int = dataProvider.length;
+        for (var i:int = 0; i < length; i++)
+        {
+            var element:GraphicElement = dataProvider.getItemAt(i) as GraphicElement;
+            if (element)
+                element.validateProperties();
+        }
+
+        if (needsDisplayObjectAssignment)
+        {
+            needsDisplayObjectAssignment = false;
+            assignDisplayObjects();
+        }
+    }
+
+    override public function validateSize(recursive:Boolean = false):void
+    {
+        // Since GraphicElement is not ILayoutManagerClient, we need to make sure we
+        // validate sizes of the elements, even in cases where recursive==false.
+
+        // Check whether we manage the elements, or are they managed by an ItemRenderer
+        // TODO EGeorgie: we need to optimize this, iterating through all the elements is slow.
+        // Validate element size
+        var length:int = dataProvider.length;
+        for (var i:int = 0; i < length; i++)
+        {
+            var element:GraphicElement = dataProvider.getItemAt(i) as GraphicElement;
+            if (element)
+                element.validateSize();
+        }
+
+        super.validateSize(recursive);
+    }
+
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        // TODO EGeorgie: we need to optimize this, iterating through all the elements is slow.
+        // Iterate through the graphic elements, clear their graphics and draw them
+        var length:int = dataProvider.length;
+        for (var i:int = 0; i < length; i++)
+        {
+            var element:GraphicElement = dataProvider.getItemAt(i) as GraphicElement;
+            if (element)
+                element.validateDisplayList();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Layout item iteration
+    //
+    //  Iterators used by Layout objects. For visual items, the layout item
+    //  is the item itself. For data items, the layout item is the item renderer
+    //  instance that is associated with the item.
+    //--------------------------------------------------------------------------
+     /**
+     *  The number of layout items in this Group. Typically this is the same
+     *  as the number of items in the Group.
+     */
+    override public function get numLayoutItems():int
+    {
+        return dataProvider.length;
+    }
+
+    /**
+     *  Gets the <i>n</i>th layout item in the Group. For visual items, the
+     *  layout item is the item itself. For data items, the layout item is the
+     *  item renderer instance that is associated with the item.
+     *
+     *  @param index The index of the item to retrieve.
+     *
+     *  @return The layout item at the specified index.
+     */
+    override public function getLayoutItemAt(index:int):ILayoutItem
+    {
+        var item:* = dataProvider.getItemAt(index);
+
+        if (!(item is IGraphicElement))
+            item = getItemSkin(item);
+
+        return LayoutItemFactory.getLayoutItemFor(item);
+    }
+
+    protected function itemAdded(item:*, index:int):void
+    {
+        var child:DisplayObject;
+
+        if (item is GraphicElement)
+        {
+            item.elementHost = this;
+
+            // If a styleable GraphicElement is being added,
+            // build its protochain for use by getStyle().
+            if (item is IStyleClient)
+                IStyleClient(item).regenerateStyleCache(true);
+        }
+        else
+        {
+            // This always adds the child to the end of the display list. Any
+            // ordering discrepancies will be fixed up in assignDisplayObjects().
+            child = addItemToDisplayList(createVisualForItem(item), item);
+        }
+
+        dispatchEvent(new ItemExistenceChangedEvent(
+                      ItemExistenceChangedEvent.ITEM_ADD, false, false, item));
+
+        invalidateSize();
+        invalidateDisplayList();
+    }
+
+    protected function itemRemoved(index:int):void
+    {
+        var item:* = _dataProvider.getItemAt(index);
+        var skin:* = getItemSkin(item);
+        var childDO:DisplayObject = item as DisplayObject;
+
+        dispatchEvent(new ItemExistenceChangedEvent(
+                      ItemExistenceChangedEvent.ITEM_REMOVE, false, false, item));
+        if (item && (item is GraphicElement))
+        {
+            item.elementHost = null;
+            item.sharedDisplayObject = null;
+            childDO = GraphicElement(item).displayObject;
+        }
+        else if (skin && skin is DisplayObject)
+        {
+            childDO = skin as DisplayObject;
+        }
+        // If the item and skin are different objects, set the skin data to
+        // null here to clear it out. Otherwise, the skin keeps a reference to the item,
+        // which can cause problems later.
+        if (item && skin && item != skin)
+            skin.data = null;
+
+        if (childDO)
+            super.removeChild(childDO);
+
+        invalidateSize();
+        invalidateDisplayList();
+    }
+
+    // Returns true if the Group's display object can be shared with graphic elements
+    // inside the group
+    private function get canShareDisplayObject():Boolean
+    {
+    	return blendMode == "normal";
+    }
+
+    // This function assumes that the only displayObjects are either items in the content array
+    // or created directly for an item in the content array.
+    private function assignDisplayObjects(startIndex:int = 0):void
+    {
+        var currentAssignableDO:DisplayObject = canShareDisplayObject ? this : null;
+        var lastDisplayObject:DisplayObject = this;
+
+        // Iterate through all of the items
+        var len:int = _dataProvider.length;
+        for (var i:int = startIndex; i < len; i++)
+        {
+            var item:* = _dataProvider.getItemAt(i);
+            var insertIndex:int;
+
+            if (!(item is GraphicElement))
+                item = getItemSkin(item);
+
+        	if (lastDisplayObject == this)
+        		insertIndex = 0;
+        	else
+        		insertIndex = super.getChildIndex(lastDisplayObject) + 1;
+
+            if (item is DisplayObject)
+            {
+            	super.setChildIndex(item as DisplayObject, insertIndex);
+
+                lastDisplayObject = item as DisplayObject;
+                // Null this out so that we are forced to create one for the next item
+                currentAssignableDO = null;
+            }
+            else if (item is GraphicElement)
+            {
+                var element:GraphicElement = item as GraphicElement;
+
+                if (currentAssignableDO == null || element.needsDisplayObject)
+                {
+                    var newChild:DisplayObject = element.displayObject;
+
+                    if (newChild == null)
+                    {
+                        newChild = element.createDisplayObject();
+                        element.displayObject = newChild; // TODO!! Handle this in createDisplayObject?
+                    }
+
+                    addItemToDisplayList(newChild, item, insertIndex);
+                    // If the element is transformed, the next item needs its own DO
+                    currentAssignableDO = element.nextSiblingNeedsDisplayObject ? null : newChild;
+                    lastDisplayObject = newChild;
+                }
+                else
+                {
+                    // Item should be assigned the currentAssignableDO
+                    // If it already has a DO, we need to remove it
+                    if (element.displayObject)
+                    {
+                        if (element.displayObject.parent == this)
+                            super.removeChild(element.displayObject);
+                        element.destroyDisplayObject();
+                    }
+
+                    element.sharedDisplayObject = currentAssignableDO;
+                    if (element.nextSiblingNeedsDisplayObject)
+                        currentAssignableDO = null;
+                }
+            }
+        }
+    }
+
+
+    // Helper function to remove child from other Group or display list before
+    // adding to the display list.
+    protected function addItemToDisplayList(child:DisplayObject, item:*, index:int = -1):DisplayObject
+    {
+        var host:DisplayObject;
+
+        if (item is GraphicElement)
+            host = DisplayObject(GraphicElement(item).elementHost);
+        else if (item is DisplayObject)
+            host = DisplayObject(item).parent;
+
+        // Remove the item from the group if that group isn't this group
+        if (host && host is Group && host != this)
+            Group(host).removeItem(item);
+        else if (host && host is DataGroup && host != this)
+        {
+            var dp:IList = DataGroup(host).dataProvider;
+            var index:int = dp.getItemIndex(item);
+            dp.removeItemAt(index);
+        }
+
+        // Calling removeItem should have already removed the child. This
+        // should handle the case when we don't call removeItem
+        if (child.parent)
+        {
+            if (child.parent == this)
+            {
+                var insertIndex:int;
+                if (index == -1)
+                    insertIndex = super.numChildren - 1;
+                else if (index == 0)
+                    insertIndex = 0;
+                else
+                    insertIndex = index;
+
+                super.setChildIndex(child, insertIndex);
+                return child;
+            }
+            else
+                child.parent.removeChild(child);
+
+        }
+
+        return super.addChildAt(child, index != -1 ? index : super.numChildren);
+    }
+
+    override public function elementLayerChanged(e:IGraphicElement):void
+    {
+        super.elementLayerChanged(e);
+
+        // One of our children have told us they might need a displayObject
+        assignDisplayObjects();
+    }
+
+
+    protected function collectionChangeHandler(event:Event):void
+    {
+        if (event is CollectionEvent)
+        {
+            var ce:CollectionEvent = CollectionEvent(event);
+
+            /* if (ce.kind == CollectionEventKind.ADD)
+            {
+
+            }
+            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)
+            {
+
+            } */
+
+            // TODO!! Fow now, always reapply the content. This needs to
+            // be optimized in the future
+           dataProviderChanged = true;
+           invalidateProperties();
+        }
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Item -> Renderer mapping
+    //
+    //--------------------------------------------------------------------------
+
+    public function getItemSkin(item:*):DisplayObject
+    {
+        var result:DisplayObject = null;
+
+        if (skinRegistry)
+            result = skinRegistry[item];
+
+        if (!result && item is DisplayObject)
+            result = item;
+
+        return result;
+    }
+
+    public function getSkinItem(skin:DisplayObject):*
+    {
+        // !! This implementation is really slow...
+        var item:*;
+
+        for (var i:int = 0; i < dataProvider.length; i++)
+        {
+            item = dataProvider.getItemAt(i);
+            if (getItemSkin(item) == skin)
+                return item;
+        }
+
+        return null;
+    }
+
+    protected var maskElements:Dictionary;
+
+    override public function addMaskElement(mask:DisplayObject, target:IGraphicElement):void
+    {
+        if (!maskElements)
+            maskElements = new Dictionary();
+
+        maskElements[mask] = target;
+        dataProviderChanged = true;
+        // TODO!! Remove this once GraphicElements use the LayoutManager. Currently the
+        // callLater is necessary because addMaskElement gets called inside of commitProperties
+        callLater(invalidateProperties);
+
+    }
+
+    override public function removeMaskElement(mask:DisplayObject, target:IGraphicElement):void
+    {
+        if (maskElements && mask in maskElements)
+        {
+            delete maskElements[mask];
+            dataProviderChanged = true;
+             // TODO!! Remove this once GraphicElements use the LayoutManager. Currently the
+        	// callLater is necessary because removeMaskElement gets called inside of commitProperties
+            callLater(invalidateProperties);
+        }
+    }
+
+	override public function addChild(child:DisplayObject):DisplayObject
+    {
+        throw(new Error("addChild is not available in Group. Use addItem instead."));
+    }
+
+    override public function addChildAt(child:DisplayObject, index:int):DisplayObject
+    {
+        throw(new Error("addChildAt is not available in Group. Use addItemAt instead."));
+    }
+
+    override public function removeChild(child:DisplayObject):DisplayObject
+    {
+        throw(new Error("removeChild is not available in Group. Use removeItem instead."));
+    }
+
+    override public function removeChildAt(index:int):DisplayObject
+    {
+        throw(new Error("removeChildAt is not available in Group. Use removeItemAt instead."));
+    }
+
+    override public function setChildIndex(child:DisplayObject, index:int):void
+    {
+        throw(new Error("setChildIndex is not available in Group. Use setItemIndex instead."));
+    }
+
+    override public function swapChildren(child1:DisplayObject, child2:DisplayObject):void
+    {
+        throw(new Error("swapChildren is not available in Group. Use swapItems instead."));
+    }
+
+    override public function swapChildrenAt(index1:int, index2:int):void
+    {
+        throw(new Error("swapChildrenAt is not available in Group. Use swapItemsAt instead."));
+    }
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18025
Author:   egeorgie@adobe.com
Date:     2010-10-05T23:57:27.340957Z

Log Message:
-----------
Rename IGraphicElementHost to IGraphicElementContainer

QE notes: N/A
Doc notes: None.
Bugs:
Reviewer: Ryan
Tests run: build
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElementHost.as" copyfrom-rev="18023" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElementContainer.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/components/Group.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElementHost.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/core/IGraphicElement.as
+++ frameworks/projects/spark/src/spark/core/IGraphicElement.as
@@ -17,11 +17,11 @@

 /**
  *  The IGraphicElement is implemented by IVisualElements that
- *  take advantage of the parent IGraphicElementHost
+ *  take advantage of the parent IGraphicElementContainer
  *  DisplayObject management.
  *
  *
One typical use case is DisplayObject sharing.
- *  Group, which implements IGraphicElementHost, organizes its
+ *  Group, which implements IGraphicElementContainer, organizes its
  *  IGraphicElement children in sequences that share and draw to
  *  the same DisplayObject.
  *  The DisplayObject is created by the first element in the
@@ -29,7 +29,7 @@
  *
  *
Another use case is when an element does not derrive from
  *  DisplayObject but instead maintains, creates and/or destroys
- *  its own DisplayObject. The IGraphicElementHost will ensure to
+ *  its own DisplayObject. The IGraphicElementContainer will ensure to
  *  call the element to create the DisplayObject, add the
  *  DisplayObject as its child at the correct index as well as
  *  handle its removal.

@@ -39,7 +39,7 @@
  *  interface. The GraphicElement class already provides most of the
  *  required functionality.

  *
- *  @see spark.core.IGraphicElementHost
+ *  @see spark.core.IGraphicElementContainer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -82,7 +82,7 @@

     /**
      *  Indicates the association between this IGraphicElement and its
-     *  display objects.  The IGraphicElementHost manages this
+     *  display objects.  The IGraphicElementContainer manages this
      *  property and the values are one of the DisplayObjectSharingMode enum class.
      *
      *

@@ -130,31 +130,31 @@
      *  Subsequent calls to the getter of the displayObject property must
      *  return the same display object.
      *
-     *  After the DisplayObject is created, the parent IGraphicElementHost
+     *  After the DisplayObject is created, the parent IGraphicElementContainer
      *  will pass along the display objects to the rest of the elements in the sequence.
      *
-     *  The IGraphicElementHost ensures that this method is called only when needed.
+     *  The IGraphicElementContainer ensures that this method is called only when needed.
      *
      *
If the element wants to participate in the DisplayObject
      *  sharing, then the new DisplayObject must implement IShareableDisplayObject.
-     *  This interface is being used by the IGraphicElementHost to manage invalidation and
+     *  This interface is being used by the IGraphicElementContainer to manage invalidation and
      *  redrawing of the graphic element sequence and typically is not directly
      *  used by the Developer.

      *
      *
To reevaluate the shared sequences, call the
      *  invalidateGraphicElementSharing() method
-     *  on the IGraphicElementHost.

-     *
-     *
To force the IGraphicElementHost to remove the element's current
+     *  on the IGraphicElementContainer.

+     *
+     *
To force the IGraphicElementContainer to remove the element's current
      *  DisplayObject from its display list and recalculate the
      *  display object sharing, call the
-     *  discardDisplayObject() method on the IGraphicElementHost.

+     *  discardDisplayObject() method on the IGraphicElementContainer.

      *
      *  @return The display object created.
      *
      *  @see #displayObject
-     *  @see spark.components.IGraphicElementHost#invalidateGraphicElementSharing
-     *  @see spark.components.IGraphicElementHost#discardDisplayObject
+     *  @see spark.components.IGraphicElementContainer#invalidateGraphicElementSharing
+     *  @see spark.components.IGraphicElementContainer#discardDisplayObject
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -180,11 +180,11 @@
      *  displayObject property must return the same display object.

      *
      *
In certain cases, the sharedDisplayObject property might be
-     *  the IGraphicElementHost itself. In the rest of the cases, the
+     *  the IGraphicElementContainer itself. In the rest of the cases, the
      *  DisplayObject is created by the first element in the sequence.

      *
      *
When this IGraphicElement needs to rebuild its sequence,
-     *  it notifies the IGraphicElementHost by calling its
+     *  it notifies the IGraphicElementContainer by calling its
      *  invalidateGraphicElementSharing() method.

      *
      *  @return Returns true when this IGraphicElement can draw itself
@@ -192,7 +192,7 @@
      *
      *  @see #canShareWithPrevious
      *  @see #canShareWithNext
-     *  @see spark.components.IGraphicElementHost#invalidateGraphicElementSharing
+     *  @see spark.components.IGraphicElementContainer#invalidateGraphicElementSharing
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -206,7 +206,7 @@
      *  share display objects with the previous IGraphicElement
      *  in the sequence.
      *
-     *
In certain cases the element might be passed to the IGraphicElementHost
+     *
In certain cases the element might be passed to the IGraphicElementContainer
      *  in a call to the setSharedDisplayObject() method.
      *  In those cases, this method is not called.

      *
@@ -244,28 +244,28 @@
     function canShareWithNext(element:IGraphicElement):Boolean;

     /**
-     *  Called by IGraphicElementHost when an IGraphicElement
+     *  Called by IGraphicElementContainer when an IGraphicElement
      *  is added to or removed from the host.
      *
Developers typically never need to call this method.

      *
-     *  @param parent The IGraphicElementHost of this IGraphicElement.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    function parentChanged(parent:IGraphicElementHost):void;
-
-    /**
-     *  Called by the IGraphicElementHost to validate the properties of
+     *  @param parent The IGraphicElementContainer of this IGraphicElement.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function parentChanged(parent:IGraphicElementContainer):void;
+
+    /**
+     *  Called by the IGraphicElementContainer to validate the properties of
      *  this element.
      *
-     *
To ensure that this method is called, notify the IGraphicElementHost
+     *
To ensure that this method is called, notify the IGraphicElementContainer
      *  by calling its invalidateGraphicElementProperties() method.

      *
      *
This method might be called even if this element has not
-     *  notified the IGraphicElementHost.

+     *  notified the IGraphicElementContainer.

      *
      *  @see #validateSize
      *  @see #validateDisplayList
@@ -278,18 +278,18 @@
     function validateProperties():void;

     /**
-     *  Called by the IGraphicElementHost to validate the size of
+     *  Called by the IGraphicElementContainer to validate the size of
      *  this element.
      *
      *
When the size of the element changes and is going to affect the
-     *  IGraphicElementHost layout, the implementer is responsible
+     *  IGraphicElementContainer layout, the implementer is responsible
      *  for invalidating the parent's size and display list.

      *
-     *
To ensure that this method is called, notify the IGraphicElementHost
+     *
To ensure that this method is called, notify the IGraphicElementContainer
      *  by calling its invalidateGraphicElementSize() method.

      *
      *
This method might be called even if this element has not
-     *  notified the IGraphicElementHost.

+     *  notified the IGraphicElementContainer.

      *
      *  @see #validateProperties
      *  @see #validateDisplayList
@@ -302,7 +302,7 @@
     function validateSize():void;

     /**
-     *  Called by the IGraphicElementHost to redraw this element
+     *  Called by the IGraphicElementContainer to redraw this element
      *  in its displayObject property.
      *
      *
If the element is the first in the sequence (displayObjectSharingMode
@@ -312,14 +312,14 @@
      *
      *
The element must alway redraw even if it itself has not changed
      *  since the last time the validateDisplayList() method was called.
-     *  The parent IGraphicElementHost will redraw the whole sequence
+     *  The parent IGraphicElementContainer will redraw the whole sequence
      *  if any of its elements need to be redrawn.

      *
-     *
To ensure this method is called, notify the IGraphicElementHost
+     *
To ensure this method is called, notify the IGraphicElementContainer
      *  by calling its invalidateGraphicElementSize() method.

      *
      *
This method might be called even if this element has not
-     *  notified the IGraphicElementHost.

+     *  notified the IGraphicElementContainer.

      *
      *  @see #displayObject
      *  @see #validateProperties


Issue #73: Remove obsolete Portal URL cleanup method.

--- src/com/esri/builder/model/PortalModel.as
+++ src/com/esri/builder/model/PortalModel.as
@@ -62,7 +62,6 @@
     {
         var cleanURL:String = url;
         cleanURL = StringUtil.trim(cleanURL);
-        cleanURL = replacePreviousDefaultPortalURL(cleanURL);
         cleanURL = ensureHTTPSOnArcGISDomains(cleanURL);
         cleanURL = cleanURL.replace(/\/sharing\/content\/items\/?$/i, '');
         cleanURL = URLUtil.ensureTrailingForwardSlash(cleanURL);
@@ -73,12 +72,6 @@
     private function ensureHTTPSOnArcGISDomains(url:String):String
     {
         return isAGO(url) ? mx.utils.URLUtil.replaceProtocol(url, "https") : url;
-    }
-
-    private function replacePreviousDefaultPortalURL(url:String):String
-    {
-        const previousDefaultPortalURL:String = "http://www.arcgis.com/";
-        return url.replace(previousDefaultPortalURL, DEFAULT_PORTAL_URL);
     }

     public function canSignOut():Boolean


Moved variable creation out of the loop in HooksProcessor.

--- src/org/robotlegs/v2/extensions/hooks/HooksProcessor.as
+++ src/org/robotlegs/v2/extensions/hooks/HooksProcessor.as
@@ -37,9 +37,11 @@
 		{
 			verifyHookClasses(hookClasses);

+			var hook:*
+
 			for each (var hookClass:Class in hookClasses)
 			{
-				var hook:* = useInjector.getInstance(hookClass);
+				hook = useInjector.getInstance(hookClass);
 				hook.hook();
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19382
Author:   aharui@adobe.com
Date:     2010-12-15T05:43:04.586172Z

Log Message:
-----------
Initial check in of Media Query support

QE notes: new feature
Doc notes: new feature
Bugs: none
Reviewer: Evtim, Pete F
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/framework/src/mx/styles/IStyleManager2.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="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MediaQueryParser.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flash/css/MediaList.java</path>

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

--- frameworks/projects/framework/src/mx/styles/IStyleManager2.as
+++ frameworks/projects/framework/src/mx/styles/IStyleManager2.as
@@ -192,6 +192,14 @@
 				url:String, update:Boolean = true,
 				applicationDomain:ApplicationDomain = null,
 				securityDomain:SecurityDomain = null):IEventDispatcher;
+
+    /**
+     *  @private
+     *  Used in media query handling.
+     *  @param value normalized media query string
+     *  @returns true if valid media
+     */
+    function acceptMediaList(value:String):Boolean;
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 21245
Author:   chiedozi@adobe.com
Date:     2011-05-13T00:52:01.736810Z

Log Message:
-----------
Fixed issues related to the application not properly resizing after the softKeyboard is deactivated

QE notes:
Doc notes:
Bugs: SDK-30146,SDK-29973
Reviewer: Jason SZ
Tests run: checkintests
Is noteworthy for integration:

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

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -278,6 +278,19 @@

     /**
      *  @private
+     *  Variable that determines whether this application is running on iOS.
+     */
+    private var isIOS:Boolean = false;
+
+    /**
+     *  @private
+     *  This variable stores the last object that received the SOFT_KEYBOARD_ACTIVATE
+     *  event.
+     */
+    private var softKeyboardTarget:Object = null;
+
+    /**
+     *  @private
      *  Flag set to true if the application has temporarily set its explicit
      *  width and height to deal with orientation.
      */
@@ -1257,6 +1270,9 @@
         if (hasEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR))
             systemManager.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorRedispatcher);

+        // Determine if we are running on an iOS device
+        isIOS = Capabilities.version.indexOf("IOS") == 0;
+
         // To prevent a flicker described in SDK-30133, a flex application listens
         // for orientationChanging events dispatched by iOS AIR applications.
         // In the handler, the stage's width and height are swapped, and a validation
@@ -1710,6 +1726,29 @@
     {
         if (this === FlexGlobals.topLevelApplication)
         {
+            if (softKeyboardTarget && softKeyboardTarget != event.target)
+                clearSoftKeyboardTarget();
+
+            softKeyboardTarget = event.target;
+
+            // If the display object that activates the softkeyboard is removed without
+            // losing focus, the runtime may not dispatch a deactivate event.  So the
+            // framework adds a REMOVE_FROM_STAGE event listener to the target and manually
+            // clears the focus.
+            softKeyboardTarget.addEventListener(Event.REMOVED_FROM_STAGE,
+                                                softKeyboardTarget_removeFromStageHandler,
+                                                false, EventPriority.DEFAULT, true);
+
+            // On iOS, if the softKeyboard target is removed from the stage as a result
+            // of a user input with another focusable component, the application will not
+            // receive a SOFT_KEYBOARD_DEACTIVATE event, only the target will.
+            if (isIOS)
+            {
+                softKeyboardTarget.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE,
+                                                    softKeyboardDeactivateHandler, false,
+                                                    EventPriority.DEFAULT, true);
+            }
+
             // Get the keyboard size
             var keyboardRect:Rectangle = stage.softKeyboardRect;

@@ -1743,8 +1782,11 @@
      */
     private function softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void
     {
-        if (this === FlexGlobals.topLevelApplication)
+        if (this === FlexGlobals.topLevelApplication && isSoftKeyboardActive)
         {
+            if (softKeyboardTarget)
+                clearSoftKeyboardTarget();
+
             isSoftKeyboardActive = false;

             if (softKeyboardBehavior == "none" && resizeForSoftKeyboard)
@@ -1761,6 +1803,43 @@

                 validateNow(); // Validate so that other listeners like Scroller get the updated dimensions
             }
+        }
+    }
+
+    /**
+     *  @private
+     *  Called when a softKeyboard activation target is removed from the
+     *  stage.  If the target has stage focus, then the focus is set to null.
+     *  This will cause a SOFT_KEYBOARD_DEACTIVATE event to be dispatched.
+     */
+    private function softKeyboardTarget_removeFromStageHandler(event:Event):void
+    {
+        if (stage.focus == softKeyboardTarget)
+            stage.focus = null;
+
+        // clearSoftKeyboardTarget() is called in response to the SOFT_KEYBOARD_DEACTIVATE
+        // event and will clear the removeFromStage listener and softKeyboardDeactivate
+        // events from the target.
+    }
+
+    /**
+     *  @private
+     *  This method clears the cached softKeyboard target and removes the
+     *  removeFromStage handler that is added in the softKeyboardActivateHandler
+     *  method.
+     */
+    private function clearSoftKeyboardTarget():void
+    {
+        if (softKeyboardTarget)
+        {
+            if (isIOS)
+            {
+                softKeyboardTarget.removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE,
+                                                       softKeyboardDeactivateHandler);
+            }
+
+            softKeyboardTarget.removeEventListener(Event.REMOVED_FROM_STAGE, softKeyboardTarget_removeFromStageHandler);
+            softKeyboardTarget = null;
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 10146
Author:   kelin@adobe.com
Date:     2009-09-11T05:56:56.397010Z

Log Message:
-----------
Fixes for missing Exclude metadata.
Removed Alternative metadata from ViewStack.
DropDownListSkin's Dropshadow alpha changed back to original 0.6.

QE notes: DropDownList drop shadow should be normal.
Doc notes: None
Bugs: sdk-23106, sdk-23116, sdk-23016, sdk-23017
Reviewer: Ryan
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

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


seek in buffer: fix audio missing reinject AAC/AVC HEADER FLV Tag after each seek also filter out old metadata tag enable the feature still an issue with live sliding reporting incorrect values when seeking in buffer related to #12

--- src/org/mangui/hls/stream/StreamBuffer.as
+++ src/org/mangui/hls/stream/StreamBuffer.as
@@ -34,6 +34,8 @@
         private var _audioTags : Vector.<FLVData>;
         private var _videoTags : Vector.<FLVData>;
         private var _metaTags : Vector.<FLVData>;
+        private var _aacHeader : FLVData;
+        private var _avcHeader : FLVData;
         /** playlist duration **/
         private var _playlist_duration : Number = 0;
         /** requested start position **/
@@ -102,15 +104,15 @@
                 Log.debug("seek : requested position:" + position + ",seek position:" + _seek_position_requested);
             }
             // check if we can seek in buffer
-            // if (_seek_position_requested >= min_pos && _seek_position_requested <= max_pos) {
-            // _seek_pos_reached = false;
-            // _first_start_position = min_pos;
-            // } else {
-            // seek position is out of buffer : load from fragment
-            _fragmentLoader.stop();
-            _fragmentLoader.seek(position);
-            flushAll();
-            // }
+            if (_seek_position_requested >= min_pos && _seek_position_requested <= max_pos) {
+                _seek_pos_reached = false;
+                _first_start_position = min_pos;
+            } else {
+                // seek position is out of buffer : load from fragment
+                _fragmentLoader.stop();
+                _fragmentLoader.seek(position);
+                flushAll();
+            }
             _timer.start();
         }

@@ -120,11 +122,13 @@
                 var tagData : FLVData = new FLVData(tag, position, continuity);
                 switch(tag.type) {
                     case FLVTag.AAC_HEADER:
+                        _aacHeader = tagData;
                     case FLVTag.AAC_RAW:
                     case FLVTag.MP3_RAW:
                         _audioTags.push(tagData);
                         break;
                     case FLVTag.AVC_HEADER:
+                        _avcHeader = tagData;
                     case FLVTag.AVC_NALU:
                         _videoTags.push(tagData);
                         break;
@@ -240,6 +244,8 @@

         /* filter/tweak tags to seek accurately into the stream */
         private function seekFilterTags(tags : Vector.<FLVData>) : Vector.<FLVData> {
+            var aacHeaderfound : Boolean = false;
+            var avcHeaderfound : Boolean = false;
             var filteredTags : Vector.<FLVData>=  new Vector.<FLVData>();
             /* PTS of first tag that will be pushed into FLV tag buffer */
             var first_pts : Number;
@@ -301,19 +307,24 @@
                 /* keyframe / accurate seeking, we need to filter out some FLV tags */
                 for each (flvData in tags) {
                     tag = flvData.tag;
+                    if (tag.type == FLVTag.AAC_HEADER) {
+                        aacHeaderfound = true;
+                    } else if (tag.type == FLVTag.AVC_HEADER) {
+                        avcHeaderfound = true;
+                    }
                     if (tag.pts >= first_pts) {
                         filteredTags.push(flvData);
                     } else {
                         switch(tag.type) {
                             case FLVTag.AAC_HEADER:
                             case FLVTag.AVC_HEADER:
-                            case FLVTag.METADATA:
                             case FLVTag.DISCONTINUITY:
                                 tag.pts = tag.dts = first_pts;
                                 filteredTags.push(flvData);
                                 break;
                             case FLVTag.AVC_NALU:
-                                /* only append video tags starting from last keyframe before seek position to avoid playback artifacts
+                            case FLVTag.METADATA:
+                                /* only append video and metadata tags starting from last keyframe before seek position to avoid playback artifacts
                                  *  rationale of this is that there can be multiple keyframes per segment. if we append all keyframes
                                  *  in NetStream, all of them will be displayed in a row and this will introduce some playback artifacts
                                  *  */
@@ -328,6 +339,14 @@
                     }
                 }
             }
+            if (aacHeaderfound == false && _aacHeader != null) {
+                _aacHeader.tag.pts = first_pts;
+                filteredTags.unshift(_aacHeader);
+            }
+            if (avcHeaderfound == false && _avcHeader != null) {
+                _avcHeader.tag.pts = first_pts;
+                filteredTags.unshift(_avcHeader);
+            }
             return filteredTags;
         }

@@ -404,15 +423,14 @@
             return tags;
         }

-        /*
         private function get min_pos() : Number {
-        var min_pos_ : Number = Number.POSITIVE_INFINITY;
-        if (_metaTags.length) min_pos_ = Math.min(min_pos_, _metaTags[0].position);
-        if (_videoTags.length) min_pos_ = Math.min(min_pos_, _videoTags[0].position);
-        if (_audioTags.length) min_pos_ = Math.min(min_pos_, _audioTags[0].position);
-        return min_pos_;
-        }
-         */
+            var min_pos_ : Number = Number.POSITIVE_INFINITY;
+            if (_metaTags.length) min_pos_ = Math.min(min_pos_, _metaTags[0].position);
+            if (_videoTags.length) min_pos_ = Math.min(min_pos_, _videoTags[0].position);
+            if (_audioTags.length) min_pos_ = Math.min(min_pos_, _audioTags[0].position);
+            return min_pos_;
+        }
+
         private function get max_pos() : Number {
             var max_pos_ : Number = Number.NEGATIVE_INFINITY;
             if (_metaTags.length) max_pos_ = Math.max(max_pos_, _metaTags[_metaTags.length - 1].position);


Transferred from the Adobe Open Source Subversion Repository

Revision: 20553
Author:   klin@adobe.com
Date:     2011-03-02T20:39:18.507335Z

Log Message:
-----------
Fix for ComboBox selecting an unexpected item when pressing the enter key after hitting the up key while the first item is selected. The userProposedSelectedIndex was being corrupted when the new selected index wasn't committed when navigating with the arrow keys.

QE notes: No
Doc notes: No
Bugs: SDK-29598
Reviewer: Jason
Tests run: cyclone server, checkintests
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as
@@ -838,10 +838,13 @@

                 }

-                proposedNewIndex = userProposedSelectedIndex = Math.min(proposedNewIndex, maxIndex);
+                proposedNewIndex = Math.min(proposedNewIndex, maxIndex);

                 if (proposedNewIndex >= 0)
+                {
+                    userProposedSelectedIndex = proposedNewIndex;
                     setSelectedIndex(proposedNewIndex, true);
+                }
             }
         }
         else


Transferred from the Adobe Open Source Subversion Repository

Revision: 22043
Author:   tkraikit@adobe.com
Date:     2011-08-17T00:40:03.068931Z

Log Message:
-----------
Fixes for:
* SDK-31037: if animation is programmatically initiated, wait until completion to raise change or valueCommit events
* SDK-31100: DateSpinner supports height property and handles width property better
* SDK-31181: set selectedDate to null triggers event
* SDK-31182: set selectedDate to null while minDate/maxDate are in effect
* SDK-31184: set selectedDate to a Date after setting it to null does not dispatch an event
* SDK-31035: improper handling of binding to null selectedDate value

QE notes: none
Doc notes: none
Bugs: SDK-31037, SDK-31100, SDK-31181, SDK-31182, SDK-31184, SDK-31035
Reviewer: jszeto
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/scripts/DateSpinnerTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/views/DateSpinnerTestHomeView.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as
@@ -107,12 +107,13 @@
     {
         super.layoutContents(unscaledWidth, unscaledHeight);

-        // Always set the SpinnerListContainer to its measured sized, regardless of our size
+        // Always set the SpinnerListContainer to its measured width, regardless of our size
         var containerWidth:Number = SpinnerListContainer(listContainer).getPreferredBoundsWidth();
-        var containerHeight:Number = SpinnerListContainer(listContainer).getPreferredBoundsHeight();
+        var containerHeight:Number = unscaledHeight;

         setElementSize(listContainer, containerWidth, containerHeight);
-        setElementPosition(listContainer, 0, 0);
+        // if width is greater than necessary, center the component
+        setElementPosition(listContainer, Math.max((unscaledWidth - containerWidth)/2, 0), 0);
     }

 }


Added ROOT_URL constant, and STAGING_SERVER_URL constant (for use in login screen form)

--- flexEditor/src/org/arisgames/editor/util/AppConstants.as
+++ flexEditor/src/org/arisgames/editor/util/AppConstants.as
@@ -2,8 +2,12 @@
 {
 public class AppConstants
 {
+	public static const APPLICATION_ENVIRONMENT_ROOT_URL:String = "http://arisgames.org/"; //For other URL's to append to
+	public static const APPLICATION_ENVIRONMENT_STAGING_URL:String = APPLICATION_ENVIRONMENT_ROOT_URL+"stagingserver1"; //server to be set on iOS device
+
 	public static const APPLICATION_ENVIRONMENT_SERVICES_URL:String = "http://davembp.local/server/services/aris/"; //staging
 	//public static const APPLICATION_ENVIRONMENT_SERVICES_URL:String = "http://www.arisgames.org/stagingserver1/services/aris/"; //staging
+

 	public static const APPLICATION_ENVIRONMENT_UPLOAD_SERVER_URL:String = "http://davembp.local/server/services/aris/uploadhandler.php"; //davembp
 	//public static const APPLICATION_ENVIRONMENT_UPLOAD_SERVER_URL:String = "http://atsosxdev.doit.wisc.edu/aris/server/services/aris/uploadhandler.php";	//dev


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

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


FLEX-34011 stop RTE when vaue/_axis is null

--- frameworks/projects/charts/src/mx/charts/AxisRenderer.as
+++ frameworks/projects/charts/src/mx/charts/AxisRenderer.as
@@ -640,10 +640,10 @@

         _axis = value;

-        value.addEventListener("axisChange", axisChangeHandler,
-                               false, 0, true);
-        value.addEventListener("titleChange", titleChangeHandler,
-                               false, 0, true);
+		if (_axis) {
+        	value.addEventListener("axisChange", axisChangeHandler, false, 0, true);
+        	value.addEventListener("titleChange", titleChangeHandler, false, 0, true);
+		}
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5389
Author:   mhorn@adobe.com
Date:     2009-03-18T16:09:24.692896Z

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

Modified Paths:
--------------
<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/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/CollectionEventKind.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/graphics/GradientBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -9771,18 +9771,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Executes the data bindings into this UIComponent object.
-     *
-     *  Workaround for MXML container/bindings problem (177074):
-     *  override Container.executeBindings() to prefer descriptor.document over parentDocument in the
-     *  call to BindingManager.executeBindings().
-     *
-     *  This should always provide the correct behavior for instances created by descriptor, and will
-     *  provide the original behavior for procedurally-created instances. (The bug may or may not appear
-     *  in the latter case.)
-     *
-     *  A more complete fix, guaranteeing correct behavior in both non-DI and reparented-component
-     *  scenarios, is anticipated for updater 1.
+     *  Executes all the bindings for which the UIComponent object is the destination.
      *
      *  @param recurse Recursively execute bindings for children of this component.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 11501
Author:   jon.avila@ssbbartgroup.com
Date:     2009-11-06T15:44:21.273377Z

Log Message:
-----------
Convenience get/set properties have been added to all UIComponents for accessibilityName, accessibilityDescription, accessibilityEnabled, and accessibilityShortcut.  These can be set in MXML or via actionScript.  If an accessibilityProperties object doesn't exist for the UIComponent one is automatically created.
QE notes: none
Doc notes: none
Bugs: n/a
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: yes, added convenience properties for accessibility.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -37,6 +37,8 @@
 import flash.text.TextFormatAlign;
 import flash.text.TextLineMetrics;
 import flash.utils.getQualifiedClassName;
+import flash.accessibility.Accessibility;
+import flash.accessibility.AccessibilityProperties;

 import mx.automation.IAutomationObject;
 import mx.binding.BindingManager;
@@ -1042,6 +1044,10 @@
  *

  *  <mx:tagname
  *   Properties
+ *    accessibilityDescription="null"
+ *    accessibilityName="null"
+ *    accessibilityShortcut="null"
+ *    accessibilitySilent="true|false"
  *    automationName="null"
  *    cachePolicy="auto|on|off"
  *    currentState="null"
@@ -1621,7 +1627,132 @@
         _updateCompletePendingFlag = value;
     }

-    //--------------------------------------------------------------------------
+	//------------------------------------------------------------------------
+    //
+    //  Properties: Accessibility
+    //
+    //------------------------------------------------------------------------
+
+	/**
+     *  @public
+	 *  A convenience accessor for the 'silent' property
+	 *  in this UIComponent's accessibilityProperties object.
+	 *
+	 *  Note that accessibilityEnabled has the opposite sense from silent;
+	 *  accessibilityEnabled is true when silent is false and vice versa.
+	 *
+	 *  The getter simply returns accessibilityProperties.silent,
+	 *  or true if accessibilityProperties is null.
+	 *  The setter first checks whether accessibilityProperties is null, and if it is,
+	 *  sets it to a new AccessibilityProperties instance;
+	 *  then it sets accessibilityProperties.silent.
+	 *
+     *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+	 */
+	public function get accessibilityEnabled():Boolean
+    {
+      return accessibilityProperties ? !accessibilityProperties.silent : true;
+	}
+
+	public function set accessibilityEnabled(value:Boolean):void
+    {
+	  if (!accessibilityProperties)
+        accessibilityProperties = new AccessibilityProperties();
+   	  accessibilityProperties.silent = !value;
+      Accessibility.updateProperties();
+	}
+
+	/**
+     *  @public
+	 *  A convenience accessor for the 'name' property
+	 *  in this UIComponent's accessibilityProperties object.
+	 *
+	 *  The getter simply returns accessibilityProperties.name,
+	 *  or "" if accessibilityProperties is null.
+	 *  The setter first checks whether accessibilityProperties is null, and if it is,
+	 *  sets it to a new AccessibilityProperties instance;
+	 *  then it sets accessibilityProperties.name.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+ 	 */
+	public function get accessibilityName():String
+    {
+	  return accessibilityProperties ? accessibilityProperties.name : "";
+	}
+
+    public function set accessibilityName(value:String):void
+    {
+	  if (!accessibilityProperties)
+	    accessibilityProperties = new AccessibilityProperties();
+ 	  accessibilityProperties.name = value;
+      Accessibility.updateProperties();
+	}
+
+	/**
+	 *  @public
+	 *  A convenience accessor for the 'description' property
+	 *  in this UIComponent's accessibilityProperties object.
+	 *
+	 *  The getter simply returns accessibilityProperties.description,
+	 *  or "" if accessibilityProperties is null.
+	 *  The setter first checks whether accessibilityProperties is null, and if it is,
+	 *  sets it to a new AccessibilityProperties instance;
+	 *  then it sets accessibilityProperties.description.
+	 *
+  	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function get accessibilityDescription():String
+    {
+	  return accessibilityProperties ? accessibilityProperties.description : "";
+	}
+
+	public function set accessibilityDescription(value:String):void
+    {
+	  if (!accessibilityProperties)
+		accessibilityProperties = new AccessibilityProperties();
+   	  accessibilityProperties.description = value;
+      Accessibility.updateProperties();
+	}
+
+	/**
+	 *  @public
+	 *  A convenience accessor for the 'shortcut' property
+	 *  in this UIComponent's accessibilityProperties object.
+	 *
+	 *  The getter simply returns accessibilityProperties.shortcut,
+	 *  or "" if accessibilityProperties is null.
+	 *  The setter first checks whether accessibilityProperties is null, and if it is,
+	 *  sets it to a new AccessibilityProperties instance;
+	 *  then it sets accessibilityProperties.shortcut.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function get accessibilityShortcut():String
+    {
+	  return accessibilityProperties ? accessibilityProperties.shortcut : "";
+	}
+
+    public function set accessibilityShortcut(value:String):void
+    {
+   	  if (!accessibilityProperties)
+	    accessibilityProperties = new AccessibilityProperties();
+	  accessibilityProperties.shortcut = value;
+      Accessibility.updateProperties();
+	}
+
+//--------------------------------------------------------------------------
     //
     //  Variables: Invalidation
     //


Transferred from the Adobe Open Source Subversion Repository

Revision: 18641
Author:   chiedozi@adobe.com
Date:     2010-11-17T01:26:13.734827Z

Log Message:
-----------
Updated MobileApplication api names.

MobileApplicationBase
backKeyHandler renamed to backKeyUpHandler
menuKeyHandler renamed to menuKeyUpHandler
sessionCachingEnabled renamed to persistNavigatorState
persistApplicationState() renamed to saveNavigatorState
restoreApplicationSate() renamed to loadNavigatorState
registerPersistenceClassAliases removed
nativeApplication_invokeHandler() renamed to invokeHandler()
nativeApplication_deactivateHandler() renamed to deactivateHandler()

PersistenceManager
flush() renamed to save() and return success boolean
initialize() renamed to load() and return success boolean
The applicationVersion shared object property was renamed to versionNumber.

View
deserializePersistedData() renamed to deserializeData()

ViewNavigatorBase
restoreViewData() renamed loadViewData()

Events
APPLICATION_PERSIST and APPLICATION_RESTORE removed from the framework
APPLICATION_PERSISTING renamed to NAVIGATOR_STATE_SAVING
APPLICATION_RESTORING renamed to NAVIGATOR_STATE_LOADING

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/IPersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</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/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.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/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/framework/src/mx/events/FlexEvent.as
+++ frameworks/projects/framework/src/mx/events/FlexEvent.as
@@ -123,118 +123,6 @@
     public static const APPLICATION_COMPLETE:String = "applicationComplete";

     /**
-     *  The FlexEvent.APPLICATION_PERSIST constant defines the value of the
-     *  type property of the event object for a applicationPersist event.
-     *
-     *
The properties of the event object have the following values:

-     *

-     *
Property	Value

-     *
bubbles	false

-     *
cancelable	false

-     *
currentTarget	The Object that defines the
-     *       event listener that handles the event. For example, if you use
-     *       myButton.addEventListener() to register an event listener,
-     *       myButton is the value of the currentTarget.

-     *
target	The Object that dispatched the event;
-     *       it is not always the Object listening for the event.
-     *       Use the currentTarget property to always access the
-     *       Object listening for the event.

-     *

-     *
-     *  @eventType applicationPersist
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static const APPLICATION_PERSIST:String = "applicationPersist";
-
-    /**
-     *  The FlexEvent.APPLICATION_PERSISTING constant defines the value of the
-     *  type property of the event object for a applicationPersisting event.
-     *
-     *
The properties of the event object have the following values:

-     *

-     *
Property	Value

-     *
bubbles	false

-     *
cancelable	true

-     *
currentTarget	The Object that defines the
-     *       event listener that handles the event. For example, if you use
-     *       myButton.addEventListener() to register an event listener,
-     *       myButton is the value of the currentTarget.

-     *
target	The Object that dispatched the event;
-     *       it is not always the Object listening for the event.
-     *       Use the currentTarget property to always access the
-     *       Object listening for the event.

-     *

-     *
-     *  @eventType applicationPersisting
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static const APPLICATION_PERSISTING:String = "applicationPersisting";
-
-    /**
-     *  The FlexEvent.APPLICATION_RESTORE constant defines the value of the
-     *  type property of the event object for a applicationRestore event.
-     *
-     *
The properties of the event object have the following values:

-     *

-     *
Property	Value

-     *
bubbles	false

-     *
cancelable	false

-     *
currentTarget	The Object that defines the
-     *       event listener that handles the event. For example, if you use
-     *       myButton.addEventListener() to register an event listener,
-     *       myButton is the value of the currentTarget.

-     *
target	The Object that dispatched the event;
-     *       it is not always the Object listening for the event.
-     *       Use the currentTarget property to always access the
-     *       Object listening for the event.

-     *

-     *
-     *  @eventType applicationRestore
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static const APPLICATION_RESTORE:String = "applicationRestore";
-
-    /**
-     *  The FlexEvent.APPLICATION_RESTORING constant defines the value of the
-     *  type property of the event object for a applicationRestoring event.
-     *
-     *
The properties of the event object have the following values:

-     *

-     *
Property	Value

-     *
bubbles	false

-     *
cancelable	true

-     *
currentTarget	The Object that defines the
-     *       event listener that handles the event. For example, if you use
-     *       myButton.addEventListener() to register an event listener,
-     *       myButton is the value of the currentTarget.

-     *
target	The Object that dispatched the event;
-     *       it is not always the Object listening for the event.
-     *       Use the currentTarget property to always access the
-     *       Object listening for the event.

-     *

-     *
-     *  @eventType applicationRestoring
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static const APPLICATION_RESTORING:String = "applicationRestoring";
-
-    /**
      *  The FlexEvent.BUTTON_DOWN constant defines the value of the
      *  type property of the event object for a buttonDown event.
      *
@@ -1002,6 +890,62 @@
      *  @productversion Flex 4
      */
     public static const MUTED_CHANGE:String = "mutedChange";
+
+    /**
+     *  The FlexEvent.NAVIGATOR_STATE_LOADING constant defines the value of the
+     *  type property of the event object for a navigatorStateLoading event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	true

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *

+     *
+     *  @eventType applicationRestoring
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public static const NAVIGATOR_STATE_LOADING:String = "navigatorStateLoading";
+
+    /**
+     *  The FlexEvent.NAVIGATOR_STATE_SAVING constant defines the value of the
+     *  type property of the event object for a navigatorStateSaving event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	true

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *

+     *
+     *  @eventType navigatorStateSaving
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public static const NAVIGATOR_STATE_SAVING:String = "navigatorStateSaving";

     /**
      *  @private


Transferred from the Adobe Open Source Subversion Repository

Revision: 12634
Author:   gruehle@adobe.com
Date:     2009-12-08T00:14:34.097426Z

Log Message:
-----------
Re-submit 12472, but for mac only.

LoaderUtil.normalizeURL() calls encodeURI() before returning. This fixes several issues when the main app/module has a high-ascii character in the path name. Note that Flex still requires user-specified urls to be encoded before being passed to the framework.

Remove commented out code from SkinnableDataContainerSkin.

QE notes: None
Doc notes: None
Bugs: SDK-24366
Reviewer: -
Tests run: Checkin, qe cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/LoaderUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SkinnableDataContainerSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/utils/LoaderUtil.as
+++ frameworks/projects/framework/src/mx/utils/LoaderUtil.as
@@ -13,6 +13,7 @@
 {

 import flash.display.LoaderInfo;
+import flash.system.Capabilities;

 import mx.core.mx_internal;

@@ -112,6 +113,12 @@
                 url = urlFilter(url, index);
             }
         }
+
+        // On the mac, the player doesn't like filenames with high-ascii
+        // characters. Calling encodeURI fixes this problem. We restrict
+        // this call to mac-only since it causes problems on Windows.
+        if (isMac())
+            return encodeURI(url);

         return url;
     }
@@ -183,6 +190,14 @@

         return absoluteURL;
     }
+
+    /**
+     *  @private
+     */
+    private static function isMac():Boolean
+    {
+        return Capabilities.os.substring(0, 3) == "Mac";
+    }

     /**
      *  @private


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

--- frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.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.rpc.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3297
Author:   jimurphy@adobe.com
Date:     2008-09-22T17:59:53.303960Z

Log Message:
-----------
Merge 3.0.x revisions 3260,3262,3266,3271,3276,3282,3285,3292,3294 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.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/framework/src/mx/managers/dragClasses/DragProxy.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/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.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/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/AbstractMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Fault.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.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" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as
+++ frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as
@@ -16,6 +16,7 @@

 import mx.core.mx_internal;
 import mx.messaging.messages.IMessage;
+import mx.messaging.messages.AbstractMessage;
 import mx.rpc.AsyncToken;

 use namespace mx_internal;
@@ -80,6 +81,9 @@
     {
         super(type, bubbles, cancelable, token, message);

+        if (message != null && message.headers != null)
+            _statusCode = message.headers[AbstractMessage.STATUS_CODE_HEADER] as int;
+
         _result = result;
     }

@@ -91,8 +95,8 @@
     //--------------------------------------------------------------------------

     /**
-     * In certain circumstances, headers may also be returned with a fault to
-     * provide further context to the failure.
+     * In certain circumstances, headers may also be returned with a result to
+     * provide further context.
      */
     public function get headers():Object
     {
@@ -115,6 +119,15 @@
         return _result;
     }

+    /**
+     * If the source message was sent via HTTP, this property provides access
+     * to the HTTP response status code (if available), otherwise the value is
+     * 0.
+     */
+    public function get statusCode():int
+    {
+        return _statusCode;
+    }

     //--------------------------------------------------------------------------
     //
@@ -147,7 +160,7 @@
      */
     override public function toString():String
     {
-        return formatToString("ResultEvent", "messageId", "type", "bubbles", "cancelable", "eventPhase");
+        return formatToString("ResultEvent", "messageId", "type", "bubbles", "cancelable", "eventPhase", "httpStatus");
     }

     /*
@@ -168,6 +181,7 @@

     private var _result:Object;
     private var _headers:Object;
+    private var _statusCode:int;
 }

 }


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

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

 package mx.rpc.soap.types
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3925
Author:   jimurphy@adobe.com
Date:     2008-10-28T15:28:25.006190Z

Log Message:
-----------
Merged gumbo_alpha revisions 3857-3860,3870,3872,3874-3876,3881,3884,3886,3889,3891,3893,3895,3908,3912 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxRotateEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxFadeEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/CubicBezierSegment.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/skins/spark/FxFocusSkin.as" copyfrom-rev="3895" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxFocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxVSliderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/LineSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxFadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxListExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxMoveEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/PathSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_conversion.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxAnimateColorEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_core.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxAnimateEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxCheckBoxExample.mxml</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/DataGroupExample.mxml" copyfrom-rev="3895" action="A">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/DataGroupExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDeclaration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/GroupExample.mxml" copyfrom-rev="3895" action="A">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/GroupExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/QuadraticBezierSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxNumericStepperExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxResizeEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxButtonExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxResize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxToggleButtonExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxSpinnerExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/PropertyValuesHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_edit.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/TextViewExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxMove.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxHSliderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -22,7 +22,7 @@

 import mx.utils.Flags32;
 import mx.components.baseClasses.FxComponent;
-import mx.graphics.TextBox;
+import mx.graphics.graphicsClasses.TextGraphicElement;

 import mx.events.FlexEvent;
 import mx.managers.IFocusManagerComponent;
@@ -131,7 +131,7 @@
     /**
      *  A skin part that defines the  label of the button.
      */
-    public var labelField:TextBox;
+    public var labelField:TextGraphicElement;

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 11696
Author:   hmuller@adobe.com
Date:     2009-11-12T16:00:33.064482Z

Log Message:
-----------
Exclude layout property from HGroup, VGroup, TileLayout.

QE notes:
Doc notes:
Bugs: sdk-23730
Reviewer: Chet
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TileGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/HGroup.as
+++ frameworks/projects/spark/src/spark/components/HGroup.as
@@ -16,6 +16,8 @@
 import spark.layouts.supportClasses.LayoutBase;

 [IconFile("HGroup.png")]
+
+[Exclude(name="layout", kind="property")]

 /**
  *  The HGroup container is an instance of the Group container


use full path for resistor images

use full path for resistor images

--- common/actionscript/org/concord/sparks/circuit/resistor/resistor_5band/Resistor.as
+++ common/actionscript/org/concord/sparks/circuit/resistor/resistor_5band/Resistor.as
@@ -96,7 +96,7 @@
         }

         private function loadBandImage(loader:Loader, fname:String):void {
-            var s = '../../common/images/resistor/' + fname;
+            var s = '/sparks-content/common/images/resistor/' + fname;
             //trace('path=' + s);
             try {
                 var req:URLRequest = new URLRequest(s);


339 poking at it

339 poking at it

--- raw/src/org/yellcorp/lib/color/matrix/ColorMatrixUtil.as
+++ raw/src/org/yellcorp/lib/color/matrix/ColorMatrixUtil.as
@@ -203,8 +203,12 @@
         {
             out = new Array(20);
         }
+
+        // copy the array at this point in case it's aliased to out
+        m = m.concat();
+
         makeIdentity(out);
-        rref(m.concat(), out);
+        rref(m, out);
         return out;
     }

@@ -221,11 +225,11 @@
         var row:int;
         var col:int;

-        // [  0  1  2  3  4 ] [ 1 0 0 0 0 ]
-        // [  5  6  7  8  9 ] [ 0 1 0 0 0 ]
-        // [ 10 11 12 13 14 ] [ 0 0 1 0 0 ]
-        // [ 15 16 17 18 19 ] [ 0 0 0 1 0 ]
-        // [  0  0  0  0  1 ] [ 0 0 0 0 1 ]
+        // [  0  1  2  3  4  |  1 0 0 0 0 ]
+        // [  5  6  7  8  9  |  0 1 0 0 0 ]
+        // [ 10 11 12 13 14  |  0 0 1 0 0 ]
+        // [ 15 16 17 18 19  |  0 0 0 1 0 ]
+        // [  0  0  0  0  1  |  0 0 0 0 1 ] <-- implicit row

         for (row = 0, col = 0; row < 20; row += 5, col++)
         {
@@ -247,7 +251,7 @@
         // [ 0 0 0 0 1 ]

         // cheap way to zero out the last column, given that the bottom
-        // row is an implicit [ 0 0 0 0 1 ]
+        // row is an implicit [ 0 0 0 0 1 | 0 0 0 0 1 ]
         zeroOffsets(orig, aug);

         // now run backwards and up from row/column 3


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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