Transferred from the Adobe Open Source Subversion Repository

Revision: 2672
Author:   egeorgie@adobe.com
Date:     2008-07-30T22:52:27.741630Z

Log Message:
-----------
Remove GraphicElement.bounds APIs in favor of measure

Reviewed by Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Ellipse.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/graphics/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/graphics/GraphicTags_checkintests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElementHostImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -345,8 +345,11 @@
         }
     }

-    override protected function measure():void
-    {
+    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
         if (!alwaysUseItemRenderer)
         {
@@ -361,6 +364,11 @@
             }
         }

+        super.validateSize(recursive);
+    }
+
+    override protected function measure():void
+    {
         super.measure();

         if (_layout)


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

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

 package mx.collections
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11942
Author:   dloverin@adobe.com
Date:     2009-11-18T17:33:13.065717Z

Log Message:
-----------
StyleManager fixes.

Stop using the styleManager property in a constructor.
framework/src/mx/containers/DividedBox.as
framework/src/mx/containers/Form.as
framework/src/mx/controls/ButtonBar.as

Cache inheriting styles. Also made static arrays in StyleManagerImpl per-instance.
framework/src/mx/events/FlexChangeEvent.as
framework/src/mx/styles/StyleManagerImpl.as

Remove static StyleManager methods that were new to Flex 4 (qualifiedTypeSelectors property, getStyleDeclarations(), hasAdvancedSelectors(), hasPseudoCondition()).
framework/src/mx/styles/StyleManager.as

Update copyright.
framework/src/mx/styles/CSSMergedStyleDeclaration.as

QE notes: None.
Doc notes: None.
Bugs: SDK-24215
Reviewer: Alex
Tests run: checkintests, containers/DividedBox, containers/form, components/ButtonBar, Managers/StyleManager, PerModuleStyleManager
Is noteworthy for integration: yes - StyleManager performance improvement

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexChangeEvent.as</path>

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

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

 import flash.display.DisplayObject;
+import flash.events.EventDispatcher;
 import flash.display.LoaderInfo;
 import flash.events.IEventDispatcher;
 import flash.events.TimerEvent;
@@ -36,6 +37,7 @@
 import mx.styles.IStyleModule;
 import mx.styles.IStyleManager2;
 import mx.events.Request;
+import flash.events.Event;

 use namespace mx_internal;

@@ -46,13 +48,93 @@
 /**
  *  @private
  */
-public class StyleManagerImpl implements IStyleManager2
+public class StyleManagerImpl extends EventDispatcher implements IStyleManager2
 {
     include "../core/Version.as";

     //--------------------------------------------------------------------------
     //
     //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  @private
+     */
+    private static var instance:IStyleManager2;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public static function getInstance():IStyleManager2
+    {
+        if (!instance)
+        {
+            // In Flex 4 each application/module creates its own style manager.
+            // There will be no style manager if the application/module was compiled for
+            // Flex 3 compatibility. In that case create there will be no instance
+            // associated with the top-level application so create a new instance.
+            instance = IStyleManager2(IFlexModuleFactory(SystemManagerGlobals.topLevelSystemManagers[0]).
+                       getImplementation("mx.styles::IStyleManager2"));
+
+            if (!instance)
+                instance = new StyleManagerImpl(SystemManagerGlobals.topLevelSystemManagers[0]);
+        }
+
+        return instance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *
+     *  @param moduleFactory The module factory that is creating this instance. May not be null.
+     */
+    public function StyleManagerImpl(moduleFactory:IFlexModuleFactory)
+    {
+        super();
+
+        this.moduleFactory = moduleFactory;
+        this.moduleFactory.registerImplementation("mx.styles::IStyleManager2", this);
+
+        // get our parent styleManager
+        if (moduleFactory is DisplayObject)
+        {
+            var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
+            DisplayObject(moduleFactory).dispatchEvent(request);
+            var moduleFactory:IFlexModuleFactory = request.value as IFlexModuleFactory;
+            if (moduleFactory)
+            {
+                _parent = IStyleManager2(moduleFactory.
+                                         getImplementation("mx.styles::IStyleManager2"));
+                if (_parent is IEventDispatcher)
+                {
+                    IEventDispatcher(_parent).addEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE, styleManagerChangeHandler, false, 0, true);
+                }
+            }
+
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
     //
     //--------------------------------------------------------------------------

@@ -64,7 +146,7 @@
      *  others may be added later as needed.
      *  The isInheritingTextFormatStyle() method queries this set.
      */
-    private static var inheritingTextFormatStyles:Object =
+    private var inheritingTextFormatStyles:Object =
         {
             align: true,
             bold: true,
@@ -82,7 +164,7 @@
      *  The method registerSizeInvalidatingStyle() adds to this set
      *  and isSizeInvalidatingStyle() queries this set.
      */
-    private static var sizeInvalidatingStyles:Object =
+    private var sizeInvalidatingStyles:Object =
         {
             alignmentBaseline: true,
             baselineShift: true,
@@ -161,7 +243,7 @@
      *  The method registerParentSizeInvalidatingStyle() adds to this set
      *  and isParentSizeInvalidatingStyle() queries this set.
      */
-    private static var parentSizeInvalidatingStyles:Object =
+    private var parentSizeInvalidatingStyles:Object =
         {
             baseline: true,
             bottom: true,
@@ -179,7 +261,7 @@
      *  The method registerParentDisplayListInvalidatingStyle() adds to this set
      *  and isParentDisplayListInvalidatingStyle() queries this set.
      */
-    private static var parentDisplayListInvalidatingStyles:Object =
+    private var parentDisplayListInvalidatingStyles:Object =
         {
             baseline: true,
             bottom: true,
@@ -202,7 +284,7 @@
      *  because the MXML compiler does this at compile time,
      *  in conformance with the CSS spec.
      */
-    private static var colorNames:Object =
+    private var colorNames:Object =
         {
             transparent: "transparent",
             black: 0x000000,
@@ -233,83 +315,7 @@
             haloorange: 0xFFB600,
             halosilver: 0xAECAD9
         };
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class variables
-    //
-    //--------------------------------------------------------------------------
-    /**
-     *  @private
-     */
-    private static var instance:IStyleManager2;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    public static function getInstance():IStyleManager2
-    {
-        if (!instance)
-        {
-            // In Flex 4 each application/module creates its own style manager.
-            // There will be no style manager if the application/module was compiled for
-            // Flex 3 compatibility. In that case create there will be no instance
-            // associated with the top-level application so create a new instance.
-            instance = IStyleManager2(IFlexModuleFactory(SystemManagerGlobals.topLevelSystemManagers[0]).
-                       getImplementation("mx.styles::IStyleManager2"));
-
-            if (!instance)
-                instance = new StyleManagerImpl(SystemManagerGlobals.topLevelSystemManagers[0]);
-        }
-
-        return instance;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *
-     *  @param moduleFactory The module factory that is creating this instance. May not be null.
-     */
-    public function StyleManagerImpl(moduleFactory:IFlexModuleFactory)
-    {
-        super();
-
-        this.moduleFactory = moduleFactory;
-        this.moduleFactory.registerImplementation("mx.styles::IStyleManager2", this);
-
-        // get our parent styleManager
-        if (moduleFactory is DisplayObject)
-        {
-            var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
-            DisplayObject(moduleFactory).dispatchEvent(request);
-            var moduleFactory:IFlexModuleFactory = request.value as IFlexModuleFactory;
-            if (moduleFactory)
-            {
-                _parent = IStyleManager2(moduleFactory.
-                                         getImplementation("mx.styles::IStyleManager2"));
-            }
-
-        }
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
+
     /**
      *  @private
      *  Whether any advanced selectors have been registered with this style
@@ -356,6 +362,12 @@

     /**
      *  @private
+     *  Cache merged styles between this and parent.
+     */
+    private var mergedInheritingStylesCache:Object;
+
+    /**
+     *  @private
      *  This style manager's flex module factory.
      */
     private var moduleFactory:IFlexModuleFactory;
@@ -469,11 +481,15 @@
      */
     public function get inheritingStyles():Object
     {
+        if (mergedInheritingStylesCache)
+            return mergedInheritingStylesCache;
+
         var mergedStyles:Object = _inheritingStyles;

         if (parent)
         {
             var otherStyles:Object = parent.inheritingStyles;
+
             for (var obj:Object in otherStyles)
             {
                 if (mergedStyles[obj] === undefined)
@@ -481,12 +497,18 @@
             }
         }

+        mergedInheritingStylesCache = mergedStyles;
+
         return mergedStyles;
     }

     public function set inheritingStyles(value:Object):void
     {
         _inheritingStyles = value;
+        mergedInheritingStylesCache = null;
+
+        if (hasEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE))
+            dispatchInheritingStylesChangeEvent();
     }

     //----------------------------------
@@ -786,9 +808,11 @@
             parentStyle = parent.getMergedStyleDeclaration(selector);

         if (style || parentStyle)
+        {
             style = new CSSMergedStyleDeclaration(style, parentStyle,
                              style ? style.selectorString : parentStyle.selectorString, this, false);
-
+        }
+
         return style;
     }

@@ -1044,7 +1068,14 @@
      */
     public function registerInheritingStyle(styleName:String):void
     {
-        inheritingStyles[styleName] = true;
+        if (_inheritingStyles[styleName] != true)
+        {
+            _inheritingStyles[styleName] = true;
+            mergedInheritingStylesCache = null;
+
+            if (hasEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE))
+                dispatchInheritingStylesChangeEvent();
+        }
     }

     /**
@@ -1061,7 +1092,10 @@
      */
     public function isInheritingStyle(styleName:String):Boolean
     {
-        if (inheritingStyles[styleName] == true)
+        if (mergedInheritingStylesCache)
+            return mergedInheritingStylesCache[styleName] == true;
+
+        if (_inheritingStyles[styleName] == true)
             return true;

         if (parent && parent.isInheritingStyle(styleName))
@@ -1562,13 +1596,40 @@
         if (update)
             styleDeclarationsChanged();
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Methods: Style Propagation
-    //
-    //--------------------------------------------------------------------------
-
+
+
+    /**
+     *  @private
+     */
+    private function dispatchInheritingStylesChangeEvent():void
+    {
+        var event:Event = new FlexChangeEvent(FlexChangeEvent.STYLE_MANAGER_CHANGE,
+            false, false, new {property: "inheritingStyles"});
+        dispatchEvent(event);
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    private function styleManagerChangeHandler(event:FlexChangeEvent):void
+    {
+        if (!event.data)
+            return;     // invalid message
+
+        var property:String = event.data["property"];
+
+        if (property == "inheritingStyles")
+        {
+            mergedInheritingStylesCache = null;
+        }
+
+        if (hasEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE))
+            dispatchEvent(event);
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12127
Author:   hmuller@adobe.com
Date:     2009-11-23T23:58:00.001192Z

Log Message:
-----------
Additional min/max Inspectable metadata, mostly for the filter classes.

QE notes:
Doc notes:
Bugs: sdk-24365
Reviewer: Chet, Jason, Ryan
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/filters/DropShadowFilter.as
+++ frameworks/projects/spark/src/spark/filters/DropShadowFilter.as
@@ -140,6 +140,8 @@

     private var _alpha:Number = 1.0;

+    [Inspectable(minValue="0.0", maxValue="1.0")]
+
     /**
      *  The alpha transparency value for the color. Valid values are 0 to 1.
      *  For example, .25 sets a transparency value of 25%.
@@ -170,6 +172,8 @@
     //----------------------------------

     private var _angle:Number = 45;
+
+    [Inspectable(minValue="0.0", maxValue="360.0")]

     /**
      *   The angle of the bevel. Valid values are from 0 to 360°.


Patch inspired by one from Case Seibert on ignite to fix XHTMLExtension. Thanks :). reviewed by Armando

--- src/org/jivesoftware/xiff/data/xhtml/XHTMLExtension.as
+++ src/org/jivesoftware/xiff/data/xhtml/XHTMLExtension.as
@@ -23,11 +23,13 @@
 	 *
 	 */

+	import flash.xml.XMLDocument;
+	import flash.xml.XMLNode;
+
 	import org.jivesoftware.xiff.data.Extension;
 	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
 	import org.jivesoftware.xiff.data.IExtension;
-	import flash.xml.XMLNode;
-	import flash.xml.XMLDocument;
+	import org.jivesoftware.xiff.data.ISerializable;

 	/**
 	 * This class provides an extension for XHTML body text in messages.
@@ -39,7 +41,7 @@
 	 * @toc-path Extensions/HTML
 	 * @toc-sort 1/2
 	 */
-	public class XHTMLExtension extends Extension implements IExtension
+	public class XHTMLExtension extends Extension implements IExtension, ISerializable
 	{
 		// Static class variables to be overridden in subclasses;
 		public static var NS:String = "http://www.w3.org/1999/xhtml";
@@ -51,6 +53,16 @@
 		{
 			super(parent);
 		}
+
+		public function serialize( parent:XMLNode ):Boolean
+        {
+             return true;
+        }
+
+        public function deserialize( node:XMLNode ):Boolean
+        {
+        	return true;
+        }

 		/**
 		 * Gets the namespace associated with this extension.
@@ -95,29 +107,17 @@
 		 */
 		public function get body():String
 		{
-			// XXX This kinda sucks becuase the accessor gets called
-			// every time it appears in code, rather than being smart
-			// about when to call it
-
-			var html:Array = new Array();
-
-			// XXX Some tests need to be done to determine if
-			// for (... in ...); reverse() is faster than for (...; ...; ...)
-			// typically there will only be 1-5 nodeValues to join
-
-			var children:Array = getNode().childNodes;
-			for (var i:String in children) {
-				html.push(children[i].toString());
+			var html:Array = [];
+			for each(var child:XMLNode in getNode().childNodes) {
+				html.unshift(child.toString());
 			}
-			html.reverse();
 			return html.join();
 		}

 		public function set body(theBody:String):void
 		{
-			var children:Array = getNode().childNodes;
-			for (var i:String in children) {
-				children[i].removeNode();
+			for each(var child:XMLNode in getNode().childNodes) {
+				child.removeNode();
 			}
 			getNode().appendChild(new XMLDocument(theBody));
 		}


Events dispatched by BatchLoader now go into a queue which is then dispatched after a setTimeout(1). This is mostly so that listeners can call dispose() on it while in a QUEUE_COMPLETE handler.

--- raw/src/org/yellcorp/lib/net/batchloader/BatchLoader.as
+++ raw/src/org/yellcorp/lib/net/batchloader/BatchLoader.as
@@ -14,6 +14,7 @@
 import flash.events.ProgressEvent;
 import flash.net.URLRequest;
 import flash.utils.Dictionary;
+import flash.utils.setTimeout;

 [Event(name="batchProgress", type="org.yellcorp.lib.net.batchloader.events.BatchLoaderProgressEvent")]
@@ -47,6 +48,9 @@

     private var autoItemID:int = 0;

+    private var eventQueue:Array;
+    private var eventQueueWaiting:Boolean;
+
     public function BatchLoader(concurrent:uint = 1,
         order:String = BatchLoaderOrder.FIFO,
         loaderItemFactory:BatchLoaderItemFactory = null)
@@ -59,6 +63,7 @@
         idToEstimation = { };

         waitingQueue = [ ];
+        eventQueue = [ ];

         this.loaderItemFactory = loaderItemFactory;
         this.order = order;
@@ -488,11 +493,11 @@
     {
         if (isComplete && !_wasComplete)
         {
-            dispatchEvent(new BatchLoaderEvent(BatchLoaderEvent.QUEUE_COMPLETE));
+            queueEvent(new BatchLoaderEvent(BatchLoaderEvent.QUEUE_COMPLETE));
         }
         else if (!isComplete && _wasComplete)
         {
-            dispatchEvent(new BatchLoaderEvent(BatchLoaderEvent.QUEUE_START));
+            queueEvent(new BatchLoaderEvent(BatchLoaderEvent.QUEUE_START));
         }
         _wasComplete = isComplete;
     }
@@ -557,12 +562,12 @@

     private function dispatchItemEvent(type:String, item:BatchLoaderItem):void
     {
-        dispatchEvent(new BatchItemEvent(type, getItemId(item), item));
+        queueEvent(new BatchItemEvent(type, getItemId(item), item));
     }

     private function dispatchItemErrorEvent(error:*, item:BatchLoaderItem):void
     {
-        dispatchEvent(new BatchItemErrorEvent(BatchItemErrorEvent.ITEM_ERROR, error, getItemId(item), item));
+        queueEvent(new BatchItemErrorEvent(BatchItemErrorEvent.ITEM_ERROR, error, getItemId(item), item));
     }

     private function onItemHttpStatus(event:HTTPStatusEvent):void
@@ -593,7 +598,7 @@
         {
             zero();
         }
-        dispatchEvent(new BatchLoaderProgressEvent(
+        queueEvent(new BatchLoaderProgressEvent(
                 BatchLoaderProgressEvent.BATCH_PROGRESS,
                 bytesLoaded, bytesTotal, progress));
     }
@@ -671,6 +676,38 @@
     private function getLoaderItemFactory():BatchLoaderItemFactory
     {
         return loaderItemFactory || defaultLoaderItemFactory;
+    }
+
+
+    private function queueEvent(event:Event):void
+    {
+        eventQueue.push(event);
+        if (!eventQueueWaiting)
+        {
+            eventQueueWaiting = true;
+            setTimeout(flushEventQueue, 1);
+        }
+    }
+
+    private function flushEventQueue():void
+    {
+        eventQueueWaiting = false;
+        var lastEventType:String;
+        while (eventQueue.length > 0)
+        {
+            var event:Event = eventQueue.shift();
+
+            // now that events are going into a queue, we dispatch the contents
+            // of the queue on the one event loop.  we can reduce spam if we
+            // squash multiple consecutive BATCH_PROGRESS events, as it may
+            // trigger ui redraws
+            if (!(event.type == BatchLoaderProgressEvent.BATCH_PROGRESS &&
+                  event.type == lastEventType))
+            {
+                dispatchEvent(event);
+            }
+            lastEventType = event.type;
+        }
     }


Add comment for potentially non-obvious behavior

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

--- src/as/com/threerings/util/ClassUtil.as
+++ src/as/com/threerings/util/ClassUtil.as
@@ -31,6 +31,8 @@
 {
     /**
      * Get the full class name, e.g. "com.threerings.util.ClassUtil".
+     * Calling getClassName with a Class object will return the same value as calling it with an
+     * instance of that class. That is, getClassName(Foo) == getClassName(new Foo()).
      */
     public static function getClassName (obj :Object) :String
     {


为测试代码增加版权信息

为测试代码增加版权信息

--- test/Test.as
+++ test/Test.as
@@ -1,3 +1,12 @@
+// vim: tabstop=4 shiftwidth=4
+
+// Copyright (c) 2010 , 杨博 (Yang Bo) All rights reserved.
+//
+//         pop.atry@gmail.com
+//
+// Use, modification and distribution are subject to the "New BSD License"
+// as listed at <url: http://www.opensource.org/licenses/bsd-license.php >.
+
 package {
 	import protobuf_unittest.*
 	import flash.display.*


? constructor ?? getDefinitionByName ? getQualifiedClassName

--- test/Test.as
+++ test/Test.as
@@ -57,8 +57,7 @@
 			trace(s)
 			trace(input)
 			ba.position = 0
-			const output:IExternalizable =
-					new (getDefinitionByName(getQualifiedClassName(input)))
+			const output:IExternalizable = new (Object(input).constructor)
 			output.readExternal(ba)
 			assertSame(input, output)
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18173
Author:   jasonsj@adobe.com
Date:     2010-10-15T17:03:20.801634Z

Log Message:
-----------
Mobile Theme Initial check-in

* New light-look visuals from XD
* Changed airmobile-config.xml to use standalone Mobile theme instead of Spark overlay
* Added theme="spark, mobile" where spark was already white-listed and support is implemented and/or planned for Mobile/spark.css (see https://zerowing.corp.adobe.com/display/flexmobile/Mobile+Theme+Styles+Spec)
* MobileSkin has symbolColor and chromeColor support. Override beginChromeColorFill and drawChromeColor when defining custom chromeColor visuals.
* CheckBox and RadioButton now have chromeColor and symbolColor support
* Added textShadowColor and textShadowAlpha support to Button and ActionBar
* Added chromeColor support to HScrollBar and VScrollBar

QE notes: All mobile skins have been updaetd.
Doc notes: Update mobile skinning documentation for new APIs
Bugs:
SDK-28043 Investigate usage of "viewWidth", "viewHeight" for the Flex Mobile Skin Assets
SDK-27609 Mobile scroll bar skins should use chromeColor
SDK-27646 cornerradius has no effect on button in mobile application
Reviewer: gruehle
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_symbol.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/metadata/ContainerBackgroundStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/TextInput_border.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_down.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_downSelected.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/themes/Mobile/spark.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/airmobile-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_downSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>

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

--- frameworks/projects/framework/src/mx/controls/ToolTip.as
+++ frameworks/projects/framework/src/mx/controls/ToolTip.as
@@ -69,7 +69,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo, spark")]
+[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo, spark, mobile")]

 /**
  *  Number of pixels between the container's bottom border and its content area.


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

--- frameworks/projects/mx/src/mx/containers/Grid.as
+++ frameworks/projects/mx/src/mx/containers/Grid.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.containers
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/containers/Tile.as
+++ frameworks/projects/mx/src/mx/containers/Tile.as
@@ -0,0 +1,843 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.containers
+{
+
+import flash.events.Event;
+import mx.core.Container;
+import mx.core.EdgeMetrics;
+import mx.core.IUIComponent;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Horizontal alignment of each child inside its tile cell.
+ *  Possible values are "left", "center", and
+ *  "right".
+ *  If the value is "left", the left edge of each child
+ *  is at the left edge of its cell.
+ *  If the value is "center", each child is centered horizontally
+ *  within its cell.
+ *  If the value is "right", the right edge of each child
+ *  is at the right edge of its cell.
+ *
+ *  @default "left"
+ */
+[Style(name="horizontalAlign", type="String", enumeration="left,center,right", inherit="no")]
+
+/**
+ *  Number of pixels between children in the horizontal direction.
+ *
+ *  @default 8
+ */
+[Style(name="horizontalGap", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between the container's bottom border and its content area.
+ *
+ *  @default 0
+ */
+[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between the container's top border and its content area.
+ *
+ *  @default 0
+ */
+[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Vertical alignment of each child inside its tile cell.
+ *  Possible values are "top", "middle", and
+ *  "bottom".
+ *  If the value is "top", the top edge of each child
+ *  is at the top edge of its cell.
+ *  If the value is "middle", each child is centered vertically
+ *  within its cell.
+ *  If the value is "bottom", the bottom edge of each child
+ *  is at the bottom edge of its cell.
+ *
+ *  @default "top"
+ */
+[Style(name="verticalAlign", type="String", enumeration="bottom,middle,top", inherit="no")]
+
+/**
+ *  Number of pixels between children in the vertical direction.
+ *
+ *  @default 6
+ */
+[Style(name="verticalGap", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="focusIn", kind="event")]
+[Exclude(name="focusOut", kind="event")]
+
+[Exclude(name="focusBlendMode", kind="style")]
+[Exclude(name="focusSkin", kind="style")]
+[Exclude(name="focusThickness", kind="style")]
+
+[Exclude(name="focusInEffect", kind="effect")]
+[Exclude(name="focusOutEffect", kind="effect")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[IconFile("Tile.png")]
+
+/**
+ *  A Tile container lays out its children
+ *  in a grid of equal-sized cells.
+ *  You can specify the size of the cells by using the
+ *  tileWidth and tileHeight properties,
+ *  or let the Tile container determine the cell size
+ *  based on the largest child.
+ *  A Tile container's direction property
+ *  determines whether its cells are laid out horizontally or
+ *  vertically, beginning from the upper-left corner of the
+ *  Tile container.
+ *
+ *
A Tile container has the following default sizing characteristics:

+ *

+ *

+ *           Characteristic
+ *           Description
+ *

+ *

+ *           Direction
+ *           horizontal
+ *

+ *

+ *           Default size of all cells
+ *           Height is the default or explicit height of the tallest child.

+ *               Width is the default or explicit width of the widest child.

+ *               All cells have the same default size.
+ *

+ *

+ *           Default size of Tile container
+ *           Flex computes the square root of the number of children, and rounds up to the nearest
+ *               integer. For example, if there are 26 children, the square root is 5.1, which is rounded up to 6.
+ *               Flex then lays out the Tile container in a 6 by 6 grid.

+ *               Default height of the Tile container is equal to
+ *               (tile cell default height) x (rounded square root of the number of children),
+ *               plus any gaps between children and any padding.

+ *               Default width is equal to
+ *               (tile cell default width) x (rounded square root of the number of children),
+ *               plus any gaps between children and any padding.
+ *

+ *

+ *           Minimum size of Tile container
+ *           The default size of a single cell. Flex always allocates enough space to display at least
+ *               one cell.
+ *

+ *

+ *           Default padding
+ *           0 pixels for the top, bottom, left, and right values.
+ *

+ *

+ *
+ *  @mxml
+ *
+ *
The <mx:Tile> tag inherits all of the tag attributes
+ *  of its superclass, and adds the following tag attributes:

+ *
+ *

+ *  <mx:Tile
+ *    Properties
+ *    direction="horizontal|vertical"
+ *    tileHeight="NaN"
+ *    tileWidth="NaN"
+ *
+ *    Sttles
+ *    horizontalAlign="left|center|right"
+ *    horizontalGap="8"
+ *    paddingBottom="0"
+ *    paddingTop="0"
+ *    verticalAlign="top|middle|bottom"
+ *    verticalGap="6"
+ *    >
+ *      ...
+ *      child tags
+ *     ...
+ *  </mx:Tile>
+ *

+ *
+ *  @includeExample examples/TileLayoutExample.mxml
+ */
+public class Tile extends Container
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function Tile()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Cached value from findCellSize() call in measure(),
+     *  so that updateDisplayList() doesn't also have to call findCellSize().
+     */
+    mx_internal var cellWidth:Number;
+
+    /**
+     *  @private
+     *  Cached value from findCellSize() call in measure(),
+     *  so that updateDisplaylist() doesn't also have to call findCellSize().
+     */
+    mx_internal var cellHeight:Number;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  direction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the direction property.
+     */
+    private var _direction:String = TileDirection.HORIZONTAL;
+
+    [Bindable("directionChanged")]
+    [Inspectable(category="General", enumeration="vertical,horizontal", defaultValue="horizontal")]
+
+    /**
+     *  Determines how children are placed in the container.
+     *  Possible MXML values  are "horizontal" and
+     *  "vertical".
+     *  In ActionScript, you can set the direction using the values
+     *  TileDirection.HORIZONTAL or TileDirection.VERTICAL.
+     *  The default value is "horizontal".
+     *  (If the container is a Legend container, which is a subclass of Tile,
+     *  the default value is "vertical".)
+     *
+     *
The first child is always placed at the upper-left of the
+     *  Tile container.
+     *  If the direction is "horizontal",
+     *  the children are placed left-to-right in the topmost row,
+     *  and then left-to-right in the second row, and so on.
+     *  If the value is "vertical", the children are placed
+     *  top-to-bottom in the leftmost column, and then top-to-bottom
+     *  in the second column, and so on.

+     *
+     *  @default "horizontal"
+     *
+     *  @see TileDirection
+     */
+    public function get direction():String
+    {
+        return _direction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set direction(value:String):void
+    {
+        _direction = value;
+
+        invalidateSize();
+        invalidateDisplayList();
+
+        dispatchEvent(new Event("directionChanged"));
+    }
+
+    //----------------------------------
+    //  tileHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the tileHeight property.
+     */
+    private var _tileHeight:Number;
+
+    [Bindable("resize")]
+    [Inspectable(category="General")]
+
+    /**
+     *  Height of each tile cell, in pixels.
+     *  If this property is NaN, the default, the height
+     *  of each cell is determined by the height of the tallest child.
+     *  If you set this property, the specified value overrides
+     *  this calculation.
+     *
+     *  @default NaN
+     */
+    public function get tileHeight():Number
+    {
+        return _tileHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set tileHeight(value:Number):void
+    {
+        _tileHeight = value;
+
+        invalidateSize();
+    }
+
+    //----------------------------------
+    //  tileWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the tileWidth property.
+     */
+    private var _tileWidth:Number;
+
+    [Bindable("resize")]
+    [Inspectable(category="General")]
+
+    /**
+     *  Width of each tile cell, in pixels.
+     *  If this property is NaN, the defualt, the width
+     *  of each cell is determined by the width of the widest child.
+     *  If you set this property, the specified value overrides
+     *  this calculation.
+     *
+     *  @default NaN
+     */
+    public function get tileWidth():Number
+    {
+        return _tileWidth;
+    }
+
+    /**
+     *  @private
+     */
+    public function set tileWidth(value:Number):void
+    {
+        _tileWidth = value;
+
+        invalidateSize();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Calculates the default minimum and maximum sizes of the
+     *  Tile container.
+     *  For more information about the measure() method,
+     *  see the UIComponent.measure() method.
+     *
+     *
This method first calculates the size of each tile cell.
+     *  For a description of how the cell size is determined, see the
+     *  tileWidth and tileHeight properties.

+     *
+    *
The measured size of a Tile container with children
+     *  is sufficient to display the cells in an N-by-N grid
+     *  with an equal number of rows and columns, plus room for
+     *  the Tile container's padding and borders.
+     *  However, there are various special cases, as in the following
+     *  examples:

+     *
+     *

+     *
If a horizontal Tile container has an
+     *  explicit width set, that value determines how many
+     *  cells will fit horizontally, and the height required to fit all the
+     *  children is calculated, producing an M-by-N grid.

+     *
+     *
If a vertical Tile container has an
+     *  explicit height set, that value determines how many
+     *  cells will fit vertically, and the height required to fit all the
+     *  children is calculated, producing an N-by-M grid.

+     *

+     *
+     *
If there are no children, the measured size is just
+     *  large enough for its padding and borders.

+     *
+     *
The minimum measured size of a Tile container
+     *  with children is just large enough for a single tile cell,
+     *  plus padding and borders.
+     *  If there are no children, the minimum measured size is just
+     *  large enough for its padding and borders.

+     *
+     *  @see mx.core.UIComponent#measure()
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        var preferredWidth:Number;
+        var preferredHeight:Number;
+        var minWidth:Number;
+        var minHeight:Number;
+
+        // Determine the size of each tile cell and cache the values
+        // in cellWidth and cellHeight for later use by updateDisplayList().
+        findCellSize();
+
+        // Min width and min height are large enough to display a single child.
+        minWidth = cellWidth;
+        minHeight = cellHeight;
+
+        // Determine the width and height necessary to display the tiles
+        // in an N-by-N grid (with number of rows equal to number of columns).
+        var n:int = numChildren;
+
+        // Don't count children that don't need their own layout space.
+        var temp:int = n;
+        for (var i:int = 0; i < n; i++)
+        {
+            if (!IUIComponent(getChildAt(i)).includeInLayout)
+                temp--;
+        }
+        n = temp;
+
+        if (n > 0)
+        {
+            var horizontalGap:Number = getStyle("horizontalGap");
+            var verticalGap:Number = getStyle("verticalGap");
+
+            var majorAxis:Number;
+
+            // If an explicit dimension or flex is set for the majorAxis,
+            // set as many children as possible along the axis.
+            if (direction == TileDirection.HORIZONTAL)
+            {
+                var unscaledExplicitWidth:Number = explicitWidth / Math.abs(scaleX);
+                if (!isNaN(unscaledExplicitWidth))
+                {
+                    // If we have an explicit height set,
+                    // see how many children can fit in the given height
+                    majorAxis = Math.floor(unscaledExplicitWidth /
+                                           (cellWidth + horizontalGap));
+                }
+            }
+            else
+            {
+                var unscaledExplicitHeight:Number = explicitHeight / Math.abs(scaleY);
+                if (!isNaN(unscaledExplicitHeight))
+                {
+                    // If we have an explicit height set,
+                    // see how many children can fit in the given height
+                    majorAxis = Math.floor(unscaledExplicitHeight /
+                                           (cellHeight + verticalGap));
+                }
+            }
+
+            // Finally, if majorAxis still isn't defined, use the
+            // square root of the number of children.
+            if (isNaN(majorAxis))
+                majorAxis = Math.ceil(Math.sqrt(n));
+
+            // Even if there's not room, force at least one cell
+            // on each row/column.
+            if (majorAxis < 1)
+                majorAxis = 1;
+
+            var minorAxis:Number = Math.ceil(n / majorAxis);
+
+            if (direction == TileDirection.HORIZONTAL)
+            {
+                preferredWidth = majorAxis * cellWidth +
+                                 (majorAxis - 1) * horizontalGap;
+
+                preferredHeight = minorAxis * cellHeight +
+                                  (minorAxis - 1) * verticalGap;
+            }
+            else
+            {
+                preferredWidth = minorAxis * cellWidth +
+                                 (minorAxis - 1) * horizontalGap;
+
+                preferredHeight = majorAxis * cellHeight +
+                                  (majorAxis - 1) * verticalGap;
+            }
+        }
+        else
+        {
+            preferredWidth = minWidth;
+            preferredHeight = minHeight;
+        }
+
+        var vm:EdgeMetrics = viewMetricsAndPadding;
+        var hPadding:Number = vm.left + vm.right;
+        var vPadding:Number = vm.top + vm.bottom;
+
+        // Add padding for margins and borders.
+        minWidth += hPadding;
+        preferredWidth += hPadding;
+        minHeight += vPadding;
+        preferredHeight += vPadding;
+
+        measuredMinWidth = Math.ceil(minWidth);
+        measuredMinHeight = Math.ceil(minHeight);
+        measuredWidth = Math.ceil(preferredWidth);
+        measuredHeight = Math.ceil(preferredHeight);
+    }
+
+    /**
+     *  Sets the positions and sizes of this container's children.
+     *  For more information about the updateDisplayList()
+     *  method, see the UIComponent.updateDisplayList() method.
+     *
+     *
This method positions the children in a checkboard-style grid of
+     *  equal-sized cells within the content area of the Tile
+     *  container (i.e., the area inside its padding).
+     *  For a description of how the cell size is determined,
+     *  see the tileWidth and
+     *  tileHeightproperties.

+     *
+     *
The separation between the cells is determined by the
+     *  horizontalGap and verticalGap styles.
+     *  The placement of each child within its cell is determined by the
+     *  horizontalAlign and verticalAlign styles.

+     *
+     *
The flow of the children is determined by the
+     *  direction property.
+     *  The first cell is always placed at the upper left of the content area.
+     *  If direction is set to "horizontal", the
+     *  cells are placed left-to-right in the topmost row, and then
+     *  left-to-right in the second row, and so on.
+     *  If direction is set to "vertical", the cells
+     *  are placed top-to-bottom in the leftmost column, and then top-to-bottom
+     *  in the second column, and so on.

+     *
+     *
If a child has a percentWidth or
+     *  percentHeight value, it is resized in that direction
+     *  to fill the specified percentage of its tile cell.

+     *
+     *  @param unscaledWidth Specifies the width of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleX property of the component.
+     *
+     *  @param unscaledHeight Specifies the height of the component, in pixels,
+     *  in the component's coordinates, regardless of the value of the
+     *  scaleY property of the component.
+     *
+     *  @see mx.core.UIComponent#updateDisplayList()
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        // The measure function isn't called if the width and height of
+        // the Tile are hard-coded. In that case, we compute the cellWidth
+        // and cellHeight now.
+        if (isNaN(cellWidth) || isNaN(cellHeight))
+            findCellSize();
+
+        var vm:EdgeMetrics = viewMetricsAndPadding;
+
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingTop:Number = getStyle("paddingTop");
+
+        var horizontalGap:Number = getStyle("horizontalGap");
+        var verticalGap:Number = getStyle("verticalGap");
+
+        var horizontalAlign:String = getStyle("horizontalAlign");
+        var verticalAlign:String = getStyle("verticalAlign");
+
+        var xPos:Number = paddingLeft;
+        var yPos:Number = paddingTop;
+
+        var xOffset:Number;
+        var yOffset:Number;
+
+        var n:int = numChildren;
+        var i:int;
+        var child:IUIComponent;
+
+        if (direction == TileDirection.HORIZONTAL)
+        {
+            var xEnd:Number = Math.ceil(unscaledWidth) - vm.right;
+
+            for (i = 0; i < n; i++)
+            {
+                child = IUIComponent(getChildAt(i));
+
+                if (!child.includeInLayout)
+                    continue;
+
+                // Start a new row?
+                if (xPos + cellWidth > xEnd)
+                {
+                    // Only if we have not just started one...
+                    if (xPos != paddingLeft)
+                    {
+                        yPos += (cellHeight + verticalGap);
+                        xPos = paddingLeft;
+                    }
+                }
+
+                setChildSize(child); // calls child.setActualSize()
+
+                // Calculate the offsets to align the child in the cell.
+                xOffset = Math.floor(calcHorizontalOffset(
+                    child.width, horizontalAlign));
+                yOffset = Math.floor(calcVerticalOffset(
+                    child.height, verticalAlign));
+
+                child.move(xPos + xOffset, yPos + yOffset);
+
+                xPos += (cellWidth + horizontalGap);
+            }
+        }
+        else
+        {
+            var yEnd:Number = Math.ceil(unscaledHeight) - vm.bottom;
+
+            for (i = 0; i < n; i++)
+            {
+                child = IUIComponent(getChildAt(i));
+
+                if (!child.includeInLayout)
+                    continue;
+
+                // Start a new column?
+                if (yPos + cellHeight > yEnd)
+                {
+                    // Only if we have not just started one...
+                    if (yPos != paddingTop)
+                    {
+                        xPos += (cellWidth + horizontalGap);
+                        yPos = paddingTop;
+                    }
+                }
+
+                setChildSize(child); // calls child.setActualSize()
+
+                // Calculate the offsets to align the child in the cell.
+                xOffset = Math.floor(calcHorizontalOffset(
+                    child.width, horizontalAlign));
+                yOffset = Math.floor(calcVerticalOffset(
+                    child.height, verticalAlign));
+
+                child.move(xPos + xOffset, yPos + yOffset);
+
+                yPos += (cellHeight + verticalGap);
+            }
+        }
+
+        // Clear the cached cell size, because if a child's size changes
+        // it will be invalid. These cached values are only used to
+        // avoid recalculating in updateDisplayList() the same values
+        // that were just calculated in measure().
+        // They should not persist across invalidation/validation cycles.
+        // (An alternative approach we tried was to clear these
+        // values in an override of invalidateSize(), but this gets called
+        // called indirectly by setChildSize() and child.move() inside
+        // the loops above. So we had to save and restore cellWidth
+        // and cellHeight around these calls in the loops, which is ugly.)
+        cellWidth = NaN;
+        cellHeight = NaN;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Calculate and store the cellWidth and cellHeight.
+     */
+    mx_internal function findCellSize():void
+    {
+        // If user explicitly supplied both a tileWidth and
+        // a tileHeight, then use those values.
+        var widthSpecified:Boolean = !isNaN(tileWidth);
+        var heightSpecified:Boolean = !isNaN(tileHeight);
+        if (widthSpecified && heightSpecified)
+        {
+            cellWidth = tileWidth;
+            cellHeight = tileHeight;
+            return;
+        }
+
+        // Reset the max child width and height
+        var maxChildWidth:Number = 0;
+        var maxChildHeight:Number = 0;
+
+        // Loop over the children to find the max child width and height.
+        var n:int = numChildren;
+        for (var i:int = 0; i < n; i++)
+        {
+            var child:IUIComponent = IUIComponent(getChildAt(i));
+
+            if (!child.includeInLayout)
+                continue;
+
+            var width:Number = child.getExplicitOrMeasuredWidth();
+            if (width > maxChildWidth)
+                maxChildWidth = width;
+
+            var height:Number = child.getExplicitOrMeasuredHeight();
+            if (height > maxChildHeight)
+                maxChildHeight = height;
+        }
+
+        // If user explicitly specified either width or height, use the
+        // user-supplied value instead of the one we computed.
+        cellWidth = widthSpecified ? tileWidth : maxChildWidth;
+        cellHeight = heightSpecified ? tileHeight : maxChildHeight;
+    }
+
+    /**
+     *  @private
+     *  Assigns the actual size of the specified child,
+     *  based on its measurement properties and the cell size.
+     */
+    private function setChildSize(child:IUIComponent):void
+    {
+        var childWidth:Number;
+        var childHeight:Number;
+        var childPref:Number;
+        var childMin:Number;
+
+        if (child.percentWidth > 0)
+        {
+            // Set child width to be a percentage of the size of the cell.
+            childWidth = Math.min(cellWidth,
+                                  cellWidth * child.percentWidth / 100);
+        }
+        else
+        {
+            // The child is not flexible, so set it to its preferred width.
+            childWidth = child.getExplicitOrMeasuredWidth();
+
+            // If an explicit tileWidth has been set on this Tile,
+            // then the child may extend outside the bounds of the tile cell.
+            // In that case, we'll honor the child's width or minWidth,
+            // but only if those values were explicitly set by the developer,
+            // not if they were implicitly set based on measurements.
+            if (childWidth > cellWidth)
+            {
+                childPref = isNaN(child.explicitWidth) ?
+                            0 :
+                            child.explicitWidth;
+
+                childMin = isNaN(child.explicitMinWidth) ?
+                           0 :
+                           child.explicitMinWidth;
+
+                childWidth = (childPref > cellWidth ||
+                              childMin > cellWidth) ?
+                             Math.max(childMin, childPref) :
+                             cellWidth;
+            }
+        }
+
+        if (child.percentHeight > 0)
+        {
+            childHeight = Math.min(cellHeight,
+                                   cellHeight * child.percentHeight / 100);
+        }
+        else
+        {
+            childHeight = child.getExplicitOrMeasuredHeight();
+
+            if (childHeight > cellHeight)
+            {
+                childPref = isNaN(child.explicitHeight) ?
+                            0 :
+                            child.explicitHeight;
+
+                childMin = isNaN(child.explicitMinHeight) ?
+                           0 :
+                           child.explicitMinHeight;
+
+                childHeight = (childPref > cellHeight ||
+                               childMin > cellHeight) ?
+                               Math.max(childMin, childPref) :
+                               cellHeight;
+            }
+        }
+
+        child.setActualSize(childWidth, childHeight);
+    }
+
+    /**
+     *  @private
+     *  Compute how much adjustment must occur in the x direction
+     *  in order to align a component of a given width into the cell.
+     */
+    mx_internal function calcHorizontalOffset(width:Number,
+                                              horizontalAlign:String):Number
+    {
+        var xOffset:Number;
+
+        if (horizontalAlign == "left")
+            xOffset = 0;
+
+        else if (horizontalAlign == "center")
+            xOffset = (cellWidth - width) / 2;
+
+        else if (horizontalAlign == "right")
+            xOffset = (cellWidth - width);
+
+        return xOffset;
+    }
+
+    /**
+     *  @private
+     *  Compute how much adjustment must occur in the y direction
+     *  in order to align a component of a given height into the cell.
+     */
+    mx_internal function calcVerticalOffset(height:Number,
+                                            verticalAlign:String):Number
+    {
+        var yOffset:Number;
+
+        if (verticalAlign == "top")
+            yOffset = 0;
+
+        else if (verticalAlign == "middle")
+            yOffset = (cellHeight - height) / 2;
+
+        else if (verticalAlign == "bottom")
+            yOffset = (cellHeight - height);
+
+        return yOffset;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 158
Author:   jszeto@adobe.com
Date:     2008-01-11T07:17:51.518779Z

Log Message:
-----------
Flex SDK Bug Fix

SDK-14226 - Container uses scale9Grid as borderMetrics

Changed container and ScrollControlBase to no longer use the skin's scale9Grid as the borderMetrics.

Bug: SDK-14226
QA: Yes
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ComboBase.as
+++ frameworks/projects/mx/src/mx/controls/ComboBase.as
@@ -27,7 +27,6 @@
 import mx.collections.XMLListCollection;
 import mx.core.EdgeMetrics;
 import mx.core.FlexVersion;
-import mx.core.IBorder;
 import mx.core.IFlexDisplayObject;
 import mx.core.IIMESupport;
 import mx.core.IRectangularBorder;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10475
Author:   jimurphy@adobe.com
Date:     2009-09-21T23:58:45.057679Z

Log Message:
-----------
Merged 3.x revisions 10063,10086,10098,10123,10176,10397,10416-10418,10420 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/SortField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>

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

--- frameworks/projects/mx/src/mx/controls/TextInput.as
+++ frameworks/projects/mx/src/mx/controls/TextInput.as
@@ -695,6 +695,7 @@
         {
             text = newText;
             textSet = false;
+            textField.setSelection(0, 0);
         }

         dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));


Transferred from the Adobe Open Source Subversion Repository

Revision: 8679
Author:   jimurphy@adobe.com
Date:     2009-07-20T13:23:31.007823Z

Log Message:
-----------
These are Asdoc edit from 3.x rev 8623.  I somehow missed committing these when they were supposed to be committed during my previous merge.

bug: no
qa: no
doc: no
checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/CallResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.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/Responder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/XMLLoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/IResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Producer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/WSDLLoadEvent.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/CallResponder.as
+++ frameworks/projects/rpc/src/mx/rpc/CallResponder.as
@@ -20,7 +20,26 @@

 import mx.utils.ArrayUtil;

+/**
+ * Dispatched when an Operation invocation successfully returns.
+ * @eventType mx.rpc.events.ResultEvent.RESULT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Event(name="result", type="mx.rpc.events.ResultEvent")]
+
+/**
+ * Dispatched when an Operation call fails.
+ * @eventType mx.rpc.events.FaultEvent.FAULT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Event(name="fault", type="mx.rpc.events.FaultEvent")]

 /**
@@ -88,7 +107,7 @@
      *  ResultEvent to the CallResponder.  You do not call
      *  this method directly.
      *
-     *  @param  data the ResultEvent delivered by the AsyncToken
+     *  @param data The ResultEvent delivered by the AsyncToken
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -108,7 +127,7 @@
      *  FaultEvent to the CallResponder.  You do not call
      *  this method directly.
      *
-     *  @param  data the FaultEvent delivered by the AsyncToken
+     *  @param data The FaultEvent delivered by the AsyncToken
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


FLEX-34854 FLEX-34884 Added more unit tests, mostly about sorting with two SortFields. NOTE that getItemIndex_finds_newly_inserted_item_in_complex_multi_field_sorted_list() fails. Debugging in process.

--- frameworks/projects/framework/tests/FLEX_34884_Tests.as
+++ frameworks/projects/framework/tests/FLEX_34884_Tests.as
@@ -111,6 +111,30 @@
         }

         [Test]
+        public function getItemIndex_finds_item_in_descending_two_sort_fields_sorted_list_after_changing_one_field():void
+        {
+            //given
+            var from0To4:IList = generateVOs(5);
+            _sut.addAll(from0To4); //index/name: 0/Object0, 1/Object1, 2/Object2, 3/Object3, 4/Object4
+
+            const sortByIndexDescending:Sort = new Sort();
+            sortByIndexDescending.fields = [new SortField("index", true, true), new SortField("name", false, false)];
+            _sut.sort = sortByIndexDescending;
+            _sut.refresh(); //index/name: 4/Object4, 3/Object3, 2/Object2, 1/Object1, 0/Object0
+
+            //when
+            var item1:FLEX_34884_VO = from0To4.getItemAt(1) as FLEX_34884_VO;
+            item1.index = 0; //index/name: 4/Object4, 3/Object3, 2/Object2, 0/Object0, 0/Object1
+
+            var item2:FLEX_34884_VO = from0To4.getItemAt(2) as FLEX_34884_VO;
+            item2.index = 0; //index/name: 4/Object4, 3/Object3, 0/Object0, 0/Object1, 0/Object2
+
+            //then
+            assertEquals(_sut.length - 1, _sut.getItemIndex(item2));
+            assertEquals(_sut.length - 2, _sut.getItemIndex(item1));
+        }
+
+        [Test]
         public function getItemIndex_finds_second_to_last_item_in_simple_no_fields_non_unique_sorted_list():void
         {
             //given
@@ -245,6 +269,71 @@
         }

         [Test]
+        public function getItemIndex_finds_item_in_complex_multi_field_sorted_non_filtered_list():void
+        {
+            //given
+            var from0To4:IList = generateVOs(5);
+            _sut.addAll(from0To4); //index / address.street: 0/Street0, 1/Street1, 2/Street2, 3/Street3, 4/Street4
+
+            const sortByStreetAndIndex:Sort = new Sort();
+            sortByStreetAndIndex.fields = [new ComplexSortField("address.street", false, true, false), new SortField("index", false, true)];
+            _sut.sort = sortByStreetAndIndex;
+            _sut.refresh(); //index / address.street: 4/Street4, 3/Street3, 2/Street2, 1/Street1, 0/Street0
+
+            _sut.complexFieldWatcher = new ComplexFieldChangeWatcher();
+
+            //when
+            var item0:FLEX_34884_VO = from0To4.getItemAt(0) as FLEX_34884_VO;
+            item0.address.street = "Street4"; //index / address.street: 0/Street4, 4/Street4, 3/Street3, 2/Street2, 1/Street1
+
+            var item1:FLEX_34884_VO = from0To4.getItemAt(1) as FLEX_34884_VO;
+            item1.address.street = "Street4"; //index / address.street: 0/Street4, 1/Street4, 4/Street4, 3/Street3, 2/Street2
+            item1.index = 9; //index / address.street: 0/Street4, 4/Street4, 9/Street4, 3/Street3, 2/Street2
+
+            //then
+            assertEquals(0, _sut.getItemIndex(item0));
+            assertEquals(2, _sut.getItemIndex(item1));
+        }
+
+        [Test]
+        public function getItemIndex_finds_item_in_complex_multi_field_sorted_filtered_list():void
+        {
+            function excludeIndexesAbove4(item:Object):Boolean
+            {
+                return FLEX_34884_VO(item).index <= 4;
+            }
+
+            //given
+            var from0To4:IList = generateVOs(5);
+            _sut.addAll(from0To4); //index / address.street: 0/Street0, 1/Street1, 2/Street2, 3/Street3, 4/Street4
+
+            const sortByStreetAndIndex:Sort = new Sort();
+            sortByStreetAndIndex.fields = [new ComplexSortField("address.street", false, true, false), new SortField("index", false, true)];
+            _sut.sort = sortByStreetAndIndex;
+
+            _sut.refresh(); //index / address.street: 4/Street4, 3/Street3, 2/Street2, 1/Street1, 0/Street0
+
+            _sut.complexFieldWatcher = new ComplexFieldChangeWatcher();
+
+            //when
+            var item0:FLEX_34884_VO = from0To4.getItemAt(0) as FLEX_34884_VO;
+            item0.address.street = "Street4"; //index / address.street: 0/Street4, 4/Street4, 3/Street3, 2/Street2, 1/Street1
+
+            var item1:FLEX_34884_VO = from0To4.getItemAt(1) as FLEX_34884_VO;
+            item1.address.street = "Street4"; //index / address.street: 0/Street4, 1/Street4, 4/Street4, 3/Street3, 2/Street2
+            item1.index = 9; //index / address.street: 0/Street4, 4/Street4, 9/Street4, 3/Street3, 2/Street2
+
+            _sut.filterFunction = excludeIndexesAbove4;
+            _sut.refresh(); //index / address.street: 0/Street4, 4/Street4, 3/Street3, 2/Street2
+
+            //then
+            assertEquals(0, _sut.getItemIndex(item0));
+            assertEquals(-1, _sut.getItemIndex(item1));
+            var item3:FLEX_34884_VO = from0To4.getItemAt(3) as FLEX_34884_VO;
+            assertEquals(2, _sut.getItemIndex(item3));
+        }
+
+        [Test]
         public function getItemIndex_finds_item_in_complex_descending_sorted_list_after_its_repositioned_due_to_its_sort_field_changing():void
         {
             //given
@@ -301,9 +390,9 @@
             var from0To4:IList = generateVOs(5);
             _sut.addAll(from0To4); //values[address.street]: Street0, Street1, Street2, Street3, Street4

-            const sortByIndexDescending:Sort = new Sort();
-            sortByIndexDescending.fields = [new ComplexSortField("address.street", false, true, false)];
-            _sut.sort = sortByIndexDescending;
+            const sortByStreetDescending:Sort = new Sort();
+            sortByStreetDescending.fields = [new ComplexSortField("address.street", false, true, false)];
+            _sut.sort = sortByStreetDescending;
             _sut.refresh(); //values[address.street]: Street4, Street3, Street2, Street1, Street0

             _sut.complexFieldWatcher = new ComplexFieldChangeWatcher();
@@ -314,6 +403,29 @@

             //then
             assertEquals(0, _sut.getItemIndex(newItem));
+        }
+
+        [Test]
+        public function getItemIndex_finds_newly_inserted_item_in_complex_multi_field_sorted_list():void
+        {
+            //given
+            var from0To4:IList = generateVOs(5);
+            _sut.addAll(from0To4); //values[address.street/index]: Street0/0, Street1/1, Street2/2, Street3/3, Street4/4
+
+            const sortByStreetAndIndex:Sort = new Sort();
+            sortByStreetAndIndex.fields = [new ComplexSortField("address.street", false, true, false), new SortField("index", false, true)];
+            _sut.sort = sortByStreetAndIndex;
+            _sut.refresh(); //values[address.street/index]: Street4/4, Street3/3, Street2/2, Street1/1, Street0/0
+
+            _sut.complexFieldWatcher = new ComplexFieldChangeWatcher();
+
+            //when
+            var newItem:FLEX_34884_VO = generateOneObject(9);
+            newItem.address.street = "Street 4";
+            _sut.addItemAt(newItem, _sut.length - 1); //values[address.street/index]: Street4/4, Street4/9, Street3/3, Street2/2, Street1/1, Street0/0
+
+            //then
+            assertEquals(1, _sut.getItemIndex(newItem));
         }

         [Test]


Transferred from the Adobe Open Source Subversion Repository

Revision: 10872
Author:   cframpto@adobe.com
Date:     2009-10-05T19:39:47.041984Z

Log Message:
-----------
Most changes already approved by PARB and a few are pending.  Given the two reviewers are at MAX and then there is a shutdown week we decided to take a chance that these changes will actually stick.

TLFText.css -> MXFTEText.css
TLFTextField -> FTETextField
UITLFTextField -> UIFTETextField
TLFDataGridItemRenderer -> FTEDataGridItemRenderer
TLFTextInput -> MXFTETextInput

UITextFormat.useTLF -> UITextFormat.useFTE

QE notes:
Doc notes:
Bugs: SDK-22909
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/MXFTETextInput.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/TLFTextInput.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/TLFTextField.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/FTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/TextFieldFactory.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/TLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/CSSTextLayoutFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/TLFDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITextFieldFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/TLFText.css" copyfrom-rev="10865" action="A">/flex/sdk/trunk/frameworks/projects/spark/MXFTEText.css</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/TLFText.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -681,7 +681,7 @@
 		// can affect both Halo and Spark components,
 		// we need to map true to "on" and false to "off"
 		// here and in Label.
-		// For Halo components, UITextField and UITLFTextField
+		// For Halo components, UITextField and UIFTETextField
 		// do the opposite mapping
 		// of "auto" and "on" to true and "off" to false.
 		// We also support a value of "default"


Transferred from the Adobe Open Source Subversion Repository

Revision: 11202
Author:   aharui@adobe.com
Date:     2009-10-27T21:32:23.252125Z

Log Message:
-----------
Make controlBarContent read/write so you can use other states syntax besides includeIn

QE Notes: None
Doc Notes: None
Bugs: SDK-23386
Reviewer: Corey
API Change: no
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/Panel, Application

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

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

--- frameworks/projects/spark/src/spark/components/Panel.as
+++ frameworks/projects/spark/src/spark/components/Panel.as
@@ -293,6 +293,17 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
+    public function get controlBarContent():Array
+    {
+        if (controlBarGroup)
+            return controlBarGroup.getMXMLContent();
+        else
+            return controlBarGroupProperties.controlBarContent;
+    }
+
+    /**
+     *  @private
+     */
     public function set controlBarContent(value:Array):void
     {
         if (controlBarGroup)


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

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

 package spark.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21605
Author:   klin@adobe.com
Date:     2011-07-18T17:52:59.831952Z

Log Message:
-----------
Add null check for stage in resizeHandler.

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

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

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

--- frameworks/projects/airspark/src/spark/components/Window.as
+++ frameworks/projects/airspark/src/spark/components/Window.as
@@ -2695,6 +2695,9 @@
      */
     private function window_resizeHandler(event:NativeWindowBoundsEvent):void
     {
+        if (stage == null)
+            return;
+
         invalidateDisplayList();

         var dispatchWidthChangeEvent:Boolean = (bounds.width != stage.stageWidth);


Transferred from the Adobe Open Source Subversion Repository

Revision: 11468
Author:   smgilson@adobe.com
Date:     2009-11-05T16:54:31.738281Z

Log Message:
-----------
Part 1 of ASDoc localization bug fixes

QE notes: -
Doc notes: -
Bugs: - FLEXDOCS-934, FLEXDOCS-909, FLEXDOCS-908, FLEXDOCS-906, FLEXDOCS-882, FLEXDOCS-883, FLEXDOCS-881
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Pause.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quartic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeLeft.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quintic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quadratic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Cubic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeDown.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/HSBColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ArrayUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/TweenEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeRight.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/DefaultListEffect.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeUp.as</path>

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

--- frameworks/projects/framework/src/mx/effects/TweenEffect.as
+++ frameworks/projects/framework/src/mx/effects/TweenEffect.as
@@ -70,8 +70,8 @@
 [Event(name="tweenEnd", type="mx.events.TweenEvent")]

 /**
- *  TweenEffect is the superclass for the animated effects in Flex 3. As of Flex 4, the new
- *  effects subclass the new Animate class instead.
+ *  TweenEffect is the superclass for the animated effects in Flex 3. As of Flex 4, the
+ *  Spark effects subclass the spark.effects.Animate class instead of TweenEffect.
  */
 [Alternative(replacement="spark.effects.Animate", since="4.0")]