Transferred from the Adobe Open Source Subversion Repository

Revision: 4959
Author:   gosmith@adobe.com
Date:     2009-02-14T01:10:57.069625Z

Log Message:
-----------
Removed the undocumented TextBlockComposer and TextFlowComposer classes. These were helper classes for TextBox and TextGraphic, respectively. Their functionality has been rolled into TextBox, TextGraphic, and TextGraphicElement. This should improve both memory and speed since the helper objects no longer have to be created. It also allows more code to be shared in TextGraphicElement.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Carol

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

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -13,14 +13,23 @@
 {

 import flash.display.DisplayObjectContainer;
+import flash.display.Graphics;
+import flash.display.Shape;
 import flash.geom.Rectangle;
+import flash.text.engine.EastAsianJustifier;
 import flash.text.engine.ElementFormat;
 import flash.text.engine.FontDescription;
+import flash.text.engine.FontMetrics;
 import flash.text.engine.Kerning;
+import flash.text.engine.LineJustification;
 import flash.text.engine.TabStop;
+import flash.text.engine.SpaceJustifier;
+import flash.text.engine.TextBlock;
+import flash.text.engine.TextElement;
+import flash.text.engine.TextLine;
+import flash.text.engine.TextLineValidity;

 import mx.core.mx_internal;
-import mx.graphics.baseClasses.TextBlockComposer;
 import mx.graphics.baseClasses.TextGraphicElement;

 [DefaultProperty("text")]
@@ -56,6 +65,37 @@
 {
     include "../core/Version.as";

+	//--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    // We can re-use single instances of a few FTE classes over and over,
+    // since they just serve as a factory for the TextLines that we care about.
+
+    /**
+	 *  @private
+	 */
+	private static var staticTextBlock:TextBlock = new TextBlock();
+
+	/**
+	 *  @private
+	 */
+	private static var staticTextElement:TextElement = new TextElement();
+
+    /**
+     *  @private
+     */
+    private static var staticSpaceJustifier:SpaceJustifier =
+        new SpaceJustifier();
+
+    /**
+     *  @private
+     */
+    private static var staticEastAsianJustifier:EastAsianJustifier =
+        new EastAsianJustifier();
+
     //--------------------------------------------------------------------------
     //
     //  Class methods
@@ -104,65 +144,10 @@

     //--------------------------------------------------------------------------
     //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private var textBlockComposer:TextBlockComposer = new TextBlockComposer();
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  baselinePosition
-    //----------------------------------
-
-    [Inspectable(category="General")]
-
-    /**
-     *  @private
-     */
-    override public function get baselinePosition():Number
-    {
-        mx_internal::validateBaselinePosition();
-
-        // Return the baseline of the first line of composed text.
-        return (textBlockComposer.textLines.length > 0) ?
-            textBlockComposer.textLines[0].y : 0;
-    }
-
-    //--------------------------------------------------------------------------
-    //
     //  Overridden methods: GraphicElement
     //
     //--------------------------------------------------------------------------

-    /**
-     *  @private
-     */
-    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 r:Rectangle = textBlockComposer.bounds;
-        measuredWidth = Math.ceil(r.width);
-        measuredHeight = Math.ceil(r.height);
-    }
-
     /**
      *  @private
      */
@@ -173,29 +158,55 @@

         // 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.
+        // In that case, composeTextLines() must not be called.
         if (!mx_internal::styleChainInitialized)
             return;

-        var overset:Boolean = compose(unscaledWidth, unscaledHeight);
-
-        mx_internal::clip(overset, unscaledWidth, unscaledHeight);
+        composeTextLines(unscaledWidth, unscaledHeight);
+
+        mx_internal::clip(unscaledWidth, unscaledHeight);
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function composeTextLines(width:Number = NaN,
+												 height:Number = NaN):void
+    {
+        var elementFormat:ElementFormat = createElementFormat();
+
+		// Set the composition bounds to be used by createTextLines().
+		// If the width or height is NaN, it will be computed by this method
+		// by the time it returns.
+		// The bounds are then used by the addTextLines() method
+		// to determine the isOverset flag.
+		// The composition bounds are also reported by the measure() method.
+		var bounds:Rectangle = mx_internal::bounds;
+        bounds.x = 0;
+        bounds.y = 0;
+        bounds.width = width;
+        bounds.height = height;
+
+        mx_internal::removeTextLines();
+		createTextLines(elementFormat);
+        mx_internal::addTextLines(DisplayObjectContainer(displayObject));
     }

-    //--------------------------------------------------------------------------
-    //
-    //  Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private function compose(width:Number = NaN, height:Number = NaN):Boolean
-    {
-        var container:DisplayObjectContainer =
-            DisplayObjectContainer(displayObject);
-
+	/**
+	 *  @private
+	 *  Creates an ElementFormat (and its FontDescription)
+	 *  based on the TextBox's CSS styles.
+	 *  These must be recreated each time because FTE
+	 *  does not allow them to be reused.
+	 */
+	private function createElementFormat():ElementFormat
+	{
 		// When you databind to a text formatting style on a TextBox,
 		// as in <TextBox fontFamily="{fontCombo.selectedItem}"/>
 		// the databinding can cause the style to be set to null.
@@ -282,38 +293,9 @@
         s = getStyle("typographicCase");
         if (s != null)
         	elementFormat.typographicCase = s;
-
-        textBlockComposer.removeTextLines(container);
-
-        var bounds:Rectangle = textBlockComposer.bounds;
-        bounds.x = 0;
-        bounds.y = 0;
-        bounds.width = width;
-        bounds.height = height;
-
-        textBlockComposer.direction = getStyle("direction");
-        textBlockComposer.justificationRule = getStyle("justificationRule");
-        textBlockComposer.justificationStyle = getStyle("justificationStyle");
-        textBlockComposer.lineBreak = getStyle("lineBreak");
-        textBlockComposer.lineHeight = getStyle("lineHeight");
-        textBlockComposer.lineThrough = getStyle("lineThrough");
-        textBlockComposer.paddingBottom = getStyle("paddingBottom");
-        textBlockComposer.paddingLeft = getStyle("paddingLeft");
-        textBlockComposer.paddingRight = getStyle("paddingRight");
-        textBlockComposer.paddingTop = getStyle("paddingTop");
-        setTabStops(textBlockComposer);
-        textBlockComposer.textAlign = getStyle("textAlign");
-        textBlockComposer.textAlignLast = getStyle("textAlignLast");
-        textBlockComposer.textDecoration = getStyle("textDecoration");
-        textBlockComposer.textJustify = getStyle("textJustify");
-        textBlockComposer.verticalAlign = getStyle("verticalAlign");
-
-        textBlockComposer.composeText(text, elementFormat);
-
-        textBlockComposer.addTextLines(container);
-
-        return textBlockComposer.isOverset;
-    }
+
+		return elementFormat;
+	}

     /**
      *  @private
@@ -355,34 +337,323 @@
             elementFormat.trackingRight = value;
     }

-    /**
-     *  @private
-     */
-    private function setTabStops(textBlockComposer:TextBlockComposer):void
-    {
-        var value:* = getStyle("tabStops");
-        var tabStops:Vector.<TabStop>;
-
-        if (value is Vector.<TabStop>)
+	/**
+	 *  @private
+	 *  Stuffs the specified text and formatting info into a TextBlock
+     *  and uses it to create as many TextLines as fit into the bounds.
+	 */
+	private function createTextLines(elementFormat:ElementFormat):void
+	{
+		// Get CSS styles that affect a TextBlock and its justifier.
+		var direction:String = getStyle("direction");
+        var justificationRule:String = getStyle("justificationRule");
+        var justificationStyle:String = getStyle("justificationStyle");
+		var tabStops:* = getStyle("tabStops");
+        var textAlign:String = getStyle("textAlign");
+        var textAlignLast:String = getStyle("textAlignLast");
+        var textJustify:String = getStyle("textJustify");
+
+		// Set the TextBlock's content.
+        staticTextElement.text = text;
+		staticTextElement.elementFormat = elementFormat;
+		staticTextBlock.content = staticTextElement;
+
+        // And its bidiLevel.
+		staticTextBlock.bidiLevel = direction == "ltr" ? 0 : 1;
+
+		// And its justifier.
+		var lineJustification:String;
+		if (textAlign == "justify")
+		{
+			lineJustification = textAlignLast == "justify" ?
+				                LineJustification.ALL_INCLUDING_LAST :
+				                LineJustification.ALL_BUT_LAST;
+		}
+		else
         {
-            tabStops = value;
+			lineJustification = LineJustification.UNJUSTIFIED;
         }
-        else if (value is Array)
+		if (justificationRule == "space")
+		{
+            staticSpaceJustifier.lineJustification = lineJustification;
+			staticSpaceJustifier.letterSpacing = textJustify == "distribute";
+            staticTextBlock.textJustifier = staticSpaceJustifier;
+		}
+		else
+		{
+            staticEastAsianJustifier.lineJustification = lineJustification;
+            staticEastAsianJustifier.justificationStyle = justificationStyle;
+
+            staticTextBlock.textJustifier = staticEastAsianJustifier;
+		}
+
+		// And its tabStops.
+		var tabStopsVector:Vector.<TabStop>;
+        if (tabStops is Vector.<TabStop>)
         {
-            var n:int = value.length;
-            tabStops = new Vector.<TabStop>(n);
+            tabStopsVector = tabStops;
+        }
+        else if (tabStops is Array)
+        {
+            var n:int = tabStops.length;
+            tabStopsVector = new Vector.<TabStop>(n);
             for (var i:int = 0; i < n; i++)
             {
-                tabStops[i] = value[i];
+                tabStopsVector[i] = tabStops[i];
             }
         }
         else
         {
-            tabStops = new Vector.<TabStop>();
+            tabStopsVector = new Vector.<TabStop>();
         }
-
-        textBlockComposer.tabStops = tabStops;
-    }
+		staticTextBlock.tabStops = tabStopsVector;
+
+		// Then create TextLines using this TextBlock.
+		createTextLinesFromTextBlock(staticTextBlock);
+	}
+
+	/**
+	 *  @private
+	 */
+	private function createTextLinesFromTextBlock(textBlock:TextBlock):void
+	{
+		// Clear any previously generated TextLines from the textLines Array.
+		mx_internal::textLines.length = 0;
+
+		// Get CSS styles for formats that we have to apply ourselves.
+		var direction:String = getStyle("direction");
+        var lineBreak:String = getStyle("lineBreak");
+        var lineHeight:Object = getStyle("lineHeight");
+        var lineThrough:Boolean = getStyle("lineThrough");
+        var paddingBottom:Number = getStyle("paddingBottom");
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingRight:Number = getStyle("paddingRight");
+        var paddingTop:Number = getStyle("paddingTop");
+        var textAlign:String = getStyle("textAlign");
+        var textAlignLast:String = getStyle("textAlignLast");
+        var textDecoration:String = getStyle("textDecoration");
+        var verticalAlign:String = getStyle("verticalAlign");
+
+		var bounds:Rectangle = mx_internal::bounds;
+
+		var innerWidth:Number = bounds.width - paddingLeft - paddingRight;
+		var innerHeight:Number = bounds.height - paddingTop - paddingBottom;
+
+		if (isNaN(innerWidth))
+			innerWidth = TextLine.MAX_LINE_WIDTH;
+
+        var maxLineWidth:Number = lineBreak == "explicit" ?
+                                  TextLine.MAX_LINE_WIDTH :
+                                  innerWidth;
+
+		if (innerWidth < 0 || innerHeight < 0 || !textBlock)
+		{
+			bounds.width = 0;
+			bounds.height = 0;
+			return;
+		}
+
+		var fontSize:Number = staticTextElement.elementFormat.fontSize;
+        var actualLineHeight:Number;
+        if (lineHeight is Number)
+        {
+            actualLineHeight = Number(lineHeight);
+        }
+        else if (lineHeight is String)
+        {
+            var len:int = lineHeight.length;
+            var percent:Number =
+                Number(String(lineHeight).substring(0, len - 1));
+            actualLineHeight = percent / 100 * fontSize;
+        }
+        if (isNaN(actualLineHeight))
+            actualLineHeight = 1.2 * fontSize;
+
+        var maxTextWidth:Number = 0;
+		var totalTextHeight:Number = 0;
+
+		var n:int = 0;
+		var nextTextLine:TextLine;
+		var nextY:Number = 0;
+		var textLine:TextLine;
+        var createdAllLines:Boolean = false;
+
+		// Generate TextLines, stopping when we run out of text
+		// or reach the bottom of the requested bounds.
+		// In this loop the lines are positioned within the rectangle
+		// (0, 0, innerWidth, innerHeight), with top-left alignment.
+		while (true)
+		{
+			nextTextLine = textBlock.createTextLine(textLine, maxLineWidth);
+			if (!nextTextLine)
+            {
+				createdAllLines = true;
+                break;
+            }
+
+			// Determine the natural baseline position for this line.
+			// Note: The y coordinate of a TextLine is the location
+			// of its baseline, not of its top.
+            nextY += (n == 0 ? nextTextLine.ascent : actualLineHeight);
+
+			// If it is completely outside the rectangle, we're done.
+			if (nextY - nextTextLine.ascent > innerHeight)
+				break;
+
+			// We'll keep this line. Put it into the textLines array.
+			textLine = nextTextLine;
+			mx_internal::textLines[n++] = textLine;
+
+			// Assign its location based on left/top alignment.
+			// Its x position is 0 by default.
+			textLine.y = nextY;
+
+			// Keep track of the maximum textWidth
+			// and the accumulated textHeight of the TextLines.
+			maxTextWidth = Math.max(maxTextWidth, textLine.textWidth);
+			totalTextHeight += textLine.textHeight;
+
+            if (lineThrough || textDecoration == "underline")
+            {
+                // FTE doesn't render strikethroughs or underlines,
+                // but it can tell us where to draw them.
+                // You can't draw in a TextLine but it can have children,
+                // so we create a child Shape to draw them in.
+
+                var elementFormat:ElementFormat =
+                    TextElement(textBlock.content).elementFormat;
+                var fontMetrics:FontMetrics = elementFormat.getFontMetrics();
+
+                var shape:Shape = new Shape();
+                var g:Graphics = shape.graphics;
+                if (lineThrough)
+                {
+                    g.lineStyle(fontMetrics.strikethroughThickness,
+                                elementFormat.color, elementFormat.alpha);
+                    g.moveTo(0, fontMetrics.strikethroughOffset);
+                    g.lineTo(textLine.textWidth, fontMetrics.strikethroughOffset);
+                }
+                if (textDecoration == "underline")
+                {
+                    g.lineStyle(fontMetrics.underlineThickness,
+                                elementFormat.color, elementFormat.alpha);
+                    g.moveTo(0, fontMetrics.underlineOffset);
+                    g.lineTo(textLine.textWidth, fontMetrics.underlineOffset);
+                }
+
+                textLine.addChild(shape);
+            }
+		}
+
+		// At this point, n is the number of lines that fit
+		// and textLine is the last line that fit.
+
+		if (n == 0)
+		{
+			bounds.width = paddingLeft + paddingRight;
+			bounds.height = paddingTop + paddingBottom;
+			return;
+		}
+
+		if (isNaN(bounds.width))
+            bounds.width = paddingLeft + maxTextWidth + paddingRight;
+        if (isNaN(bounds.height))
+            bounds.height = paddingTop + textLine.y +
+							textLine.descent + paddingBottom;
+
+		innerWidth = bounds.width - paddingLeft - paddingRight;
+		innerHeight = bounds.height - paddingTop - paddingBottom;
+
+        var leftAligned:Boolean =
+            textAlign == "start" && direction == "ltr" ||
+            textAlign == "end" && direction == "rtl" ||
+            textAlign == "left" ||
+            textAlign == "justify";
+        var centerAligned:Boolean = textAlign == "center";
+        var rightAligned:Boolean =
+            textAlign == "start" && direction == "rtl" ||
+            textAlign == "end" && direction == "ltr" ||
+            textAlign == "right";
+
+		// Calculate loop constants for horizontal alignment.
+		var leftOffset:Number = bounds.left + paddingLeft;
+		var centerOffset:Number = leftOffset + innerWidth / 2;
+		var rightOffset:Number =  leftOffset + innerWidth;
+
+		// Calculate loop constants for vertical alignment.
+		var topOffset:Number = bounds.top + paddingTop;
+		var bottomOffset:Number = innerHeight - (textLine.y + textLine.descent);
+		var middleOffset:Number = bottomOffset / 2;
+		bottomOffset += topOffset;
+		middleOffset += topOffset;
+		var leading:Number = (innerHeight - totalTextHeight) / (n - 1);
+
+		var previousTextLine:TextLine;
+		var y:Number = 0;
+
+        var lastLineIsSpecial:Boolean =
+            textAlign == "justify" && createdAllLines;
+
+		// Make each line static (which decouples it from the TextBlock
+		// that created it and makes it consume less memory)
+		// and reposition each line if necessary
+		// based on the horizontal and vertical alignment.
+		for (var i:int = 0; i < n; i++)
+		{
+			textLine = TextLine(mx_internal::textLines[i]);
+
+			textLine.validity = TextLineValidity.STATIC;
+
+			// If textAlign is "justify" and there is more than one line,
+            // the last one (if we created it) gets horizontal aligned
+            // according to textAlignLast.
+            if (lastLineIsSpecial && i == n - 1)
+            {
+                leftAligned =
+                    textAlignLast == "start" && direction == "ltr" ||
+                    textAlignLast == "end" && direction == "rtl" ||
+                    textAlignLast == "left" ||
+                    textAlignLast == "justify";
+                centerAligned = textAlignLast == "center";
+                rightAligned =
+                    textAlignLast == "start" && direction == "rtl" ||
+                    textAlignLast == "end" && direction == "ltr" ||
+                    textAlignLast == "right";
+            }
+
+            if (leftAligned)
+				textLine.x = leftOffset;
+			else if (centerAligned)
+				textLine.x = centerOffset - textLine.textWidth / 2;
+			else if (rightAligned)
+				textLine.x = rightOffset - textLine.textWidth;
+
+			if (verticalAlign == "top")
+			{
+				textLine.y += topOffset;
+			}
+			else if (verticalAlign == "middle")
+			{
+				textLine.y += middleOffset;
+			}
+			else if (verticalAlign == "bottom")
+			{
+				textLine.y += bottomOffset;
+			}
+			else if (verticalAlign == "justify")
+			{
+				// Determine the natural baseline position for this line.
+				// Note: The y coordinate of a TextLine is the location
+				// of its baseline, not of its top.
+				y += i == 0 ?
+					 topOffset + textLine.ascent :
+					 previousTextLine.descent + leading + textLine.ascent;
+
+				textLine.y = y;
+				previousTextLine = textLine;
+			}
+		}
+	}
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 21261
Author:   smgilson@adobe.com
Date:     2011-05-16T16:15:21.533245Z

Log Message:
-----------
ASDoc fixes:
- Fix incorrect product tag on GroupBase.containsElement()
- Fix incorrect param order for BitmapUtil.getSnapshotWithPadding()
- Add missing <p> tag to ViewNavigatorApplicationBase.as

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as</path>

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

--- frameworks/projects/spark/src/spark/utils/BitmapUtil.as
+++ frameworks/projects/spark/src/spark/utils/BitmapUtil.as
@@ -44,16 +44,16 @@
      *  Creates a BitmapData representation of the target object.
      *
      *  @param target The object to capture in the resulting BitmapData
+     *
+     *  @param padding Padding, in pixels, around to target to be included in the bitmap.
+     *
+     *  @param propagateColorTransform If true, the target's color transform will
+     *  be applied to the bitmap capture operation.
      *
      *  @param bounds If non-null, this Rectangle will be populated with
      *  the visible bounds of the object, relative to the object itself.
-     *
-     *  @param padding Padding, in pixels, around to target to be included in the bitmap.
      *
      *  @return A BitmapData object containing the image.
-     *
-     *  @param propagateColorTransform If true, the target's color transform will
-     *  be applied to the bitmap capture operation.
      *
      *  @throws SecurityError The target object and  all of its child
      *  objects do not come from the same domain as the caller,


Transferred from the Adobe Open Source Subversion Repository

Revision: 21351
Author:   deeptika@adobe.com
Date:     2011-06-08T05:49:31.966086Z

Log Message:
-----------
Filtering 0 values for column and bar charts in case of stacked charts

QE notes:
Doc notes:
Bugs: FLEXDMV-2478 (Chart bars with zero data are drawn (and have datatips) although they have no values.)
Reviewer:
Tests run: Checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/BarSeries.as</path>

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

--- frameworks/projects/charts/src/mx/charts/series/BarSeries.as
+++ frameworks/projects/charts/src/mx/charts/series/BarSeries.as
@@ -1695,21 +1695,16 @@
                 {
                     stackedValue = 0;
                 }
-                if (xValue == 0)
-                {
-                    chartItem.xValue = 0;
-                    chartItem.minValue = 0;
-                }
-                else
-                {
-                    chartItem.xValue = xValue + stackedValue;
-                    chartItem.minValue = stackedValue;
-                }
-                xValue += stackedValue;
-                stackedYValueDictionary[yValue] = xValue;
-                chartItem.yValue = yValue;
-                maxValue = Math.max(maxValue,xValue);
-
+				if (xValue != 0)
+				{
+					chartItem.xValue = xValue + stackedValue;
+					chartItem.minValue = stackedValue;
+
+					xValue += stackedValue;
+					stackedYValueDictionary[yValue] = xValue;
+					chartItem.yValue = yValue;
+					maxValue = Math.max(maxValue,xValue);
+				}
                 i++;
                 cursor.moveNext();
             }
