Transferred from the Adobe Open Source Subversion Repository

Revision: 16761
Author:   hmuller@adobe.com
Date:     2010-07-01T04:42:48.794584Z

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

Substantially revised the way DataGrid/Grid typicalItem is used by GridLayout to compute column widths and (soon) the default row height.  Typical item based column widths are now computed just once and cached.

Added typicalCellWidth,Height methods to GridDimensions.

Made the GridDimensions getCellX() and getCellY() methods public.

Temporarily added fixedRowHeight property to Grid.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridDimensions.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -144,8 +144,6 @@
         if (!grid)
             return;

-        //trace("GridLayout.udl", unscaledWidth, unscaledHeight);
-
         // Layout the item renderers and compute new values for visibleRowIndices et al

         oldVisibleRowIndices = visibleRowIndices;
@@ -153,7 +151,9 @@

         const scrollX:Number = horizontalScrollPosition;
         const scrollY:Number = verticalScrollPosition;
-		updateVisibleColumnWidths(scrollX, scrollY, unscaledWidth, unscaledHeight);
+
+		updateGridDimensions(scrollX, scrollY, unscaledWidth, unscaledHeight);
+
         layoutItemRenderers(grid.itemRendererGroup, scrollX, scrollY, unscaledWidth, unscaledHeight);

         // Layout the row backgrounds
@@ -273,14 +273,11 @@

 	//--------------------------------------------------------------------------
 	//
-	//  Computing the Visible Column Widths
+	//  Updating the GridDimensions' typicalCell sizes and columnWidths
 	//
 	//--------------------------------------------------------------------------

-	private const columnIndices:Vector.<int> = new Vector.<int>(0);
-	private const columnWidths:Vector.<Number> = new Vector.<Number>(0);
-
-	/**
+    /**
 	 *  @private
 	 *  Use the specified GridColumn's itemRenderer (IFactory) to create a temporary
 	 *  item renderer.   The returned item renderer must be freed, with freeGridElement(),
@@ -307,44 +304,63 @@

 	/**
 	 *  @private
-	 *  Compute the widths and indices of the columns that fit within the specified width, where the
-	 *  first column's index is startIndex, and the left edge of the first column is startX.  The
-	 *  widths and indices are returned in the vector parameters.   The vector parameters are
-	 *  expected to be empty when this method is called.
-	 *
-	 *  The returned width for GridColumns with an explicit width, is just the explicit width.
-	 *  Otherwise an item renderer is created for the column and the grid's typical item and
-	 *  the item renderer's preferred width is the column's width.
+     *  Update the typicalCellWidth,Height for all of the columns starting
+     *  with x coordinate startX and column startIndex that fit within the
+     *  specified width.  Typical sizes are only updated if the current
+     *  typical cell size is NaN.
+     *
+     *  The typicalCellWidth for GridColumns with an explicit width, is just
+     *  the explicit width.  Otherwise an item renderer is created for the column
+     *  and the item renderer's preferred bounds become the typical cell size.
+     *
+     *  Return the indices of the columns whose typicalCellWidth,Height was updated.
 	 */
-	private function computeVisibleColumnWidths(width:Number, startX:Number, startIndex:int, indices:Vector.<int>, widths:Vector.<Number>):void
+	private function updateTypicalCellSizes(width:Number, startX:Number, startIndex:int):Vector.<int>
 	{
 		const gridDimensions:GridDimensions = gridDimensions;
 		const columnCount:int = gridDimensions.columnCount;
 		const columnGap:int = gridDimensions.columnGap;
-		const startCellR:Rectangle = gridDimensions.getCellBounds(0 /* rowIndex */, startIndex);
-
-		for (var index:int = startIndex; (width > 0) && (index < columnCount); index++)
+		const startCellX:Number = gridDimensions.getCellX(0 /* rowIndex */, startIndex);
+        const isFixedRowHeight:Boolean = !isNaN(grid.fixedRowHeight);
+
+        // Update the typicalCellWidth,Height as needed.   Avoid creating renderers or
+        // the indices vector if possible
+
+        var indices:Vector.<int> = null;  // return value
+
+		for (var columnIndex:int = startIndex; (width > 0) && (columnIndex < columnCount); columnIndex++)
 		{
-			var gridColumn:GridColumn = getGridColumn(index);
-			var columnWidth:Number;
+            var cellHeight:Number = gridDimensions.getTypicalCellHeight(columnIndex);
+			var cellWidth:Number = gridDimensions.getTypicalCellWidth(columnIndex);

-			if (isNaN(gridColumn.width)) // if this column's width wasn't explicitly specified
-			{
-				var renderer:IVisualElement = createTypicalItemRenderer(index);
-				columnWidth = renderer.getPreferredBoundsWidth();
-				freeGridElement(renderer);
-			}
+            var column:GridColumn = getGridColumn(columnIndex);
+            if (!isNaN(column.width))
+                cellWidth = column.width;
+
+            if (isNaN(cellWidth) || (!isFixedRowHeight && isNaN(cellHeight)))
+            {
+                var renderer:IVisualElement = createTypicalItemRenderer(columnIndex);
+                if (isNaN(cellWidth))
+                    cellWidth = renderer.getPreferredBoundsWidth();
+                if (isNaN(cellHeight))
+                    cellHeight = renderer.getPreferredBoundsHeight();
+                freeGridElement(renderer);
+
+                gridDimensions.setTypicalCellWidth(columnIndex, cellWidth);
+                gridDimensions.setTypicalCellHeight(columnIndex, cellHeight);
+
+                if (indices == null)
+                    indices = new Vector.<int>();
+                indices.push(columnIndex);
+            }
+
+			if (columnIndex == startIndex)
+				width -= startCellX + cellWidth - startX;
 			else
-				columnWidth = gridColumn.width;
-
-			if (index == startIndex)
-				width -= startCellR.x + columnWidth - startX;
-			else
-				width -= columnWidth + columnGap;
-
-			indices.push(index);
-			widths.push(columnWidth);
-		}
+				width -= cellWidth + columnGap;
+		}
+
+        return indices;
 	}

 	/**
@@ -356,17 +372,20 @@
 	 *
 	 *  This method should be called *before* layoutItemRenderers().
 	 */