@@ -1816,8 +1811,7 @@
                 }
                 if (xValue == 0)
                 {
-                    chartItem.xValue = 0;
-                    chartItem.minValue = 0;
+                    // Do nothing
                 }
                 else
                 {
@@ -1825,7 +1819,6 @@
                     chartItem.minValue = stackedValue;
                 }
                 xValue += stackedValue;
-                //chartItem.minValue = stackedValue;
                 if (xValue >= 0)
                 {
                     stackedPosYValueDictionary[yValue] = xValue;
@@ -1836,8 +1829,7 @@
                     stackedNegYValueDictionary[yValue] = xValue;
                     minValue = Math.min(minValue,xValue);
                 }
-                chartItem.yValue = yValue;
-                //chartItem.xValue = xValue;
+                chartItem.yValue = yValue;
                 i++;
                 cursor.moveNext();
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8189
Author:   egeorgie@adobe.com
Date:     2009-06-24T19:16:22.451500Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-21187 VideoElement doesn't respect horizontalCenter or verticalCenter property

Fix: Add a check in the Preloader to not initialize the application, until the stage is resized properly.

Doc Notes: None
Bugs: SDK-21187
Reviewer: Alex
tests: checkintests, mustella (DownloadProgressBar)

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as

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

--- frameworks/projects/framework/src/mx/preloaders/Preloader.as
+++ frameworks/projects/framework/src/mx/preloaders/Preloader.as
@@ -505,6 +505,21 @@
 				}
 			}

+            // Sometimes the stage size doesn't get resized right away,
+            // wait till we have the correct size - SDK-21187
+            try
+            {
+                var stageWidth:Number = stage.stageWidth;
+                var stageHeight:Number = stage.stageHeight
+            }
+            catch (e:Error)
+            {
+                stageWidth = loaderInfo.width;
+                stageHeight = loaderInfo.height;
+            }
+            if (stageWidth == 0 && stageHeight == 0)
+                return;
+
 			timer.removeEventListener(TimerEvent.TIMER, timerHandler);

 			// Stop the timer.


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/utils/IXMLNotifiable.as
+++ frameworks/projects/framework/src/mx/utils/IXMLNotifiable.as
@@ -16,6 +16,11 @@

 /**
  *  The IXMLNotifiable interface is for internal use only.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public interface IXMLNotifiable
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12280
Author:   smgilson@adobe.com
Date:     2009-11-30T17:45:36.448234Z

Log Message:
-----------
ASDoc updates in preperation for localization

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.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/spark/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/WipeDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/CrossFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/IAnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/SetAction.as</path>

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

--- frameworks/projects/spark/src/spark/effects/AnimateFilter.as
+++ frameworks/projects/spark/src/spark/effects/AnimateFilter.as
@@ -52,6 +52,8 @@
  *  </pre>
  *
  *  @see spark.effects.supportClasses.AnimateFilterInstance
+ *
+ *  @includeExample examples/AnimateFilterEffectExample.mxml
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


JPEG header can be of any size, so make sure we examine just enough (1024K) to find SOFn marker.

--- src/flash/plupload/src/com/mxi/image/JPEG.as
+++ src/flash/plupload/src/com/mxi/image/JPEG.as
@@ -36,9 +36,11 @@

 		public function info() : Object
 		{
-			var idx:uint = 0, marker:uint, length:uint;
+			var idx:uint = 0, marker:uint, length:uint, limit:uint;
+
+			limit = Math.min(1048576, _br.length);

-			while (idx <= 65536) {
+			while (idx <= limit) { // make sure we examine just enough data
 				marker = _br.SHORT(idx += 2);
 				if (marker >= 0xFFC0 && marker <= 0xFFC3) { // SOFn
 					idx += 5; // marker (2 bytes) + length (2 bytes) + Sample precision (1 byte)


- bugfix: The check for changed dimensions of an element didn't take margins into account that collapsed out from children

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

--- src/reprise/ui/UIComponent.as
+++ src/reprise/ui/UIComponent.as
@@ -1600,7 +1600,7 @@
 				m_borderBoxWidth +
 				m_currentStyles.marginLeft + m_currentStyles.marginRight,
 				m_borderBoxHeight +
-				m_currentStyles.marginTop + m_currentStyles.marginBottom));
+				m_currentStyles.collapseMarginTop + m_currentStyles.collapsedMarginBottom));

 			var parentReflowNeeded : Boolean = false;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2072
Author:   clucier@adobe.com
Date:     2008-06-13T17:31:23.718875Z

Log Message:
-----------
Fix for validation of null value, when required property is set to 'false'. We now issue a result event properly.
QA: Yes
Bugs: SDK-15004

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/Validator.as

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

--- frameworks/projects/framework/src/mx/validators/Validator.as
+++ frameworks/projects/framework/src/mx/validators/Validator.as
@@ -809,17 +809,23 @@
         if (value == null)
             value = getValueFromSource();

-        // if required flag is true and there is no value
-        // we need to generate a required field error
         if (isRealValue(value) || required)
         {
+            // Validate if the target is required or our value is non-null.
             return processValidation(value, suppressEvents);
         }
         else
         {
-            // Just return valid
-            return new ValidationResultEvent(ValidationResultEvent.VALID);
-        }
+            // We assume if value is null and required is false that
+            // validation was successful.
+            var resultEvent:ValidationResultEvent =
+                new ValidationResultEvent(ValidationResultEvent.VALID);
+            if (!suppressEvents && _enabled)
+            {
+            	dispatchEvent(resultEvent);
+            }
+            return resultEvent;
+        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 3307
Author:   matamel@adobe.com
Date:     2008-09-23T02:38:31.193018Z

Log Message:
-----------
Feature: Message throttling - message priority sub-feature.
QA: Not yet.
Doc: Not yet.
Checkintests: Pass

Details: Adding message priority support to BlazeDS client code as outlined in the spec. This check-in enables setting the message priority at the Producer and message levels but the priority is not used in FlexClientOutboundQueueProcessor yet.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/AbstractMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Producer.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as
+++ frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as
@@ -177,7 +177,47 @@
             dispatchEvent(event);
         }
     }
-
+
+    //----------------------------------
+    //  priority
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _priority:int = -1;
+
+    [Bindable(event="propertyChange")]
+
+    /**
+     *  The default message priority for the messages sent by the Producer. The
+     *  valid values are 0 to 9 (0 being lowest) and -1 means that the Producer
+     *  does not have a priority set. Note that if the message already has a
+     *  priority defined, that takes precedence over Producer's priority.
+     */
+    public function get priority():int
+    {
+        return _priority;
+    }
+
+    /**
+     *  @private
+     */
+    public function set priority(value:int):void
+    {
+        if (_priority != value)
+        {
+            if (value < 0)
+                value = 0;
+            else if (value > 9)
+                value = 9;
+
+            var event:PropertyChangeEvent = PropertyChangeEvent.createUpdateEvent(this, "priority", _priority, value);
+            _priority = value;
+            dispatchEvent(event);
+        }
+    }
+
     //----------------------------------
     //  reconnectAttempts
     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 3881