- 	private function updateVisibleColumnWidths(scrollX:Number, scrollY:Number, width:Number, height:Number):void
+ 	private function updateGridDimensions(scrollX:Number, scrollY:Number, width:Number, height:Number):void
 	{
+        const gridDimensions:GridDimensions = gridDimensions;
 		const firstVisibleColumnIndex:int = gridDimensions.getColumnIndexAt(scrollX, scrollY);
-	    computeVisibleColumnWidths(width, scrollX, firstVisibleColumnIndex, columnIndices, columnWidths);
-		// TBD: loop to incorporate "slave" elements, notably CHB
-
-		const visibleColumnCount:uint = columnIndices.length;
-		for (var index:int = 0; index < visibleColumnCount; index++)
+        const columnIndices:Vector.<int> = updateTypicalCellSizes(width, scrollX, firstVisibleColumnIndex);
+
+        if (!columnIndices)  // there no new typical item cell widths
+            return;
+
+		const columnCount:uint = columnIndices.length;
+		for (var index:int = 0; index < columnCount; index++)
 		{
 			var columnIndex:int = columnIndices[index];
-			var columnWidth:Number = columnWidths[index];
+			var columnWidth:Number = gridDimensions.getTypicalCellWidth(columnIndex);
 			var gridColumn:GridColumn = getGridColumn(columnIndex);

 			if (isNaN(gridColumn.width)) // if this column's width wasn't explicitly specified
@@ -385,9 +404,6 @@

 			gridDimensions.setColumnWidth(columnIndex, columnWidth);  // store the column width
 		}
-
-		columnIndices.length = 0;
-		columnWidths.length = 0;
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17004
Author:   cframpto@adobe.com
Date:     2010-07-21T20:54:17.524014Z

Log Message:
-----------
When the selectionMode goes to none, make sure all the selection visuals are removed and only reset the caret if a selection isn't required.
When the column's headerText is changed, make sure the ColumnHeaderBar is updated.

QE notes:
Doc notes:
Bugs: SDK-26844, SDK-26888
Reviewer: Hans
Tests run: none
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -1169,7 +1169,7 @@
             // Selection is row-based so if there are existing cell selections,
             // free them since they can't be reused.
             // TBD: this check won't work with column selections.
-            if (visibleColumnSelectionIndices.length)
+            if (visibleColumnSelectionIndices.length > 0)
             {
                 freeGridElements(visibleSelectionIndicators);
                 visibleSelectionIndicators.length = 0;
@@ -1206,7 +1206,7 @@
         // Selection is not row-based so if there are existing row selections,
         // free them since they can't be reused.
         // TBD: this check won't work with column selections.
-        if (visibleRowSelectionIndices.length &&
+        if (visibleRowSelectionIndices.length > 0 &&
             visibleColumnSelectionIndices.length == 0)
         {
             freeGridElements(visibleSelectionIndicators);
@@ -1248,6 +1248,17 @@
         }

         // No selection.
+
+        // If there are existing cell selections,
+        // free them since there is no selection.
+        // TBD: this check won't work with column selections.
+        if (visibleColumnSelectionIndices.length > 0)
+        {
+            freeGridElements(visibleSelectionIndicators);
+            visibleSelectionIndicators.length = 0;
+            visibleRowSelectionIndices.length = 0;
+            visibleColumnSelectionIndices.length = 0;
+        }
     }

     private function layoutRowSelectionIndicator(indicator:IVisualElement, rowIndex:int):void


[utils] Adds possibility to specify comparator function when array are comparing.

--- skein-utils/src/skein/utils/ArrayUtil.as
+++ skein-utils/src/skein/utils/ArrayUtil.as
@@ -28,7 +28,7 @@
         return true;
     }

-    public static function same(array1:Array, array2:Array):Boolean
+    public static function same(array1:Array, array2:Array, comparator:Function=null):Boolean
     {
         if (array1 == null && array2 == null) return true;

@@ -40,10 +40,41 @@
         {
             var value1:Object = array1[i];

-            if (array2.indexOf(value1) == -1) return false;
+            var found:Boolean;
+
+            if (comparator == null)
+            {
+                found = array2.indexOf(value1) != -1;
+            }
+            else
+            {
+                found = array2.some(function(value2:*, index:int, array:Array):Boolean
+                {
+                    return comparator(value1, value2);
+                });
+            }
+
+            if (!found) return false;
         }

         return true;
     }
+
+    public static function copy(array:Array):Array
+    {
+        if (array == null)
+            return null;
+
+        var result:Array = [];
+
+        for (var i:uint = 0, n:uint = array.length; i < n; i++)
+        {
+            var item:Object = array[i];
+
+            result.push(ObjectUtil.copy(item));
+        }
+
+        return result;
+    }
 }
 }


added error checking for type cast

added error checking for type cast

--- WeaveJS/src/weavejs/data/column/AbstractAttributeColumn.as
+++ WeaveJS/src/weavejs/data/column/AbstractAttributeColumn.as
@@ -116,8 +116,13 @@
 				return array;

 			var value:* = dataCache.get(dataType, key);
-			if (value === undefined)
-				dataCache.set(dataType, key, value = dataType(generateValue(key, dataType)));
+			if (value === undefined)
+			{
+				value = generateValue(key, dataType);
+				if (!value is dataType)
+					throw new Error("generateValue() did not produce a value of the requested type. Expected " + Weave.className(dataType) + ", got " + Weave.className(value));
+				dataCache.set(dataType, key, value);
+			}
 			return value;
 		}


Link deletion

Link deletion

--- src/LevelStates/LevelState.as
+++ src/LevelStates/LevelState.as
@@ -638,6 +638,7 @@
 				if (ControlSet.DELETE_KEY.enabled && ControlSet.DELETE_KEY.pressed() && !currentBloc) {
 					destroyModules();
 					destroyWires();
+					destroyLinks();
 				}

 				if (ControlSet.PASTE_KEY.justPressed() && U.clipboard) {
@@ -803,6 +804,16 @@
 			return null;
 		}

+		private function findMousedLink():DLink {
+			if (U.buttonManager.moused)
+				return null;
+
+			for each (var link:DLink in displayLinks)
+				if (link.link.mouseable && link.overlapsPoint(U.mouseFlxLoc))
+					return link;
+			return null;
+		}
+

 		private function checkMenuState():void {
 			deleteHint.exists = canDelete();
@@ -821,9 +832,15 @@
 		private function canDelete():Boolean {
 			if (currentLink || currentBloc || selectionArea || runningDisplayTest)
 				return false;
+
 			var mousedWire:DWire = findMousedWire();
 			if (mousedWire && !mousedWire.wire.FIXED)
 				return true;
+
+			var mousedLink:DLink = findMousedLink();
+			if (mousedLink && !mousedLink.link.FIXED)
+				return true;
+
 			var module:Module = findMousedModule();
 			return module && !module.FIXED;
 		}
@@ -968,6 +985,12 @@
 				new CustomAction(Wire.remove, Wire.place, mousedWire.wire).execute();
 		}