Author:   gruehle@adobe.com
Date:     2008-10-24T20:07:42.180742Z

Log Message:
-----------
New focus skin, and focus skin handling for gumbo components.

This checkin also fixes focus issues with Spinner and NumericStepper. These components set their skin parts focusEnabled="false".

QE Notes: Joann has excluded the mustella tests that fail due to this change, and will check in updates.
Doc Notes: None
Bugs: SDK-17284
Reviewer: Ely

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="A">/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/skins/spark/FxFocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
@@ -0,0 +1,147 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.skins.spark
+{
+
+import flash.display.Bitmap;
+import flash.display.BitmapData;
+import flash.display.IBitmapDrawable;
+import flash.filters.GlowFilter;
+import flash.geom.ColorTransform;
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import mx.components.baseClasses.FxComponent;
+import mx.components.FxCheckBox;
+import mx.components.FxRadioButton;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+/**
+ *  Focus skins for Fx components.
+ */
+public class FxFocusSkin extends UIComponent
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    // TODO: Make this a style property?
+    private const FOCUS_THICKNESS:int = 2;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    private static var colorTransform:ColorTransform = new ColorTransform(
+                1.01, 1.01, 1.01, 2);
+    private static var glowFilter:GlowFilter = new GlowFilter(
+                0x70B2EE, 0.85, 5, 5, 3, 1, false, true);
+    private static var rect:Rectangle = new Rectangle();;
+    private static var filterPt:Point = new Point();
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function FxFocusSkin()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Bitmap capture of the focused component. This bitmap includes a glow
+     *  filter that shows the focus glow.
+     */
+    private var bitmap:Bitmap;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        // Grab a bitmap of the focused object
+        var focusObject:Object = focusManager.getFocus();
+        var bitmapData:BitmapData = new BitmapData(
+                    focusObject.width + (FOCUS_THICKNESS * 2),
+                    focusObject.height + (FOCUS_THICKNESS * 2), true, 0);
+        var m:Matrix = new Matrix();
+
+        // If the focus object already has a focus skin, make sure it is hidden.
+        if (focusObject is FxComponent && focusObject.mx_internal::focusObj)
+            focusObject.mx_internal::focusObj.visible = false;
+
+        // Temporary solution for focus drawing on CheckBox and RadioButton components.
+        // Hide the label before drawing the focus.
+        // TODO: Figure out a better solution.
+        var hidLabelField:Boolean = false;
+        if ((focusObject is FxCheckBox || focusObject is FxRadioButton)
+             && focusObject.labelField)
+        {
+            focusObject.labelField.displayObject.visible = false;
+            hidLabelField = true;
+        }
+
+        m.tx = FOCUS_THICKNESS;
+        m.ty = FOCUS_THICKNESS;
+        bitmapData.draw(focusObject as IBitmapDrawable, m);
+
+        // Show the focus skin, if needed.
+        if (focusObject is FxComponent && focusObject.mx_internal::focusObj)
+            focusObject.mx_internal::focusObj.visible = true;
+
+        // Show the label, if needed.
+        if (hidLabelField)
+            focusObject.labelField.displayObject.visible = true;
+
+        // Transform the color to remove the transparency. The GlowFilter has the "knockout" property
+        // set to true, which removes this image from the final display, leaving only the outer glow.
+        rect.x = rect.y = FOCUS_THICKNESS;
+        rect.width = focusObject.width;
+        rect.height = focusObject.height;
+        bitmapData.colorTransform(rect, colorTransform);
+
+        // Apply the glow filter
+        rect.x = rect.y = 0;
+        rect.width = bitmapData.width;
+        rect.height = bitmapData.height;
+        bitmapData.applyFilter(bitmapData, rect, filterPt, glowFilter);
+
+        if (!bitmap)
+        {
+            bitmap = new Bitmap();
+            addChild(bitmap);
+            bitmap.x = bitmap.y = -FOCUS_THICKNESS;
+        }
+
+        bitmap.bitmapData = bitmapData;
+    }
+}
+}


Add getter on context (minko_render namespace)

--- src/aerys/minko/render/resource/Context3DResource.as
+++ src/aerys/minko/render/resource/Context3DResource.as
@@ -9,6 +9,8 @@
 	import flash.display3D.textures.Texture;
 	import flash.display3D.textures.TextureBase;
 	import flash.geom.Rectangle;
+
+	import aerys.minko.ns.minko_render;

 	public final class Context3DResource
 	{
@@ -50,6 +52,11 @@
         private var _stencilActionOnBothPass                : String;
         private var _stencilActionOnDepthFail               : String;
         private var _stencilActionOnDepthPassStencilFail    : String;
+
+		minko_render function get context() : Context3D
+		{
+			return _context;
+		}

 		public function get enabledErrorChecking() : Boolean
 		{


Fixed keyboard-only support: no more crashes when no gamepads are present

--- src/com/zehfernando/input/binding/KeyActionBinder.as
+++ src/com/zehfernando/input/binding/KeyActionBinder.as
@@ -215,6 +215,10 @@
 			_onActionValueChanged = new SimpleSignal();
 			_onDevicesChanged = new SimpleSignal();

+			gameInputDevices = new Vector.<GameInputDevice>();
+			gameInputDeviceIds = new Vector.<String>();
+			gameInputDeviceDefinitions = new Vector.<AutoGamepadInfo>();
+
 			start();
 		}

@@ -261,7 +265,7 @@
 			var i:int;
 			var hasChanged:Boolean = false;

-			if ((gameInputDevices == null && GameInput.numDevices > 0) || (gameInputDevices != null && GameInput.numDevices != gameInputDevices.length)) {
+			if (GameInput.numDevices != gameInputDevices.length) {
 				hasChanged = true;
 			} else {
 				for (i = 0; i < GameInput.numDevices; i++) {
@@ -337,8 +341,8 @@
 					}

 					// Now that gameInputDeviceIds is correct, just create the list of references
-					gameInputDevices = new Vector.<GameInputDevice>(gameInputDeviceIds.length);
-					gameInputDeviceDefinitions = new Vector.<AutoGamepadInfo>(gameInputDeviceIds.length);
+					gameInputDevices.length = gameInputDeviceIds.length;
+					gameInputDeviceDefinitions.length = gameInputDeviceIds.length;
 					for (i = 0; i < gameInputDeviceIds.length; i++) {
 						gamepadPosition = newGamepadIds.indexOf(gameInputDeviceIds[i]);
 						if (gamepadPosition < 0) {
@@ -353,17 +357,17 @@
 					}
 				} else {
 					// Full refresh: create a new list of devices
-					gameInputDevices = new Vector.<GameInputDevice>();
-					gameInputDeviceIds = new Vector.<String>();
-					gameInputDeviceDefinitions = new Vector.<AutoGamepadInfo>();
+					gameInputDevices.length = GameInput.numDevices;
+					gameInputDeviceIds.length = GameInput.numDevices;
+					gameInputDeviceDefinitions.length = GameInput.numDevices;
 					for (i = 0; i < GameInput.numDevices; i++) {
-						gameInputDevices.push(GameInput.getDeviceAt(i));
+						gameInputDevices[i] = GameInput.getDeviceAt(i);
 						if (gameInputDevices[i] != null) {
-							gameInputDeviceIds.push(gameInputDevices[i].id);
-							gameInputDeviceDefinitions.push(findGamepadInfo(gameInputDevices[i]));
+							gameInputDeviceIds[i] = gameInputDevices[i].id;
+							gameInputDeviceDefinitions[i] = findGamepadInfo(gameInputDevices[i]);
 						} else {
-							gameInputDeviceIds.push(null);
-							gameInputDeviceDefinitions.push(null);
+							gameInputDeviceIds[i] = null;
+							gameInputDeviceDefinitions[i] = null;
 						}
 					}
 				}
@@ -660,8 +664,8 @@
 					gameInput.removeEventListener(GameInputEvent.DEVICE_REMOVED, onGameInputDeviceRemoved);
 				}

-				gameInputDevices = null;
-				gameInputDeviceDefinitions = null;
+				gameInputDevices.length = 0;
+				gameInputDeviceDefinitions.length = 0;
 				removeGameInputDeviceEvents();

 				_isRunning = false;


fix TransformController.updateRootLocalToWorld() and TransformController.updateLocalToWorld() to update the node's flags properly in order to make sure world to local is not still marked as init. when local to world has changed the ISceneNode.localToWorldChanged signal will also be called after world to local has been updated (if required) in order to avoid a race condition when calling TransformController.getWorldToLocalTransform(node) in one of this signal callbacks

--- src/aerys/minko/scene/controller/TransformController.as
+++ src/aerys/minko/scene/controller/TransformController.as
@@ -86,8 +86,7 @@
                     rootLocalToWorld.unlock();

                 rootTransform._hasChanged = false;
-                _flags[nodeId] |= FLAG_INIT_LOCAL_TO_WORLD;
-                root.localToWorldTransformChanged.execute(root, rootLocalToWorld);
+                rootFlags = (rootFlags | FLAG_INIT_LOCAL_TO_WORLD) & ~FLAG_INIT_WORLD_TO_LOCAL;

                 if (rootFlags & FLAG_SYNCHRONIZE_TRANSFORMS)
                 {
@@ -98,10 +97,15 @@
                         rootWorldToLocal.lock();

                     rootWorldToLocal.copyFrom(rootLocalToWorld).invert();
+                    rootFlags |= FLAG_INIT_WORLD_TO_LOCAL;

                     if (rootFlags & FLAG_LOCK_TRANSFORMS)
                         rootWorldToLocal.unlock();
                 }
+
+                _flags[nodeId] = rootFlags;
+
+                root.localToWorldTransformChanged.execute(root, rootLocalToWorld);
             }
         }

@@ -151,8 +155,8 @@
                             childLocalToWorld.unlock();

                         childTransform._hasChanged = false;
-                        _flags[childId] |= FLAG_INIT_LOCAL_TO_WORLD;
-                        child.localToWorldTransformChanged.execute(child, childLocalToWorld);
+                        childFlags = (childFlags | FLAG_INIT_LOCAL_TO_WORLD)
+                            & ~FLAG_INIT_WORLD_TO_LOCAL;

                         if (childFlags & FLAG_SYNCHRONIZE_TRANSFORMS)
                         {
@@ -163,10 +167,15 @@
                                 childWorldToLocal.lock();

                             childWorldToLocal.copyFrom(childLocalToWorld).invert();
+                            childFlags |= FLAG_INIT_WORLD_TO_LOCAL;

                             if (childFlags & FLAG_LOCK_TRANSFORMS)
                                 childWorldToLocal.unlock();
                         }