+		private function destroyLinks():void {
+			var mousedLink:DLink = findMousedLink();
+			if (mousedLink)
+				new CustomAction(Link.remove, Link.place, mousedLink.link).execute();
+		}
+
 		public function ensureNothingHeld():void {
 			if (currentBloc) {
 				currentBloc.unravel();


Transferred from the Adobe Open Source Subversion Repository

Revision: 11279
Author:   dloverin@adobe.com
Date:     2009-10-29T21:14:43.090882Z

Log Message:
-----------
ASDoc changes to IStyleManger2 and IStyleManager

Copy the ASDoc for the StyleManager API from StyleManager to IStyleManager2 and IStyleManager. Also needed to remove the [ExcludeClass] metadata from both interfaces.

QE notes: None.
Doc notes: None.
Bugs: SDK-23884
Reviewer: Gaurav
Tests run: checkintests
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>

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

--- frameworks/projects/framework/src/mx/styles/IStyleManager.as
+++ frameworks/projects/framework/src/mx/styles/IStyleManager.as
@@ -14,12 +14,24 @@

 import flash.events.IEventDispatcher;

-[ExcludeClass]
-
 /**
- *  @private
+ *  The IStyleManager class manages the following:
+ *

+ *
Which CSS style properties the class inherits

+ *
Which style properties are colors, and therefore get special handling

+ *
A list of strings that are aliases for color values

+ *

+ *
  *  This interface was used by Flex 2.0.1.
  *  Flex 3 now uses IStyleManager2 instead.
+ *
+ *  @see mx.styles.CSSStyleDeclaration
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 2.0.1
+ *
  */
 public interface IStyleManager
 {
@@ -33,22 +45,54 @@
 	//  inheritingStyles
     //----------------------------------

+    /**
+     *  @private
+     *  Set of inheriting non-color styles.
+     *  This is not the complete set from CSS.
+     *  Some of the omitted we don't support at all,
+     *  others may be added later as needed.
+     *  The method registerInheritingStyle() adds to this set
+     *  and isInheritingStyle() queries this set.
+     */
 	function get inheritingStyles():Object;
+
+    /**
+     *  @private
+     */
 	function set inheritingStyles(value:Object):void;

     //----------------------------------
 	//  stylesRoot
     //----------------------------------

+    /**
+     *  @private
+     *  The root of all proto chains used for looking up styles.
+     *  This object is initialized once by initProtoChainRoots() and
+     *  then updated by calls to setStyle() on the global CSSStyleDeclaration.
+     *  It is accessed by code that needs to construct proto chains,
+     *  such as the initProtoChain() method of UIComponent.
+     */
 	function get stylesRoot():Object;
-	function set stylesRoot(value:Object):void;
+
+    /**
+     *  @private
+     */
+    function set stylesRoot(value:Object):void;

     //----------------------------------
 	//  typeSelectorCache
     //----------------------------------

+    /**
+     *  @private
+     */
 	function get typeSelectorCache():Object;
-	function set typeSelectorCache(value:Object):void;
+
+    /**
+     *  @private
+     */
+    function set typeSelectorCache(value:Object):void;

     //--------------------------------------------------------------------------
     //
@@ -56,51 +100,455 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  Gets the CSSStyleDeclaration object that stores the rules
+     *  for the specified CSS selector.
+     *
+     *
If the selector parameter starts with a period (.),
+     *  the returned CSSStyleDeclaration is a class selector and applies only to those instances
+     *  whose styleName property specifies that selector
+     *  (not including the period).
+     *  For example, the class selector ".bigMargins"
+     *  applies to any UIComponent whose styleName
+     *  is "bigMargins".

+     *
+     *
If the selector parameter does not start with a period,
+     *  the returned CSSStyleDeclaration is a type selector and applies to all instances
+     *  of that type.
+     *  For example, the type selector "Button"
+     *  applies to all instances of Button and its subclasses.

+     *
+     *
The global selector is similar to a type selector
+     *  and does not start with a period.

+     *
+     *  @param selector The name of the CSS selector.
+     *
+     *  @return The style declaration whose name matches the selector property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function getStyleDeclaration(selector:String):CSSStyleDeclaration;

+    /**
+     *  Sets the CSSStyleDeclaration object that stores the rules
+     *  for the specified CSS selector.
+     *
+     *
If the selector parameter starts with a period (.),
+     *  the specified selector is a "class selector" and applies only to those instances
+     *  whose styleName property specifies that selector
+     *  (not including the period).
+     *  For example, the class selector ".bigMargins"
+     *  applies to any UIComponent whose styleName
+     *  is "bigMargins".

+     *
+     *
If the selector parameter does not start with a period,
+     *  the specified selector is a "type selector" and applies to all instances
+     *  of that type.
+     *  For example, the type selector "Button"
+     *  applies to all instances of Button and its subclasses.

+     *
+     *
The global selector is similar to a type selector
+     *  and does not start with a period.

+     *
+     *  @param selector The name of the CSS selector.
+     *  @param styleDeclaration The new style declaration.
+     *  @param update Set to true to force an immediate update of the styles; internally, Flex
+     *  calls the styleChanged() method of UIComponent.
+     *  Set to false to avoid an immediate update of the styles in the application.
+     *
+     *
The styles will be updated the next time one of the following methods is called with
+     *  the update property set to true:
+     *

+     *
clearStyleDeclaration()

+     *
loadStyleDeclarations()

+     *
setStyleDeclaration()

+     *
unloadStyleDeclarations()

+     *

+     *

+     *
+     *
Typically, if you call the one of these methods multiple times,
+     *  you set this property to true only on the last call,
+     *  so that Flex does not call the styleChanged() method multiple times.

+     *
+     *
If you call the getStyle() method, Flex returns the style value
+     *  that was last applied to the UIComponent through a call to the styleChanged() method.
+     *  The component's appearance might not reflect the value returned by the getStyle() method. This occurs
+     *  because one of these style declaration methods might not yet have been called with the
+     *  update property set to true.

+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function setStyleDeclaration(selector:String,
 								styleDeclaration:CSSStyleDeclaration,
 								update:Boolean):void;

+    /**
+     *  Clears the CSSStyleDeclaration object that stores the rules
+     *  for the specified CSS selector.
+     *
+     *
If the specified selector is a class selector (for example, ".bigMargins" or ".myStyle"),
+     *  you must be sure to start the
+     *  selector property with a period (.).

+     *
+     *
If the specified selector is a type selector (for example, "Button"), do not start the
+     *  selector property with a period.

+     *
+     *
The global selector is similar to a type selector
+     *  and does not start with a period.

+     *
+     *  @param selector The name of the CSS selector to clear.
+     *  @param update Set to true to force an immediate update of the styles.
+     *  Set to false to avoid an immediate update of the styles in the application.
+     *  For more information about this method, see the description in the setStyleDeclaration()
+     *  method.
+     *
+     *  @see #setStyleDeclaration()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function clearStyleDeclaration(selector:String, update:Boolean):void;

+    /**
+     *  Adds to the list of styles that can inherit values
+     *  from their parents.
+     *
+     *
Note: Ensure that you avoid using duplicate style names, as name
+     *  collisions can result in decreased performance if a style that is
+     *  already used becomes inheriting.

+     *
+     *  @param styleName The name of the style that is added to the list of styles that can inherit values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function registerInheritingStyle(styleName:String):void;

+    /**
+     *  Tests to see if a style is inheriting.
+     *
+     *  @param styleName The name of the style that you test to see if it is inheriting.
+     *
+     *  @return Returns true if the specified style is inheriting.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function isInheritingStyle(styleName:String):Boolean;

+    /**
+     *  Test to see if a TextFormat style is inheriting.
+     *
+     *  @param styleName The name of the style that you test to see if it is inheriting.
+     *
+     *  @return Returns true if the specified TextFormat style
+     *  is inheriting.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function isInheritingTextFormatStyle(styleName:String):Boolean;

+    /**
+     *  Adds to the list of styles which may affect the measured size
+     *  of the component.
+     *  When one of these styles is set with setStyle(),
+     *  the invalidateSize() method is automatically called on the component
+     *  to make its measured size get recalculated later.
+     *
+     *  @param styleName The name of the style that you add to the list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function registerSizeInvalidatingStyle(styleName:String):void;

+    /**
+     *  Tests to see if a style changes the size of a component.
+     *
+     *
When one of these styles is set with the setStyle() method,
+     *  the invalidateSize() method is automatically called on the component
+     *  to make its measured size get recalculated later.

+     *
+     *  @param styleName The name of the style to test.
+     *
+     *  @return Returns true if the specified style is one
+     *  which may affect the measured size of the component.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function isSizeInvalidatingStyle(styleName:String):Boolean;

+    /**
+     *  Adds to the list of styles which may affect the measured size
+     *  of the component's parent container.
+     *
When one of these styles is set with setStyle(),
+     *  the invalidateSize() method is automatically called on the component's
+     *  parent container to make its measured size get recalculated
+     *  later.

+     *
+     *  @param styleName The name of the style to register.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function registerParentSizeInvalidatingStyle(styleName:String):void;

+    /**
+     *  Tests to see if the style changes the size of the component's parent container.
+     *
+     *
When one of these styles is set with setStyle(),
+     *  the invalidateSize() method is automatically called on the component's
+     *  parent container to make its measured size get recalculated
+     *  later.

+     *
+     *  @param styleName The name of the style to test.
+     *
+     *  @return Returns true if the specified style is one
+     *  which may affect the measured size of the component's
+     *  parent container.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function isParentSizeInvalidatingStyle(styleName:String):Boolean;

+    /**
+     *  Adds to the list of styles which may affect the appearance
+     *  or layout of the component's parent container.
+     *  When one of these styles is set with setStyle(),
+     *  the invalidateDisplayList() method is auomatically called on the component's
+     *  parent container to make it redraw and/or relayout its children.
+     *
+     *  @param styleName The name of the style to register.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function registerParentDisplayListInvalidatingStyle(styleName:String):void;

+    /**
+     *  Tests to see if this style affects the component's parent container in
+     *  such a way as to require that the parent container redraws itself when this style changes.
+     *
+     *
When one of these styles is set with setStyle(),
+     *  the invalidateDisplayList() method is auomatically called on the component's
+     *  parent container to make it redraw and/or relayout its children.

+     *
+     *  @param styleName The name of the style to test.
+     *
+     *  @return Returns true if the specified style is one
+     *  which may affect the appearance or layout of the component's
+     *  parent container.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function isParentDisplayListInvalidatingStyle(styleName:String):Boolean;

+    /**
+     *  Adds a color name to the list of aliases for colors.
+     *
+     *  @param colorName The name of the color to add to the list; for example, "blue".
+     *  If you later access this color name, the value is not case-sensitive.
+     *
+     *  @param colorValue Color value, for example, 0x0000FF.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function registerColorName(colorName:String, colorValue:uint):void;

+    /**
+     *  Tests to see if the given String is an alias for a color value. For example,
+     *  by default, the String "blue" is an alias for 0x0000FF.
+     *
+     *  @param colorName The color name to test. This parameter is not case-sensitive.
+     *
+     *  @return Returns true if colorName is an alias
+     *  for a color.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function isColorName(colorName:String):Boolean;

+    /**
+     *  Returns the numeric RGB color value that corresponds to the
+     *  specified color string.
+     *  The color string can be either a case-insensitive color name
+     *  such as "red", "Blue", or
+     *  "haloGreen", a hexadecimal value such as 0xFF0000, or a #-hexadecimal String
+     *  such as "#FF0000".
+     *
+     *
This method returns a uint, such as 4521830, that represents a color. You can convert
+     *  this uint to a hexadecimal value by passing the numeric base (in this case, 16), to
+     *  the uint class's toString() method, as the following example shows:

+     *

+     *  import mx.styles.StyleManager;
+     *  private function getNewColorName():void {
+     *      StyleManager.registerColorName("soylentGreen",0x44FF66);
+     *      trace(StyleManager.getColorName("soylentGreen").toString(16));
+     *  }
+     *

+     *
+     *  @param colorName The color name.
+     *
+     *  @return Returns a uint that represents the color value or NOT_A_COLOR
+     *  if the value of the colorName property is not an alias for a color.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function getColorName(colorName:Object):uint;

+    /**
+     *  Converts each element of the colors Array from a color name
+     *  to a numeric RGB color value.
+     *  Each color String can be either a case-insensitive color name
+     *  such as "red", "Blue", or
+     *  "haloGreen", a hexadecimal value such as 0xFF0000, or a #-hexadecimal String
+     *  such as "#FF0000"..
+     *
+     *  @param colors An Array of color names.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function getColorNames(colors:Array /* of Number or String */):void;

+    /**
+     *  Determines if a specified parameter is a valid style property. For example:
+     *
+     *

+     *  trace(StyleManager.isValidStyleValue(myButton.getStyle("color")).toString());
+     *

+     *
+     *
This can be useful because some styles can be set to values
+     *  such as 0, NaN,
+     *  the empty String (""), or null, which can
+     *  cause an if (value) test to fail.

+     *
+     *  @param value The style property to test.
+     *
+     *  @return If you pass the value returned by a getStyle() method call
+     *  to this method, it returns true if the style
+     *  was set and false if it was not set.
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function isValidStyleValue(value:*):Boolean;

+    /**
+     *  Loads a style SWF.
+     *
+     *  @param url Location of the style SWF.
+     *
+     *  @param update Set to true to force
+     *  an immediate update of the styles.
+     *  Set to false to avoid an immediate update
+     *  of the styles in the application.
+     *  This parameter is optional and defaults to true
+     *  For more information about this parameter, see the description
+     *  in the setStyleDeclaration() method.
+     *
+     *  @param trustContent Obsolete, no longer used.
+     *  This parameter is optional and defaults to false.
+     *
+     *  @param applicationDomain The ApplicationDomain passed to the
+     *  load() method of the IModuleInfo that loads the style SWF.
+     *  This parameter is optional and defaults to null.
+     *
+     *  @param securityDomain The SecurityDomain passed to the
+     *  load() method of the IModuleInfo that loads the style SWF.
+     *  This parameter is optional and defaults to null.
+     *
+     *  @return An IEventDispatcher implementation that supports
+     *          StyleEvent.PROGRESS, StyleEvent.COMPLETE, and
+     *          StyleEvent.ERROR.
+     *
+     *  @see #setStyleDeclaration()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function loadStyleDeclarations(
 					url:String, update:Boolean = true,
 					trustContent:Boolean = false):IEventDispatcher;

+    /**
+     *  Unloads a style SWF.
+     *
+     *  @param url Location of the style SWF.
+     *  @param update Set to true to force an immediate update of the styles.
+     *  Set to false to avoid an immediate update of the styles in the application.
+     *  For more information about this method, see the description in the setStyleDeclaration()
+     *  method.
+     *
+     *  @see #setStyleDeclaration()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
 	function unloadStyleDeclarations(
 					url:String, update:Boolean = true):void;

+    /**
+     *  @private
+     *  This method is called by code autogenerated by the MXML compiler,
+     *  after StyleManager.styles is popuplated with CSSStyleDeclarations.
+     */
 	function initProtoChainRoots():void;

+    /**
+     *  @private
+     *  After an entire selector is added, replaced, or removed,
+     *  this method updates all the DisplayList trees.
+     */
 	function styleDeclarationsChanged():void;
 }


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

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

 package spark.skins
 {


Made sure to use child's size, and not actual size when computing flow layout

git-svn-id: 02605e11d3a461bc7e12f3f3880edf4b0c8dcfd0@4658 3e7533ad-8678-4d30-8e38-00a379d3f0d0

--- src/laml/layout/FlowLayout.as
+++ src/laml/layout/FlowLayout.as
@@ -109,7 +109,7 @@
 			for(var i:int; i < len; i++) {
 				child = kids[i] as LayoutableDelegate;
 				child.position = first;
-				first = first + child.actual + gutter;
+				first = first + child.size + gutter;
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.events
 {


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

--- frameworks/projects/framework/src/mx/validators/Validator.as
+++ frameworks/projects/framework/src/mx/validators/Validator.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.validators
 {


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

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

 package spark.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5647
Author:   pfarland@adobe.com
Date:     2009-03-27T13:59:54.760468Z

Log Message:
-----------
Fixing programmatic usages of 'mx.components' to the spark equivalent after the rename.

Also fixing calls to StyleManager.getStyleDeclaration() that use an unqualified type name. Type selectors should be referenced via fully qualified ActionScript class names at runtime. When compatibility version is set to 3, getStyleDeclaration will remove the package name to match type selectors in the legacy unqualified manner.

QE: This fixes bug SDK-20253, and potentially a few other edge cases like the CursorManager RTE.
Doc: No
Checkintests: Pass

Bugs:
SDK-20253 - [rename_work] Spark RadioButton and CheckBox focus ring now highlights the label of the RadioButton

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/printing/FlexPrintJob.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
@@ -126,8 +126,8 @@
         // Hide the label before drawing the focus.
         // TODO: Figure out a better solution.
         var hidLabelElement:Boolean = false;
-        if ((weakIsCheck(focusObject, "mx.components::CheckBox") ||
-             weakIsCheck(focusObject, "mx.components::RadioButton"))
+        if ((weakIsCheck(focusObject, "spark.components::CheckBox") ||
+             weakIsCheck(focusObject, "spark.components::RadioButton"))
              && focusObject.labelElement)
         {
             focusObject.labelElement.displayObject.visible = false;
@@ -148,7 +148,7 @@

         // Special case for Scroller - fill the entire rect.
         // TODO: Figure out a better solution.
-        if (weakIsCheck(focusObject, "mx.components::Scroller"))
+        if (weakIsCheck(focusObject, "spark.components::Scroller"))
         {
             rect.x = rect.y = FOCUS_THICKNESS;
             rect.width = focusObject.width;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/olap/OLAPLevel.as
+++ frameworks/projects/advancedgrids/src/mx/olap/OLAPLevel.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.olap
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 15526
Author:   chaase@adobe.com
Date:     2010-04-16T23:14:38.571769Z

Log Message:
-----------
Two effects fixes, one states/SetProperty fix.
The Fade fix allows objects which don't exist in the next state, but which don't have valid values set in that state for position/orientation, to fade out in place.
The states fix cleans up the layout constraint docs in UIComponent and fixes logic in SetProperty that makes it possible to actually unset these properties in MXML.
The AnimateTransform fix cleans up logic when using AnimateTransform directly to auto-animate properties that change between states.

QE notes: Fade_accessor Fade_relevantProperties_Default fails because the affectedProperties of Fade has changed with one of these fixes. The test needs to be updated.
Doc notes: None
Bugs: sdk-25389, sdk-24989, sdk-24925
Reviewer: Corey (UIComponent, SetProperty) and Jason (the rest)
Tests run: checkintests, Mustella spark/effects, mx/states
Is noteworthy for integration: yes: downstream tools wanted fix for sdk-24925

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/states/SetProperty.as
+++ frameworks/projects/framework/src/mx/states/SetProperty.as
@@ -446,7 +446,11 @@
     private function setPropertyValue(obj:Object, name:String, value:*,
                                       valueForType:Object):void
     {
-        if (valueForType is Number)
+        // special-case undefined: we don't want to cast it to some
+        // special type and lose that information
+        if (value === undefined)
+            obj[name] = value;
+        else if (valueForType is Number)
             obj[name] = Number(value);
         else if (valueForType is Boolean)
             obj[name] = toBoolean(value);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.accessibility
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 16262
Author:   dloverin@adobe.com
Date:     2010-05-20T18:44:39.210129Z

Log Message:
-----------
Move mx components out of framework.swc into mx.swc

The new mx.swc library lives in the libs/mx directory.

QE notes: Of the 5 failures I saw: 1 was intermittent and 4 are not a bug.
Managers/StyleManager/AdvancedCSS/descendantSelectors/AdvancedCSS_descendantSelectors_Style descendantSelector_combining_nested_style
    This failure was intermittent.

mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ApplicationControlBar_FromTo
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ApplicationControlBar_By
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ControlBar_FromTo
mx/effects/Resize/Containers/Resize_Containers Effects_Resize_Containers_ControlBar_By
    These failures are due to my code changes but I believe the old behavior was incorrect. When a control bar is the last child in a Panel it should appear at the bottom of the Panel. In the test case an ApplicationControlBar/ContorlBar is added to an empty Panel, making it the last child in the Panel. So it should appear at the bottom of the Panel instead of inside the Panel.

Doc notes: new library, mx.swc
Bugs:
Reviewer: Alex
Tests run:
Is noteworthy for integration: Yes

Modified Paths:
--------------
740 paths were modified

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

--- frameworks/projects/mx/src/mx/styles/metadata/GapStyles.as
+++ frameworks/projects/mx/src/mx/styles/metadata/GapStyles.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Number of pixels between children in the horizontal direction.
+ *  The default value depends on the component class;
+ *  if not overridden for the class, the default value is 8.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="horizontalGap", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between children in the vertical direction.
+ *  The default value depends on the component class;
+ *  if not overridden for the class, the default value is 6.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="verticalGap", type="Number", format="Length", inherit="no")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 4059
Author:   gosmith@adobe.com
Date:     2008-11-10T19:56:38.121345Z

Log Message:
-----------
The measure() and updateDisplayList() methods of TextBox and TextGraphic now return early if the inheritingStyles and nonInheritingStyles proto chains haven't been initialized, to avoid RTEs in the compose() method from invalid styles values.

QE Notes: None
Doc Notes: None
Bugs: SDK-17975
Reviewer: Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -335,6 +335,14 @@
      */
     override protected function measure():void
     {
+        super.measure();
+
+        // The measure() method of a GraphicElement can get called
+        // when its style chain hasn't been initialized.
+        // In that case, compose() must not be called.
+        if (!mx_internal::styleChainInitialized)
+            return;
+
         compose(explicitWidth, explicitHeight);

         var bounds:Rectangle = textFlowComposer.bounds;
@@ -350,6 +358,12 @@
     {
         super.updateDisplayList(unscaledWidth, unscaledHeight);

+        // The updateDisplayList() method of a GraphicElement can get called
+        // when its style chain hasn't been initialized.
+        // In that case, compose() must not be called.
+        if (!mx_internal::styleChainInitialized)
+            return;
+
         compose(unscaledWidth, unscaledHeight);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4899
Author:   jimurphy@adobe.com
Date:     2009-02-09T15:58:02.302090Z

Log Message:
-----------
Merge i10 revisions 4865,4870-4871,4877,4880-4882,4890-4891 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/StyleInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/XMLBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/src/java/macromedia/asc/embedding/LintEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/VisualChildInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/Initializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextBlockComposer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/InitializedPropertyDeclaration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EventInitializer.java</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/NamedInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/TextParser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ArrayElementInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/XMLListBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EffectInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/As3Compiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -639,6 +639,11 @@
     {
         // Don't want this handler firing when we're re-composing the text lines.
         textFlow.removeEventListener(DamageEvent.DAMAGE, textFlow_damageHandler);
+
+        // Temporary fix for SDK-18880.
+        // This won't be necessary when TLF allows
+        // FlowElements to be reparented.
+        textFlow.replaceChildren(0, textFlow.numChildren);

         textFlow = createTextFlow();
         _content = textFlow;


Transferred from the Adobe Open Source Subversion Repository

Revision: 20186
Author:   eday@adobe.com
Date:     2011-02-08T06:10:34.980106Z

Log Message:
-----------
SoftKeyboard/Scroller fix revisited.  I neglected to allow throwing to occur once the soft keyboard was activated.

QE notes:
Doc notes:
Bugs: SDK-29311
Reviewer: Ryan, Jason Szeto
Tests run:
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -748,7 +748,7 @@
     /**
      *  @private
      */
-    mx_internal var isSoftKeyboardActivated:Boolean = false;
+    mx_internal var preventThrows:Boolean = false;

     //--------------------------------------------------------------------------
     //
@@ -2175,6 +2175,7 @@
             // we are scrolling
             captureNextClick = true;
             captureNextMouseDown = true;
+            preventThrows = false;

             hspBeforeTouchScroll = viewport.horizontalScrollPosition;
             vspBeforeTouchScroll = viewport.verticalScrollPosition;
@@ -2578,7 +2579,7 @@
      */
     private function softKeyboardActivateHandler(event:SoftKeyboardEvent):void
     {
-        isSoftKeyboardActivated = true;
+        preventThrows = true;

         // Size of app has changed, so run this logic again
         var keyboardRect:Rectangle = stage.softKeyboardRect;
@@ -2607,7 +2608,7 @@
         adjustScrollPositionAfterSoftKeyboardDeactivate();
         oldSoftKeyboardHeight = NaN;
         oldSoftKeyboardWidth = NaN;
-        isSoftKeyboardActivated = false;
+        preventThrows = false;
     }

     /**
@@ -3187,7 +3188,7 @@
         }

         // If the soft keyboard is up (or about to come up), don't start a throw.
-        if (scroller.isSoftKeyboardActivated)
+        if (scroller.preventThrows)
         {
             endTouchScroll();
             return;


Transferred from the Adobe Open Source Subversion Repository

Revision: 22057
Author:   cframpto@adobe.com
Date:     2011-08-17T19:23:31.306738Z

Log Message:
-----------
Last batch of ASdoc edits for StageText.

QE notes:
Doc notes: Matt review TextArea/TextInput/SkinnableTextBase and StyleableStageText particularly the intros and the styles (had to change the format again).
Bugs: SDK-31078, SDK-31205, SDK-31109, SDK-31015
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/TextArea.as
+++ frameworks/projects/spark/src/spark/components/TextArea.as
@@ -41,6 +41,10 @@
 [Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]

 /**
+ *  Indicates under what conditions the horizontal scroll bar is displayed.
+ *
+ *
For the Mobile theme, this is not supported.

+ *
  *  @copy spark.components.Scroller#style:horizontalScrollPolicy
  *
  *  @langversion 3.0
@@ -51,6 +55,10 @@
 [Style(name="horizontalScrollPolicy", type="String", inherit="no", enumeration="off,on,auto")]

 /**
+ *  Indicates under what conditions the vertical scroll bar is displayed.
+ *
+ *
For the Mobile theme, this is not supported.

+ *
  *  @copy spark.components.Scroller#style:verticalScrollPolicy
  *
  *  @langversion 3.0
@@ -276,9 +284,9 @@
  *    widthInChars="Calculated default"  [Spark theme only]
  *
  *    Styles
- *    horizontalScrollPolicy="auto"
+ *    horizontalScrollPolicy="auto"  [Spark theme only]
  *    symbolColor=""
- *    verticalScrollPolicy="auto"
+ *    verticalScrollPolicy="auto"  [Spark theme only]
  *  />
  *

  *


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

--- frameworks/projects/spark/src/spark/layouts/BasicLayout.as
+++ frameworks/projects/spark/src/spark/layouts/BasicLayout.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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.layouts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5930
Author:   egeorgie@adobe.com
Date:     2009-04-04T00:42:20.862992Z

Log Message:
-----------
Implement baseline support in BasicLayout, tweak percent sizing to take into account left/right, fix measurement for horizontalCenter/verticalCenter

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans
tests: checkintests, mustella (gumbo/layout, gumbo/group, gumbo/dataGroup, gumbo/layout3D)

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as

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

--- frameworks/projects/spark/src/spark/layouts/BasicLayout.as
+++ frameworks/projects/spark/src/spark/layouts/BasicLayout.as
@@ -12,11 +12,10 @@
 package spark.layout
 {

-import flash.geom.Point;
-import flash.geom.Rectangle;
+import mx.core.ILayoutElement;
+import mx.core.IVisualElement;

 import spark.components.supportClasses.GroupBase;
-import mx.core.ILayoutElement;
 import spark.layout.supportClasses.LayoutBase;
 import spark.layout.supportClasses.LayoutElementHelper;

@@ -97,41 +96,96 @@
             if (!layoutElement || !layoutElement.includeInLayout)
                 continue;

+            var hCenter:Number   = LayoutElementHelper.parseConstraintValue(layoutElement.horizontalCenter);
+            var vCenter:Number   = LayoutElementHelper.parseConstraintValue(layoutElement.verticalCenter);
+            var baseline:Number  = LayoutElementHelper.parseConstraintValue(layoutElement.baseline);
             var left:Number      = LayoutElementHelper.parseConstraintValue(layoutElement.left);
             var right:Number     = LayoutElementHelper.parseConstraintValue(layoutElement.right);
             var top:Number       = LayoutElementHelper.parseConstraintValue(layoutElement.top);
             var bottom:Number    = LayoutElementHelper.parseConstraintValue(layoutElement.bottom);

-            var extX:Number = 0;
-            var extY:Number = 0;
-
-            if (isNaN(left) && isNaN(right) &&
-                isNaN(LayoutElementHelper.parseConstraintValue(layoutElement.horizontalCenter)))
-            {
-                extX += layoutElement.getLayoutBoundsX();
+            // Extents of the element - how much additional space (besides its own width/height)
+            // the element needs based on its constraints.
+            var extX:Number;
+            var extY:Number;
+
+            if (!isNaN(left) && !isNaN(right))
+            {
+                // If both left & right are set, then the extents is always
+                // left + right so that the element is resized to its preferred
+                // size (if it's the one that pushes out the default size of the container).
+                extX = left + right;
+            }
+            else if (!isNaN(hCenter))
+            {
+                // If we have horizontalCenter, then we want to have at least enough space
+                // so that the element is within the parent container.
+                // If the element is aligned to the left/right edge of the container and the
+                // distance between the centers is hCenter, then the container width will be
+                // parentWidth = 2 * (abs(hCenter) + elementWidth / 2)
+                // <=> parentWidth = 2 * abs(hCenter) + elementWidth
+                // Since the extents is the additional space that the element needs
+                // extX = parentWidth - elementWidth = 2 * abs(hCenter)
+                extX = Math.abs(hCenter) * 2;
+            }
+            else if (!isNaN(left) || !isNaN(right))
+            {
+                extX = isNaN(left) ? 0 : left;
+                extX += isNaN(right) ? 0 : right;
             }
             else
             {
-                extX += isNaN(left) ? 0 : left;
-                extX += isNaN(right) ? 0 : right;
-            }
-
-            if (isNaN(top) && isNaN(bottom) &&
-                isNaN(LayoutElementHelper.parseConstraintValue(layoutElement.verticalCenter)))
-            {
-                extY += layoutElement.getLayoutBoundsY();
+                extX = layoutElement.getLayoutBoundsX();
+            }
+
+            if (!isNaN(top) && !isNaN(bottom))
+            {
+                // If both top & bottom are set, then the extents is always
+                // top + bottom so that the element is resized to its preferred
+                // size (if it's the one that pushes out the default size of the container).
+                extY = top + bottom;
+            }
+            else if (!isNaN(vCenter))
+            {
+                // If we have verticalCenter, then we want to have at least enough space
+                // so that the element is within the parent container.
+                // If the element is aligned to the top/bottom edge of the container and the
+                // distance between the centers is vCenter, then the container height will be
+                // parentHeight = 2 * (abs(vCenter) + elementHeight / 2)
+                // <=> parentHeight = 2 * abs(vCenter) + elementHeight
+                // Since the extents is the additional space that the element needs
+                // extY = parentHeight - elementHeight = 2 * abs(vCenter)
+                extY = Math.abs(vCenter) * 2;
+            }
+            else if (!isNaN(baseline))
+            {
+                // TODO EGeorgie: move baselinePosition to ILayoutElement.
+                extY = baseline - IVisualElement(layoutElement).baselinePosition;
+            }
+            else if (!isNaN(top) || !isNaN(bottom))
+            {
+                extY = isNaN(top) ? 0 : top;
+                extY += isNaN(bottom) ? 0 : bottom;
             }
             else
             {
-                extY += isNaN(top) ? 0 : top;
-                extY += isNaN(bottom) ? 0 : bottom;
-            }
-
-            width = Math.max(width, extX + layoutElement.getPreferredBoundsWidth());
-            height = Math.max(height, extY + layoutElement.getPreferredBoundsHeight());
-
-            var elementMinWidth:Number = constraintsDetermineWidth(layoutElement) ? layoutElement.getMinBoundsWidth() : layoutElement.getPreferredBoundsWidth();
-            var elementMinHeight:Number = constraintsDetermineHeight(layoutElement) ? layoutElement.getMinBoundsHeight() : layoutElement.getPreferredBoundsHeight();
+                extY = layoutElement.getLayoutBoundsY();
+            }
+
+            var preferredWidth:Number = layoutElement.getPreferredBoundsWidth();
+            var preferredHeight:Number = layoutElement.getPreferredBoundsHeight();
+
+            width = Math.max(width, extX + preferredWidth);
+            height = Math.max(height, extY + preferredHeight);
+
+            // Find the minimum default extents, we take the minimum width/height only
+            // when the element size is determined by the parent size
+            var elementMinWidth:Number =
+                constraintsDetermineWidth(layoutElement) ? layoutElement.getMinBoundsWidth() :
+                                                           preferredWidth;
+            var elementMinHeight:Number =
+                constraintsDetermineHeight(layoutElement) ? layoutElement.getMinBoundsHeight() :
+                                                            preferredHeight;

             minWidth = Math.max(minWidth, extX + elementMinWidth);
             minHeight = Math.max(minHeight, extY + elementMinHeight);
@@ -217,44 +271,55 @@
             if (!layoutElement || !layoutElement.includeInLayout)
                 continue;

-            var hCenter:Number = LayoutElementHelper.parseConstraintValue(layoutElement.horizontalCenter);
-            var vCenter:Number = LayoutElementHelper.parseConstraintValue(layoutElement.verticalCenter);
-            var left:Number    = LayoutElementHelper.parseConstraintValue(layoutElement.left);
-            var right:Number   = LayoutElementHelper.parseConstraintValue(layoutElement.right);
-            var top:Number     = LayoutElementHelper.parseConstraintValue(layoutElement.top);
-            var bottom:Number  = LayoutElementHelper.parseConstraintValue(layoutElement.bottom);
+            var hCenter:Number       = LayoutElementHelper.parseConstraintValue(layoutElement.horizontalCenter);
+            var vCenter:Number       = LayoutElementHelper.parseConstraintValue(layoutElement.verticalCenter);
+            var baseline:Number      = LayoutElementHelper.parseConstraintValue(layoutElement.baseline);
+            var left:Number          = LayoutElementHelper.parseConstraintValue(layoutElement.left);
+            var right:Number         = LayoutElementHelper.parseConstraintValue(layoutElement.right);
+            var top:Number           = LayoutElementHelper.parseConstraintValue(layoutElement.top);
+            var bottom:Number        = LayoutElementHelper.parseConstraintValue(layoutElement.bottom);
+            var percentWidth:Number  = layoutElement.percentWidth;
+            var percentHeight:Number = layoutElement.percentHeight;
+
             var elementMaxWidth:Number = layoutElement.getMaxBoundsWidth();
             var elementMaxHeight:Number = layoutElement.getMaxBoundsHeight();
-
-            // Remember child position before setting layoutSize, since changing the size may
-            // change the position.
-            var childX:Number = layoutElement.getLayoutBoundsX();
-            var childY:Number = layoutElement.getLayoutBoundsY();

             // Calculate size
             var childWidth:Number = NaN;
             var childHeight:Number = NaN;

-            if (!isNaN(left) && !isNaN(right))
+            if (!isNaN(percentWidth))
+            {
+                var availableWidth:Number = unscaledWidth;
+                if (!isNaN(left))
+                    availableWidth -= left;
+                if (!isNaN(right))
+                     availableWidth -= right;
+
+                childWidth = availableWidth * Math.min(percentWidth * 0.01, 1);
+                elementMaxWidth = Math.min(elementMaxWidth,
+                    maxSizeToFitIn(unscaledWidth, hCenter, left, right, layoutElement.getLayoutBoundsX()));
+            }
+            else if (!isNaN(left) && !isNaN(right))
             {
                 childWidth = unscaledWidth - right - left;
             }
-            else if (!isNaN(layoutElement.percentWidth))
-            {
-                childWidth = unscaledWidth * Math.min(layoutElement.percentWidth * 0.01, 1);
-                elementMaxWidth = Math.min(elementMaxWidth,
-                    maxSizeToFitIn(unscaledWidth, hCenter, left, right, childX));
-            }
-
-            if (!isNaN(top) && !isNaN(bottom))
+
+            if (!isNaN(percentHeight))
+            {
+                var availableHeight:Number = unscaledHeight;
+                if (!isNaN(top))
+                    availableHeight -= top;
+                if (!isNaN(bottom))
+                    availableHeight -= bottom;
+
+                childHeight = availableHeight * Math.min(percentHeight * 0.01, 1);
+                elementMaxHeight = Math.min(elementMaxHeight,
+                    maxSizeToFitIn(unscaledHeight, vCenter, top, bottom, layoutElement.getLayoutBoundsY()));
+            }
+            else if (!isNaN(top) && !isNaN(bottom))
             {
                 childHeight = unscaledHeight - bottom - top;
-            }
-            else if (!isNaN(layoutElement.percentHeight))
-            {
-                childHeight = unscaledHeight * Math.min(layoutElement.percentHeight * 0.01, 1);
-                elementMaxHeight = Math.min(elementMaxHeight,
-                    maxSizeToFitIn(unscaledHeight, vCenter, top, bottom, childY));
             }

             // Apply min and max constraints, make sure min is applied last. In the cases
@@ -270,6 +335,9 @@
             var elementWidth:Number = layoutElement.getLayoutBoundsWidth();
             var elementHeight:Number = layoutElement.getLayoutBoundsHeight();

+            var childX:Number = NaN;
+            var childY:Number = NaN;
+
             // Horizontal position
             if (!isNaN(hCenter))
                 childX = Math.round((unscaledWidth - elementWidth) / 2 + hCenter);
@@ -277,18 +345,20 @@
                 childX = left;
             else if (!isNaN(right))
                 childX = unscaledWidth - elementWidth - right;
-            else // since setting actual size might have moved the actual position, we need to reset here
-            	childX = layoutElement.getLayoutBoundsX();
+            else
+                childX = layoutElement.getLayoutBoundsX();

             // Vertical position
             if (!isNaN(vCenter))
                 childY = Math.round((unscaledHeight - elementHeight) / 2 + vCenter);
+            else if (!isNaN(baseline))
+                childY = baseline - IVisualElement(layoutElement).baselinePosition;
             else if (!isNaN(top))
                 childY = top;
             else if (!isNaN(bottom))
                 childY = unscaledHeight - elementHeight - bottom;
-           	else  // since setting actual size might have moved the actual position, we need to reset here
-           		childY = layoutElement.getLayoutBoundsY();
+            else
+                childY = layoutElement.getLayoutBoundsY();

             // Set position
             layoutElement.setLayoutBoundsPosition(childX, childY);


ApplyFadeSoundData を internal へ変更

ApplyFadeSoundData を internal へ変更

--- project/SoundConductor/src/jp/hiiragi/managers/soundConductor/ApplyFadeSoundData.as
+++ project/SoundConductor/src/jp/hiiragi/managers/soundConductor/ApplyFadeSoundData.as
@@ -3,7 +3,7 @@
 	import flash.media.SoundChannel;

-	public class ApplyFadeSoundData
+	internal class ApplyFadeSoundData
 	{

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4736
Author:   chaase@adobe.com
Date:     2009-01-29T19:31:04.898445Z

Log Message:
-----------
API improvements in some of the effects classes, such as:

- PropertyValuesHolder renamed to AnimationProperty
	- Also, values[] array changed to valueFrom and valueTo Objects
	- Also, 'delta' property changed to valueBy Object property
- FxAnimate.propertyValuesList renamed to FxAnimate.animationProperties
- Constant interpolator renamed Linear (old Linear interpolator went away)
- ColorInterpolator renamed RGBInterpolator
- HSBInterpolator now exists (not used by default: FxAnimateColor uses RGBInterpolator)
- HSBColor: new data structure in mx.utils for holding HSB colors and converting from/to RGB
- various changes to *Instance classes in effects (but these are not generally used externally)

QE Notes: Mustella tests will break due to class and property renames. QE is fixing these issues and a follow-up putback to Mustella is expected
Doc Notes: None
Bugs: -
Reviewer: Gordon
tests: checkintests, Mustella: tests/Effects tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxFadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/Constant.as" copyfrom-rev="4610" action="R">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/ColorInterpolator.as" copyfrom-rev="4610" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/RGBInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/HSBColor.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/ColorInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/ArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateShaderTransitionInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/Constant.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/IInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/NumberInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/interpolation/EaseInOut.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/AnimationProperty.as</path>

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

--- frameworks/projects/framework/src/FrameworkClasses.as
+++ frameworks/projects/framework/src/FrameworkClasses.as
@@ -140,6 +140,7 @@
 	import mx.utils.DescribeTypeCache; DescribeTypeCache;
 	import mx.utils.DescribeTypeCacheRecord; DescribeTypeCacheRecord;
 	import mx.utils.DisplayUtil; DisplayUtil;
+    import mx.utils.HSBColor; HSBColor;
 	import mx.utils.OrderedObject; OrderedObject;
 	import mx.utils.XMLUtil; XMLUtil;
 	import mx.utils.Base64Decoder; Base64Decoder;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

--- frameworks/projects/framework/src/FrameworkClasses.as
+++ frameworks/projects/framework/src/FrameworkClasses.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

--- frameworks/projects/spark/src/spark/core/IViewport.as
+++ frameworks/projects/spark/src/spark/core/IViewport.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 18215
Author:   cframpto@adobe.com
Date:     2010-10-19T14:50:14.127382Z

Log Message:
-----------
Label should not use anything in TextUtil because it brings in too much of TLF.  Refactor TextUtil a bit so it minimizes its dependencies on TLF.

QE notes:
Doc notes:
Bugs: SDK-28241
Reviewer: Alex
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>

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

--- frameworks/projects/spark/src/spark/utils/TextUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextUtil.as
@@ -14,16 +14,11 @@

 import flash.text.engine.FontDescription;
 import flash.text.engine.FontLookup;
-import flash.text.engine.TextBlock;
 import flash.text.engine.TextLine;
 import flash.text.engine.TextLineValidity;

 import flashx.textLayout.compose.ISWFContext;
 import flashx.textLayout.compose.TextLineRecycler;
-import flashx.textLayout.elements.FlowLeafElement;
-import flashx.textLayout.elements.ParagraphElement;
-import flashx.textLayout.elements.SpanElement;
-import flashx.textLayout.elements.TextFlow;
 import flashx.textLayout.formats.ITextLayoutFormat;

 import mx.core.EmbeddedFont;
@@ -33,7 +28,6 @@
 import mx.core.mx_internal;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
-import mx.utils.StringUtil;

 use namespace mx_internal;

@@ -47,109 +41,12 @@
 public class TextUtil
 {
     include "../core/Version.as";
-
+
     //--------------------------------------------------------------------------
     //
     //  Class methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    public static function extractText(textFlow:TextFlow):String
-    {
-        var text:String = "";
-
-        var leaf:FlowLeafElement = textFlow.getFirstLeaf();
-        while (leaf)
-        {
-            var p:ParagraphElement = leaf.getParagraph();
-            for (;;)
-            {
-                text += leaf.text;
-                leaf = leaf.getNextLeaf(p);
-                if (!leaf)
-                    break;
-            }
-            leaf = p.getLastLeaf().getNextLeaf(null);
-            if (leaf)
-                text += "\n";
-        }
-
-        return text;
-    }
-
-    /**
-     *  @private
-     */
-    public static function getNumberOrPercentOf(value:Object,
-                                                n:Number):Number
-    {
-        // If 'value' is a Number like 10.5, return it.
-        if (value is Number)
-            return Number(value);
-
-        // If 'value' is a percentage String like "10.5%",
-        // return that percentage of 'n'.
-        if (value is String)
-        {
-            var len:int = String(value).length;
-            if (len >= 1 && value.charAt(len - 1) == "%")
-            {
-                var percent:Number = Number(value.substring(0, len - 1));
-                return percent / 100 * n;
-            }
-        }
-
-        // Otherwise, return NaN.
-        return NaN;
-    }
-
-    /**
-     *  @private
-     */
-    public static function obscureTextFlow(textFlow:TextFlow,
-                                           obscurationChar:String):void
-    {
-        for (var leaf:FlowLeafElement = textFlow.getFirstLeaf();
-             leaf;
-             leaf = leaf.getNextLeaf())
-        {
-            if (leaf is SpanElement)
-            {
-                var leafText:String = SpanElement(leaf).text;
-                if (leafText)
-                {
-                	SpanElement(leaf).text = StringUtil.repeat(
-                		obscurationChar, leafText.length);
-                }
-            }
-        }
-    }
-
-    /**
-     *  @private
-     */
-    public static function unobscureTextFlow(textFlow:TextFlow,
-                                             text:String):void
-    {
-        for (var leaf:FlowLeafElement = textFlow.getFirstLeaf();
-             leaf;
-             leaf = leaf.getNextLeaf())
-        {
-            if (leaf is SpanElement)
-            {
-                var span:SpanElement = leaf as SpanElement;
-
-                // leaf.textLength may have paragraph terminator in length so
-                // use length of text in the span
-                var t:String = text.substr(leaf.getAbsoluteStart(),
-                                          span.text.length);
-                span.text = t;
-            }
-        }
-    }

     /**
      *  @private


added validation for provided account ID

--- source/actionscript/agnostic/src/eu/alebianco/air/extensions/analytics/GATracker.as
+++ source/actionscript/agnostic/src/eu/alebianco/air/extensions/analytics/GATracker.as
@@ -43,7 +43,8 @@
 	public final class GATracker implements IDisposable
 	{
 		private static const VERSION:String = "1.1";
-
+
+        private static const GA_ID_VALIDATOR:RegExp = /^UA-\d{4,10}-\d{1,4}$/i
 		private static const EXTENSION_ID:String = "eu.alebianco.air.extensions.analytics.NativeGATracker";

 		private static var instance:GATracker;
@@ -175,7 +176,11 @@

 		public function startNewSession(accountID:String, interval:int = 20):void
 		{
-			handleResult(context.call("startNewSession", accountID, interval));
+            if (GA_ID_VALIDATOR.test(accountID)) {
+			    handleResult(context.call("startNewSession", accountID.toUpperCase(), interval));
+            } else {
+                throw new ArgumentError("The provided account ID is invalid, it should follow the format UA-00000-0.")
+            }
 		}

 		public function stopSession():void


- feature: The Label component now catches exceptions caused by malformed XML content and displays a red error message.

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

--- src/reprise/controls/Label.as
+++ src/reprise/controls/Label.as
@@ -304,7 +304,15 @@

 				var labelString : String = m_labelXML.toXMLString();
 				labelString = resolveBindings(labelString);
-				var labelXML : XML = new XML(labelString);
+				var labelXML : XML;
+				try
+				{
+					labelXML = new XML(labelString);
+				}
+				catch (error : Error)
+				{
+					labelXML = new XML('
malformed content
');
+				}
 				labelXML.normalize();
 				cleanNode(labelXML, m_selectorPath, m_rootElement.styleSheet);
 				//TODO: check if condenseWhite = true is ok to use!