+
+                        _flags[childId] = childFlags;
+
+                        child.localToWorldTransformChanged.execute(child, childLocalToWorld);

                         if (childId == targetNodeId)
                             return;


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

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

 package mx.automation.delegates.charts
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/effects/easing/Quintic.as
+++ frameworks/projects/mx/src/mx/effects/easing/Quintic.as
@@ -13,7 +13,7 @@
 {

 /**
- *  The new effects provided as of Flex 4 use classes which implement the
+ *  The Spark effects provided as of Flex 4 use classes which implement the
  *  IEaser interface instead of the easing functions in classes like Quintic for
  *  the earlier Flex 3 effects. To achieve the same functionality of Quintic,
  *  create a Power instance with an exponent of 5 and set the
@@ -35,24 +35,24 @@
  */
 public class Quintic
 {
-	include "../../core/Version.as";
+    include "../../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Class methods
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------

     /**
      *  The easeIn() method starts motion from zero velocity,
      *  and then accelerates motion as it executes.
      *
      *  @param t Specifies time.
-	 *
+     *
      *  @param b Specifies the initial position of a component.
-	 *
+     *
      *  @param c Specifies the total change in position of the component.
-	 *
+     *
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
@@ -62,22 +62,22 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public static function easeIn(t:Number, b:Number,
-								  c:Number, d:Number):Number
-	{
-		return c * (t /= d) * t * t * t * t + b;
-	}
+    public static function easeIn(t:Number, b:Number,
+                                  c:Number, d:Number):Number
+    {
+        return c * (t /= d) * t * t * t * t + b;
+    }

     /**
      *  The easeOut() method starts motion fast,
      *  and then decelerates motion to a zero velocity as it executes.
      *
      *  @param t Specifies time.
-	 *
+     *
      *  @param b Specifies the initial position of a component.
-	 *
+     *
      *  @param c Specifies the total change in position of the component.
-	 *
+     *
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
@@ -87,24 +87,24 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public static function easeOut(t:Number, b:Number,
-								   c:Number, d:Number):Number
-	{
-		return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
-	}
+    public static function easeOut(t:Number, b:Number,
+                                   c:Number, d:Number):Number
+    {
+        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
+    }

     /**
      *  The easeInOut() method combines the motion
      *  of the easeIn() and easeOut() methods
-	 *  to start the motion from a zero velocity, accelerate motion,
-	 *  then decelerate to a zero velocity.
+     *  to start the motion from a zero velocity, accelerate motion,
+     *  then decelerate to a zero velocity.
      *
      *  @param t Specifies time.
-	 *
+     *
      *  @param b Specifies the initial position of a component.
-	 *
+     *
      *  @param c Specifies the total change in position of the component.
-	 *
+     *
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
@@ -114,14 +114,14 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public static function easeInOut(t:Number, b:Number,
-									 c:Number, d:Number):Number
-	{
-		if ((t /= d / 2) < 1)
-			return c / 2 * t * t * t * t * t + b;
+    public static function easeInOut(t:Number, b:Number,
+                                     c:Number, d:Number):Number
+    {
+        if ((t /= d / 2) < 1)
+            return c / 2 * t * t * t * t * t + b;

-		return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
-	}
+        return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
+    }
 }

 }


make catch block empty to improve performance

--- frameworks/projects/spark/src/spark/collections/Sort.as
+++ frameworks/projects/spark/src/spark/collections/Sort.as
@@ -551,14 +551,14 @@
                     fieldName = fieldList[i];
                     if (fieldName)
                     {
-                        var hasFieldName:Boolean;
-                        try
+                        var hasFieldName:Boolean = false;
+
+						try
                         {
                             hasFieldName = values[fieldName] !== undefined;
                         }
                         catch(e:Error)
                         {
-                            hasFieldName = false;
                         }
                         if (hasFieldName)
                         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3451
Author:   egreenfi@adobe.com
Date:     2008-10-02T05:10:18.410127Z

Log Message:
-----------
- UIComponents, GraphicElements's matrix used for layout calculations, and set by the parent layouts, is now decoupled from the actual layout used by the flash player for rendering.
- Both UIComponents an d GraphicElements can be handed a TransformOffset object. The transformOffset allows developers to specify adjustments to the transform as defined by the compoennts parent layout.
- 3D properties on components and graphic elements are now supported.  Setting a 3D property or a 3D matrix on a component or element will affect it visually, but the 2D layouts will continue to lay out as though only the 2D portion of their layout is applied.
- transformX,Y,Z now fully supported on components and elements.  For layouts that don't try and set the post transform bounds (i.e., absolute layout without constraints), the layout scale and rotation will be centered on this point.  The offset transform will also be centered around this point.
- layering is now decoupled from item order.  By default, components now render in order based on the value of their 'layer' property.  All components' layers default to 0.  components with the same layer render in the order they appear in their parent group's item list.
- setting transform.matrix on UIComponent is now supported, and is roughly the same as setting the convenience layout properties on the component.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/.flexProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/build.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/ITransformable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/framework/.actionScriptProperties</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/framework/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4/.flexLibProperties</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom</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/flex/graphics/Parser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/framework/.flexLibProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4/.actionScriptProperties</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/geom/Transform.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/geom/Transform.as" copyfrom-rev="3342" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TransformUtil.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/TransformOffset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/fxg-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -2,10 +2,14 @@
 import flash.display.BlendMode;
 import flash.display.DisplayObject;
 import flash.events.Event;
+import flash.geom.ColorTransform;
+import flash.geom.Matrix;
+import flash.geom.Rectangle;
 import flash.utils.Dictionary;

 import flex.events.FlexEvent;
 import flex.events.ItemExistenceChangedEvent;
+import flex.graphics.Graphic;
 import flex.graphics.IGraphicElement;
 import flex.graphics.graphicsClasses.GraphicElement;
 import flex.intf.ILayoutItem;
@@ -14,6 +18,12 @@
 import mx.collections.ICollectionView;
 import mx.collections.IList;
 import mx.collections.ListCollectionView;
+import mx.controls.Label;
+import mx.core.IDataRenderer;
+import mx.core.IDeferredInstance;
+import mx.core.IFactory;
+import mx.core.IVisualItem;
+import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.styles.IStyleClient;
@@ -57,6 +67,10 @@
     private var _content:*;
     private var _contentType:int;
     private var contentCollection:ICollectionView;
+    private var layeringMode:uint = ITEM_ORDERED_LAYERING;
+
+    private static const ITEM_ORDERED_LAYERING:uint = 0;
+    private static const SPARSE_LAYERING:uint = 1;

     private static const CONTENT_TYPE_UNKNOWN:int = 0;
     private static const CONTENT_TYPE_ARRAY:int = 1;
@@ -519,10 +533,25 @@
     //
     //--------------------------------------------------------------------------

+
+    override public function invalidateLayering():void
+    {
+    	if(layeringMode == ITEM_ORDERED_LAYERING)
+    		layeringMode = SPARSE_LAYERING;
+    	if(needsDisplayObjectAssignment == true)
+    		return;
+    	needsDisplayObjectAssignment = true;
+    	invalidateProperties();
+    }
+
+
     protected function itemAdded(item:*, index:int):void
     {
         var child:DisplayObject;

+        if (item is IVisualItem && (item as IVisualItem).layer != 0)
+        	invalidateLayering();
+
         if (item is GraphicElement)
         {
             item.elementHost = this;
@@ -613,75 +642,162 @@
     // inside the group
     private function get canShareDisplayObject():Boolean
     {
-    	return _blendMode == "normal";
-    }
-
-    // This function assumes that the only displayObjects are either items in the content array
-    // or created directly for an item in the content array.
-    private function assignDisplayObjects(startIndex:int = 0):void
-    {
-        var currentAssignableDO:DisplayObject = canShareDisplayObject ? this : null;
-        //trace("currADO: " + currentAssignableDO);
-        var lastDisplayObject:DisplayObject = this;
-
+    	return blendMode == "normal" && (layeringMode == ITEM_ORDERED_LAYERING);
+    }
+
+   private function assignDisplayObjects():void
+    {
+        var topLayerItems:Vector.<IVisualItem>;
+        var bottomLayerItems:Vector.<IVisualItem>;
+        var keepLayeringEnabled:Boolean = false;
+
+        mergeData.currentAssignableDO  = canShareDisplayObject ? this : null;
+        mergeData.lastDisplayObject = this;
+        mergeData.insertIndex = 0;
+
         // Iterate through all of the items
         var len:int = numItems;
-        for (var i:int = startIndex; i < len; i++)
+        for (var i:int = 0; i < len; i++)
         {
             var item:* = getItemAt(i);
-            var insertIndex:int;
-
-        	if (lastDisplayObject == this)
-        		insertIndex = 0;
-        	else
-        		insertIndex = super.getChildIndex(lastDisplayObject) + 1;
-
-            if (item is DisplayObject)
-            {
-            	super.setChildIndex(item as DisplayObject, insertIndex);
-
-                lastDisplayObject = item as DisplayObject;
-                // Null this out so that we are forced to create one for the next item
-                currentAssignableDO = null;
-            }
-            else if (item is GraphicElement)
-            {
-                var element:GraphicElement = item as GraphicElement;
-
-                if (currentAssignableDO == null || element.needsDisplayObject)
+
+        	if(layeringMode != ITEM_ORDERED_LAYERING)
+        	{
+        		var layer:Number = 0;
+        		if (item is IVisualItem)
+        			layer = (item as IVisualItem).layer;
+        		if(layer != 0)
+        		{
+            		if (layer > 0)
+            		{
+            			if(topLayerItems == null) topLayerItems = new Vector.<IVisualItem>();
+            			topLayerItems.push(item);
+            			continue;
+            		}
+            		else
+            		{
+            			if(bottomLayerItems == null) bottomLayerItems = new Vector.<IVisualItem>();
+            			bottomLayerItems.push(item);
+            			continue;
+            		}
+            	}
+         	}
+			assignDisplayObjectTo(item,mergeData);
+        }
+        if(topLayerItems != null)
+        {
+        	keepLayeringEnabled = true;
+        	//topLayerItems.sortOn("layer",Array.NUMERIC);
+        	sortOnLayer(topLayerItems);
+        	len = topLayerItems.length;
+        	for(i=0;i<len;i++)
+        	{
+        		assignDisplayObjectTo(topLayerItems[i],mergeData);
+        	}
+        }
+        if(bottomLayerItems != null)
+        {
+        	keepLayeringEnabled = true;
+	        mergeData.currentAssignableDO  = null;
+	        mergeData.lastDisplayObject = this;
+	        mergeData.insertIndex = 0;
+
+        	//bottomLayerItems.sortOn("layer",Array.NUMERIC);
+        	sortOnLayer(bottomLayerItems);
+        	len = bottomLayerItems.length;
+
+        	for(i=0;i<len;i++)
+        	{
+        		assignDisplayObjectTo(bottomLayerItems[i],mergeData);
+        	}
+        }
+        if(keepLayeringEnabled == false)
+        	layeringMode = ITEM_ORDERED_LAYERING;
+    }
+
+    /**
+    * @private
+    * a simple insertion sort.  This works well for small lists (under 12 or so), uses
+    * no aditional memory, and most importantly, is stable, meaning items with comparable
+    * values will stay in the same order relative to each other. For layering, we guarantee
+    * first the layer property, and then the item order, so a stable sort is important (and the
+    * built in flash sort is not stable).
+    */
+	private static function sortOnLayer(a:Vector.<IVisualItem>):void
+	{
+		var len:Number = a.length;
+		var tmp:*;
+		if(len<= 1)
+			return;
+		for(var i:int = 1;i<len;i++)
+		{
+			for (var j:int = i;j > 0;j--)
+			{
+				if( a[j].layer < a[j-1].layer )
+				{
+					tmp = a[j];
+					a[j] = a[j-1];
+					a[j-1] = tmp;
+				}
+				else
+					break;
+			}
+		}
+	}
+
+    private function assignDisplayObjectTo(item:*,mergeData:GroupDisplayObjectMergeData):void
+    {
+
+    	if (mergeData.lastDisplayObject == this)
+    		mergeData.insertIndex = 0;
+    	else
+    		mergeData.insertIndex = super.getChildIndex(mergeData.lastDisplayObject) + 1;
+
+        if (item is DisplayObject)
+        {
+        	super.setChildIndex(item as DisplayObject, mergeData.insertIndex);
+
+            mergeData.lastDisplayObject = item as DisplayObject;
+            // Null this out so that we are forced to create one for the next item
+            mergeData.currentAssignableDO = null;
+        }
+        else if (item is GraphicElement)
+        {
+            var element:GraphicElement = item as GraphicElement;
+
+            if (mergeData.currentAssignableDO == null || element.needsDisplayObject)
+            {
+                var newChild:DisplayObject = element.displayObject;
+
+                if (newChild == null)
                 {
-                    var newChild:DisplayObject = element.displayObject;
-
-                    if (newChild == null)
-                    {
-                        newChild = element.createDisplayObject();
-                        element.displayObject = newChild; // TODO!! Handle this in createDisplayObject?
-                    }
-
-                    addItemToDisplayList(newChild, item, insertIndex);
-                    // If the element is transformed, the next item needs its own DO
-                    currentAssignableDO = element.nextSiblingNeedsDisplayObject ? null : newChild;
-                    lastDisplayObject = newChild;
+                    newChild = element.createDisplayObject();
+                    element.displayObject = newChild; // TODO!! Handle this in createDisplayObject?
                 }
-                else
+
+                addItemToDisplayList(newChild, item, mergeData.insertIndex);
+                // If the element is transformed, the next item needs its own DO
+                mergeData.currentAssignableDO = element.nextSiblingNeedsDisplayObject ? null : newChild;
+                mergeData.lastDisplayObject = newChild;
+            }
+            else
+            {
+                // Item should be assigned the currentAssignableDO
+                // If it already has a DO, we need to remove it
+                if (element.displayObject)
                 {
-                    // Item should be assigned the currentAssignableDO
-                    // If it already has a DO, we need to remove it
-                    if (element.displayObject)
-                    {
-                        if (element.displayObject.parent == this)
-                            super.removeChild(element.displayObject);
-                        element.destroyDisplayObject();
-                    }
-
-                    element.sharedDisplayObject = currentAssignableDO;
-                    if (element.nextSiblingNeedsDisplayObject)
-                        currentAssignableDO = null;
+                    if (element.displayObject.parent == this)
+                        super.removeChild(element.displayObject);
+                    element.destroyDisplayObject();
                 }
+
+                element.sharedDisplayObject = mergeData.currentAssignableDO;
+                if (element.nextSiblingNeedsDisplayObject)
+                    mergeData.currentAssignableDO = null;
             }
         }
     }
-
+

     // Helper function to remove child from other Group or display list before
     // adding to the display list.
@@ -932,3 +1048,15 @@

 }
 }
+
+
+import flash.display.DisplayObject;
+
+class GroupDisplayObjectMergeData
+{
+    public var currentAssignableDO:DisplayObject;
+    public var lastDisplayObject:DisplayObject;
+    public var insertIndex:int;
+}
+
+const mergeData:GroupDisplayObjectMergeData = new GroupDisplayObjectMergeData();


Transferred from the Adobe Open Source Subversion Repository

Revision: 12015
Author:   aharui@adobe.com
Date:     2009-11-19T22:34:02.934215Z

Log Message:
-----------
Fix truncation in Label.  Fix baselines in Spark in general.

QE Notes: SS updated tests based on Cyclone
Doc Notes: None
Bugs: SDK-23992, SDK-23462, SDK-23931, SDK-23913, SDK-23842, SDK-23082
Reviewer: Carol, Gordon
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/Label, cyclone

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -427,12 +427,12 @@
         // - truncation options exist (0=no trunc, -1=fill up bounds then trunc,
         //      n=n lines then trunc)
         // - compose width is specified
-        // - explicit line breaking is not used
         // - content doesn't fit
-        if (maxDisplayedLines && getStyle("lineBreak") == "toFit" &&
-            !doesComposedTextFit(height, allLinesComposed, maxDisplayedLines))
-        {
-            truncateText(width, height);
+        var lb:String = getStyle("lineBreak");
+        if (maxDisplayedLines && (lb == "toFit" || lb == "explicit") &&
+            !doesComposedTextFit(height, width, allLinesComposed, maxDisplayedLines, lb))
+        {
+            truncateText(width, height, lb);
         }

         // Detach the TextLines from the TextBlock that created them.
@@ -881,6 +881,9 @@

 		// For truncation, need to know if all lines have been composed.
         var createdAllLines:Boolean = false;
+        // sometimes we need to create an extra line in order to compute
+        // truncation
+        var extraLine:Boolean;

 		// Generate TextLines, stopping when we run out of text
 		// or reach the bottom of the requested bounds.
@@ -920,7 +923,7 @@

 			if (!nextTextLine)
             {
-				createdAllLines = true;
+				createdAllLines = !extraLine;
                 break;
             }

@@ -936,7 +939,11 @@
 			if (verticalAlign == "top" &&
 			    nextY - nextTextLine.ascent > innerHeight)
 			{
-				break;
+                // make an extra line so we can compute truncation
+                if (!extraLine)
+				    extraLine = true;
+                else
+                    break;
 			}

 			// We'll keep this line. Put it into the textLines array.
@@ -1120,9 +1127,9 @@
      *  Determines if the composed text fits in the given height and
      *  line count limit.
      */
-    private function doesComposedTextFit(height:Number,
+    private function doesComposedTextFit(height:Number, width:Number,
                                          createdAllLines:Boolean,
-                                         lineCountLimit:int):Boolean
+                                         lineCountLimit:int, lineBreak:String):Boolean
     {
         // Not all text composed because it didn't fit within bounds.
         if (!createdAllLines)
@@ -1132,6 +1139,14 @@
         if (lineCountLimit != -1 && textLines.length > lineCountLimit)
             return false;

+        if (lineBreak == "explicit")
+        {
+            // if explicit, if the right edge of any lines go outside the
+            // desired width
+            if (bounds.right > width)
+                return false;
+        }
+
         // No lines or no height restriction.
         if (!textLines.length || isNaN(height))
             return true;
@@ -1151,14 +1166,23 @@
      *  Adapted from justification code in TLF's
      *  TextLineFactory.textLinesFromString().
      */
-	private function truncateText(width:Number, height:Number):void
+    private function truncateText(width:Number, height:Number, lineBreak:String):void
 	{
 	    var lineCountLimit:int = maxDisplayedLines;
         var somethingFit:Boolean = false;
         var truncLineIndex:int = 0;

+        if (lineBreak == "explicit")
+        {
+            truncateExplicitLineBreakText(width, height);
+            return;
+        }
+
         // Compute the truncation line.
         truncLineIndex = computeLastAllowedLineIndex(height, lineCountLimit);
+        // add extra line in case we wordwrapped some characters
+        // onto extra lines, but don't go off the end
+        truncLineIndex = Math.min(truncLineIndex + 1, textLines.length - 1);

         if (truncLineIndex >= 0)
         {
@@ -1226,9 +1250,10 @@
                     var createdAllLines:Boolean = createTextLinesFromTextBlock(
                     	staticTextBlock, textLines, bounds);

-                    if (doesComposedTextFit(height,
+                    if (doesComposedTextFit(height, width,
                                             createdAllLines,
-                                            lineCountLimit))
+                                            lineCountLimit, lineBreak))
+
                     {
                         somethingFit = true;
                         break;
@@ -1241,8 +1266,12 @@

                     // Try again by truncating at the beginning of the
                     // preceding atom.
+                    var oldCharPosition:int = truncateAtCharPosition;
                     truncateAtCharPosition = getNextTruncationPosition(
-                    	truncLineIndex, truncateAtCharPosition);
+                    	Math.min(truncLineIndex, textLines.length - 1), truncateAtCharPosition);
+                    // check to see if we've run out of chars
+                    if (oldCharPosition == truncateAtCharPosition)
+                        break;
                 }
                 while (true);
             }
@@ -1269,6 +1298,70 @@
         setIsTruncated(true);
     }

+    /**
+     *  @private
+     *  width and height are the ones used to do the compose, not the measured
+     *  results resulting from the compose.
+     */
+    private function truncateExplicitLineBreakText(width:Number, height:Number):void
+	{
+        // 1. Measure the space that the truncation indicator will take
+        // by composing the truncation resource using the same bounds
+        // and formats.  The measured indicator lines could be cached but
+        // as well as being dependent on the indicator string, they are
+        // dependent on the given width.
+        staticTextElement.text = truncationIndicatorResource;
+        var indicatorLines:Vector.<DisplayObject> =
+            new Vector.<DisplayObject>();
+        var indicatorBounds:Rectangle = new Rectangle(0, 0, width, NaN);
+
+        createTextLinesFromTextBlock(staticTextBlock,
+                                     indicatorLines,
+                                     indicatorBounds);
+
+        releaseLinesFromTextBlock();
+
+        // check each line to see if it needs truncation
+        var n:int = textLines.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var line:TextLine = textLines[i] as TextLine;
+            // if the line is wider than bounds or off the left side
+            // TODO (aharui): What if text runs off left side because of
+            // alignment or direction?
+            if ((line.x + line.width) > width)
+            {
+                // clip this line
+                var lineLength:int = line.rawTextLength;
+                // start chopping from the end until it fits
+                while (--lineLength > 0)
+                {
+                    var lineStr:String = text.substr(line.textBlockBeginIndex, lineLength);
+                    lineStr += truncationIndicatorResource;
+                    staticTextElement.text = lineStr;
+                    var clippedLines:Vector.<DisplayObject> =
+            	        new Vector.<DisplayObject>();
+
+                    createTextLinesFromTextBlock(staticTextBlock,
+                                                 clippedLines,
+                                                 indicatorBounds);
+
+                    releaseLinesFromTextBlock();
+                    if (clippedLines.length == 1 &&
+                        (clippedLines[0].x + clippedLines[0].width) <= width)
+                    {
+                        // replace with the clipped line
+                        clippedLines[0].x = line.x;
+                        clippedLines[0].y = line.y;
+                        textLines[i] = clippedLines[0];
+                        break;
+                    }
+
+                }
+            }
+        }
+    }
+
     /**
 	 *  @private
      *  Calculates the last line that fits in the given height and line count
@@ -1278,6 +1371,9 @@
                                                  lineCountLimit:int):int
     {
         var truncationLineIndex:int = textLines.length - 1;
+        // return -1 if no textLines (usually because zero size)
+        if (truncationLineIndex < 0)
+            return truncationLineIndex;

         if (!isNaN(height))
         {
@@ -1366,9 +1462,21 @@
             }

             if (truncateAtCharPosition < line.textBlockBeginIndex)
+            {
                 truncationLineIndex--;
+                // if we run out of chars, just return the same
+                // position to warn the caller to stop
+                if (truncationLineIndex < 0)
+                    return truncateAtCharPosition;
+            }
             else
+            {
                 truncationLineIndex++;
+                // if we run out of chars, just return the same
+                // position to warn the caller to stop
+                if (truncationLineIndex >= textLines.length)
+                    return truncateAtCharPosition;
+            }

             line = TextLine(textLines[truncationLineIndex]);
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19786
Author:   clucier@adobe.com
Date:     2011-01-17T21:50:08.259241Z

Log Message:
-----------
AnimateTransform based effects now overlay properly in parallel effects.

QE notes: None
Doc notes: None
Bugs: SDK-29032
Reviewer: Jason S.
Tests run: Cyclone Server
Is noteworthy for integration: None

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/effects/Scale.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Rotate3D.as
+++ frameworks/projects/spark/src/spark/effects/Rotate3D.as
@@ -285,18 +285,19 @@
      */
     override protected function initInstance(instance:IEffectInstance):void
     {
-        if (!applyChangesPostLayout)
-        {
-            addMotionPath("rotationX", angleXFrom, angleXTo);
-            addMotionPath("rotationY", angleYFrom, angleYTo);
-            addMotionPath("rotationZ", angleZFrom, angleZTo);
-        }
-        else
-        {
-            addMotionPath("postLayoutRotationX", angleXFrom, angleXTo);
-            addMotionPath("postLayoutRotationY", angleYFrom, angleYTo);
-            addMotionPath("postLayoutRotationZ", angleZFrom, angleZTo);
-        }
+        var xProp:String = applyChangesPostLayout ? "postLayoutRotationX" : "rotationX";
+        var yProp:String = applyChangesPostLayout ? "postLayoutRotationY" : "rotationY";
+        var zProp:String = applyChangesPostLayout ? "postLayoutRotationZ" : "rotationZ";
+
+        if (!(isNaN(angleXFrom) && isNaN(angleXTo)))
+            addMotionPath(xProp, angleXFrom, angleXTo);
+
+        if (!(isNaN(angleYFrom) && isNaN(angleYTo)))
+            addMotionPath(yProp, angleYFrom, angleYTo);
+
+        if (!(isNaN(angleZFrom) && isNaN(angleZTo)))
+            addMotionPath(zProp, angleZFrom, angleZTo);
+
         super.initInstance(instance);
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7306
Author:   aharui@adobe.com
Date:     2009-05-27T14:54:00.080376Z

Log Message:
-----------
Fix another pair of mustella failures from the frame1 cleanup

QE Notes: None
Doc Notes: None
Bugs: SDK-21386
Reviewer: corey
tests: checkintests mustella/MarshallPlan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ActiveWindowManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallPlan.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/framework/src/mx/controls/SWFLoader.as
+++ frameworks/projects/framework/src/mx/controls/SWFLoader.as
@@ -2535,7 +2535,7 @@
             var sm:ISystemManager = content as ISystemManager;
             if (sm != null)
 			{
-				var cm:Object = sm.getImplementation("mx.managers.ISystemManagerChildManager");
+				var cm:Object = sm.getImplementation("mx.managers::ISystemManagerChildManager");
                 Object(cm).regenerateStyleCache(recursive);
 			}
         }
@@ -2562,7 +2562,7 @@
             var sm:ISystemManager = content as ISystemManager;
             if (sm != null)
 			{
-				var cm:Object = sm.getImplementation("mx.managers.ISystemManagerChildManager");
+				var cm:Object = sm.getImplementation("mx.managers::ISystemManagerChildManager");
                 Object(cm).notifyStyleChangeInChildren(styleProp, recursive);
 			}
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 10464
Author:   rfrishbe@adobe.com
Date:     2009-09-21T17:40:30.663638Z

Log Message:
-----------
Removing support in Flex framework for compatibility version < 3.  We won't support compatibility-version 2 or 2.01 anymore.  We only keep compatibility-version for one full release, so for Flex 4, we only support compatibility-version = 3.x.

This should reduce our code-size some as we no longer need this old code.  I didn't clean up the compiler's support for compatibility-versioning as it didn't seem worth the effort.

QE notes: -
Doc notes: -
Bugs: SDK-15360
Reviewer: Kevin
Tests run: checkintests, Joan ran all mustella tests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.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/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserYearArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PanelSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/utils/SecurityUtil.as
+++ frameworks/projects/framework/src/mx/utils/SecurityUtil.as
@@ -18,6 +18,11 @@

 /**
  *  Utilities for working with security-related issues.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class SecurityUtil
 {
@@ -35,6 +40,11 @@
 	 *  @param bp The provider of the bridge that connects the two applications.
 	 *
 	 *  @return true if there is mutual trust; otherwise false.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function hasMutualTrustBetweenParentAndChild(bp:ISWFBridgeProvider):Boolean
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 11597
Author:   jszeto@adobe.com
Date:     2009-11-10T01:14:58.384507Z

Log Message:
-----------
ComboBox bug fixes

SDK-24107 - ComboBox RTE when user types input and no dataProvider is present

Add check in processInputField

SDK-24070 - ComboBox does not match when openOnInput = false

Still perform matching when openOnInput = false

Change the behavior to no longer close the dropDown if delete or backspace are pressed.

QE notes: None
Doc notes: None
Bugs: SDK-24107, SDK-24070
Reviewer: Glenn
Tests run: ComboBox
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as

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

--- frameworks/projects/spark/src/spark/components/ComboBox.as
+++ frameworks/projects/spark/src/spark/components/ComboBox.as
@@ -458,9 +458,12 @@

         //trace("CB.processInputField input string",textInput.text);

+        if (!dataProvider || dataProvider.length <= 0)
+            return;
+
         // If the textInput has been changed, then use the input string as the selectedItem
         actualProposedSelectedIndex = CUSTOM_SELECTED_ITEM;
-
+
         if (textInput.text != "")
         {
             if (itemMatchingFunction != null)
@@ -850,7 +853,6 @@
         if (operation is DeleteTextOperation || operation is CutOperation)
         {
             super.changeHighlightedSelection(CUSTOM_SELECTED_ITEM);
-            closeDropDown(false);
         }
         else
         {
@@ -864,9 +866,9 @@
                     addEventListener(DropDownEvent.OPEN, editingOpenHandler);
                     return;
                 }
-
-                processInputField();
             }
+
+            processInputField();
         }
     }