Transferred from the Adobe Open Source Subversion Repository

Revision: 19851
Author:   mcho@adobe.com
Date:     2011-01-20T23:07:11.305461Z

Log Message:
-----------
More precise text alignment for mobile components

QE notes: Components with tend to be narrower and shorter for the View Menu.  Must update baselines that use x, y, width, height.
Doc notes: None
Bugs:
Reviewer: Ryan, Jason Szeto, Jason SJ, Glenn
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TabbedViewNavigatorButtonBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -11,6 +11,9 @@

 package spark.components.supportClasses
 {
+
+import flash.display.Bitmap;
+import flash.display.BitmapData;
 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
 import flash.events.Event;
@@ -29,6 +32,7 @@
 import flash.text.TextInteractionMode;
 import flash.text.TextLineMetrics;
 import flash.ui.Keyboard;
+import flash.utils.Dictionary;

 import mx.core.DesignLayer;
 import mx.core.IVisualElement;
@@ -175,7 +179,19 @@
     //  Properties
     //
     //--------------------------------------------------------------------------
-
+	override public function set width(value:Number): void
+	{
+		super.width = value;
+
+		// If we're multiline we need to invalidate our size since our height
+		// may have changed
+		if (multiline)
+		{
+			invalidateTightTextHeight = true;
+			invalidateTextSizeFlag = true;
+		}
+	}
+
     public function get measuredTextSize():Point
     {
         // commit style to get an accurate measurement
@@ -185,7 +201,7 @@
         {
             _measuredTextSize = new Point();
             invalidateTextSizeFlag = true;
-			invalidateBaselineBottomOffset = true;
+			invalidateTightTextHeight = true;
         }

         if (invalidateTextSizeFlag)
@@ -199,42 +215,42 @@
             {
                 _measuredTextSize.x = textWidth + textIndent + TEXT_WIDTH_PADDING
                 _measuredTextSize.y = textHeight + TEXT_HEIGHT_PADDING;
-
-                return _measuredTextSize;
             }
-
-            // when scaling, remove/add to stage for consistent measurement
-            var originalParent:DisplayObjectContainer = parent;
-            var index:int = parent.getChildIndex(this);
-
-            // remove from display list
-            if (originalParent is UIComponent)
-                UIComponent(originalParent).$removeChild(this);
-            else
-                originalParent.removeChild(this);
-
-            _measuredTextSize.x = textWidth + textIndent + TEXT_WIDTH_PADDING
-            _measuredTextSize.y = textHeight + TEXT_HEIGHT_PADDING;
-
-            // add to display list
-            if (originalParent is UIComponent)
-                UIComponent(originalParent).$addChildAt(this, index);
-            else
-                originalParent.addChildAt(this, index);
-
-            // If we use device fonts, then the unscaled sizes are
-            // textWidth * scaleX / scaleY
-            // textHeight * scaleX / scaleY
-            if (m.a != m.d)
-            {
-                var scaleFactor:Number = (m.a / m.d);
-
-                // textIndent and gutter are also scaled
-                _measuredTextSize.x = Math.abs(_measuredTextSize.x * scaleFactor);
-                _measuredTextSize.y = Math.abs(_measuredTextSize.y * scaleFactor);
-            }
-
-            invalidateTextSizeFlag = false;
+			else
+			{
+	            // when scaling, remove/add to stage for consistent measurement
+	            var originalParent:DisplayObjectContainer = parent;
+	            var index:int = parent.getChildIndex(this);
+
+	            // remove from display list
+	            if (originalParent is UIComponent)
+	                UIComponent(originalParent).$removeChild(this);
+	            else
+	                originalParent.removeChild(this);
+
+	            _measuredTextSize.x = textWidth + textIndent + TEXT_WIDTH_PADDING
+	            _measuredTextSize.y = textHeight + TEXT_HEIGHT_PADDING;
+
+	            // add to display list
+	            if (originalParent is UIComponent)
+	                UIComponent(originalParent).$addChildAt(this, index);
+	            else
+	                originalParent.addChildAt(this, index);
+
+	            // If we use device fonts, then the unscaled sizes are
+	            // textWidth * scaleX / scaleY
+	            // textHeight * scaleX / scaleY
+	            if (m.a != m.d)
+	            {
+	                var scaleFactor:Number = (m.a / m.d);
+
+	                // textIndent and gutter are also scaled
+	                _measuredTextSize.x = Math.abs(_measuredTextSize.x * scaleFactor);
+	                _measuredTextSize.y = Math.abs(_measuredTextSize.y * scaleFactor);
+	            }
+			}
+
+			invalidateTextSizeFlag = false;
         }

         return _measuredTextSize;
@@ -321,78 +337,96 @@

 	//----------------------------------
 	//  Text alignment helpers
-	//----------------------------------
+	//----------------------------------
 	/**
-	 *  Distance from the top edge of the containing text field to the text
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.1
-	 *  @playerversion AIR 2.0
-	 *  @productversion Flex 4.5
+	 *  @private
+	 *  The height of the first line of text to the baseline of the bottom line
+	 *  of text.  Handles both single line and multiline text.
 	 */
-	public function get textTopOffset():Number
-	{
-		// FIXME mcho:  add ascentShift style
-		var ascentShift:Number = 3;
-		// Height of gutter and the baseline
-		return StyleableTextField.TEXT_HEIGHT_PADDING/2 + ascentShift;
-	}
-
-	/**
-	 *  Distance from the bottom edge of the containing text field to the baseline
-	 *  of the last line of text
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.1
-	 *  @playerversion AIR 2.0
-	 *  @productversion Flex 4.5
-	 */
-	public function get baselineBottomOffset():Number
+	private function get tightTextHeight() :Number
 	{
 		commitStyles();

-		if (invalidateBaselineBottomOffset)
+		// figure out distance from text bottom to last baseline
+		if (invalidateTightTextHeight)
 		{
 			// getLineMetrics() returns strange numbers for an empty string,
 			// so instead we get the metrics for a non-empty string.
 			var isEmpty:Boolean = (text == "");
+
 			if (isEmpty)
-				super.text = "Wj";
+				text = "Wj";

 			var metrics:TextLineMetrics = getLineMetrics(0);

+			// bottom gutter and descent
+			var bottomOffset:Number = StyleableTextField.TEXT_HEIGHT_PADDING/2 + metrics.descent;
+			if (numLines == 1) // account for the extra leading on single line text
+				bottomOffset += metrics.leading;
+
+			var topOffset:Number = getTextTopOffset(defaultTextFormat);
+			_tightTextHeight = measuredTextSize.y - topOffset - bottomOffset;
+
 			if (isEmpty)
-				super.text = "";
-
-			// bottom gutter and descent
-			_baselineBottomOffset = StyleableTextField.TEXT_HEIGHT_PADDING/2 + metrics.descent;
-			if (numLines == 1) // account for the extra leading on single line text
-				_baselineBottomOffset += metrics.leading;
-
-			invalidateBaselineBottomOffset = false;
+				text = "";
+
+			invalidateTightTextHeight = false;
 		}

-		return _baselineBottomOffset;
+		return _tightTextHeight;
 	}
-
-

 	/**
-	 *  Distance between textTopOffset and baselineBottomOffset.  Essentially
-	 *  the height of the first line of text to the baseline of the bottom line
-	 *  of text
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.1
-	 *  @playerversion AIR 2.0
-	 *  @productversion Flex 4.5
+	 *  @private
+	 *  Finds the distance from the top edge of the containing text field to the text for
+	 *  a particular font, size, weight and style combination.  This value accounts for
+	 *  the difference between the metrics.ascent and the true top of the text within the
+	 *  text field and the top gutter
 	 */
-	public function get textTopToLastBaselineHeight() :Number
+	private static function getTextTopOffset(textFormat:TextFormat):Number
 	{
-		return measuredTextSize.y - textTopOffset - baselineBottomOffset;
+		// try to find the top offset for the font, size, weight and style in our table
+		// we only store offets for unique font, size, weight and style combinations
+		// FIXME (mcho)  are there more properties that affect the top offset we should
+		// take into account?
+		var key:String = textFormat.font + "_" + textFormat.size + "_" + textFormat.bold + "_" + textFormat.italic;
+		var topOffset:Number = textTopOffsetTable[key];
+
+		// if we can't find the value in our table let's calculate it
+		if (isNaN(topOffset))
+		{
+			// create sample text field
+			var field:TextField = new TextField();
+			field.defaultTextFormat = textFormat;
+			field.embedFonts = isFontEmbedded(textFormat);
+			field.textColor = 0x000000; // make sure our text is black so it will show up against white
+			field.text = "T"; // use "T" as our standard
+			field.width = field.textWidth;
+			field.height = field.textHeight;
+
+			// draw the field into a bitmap data - note default bg color of bitmapData is white.
+			var bitmapData:BitmapData = new BitmapData(field.width, field.height);
+			bitmapData.draw(field);
+
+			// search vertically for the first non white pixel
+			var col:int = Math.round(bitmapData.width/2);
+			for (var i:int = 0; i < bitmapData.height; i++)
+			{
+				if (bitmapData.getPixel(col, i) != 0xFFFFFF)
+					break;
+			}
+
+			if (i == bitmapData.height)
+				topOffset = StyleableTextField.TEXT_HEIGHT_PADDING/2; // if we didn't find a non white pixel set top offset to top gutter
+			else
+				topOffset = i;
+
+			// store the offset value in our look up table
+			textTopOffsetTable[key] = topOffset;
+		}
+
+		return topOffset;
 	}
-
-

     //--------------------------------------------------------------------------
@@ -432,7 +466,7 @@
         super.text = value;
         _isTruncated = false;
         invalidateTextSizeFlag = true;
-		invalidateBaselineBottomOffset = true;
+		invalidateTightTextHeight = true;

         if (hasEventListener(FlexEvent.VALUE_COMMIT))
             dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
@@ -735,7 +769,7 @@
         replaceText(selectionAnchorPosition, selectionActivePosition, text);
         dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
         invalidateTextSizeFlag = true;
-		invalidateBaselineBottomOffset = true;
+		invalidateTightTextHeight = true;
     }

     /**
@@ -758,7 +792,7 @@
         super.appendText(text);
         dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
         invalidateTextSizeFlag = true;
-		invalidateBaselineBottomOffset = true;
+		invalidateTightTextHeight = true;
     }

     /**
@@ -891,7 +925,7 @@
             // changed
             invalidateTextSizeFlag = true;
             invalidateBaselinePosition = true;
-			invalidateBaselineBottomOffset = true;
+			invalidateTightTextHeight = true;
         }
     }

@@ -1014,7 +1048,7 @@
             _isTruncated = true;
             invalidateTextSizeFlag = true;
             invalidateBaselinePosition = true;
-			invalidateBaselineBottomOffset = true;
+			invalidateTightTextHeight = true;

             // Make sure all text is visible
             scrollH = 0;
@@ -1033,7 +1067,7 @@
     /**
      *  @private
      */
-    private function isFontEmbedded(format:TextFormat):Boolean
+    private static function isFontEmbedded(format:TextFormat):Boolean
     {
         if (!embeddedFonts)
             embeddedFonts = Font.enumerateFonts();
@@ -1067,7 +1101,7 @@
         if (!(event is TextOperationEvent))
         {
             invalidateTextSizeFlag = true;
-			invalidateBaselineBottomOffset = true;
+			invalidateTightTextHeight = true;

             var newEvent:TextOperationEvent = new TextOperationEvent(event.type);

@@ -1244,7 +1278,16 @@
      */
     public function getLayoutBoundsHeight(postLayoutTransform:Boolean=true):Number
     {
-        return height;
+		if (useTightTextBounds)
+		{
+			// we want to return the text field height without the top and bottom offsets
+			// (measuredTextSize.y - tightTextHeight) gives us the sum of top and bottom offsets
+			return height - (measuredTextSize.y - tightTextHeight);
+		}
+		else
+		{
+			return height;
+		}
     }

     /**
@@ -1252,7 +1295,15 @@
      */
     public function getLayoutBoundsWidth(postLayoutTransform:Boolean=true):Number
     {
-        return width;
+		if (useTightTextBounds)
+		{
+			// return the text field width without the left and right gutters
+			return width - StyleableTextField.TEXT_WIDTH_PADDING;
+		}
+		else
+		{
+			return width;
+		}
     }

     /**
@@ -1260,15 +1311,34 @@
      */
     public function getLayoutBoundsX(postLayoutTransform:Boolean=true):Number
     {
-        return x;
-    }
+		if (useTightTextBounds)
+		{
+			// return the x position of the text within the text field.  we calculate this value
+			// using text field's x, offset by the left gutter
+			return x + StyleableTextField.TEXT_WIDTH_PADDING/2;
+		}
+		else
+		{
+			return x;
+		}
+    }
+

     /**
      * @private
      */
     public function getLayoutBoundsY(postLayoutTransform:Boolean=true):Number
     {
-        return y;
+		if (useTightTextBounds)
+		{
+			// return the y position of the text within the text field.  we calculate this value
+			// using text field's y, offset by the text top offset
+			return y + getTextTopOffset(defaultTextFormat);
+		}
+		else
+		{
+			return y;
+		}
     }

     /**
@@ -1324,7 +1394,17 @@
      */
     public function getPreferredBoundsHeight(postLayoutTransform:Boolean=true):Number
     {
-        return measuredTextSize.y;
+		if (useTightTextBounds)
+		{
+			// The height from the top of the text to the baseline of the
+			// last line of text.  This is the height used for positioning text
+			// according to its baseline
+			return tightTextHeight;
+		}
+		else
+		{
+			return measuredTextSize.y;
+		}
     }

     /**
@@ -1332,7 +1412,15 @@
      */
     public function getPreferredBoundsWidth(postLayoutTransform:Boolean=true):Number
     {
-        return measuredTextSize.x;
+		if (useTightTextBounds)
+		{
+			// The measuredTextSize without the left and right gutters
+			return measuredTextSize.x - StyleableTextField.TEXT_WIDTH_PADDING;
+		}
+		else
+		{
+			return measuredTextSize.x;
+		}
     }

     /**
@@ -1356,17 +1444,46 @@
      */
     public function setLayoutBoundsPosition(x:Number, y:Number, postLayoutTransform:Boolean=true):void
     {
-        this.x = x;
-        this.y = y;
+		if (useTightTextBounds)
+		{
+			// offset the positions by the left gutters and the top offset
+			this.x = x - StyleableTextField.TEXT_WIDTH_PADDING/2;
+			this.y = y - getTextTopOffset(defaultTextFormat);
+		}
+		else
+		{
+			this.x = x;
+			this.y = y;
+		}
     }

     /**
      * @private
      */
     public function setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean=true):void
-    {
-        this.width = width;
-        this.height = height;
+    {
+		// width
+		var newWidth:Number = width;
+		if (isNaN(newWidth))
+			newWidth = getPreferredBoundsWidth();
+
+		// re-add the left and right gutters
+		if (useTightTextBounds)
+			newWidth += StyleableTextField.TEXT_WIDTH_PADDING;
+
+		this.width = newWidth;
+
+		// height
+		var newHeight:Number = height;
+		if (isNaN(newHeight))
+			newHeight = getPreferredBoundsHeight();
+
+		// re-add the top and bottom offsets.  (measuredTextSize.y - tightTextHeight) gives us
+		// the sum of top and bottom offsets
+		if (useTightTextBounds)
+			newHeight += (measuredTextSize.y - tightTextHeight);
+
+		this.height = newHeight;
     }

     /**
@@ -1794,6 +1911,11 @@
     // Name of the style to use for determining the text color
     mx_internal var colorName:String = "color";

+	// Whether or not we want to size and position the text field based upon its
+	// tight text bounds.  Use useTightTextBounds == true when you want precise
+	// text placement.
+	mx_internal var useTightTextBounds:Boolean = true;
+
     private static var supportedStyles:String = "textAlign fontFamily fontWeight fontStyle color fontSize textDecoration textIndent leading letterSpacing"

     private var invalidateStyleFlag:Boolean = true;
@@ -1803,7 +1925,14 @@
     private var _isTruncated:Boolean = false;

     private static var embeddedFonts:Array;
-
+
+
+	/**
+	 *  @private
+	 *  Table of text top offsets for different fonts, sizes, weights and styles
+	 */
+	private static var textTopOffsetTable:Dictionary = new Dictionary();
+
     /**
      *  @private
      *  Whether this StyleableTextField needs to be measure its unscaled size
@@ -1828,12 +1957,12 @@
 	/**
 	 *  @private
 	 */
-	private var invalidateBaselineBottomOffset:Boolean = true;
+	private var invalidateTightTextHeight:Boolean = true;

 	/**
 	 *  @private
 	 */
-	private var _baselineBottomOffset:Number;
+	private var _tightTextHeight:Number;

     /**
      *  @private


support DFXP captions background colour and inherit style from body

--- plugins/closedcaptionsFlexible_plugin/src/com/kaltura/kdpfl/plugin/component/ClosedCaptions.as
+++ plugins/closedcaptionsFlexible_plugin/src/com/kaltura/kdpfl/plugin/component/ClosedCaptions.as
@@ -376,19 +376,21 @@

 							currLine.text += " " + textToAdd;
 						}
+
+						if ( !paragraph.attribute("style").length() && body.attribute("style").length() ) {
+							paragraph.@["style"] = body.attribute("style")[0].toString();
+						}
 						if (paragraph.attribute("style").length() )
 						{
-							currLine.textFormat = stylingObject[paragraph.attribute ("style") [0].toString ()]["tf"];
-
-							currLine.backgroundColor = stylingObject[paragraph.attribute ("style") [0].toString ()]["backgroundColor"];
-
-							currLine.showBGColor = stylingObject[paragraph.attribute ("style") [0].toString ()]["showBGColor"];
+							var curStyle:Object = stylingObject[paragraph.attribute("style")[0].toString()];
+							currLine.textFormat = curStyle.tf;
+							currLine.backgroundColor = curStyle.backgroundColor;
+							currLine.showBGColor = curStyle.showBGColor;

 						}
 						else
 						{
-							currLine.textFormat = new TextFormat (defaultFontFamily, defaultFontSize, defaultFontColor, null, null, null, null, null, "center");
-
+							currLine.textFormat = new TextFormat (defaultFontFamily, defaultFontSize, defaultFontColor, null, null, null, null, null, "center");
 							currLine.showBGColor = false;
 						}

@@ -432,17 +434,44 @@
 			return tf;

 		}
+		private function translateToColor(c:String):String
+		{
+
+			switch(c){
+
+				case "black" : return "0x000000";
+				case "silver" : return "0xc0c0c0";
+				case "gray" : return "0x808080";
+				case "white" : return "0xffffff";
+				case "maroon" : return "0x800000";
+				case "red" : return "0xff0000";
+				case "purple" : return "0x800080";
+				case "fuchsia" : return "0xff00ff";
+				case "magenta" : return "0xff00ff";
+				case "green" : return "0x008000";
+				case "lime" : return "0x00ff00";
+				case "olive" : return "0x808000";
+				case "yellow" : return "0xffff00";
+				case "navy" : return "0x000080";
+				case "blue" : return "0x0000ff";
+				case "teal" : return "0x008080";
+				case "aqua" : return "0x00ffff";
+				case "cyan" : return "0x00ffff";
+			}
+			return c;
+		}

 		private function xmlToBGColor(style : XML) : Number
 		{
-			var bgColor : Number = style.@xmlns_tts::backgroundColor.length() ? Number(style.@xmlns_tts::backgroundColor[0].toString().replace("#", "0x")) : 0x000000;
-			return bgColor;
-
-
-
-
-
-
+			var bgColor:String;
+			if(style.@xmlns_tts::backgroundColor.length())
+			{
+				bgColor = style.@xmlns_tts::backgroundColor[0].toString().replace("#", "0x");
+				//fix color names value
+				bgColor = translateToColor(bgColor);
+			} else
+				bgColor = "0";
+			return Number(bgColor);
 		}

 		private function shouldShowBGColor (style : XML) : Boolean
@@ -596,14 +625,14 @@

 			if (defaultGlowFilter && !ccLine.showBGColor)
 			{
-				_label.filters = [defaultGlowFilter];
-				_label.background = false;
+				caption.filters = [defaultGlowFilter];
+				caption.background = false;
 			}
 			else
 			{
-				_label.filters = [];
-				_label.background = true;
-				_label.backgroundColor = ccLine.backgroundColor;
+				caption.filters = [];
+				caption.background = true;
+				caption.backgroundColor = ccLine.backgroundColor;
 			}
 			caption.x = x;
 			caption.y = y;


fixed bug where column id wasn't being cast as number

Change-Id: If764a4bd42488e780efa6f655bdea3ce164938dd

--- WeaveData/src/weave/data/DataSources/WeaveDataSource.as
+++ WeaveData/src/weave/data/DataSources/WeaveDataSource.as
@@ -524,7 +524,7 @@

 			if (_idFields || params[ENTITY_ID])
 			{
-				var id:Object = _idFields ? getAttrs(leafNode, _idFields, true) : params[ENTITY_ID];
+				var id:Object = _idFields ? getAttrs(leafNode, _idFields, true) : StandardLib.asNumber(params[ENTITY_ID]);
 				var sqlParams:Array = WeaveAPI.CSVParser.parseCSVRow(params[SQLPARAMS]);
 				query = dataService.getColumn(id, params[ColumnMetadata.MIN], params[ColumnMetadata.MAX], sqlParams);
 			}


- FIXED - FLEX-34145 Mobile Theme: TextInput with layoutDirection="rtl" becomes mirror on focus out. - Fixed stage text placement error when layoutDirection was set at the app of view level.

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
@@ -1567,6 +1567,7 @@
                 proxy.transform.matrix = mirrorMatrix;
             }
         }
+    }

     /** Dispose the proxy resources once it has been removed from the stage */
     protected function disposeProxy():void


Transferred from the Adobe Open Source Subversion Repository

Revision: 31
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-18T22:53:44.445926Z

Log Message:
-----------
Perforce Change 191386 by rfrishbe@ryan on 2007/12/18 17:52:29 AIR Dependency Issues. Mostly just changing types from concrete classes to interfaces. Also removing some unused private methods in Window/WindowedApplication. Bugs: SDK-14028 QA: Yes Doc: No Review: Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/airframework/src/mx/core/Window.as
+++ frameworks/projects/airframework/src/mx/core/Window.as
@@ -2147,24 +2147,6 @@
             sm.activate(this);
 			_cursorManager = new CursorManagerImpl(sm);
         }
-    }
-
-    /**
-     *  @private
-     */
-    private function measureChromeText(textField:UITextField):Rectangle
-    {
-        var textWidth:Number = 20;
-        var textHeight:Number = 14;
-
-        if (textField && textField.text)
-        {
-            textField.validateNow();
-            textWidth = textField.textWidth;
-            textHeight = textField.textHeight;
-        }
-
-        return new Rectangle(0, 0, textWidth, textHeight);
     }

  	/**


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

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

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6298
Author:   mhorn@adobe.com
Date:     2009-04-27T20:49:50.739002Z

Log Message:
-----------
asdoc updates

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/SkinnableDataContainerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerPlayPauseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonBarFirstButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ScrollBarDownButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/SkinnableContainerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/HSliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonBarLastButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DefaultButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ScrollBarUpButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/SpinnerIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/HScrollBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VSliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/SpinnerDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VScrollBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerMuteButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonBarMiddleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ScrollBarRightButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/HScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DropDownListButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ScrollBarLeftButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/NumericStepperTextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/HSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/PanelSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/skins/SparkSkin.as
+++ frameworks/projects/spark/src/spark/skins/SparkSkin.as
@@ -19,7 +19,7 @@
 import flash.events.Event;

 /**
- *  Base class for spark skins.
+ *  Base class for Spark skins.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -37,7 +37,7 @@
     public var colorized:Boolean = false;

     /**
-     * Constructor
+     * Constructor.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -50,7 +50,7 @@
     }

     /**
-     * names of items that should not be colorized by the "baseColor" style.
+     * Names of items that should not be colorized by the baseColor style.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -63,7 +63,7 @@
     }

     /**
-     * names of items that should have their "color" property defined by the "symbolColor" style.
+     * Names of items that should have their color property defined by the symbolColor style.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -76,7 +76,7 @@
     }

     /*
-     * names of items that should have their "color" property defined by the "contentBackgroundColor" style.
+     * Names of items that should have their color property defined by the contentBackgroundColor style.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


- bugfix: the parser method for -reprise-transition-property didn't really work ...

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

--- src/reprise/css/propertyparsers/Transition.as
+++ src/reprise/css/propertyparsers/Transition.as
@@ -158,9 +158,13 @@
 			{
 				return property;
 			}
-			property.setSpecifiedValue(
-				(intermediateResult.filteredString as String).split(',').
-				map(CSSParsingHelper.camelCaseCSSValueName));
+			var entries : Array =
+				(intermediateResult.filteredString as String).split(',');
+			for (var i : int = entries.length; i--;)
+			{
+				entries[i] = CSSParsingHelper.camelCaseCSSValueName(entries[i]);
+			}
+			property.setSpecifiedValue(entries);
 			return property;
 		}


Added DictUtils function to clone a dict

--- as3/smartform/src/com/rpath/raf/util/DictionaryUtils.as
+++ as3/smartform/src/com/rpath/raf/util/DictionaryUtils.as
@@ -32,5 +32,16 @@
         }
         return keys;
     }
+
+    public static function copy(dict:Dictionary, useWeakKeys:Boolean=false):Dictionary
+    {
+        var result:Dictionary = new Dictionary(useWeakKeys);
+        var keys:Array = DictionaryUtils.getKeys(dict);
+        for each (var key:* in keys)
+        {
+            result[key] = dict[key];
+        }
+        return result;
+    }
 }
 }


code cleanup

code cleanup

Change-Id: I8caa410d08767b12e2867cbbac35af85ca767033

--- WeaveCore/src/weave/utils/BitmapUtils.as
+++ WeaveCore/src/weave/utils/BitmapUtils.as
@@ -224,11 +224,10 @@
 			var base64data:String = bitmapData ? StandardLib.btoa(new PNGEncoder().encode(bitmapData)) : '';
 			ExternalInterface.marshallExceptions = false;
 			ExternalInterface.call(
-				"function(javaScriptImgExpression, base64data) {" +
+				"function(base64data) {" +
 				"  var weave = " + JavaScript.JS_this + ";" +
 				"  (" + javaScriptImgExpression + ").src = 'data:image/png;base64,' + base64data;" +
 				"}",
-				javaScriptImgExpression,
 				base64data
 			);
 		}


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

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

 package mx.olap
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/effects/MaskEffect.as
+++ frameworks/projects/framework/src/mx/effects/MaskEffect.as
@@ -0,0 +1,509 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects
+{
+
+import flash.events.EventDispatcher;
+import mx.effects.effectClasses.MaskEffectInstance;
+import mx.events.TweenEvent;
+
+
+/**
+ *  Dispatched when the effect starts, which corresponds to the
+ *  first call to the onMoveTweenUpdate()
+ *  and onScaleTweenUpdate() methods.
+ *  Flex also dispatches the first tweenUpdate event
+ *  for the effect at the same time.
+ *
+ *
The Effect.effectStart event is dispatched
+ *  before the tweenStart event.

+ *
+ *  @eventType mx.events.TweenEvent.TWEEN_START
+ */
+[Event(name="tweenStart", type="mx.events.TweenEvent")]
+
+/**
+ *  Dispatched every time the effect updates the target.
+ *  The dispatching of this event corresponds to the
+ *  calls to the onMoveTweenUpdate()
+ *  and onScaleTweenUpdate() methods.
+ *
+ *  @eventType mx.events.TweenEvent.TWEEN_UPDATE
+ */
+[Event(name="tweenUpdate", type="mx.events.TweenEvent")]
+
+/**
+ *  Dispatched when the effect ends.
+ *
+ *
When an effect plays a single time, this event occurs
+ *  at the same time as an effectEnd event.
+ *  If you configure the effect to repeat,
+ *  it occurs at the end of every repetition of the effect,
+ *  and the endEffect event occurs
+ *  after the effect plays for the final time.

+ *
+ *  @eventType mx.events.TweenEvent.TWEEN_END
+ */
+[Event(name="tweenEnd", type="mx.events.TweenEvent")]
+
+/**
+ *  The MaskEffect class is an abstract base class for all effects
+ *  that animate a mask, such as the wipe effects and the Iris effect.
+ *  This class encapsulates methods and properties that are common
+ *  among all mask-based effects.
+ *
+ *
A mask effect uses an overlay, called a mask, to perform the effect.
+ *  By default, the mask is a rectangle with the same size
+ *  as the target component.

+ *
+ *
The before or after state of the target component of a mask effect
+ *  must be invisible.
+ *  That means a mask effect always makes a target component appear on
+ *  the screen, or disappear from the screen.

+ *
+ *
You use the scaleXFrom, scaleYFrom,
+ *  scaleXTo, and scaleX properties to specify
+ *  the initial and final scale of the mask, where a value of 1.0 corresponds
+ *  to scaling the mask to the size of the target component, 2.0 scales
+ *  the mask to twice the size of the component, 0.5 scales the mask to half
+ *  the size of the component, and so on.
+ *  To use any one of these properties, you must specify all four.

+ *
+ *
You use the xFrom, yFrom, xTo,
+ *  and yTo properties to specify the coordinates of the initial
+ *  position and final position of the mask relative to the target component,
+ *  where (0, 0) corresponds to the upper left corner of the target.
+ *  To use any one of these properties, you must specify all four.

+ *
+ *
The coordinates of the initial and final position of the mask
+ *  depend on the type of effect and whether the show property
+ *  is true or false.
+ *  For example, for the WipeLeft effect with a show value of
+ *  false, the coordinates of the initial mask position
+ *  are (0, 0),corresponding to the upper-left corner of the target,
+ *  and the coordinates of the final position are the upper-right corner
+ *  of the target (width, 0), where width is the width of the target.

+ *
+ *
For a show value of true for the WipeLeft
+ *  effect, the coordinates of the initial mask position are (width, 0),
+ *  and the coordinates of the final position are (0, 0).

+ *
+ *  @mxml
+ *
+ *
The MaskEffect class defines the following properties,
+ *  which all of its subclasses inherit:

+ *
+ *

+ *  <mx:tagname
+ *    createMaskFunction=""
+ *    moveEasingFunction=""
+ *    scaleEasingFunction=""
+ *    scaleXFrom=""
+ *    scaleXTo=""
+ *    scaleYFrom=""
+ *    scaleYTo=""
+ *    show="true|false"
+ *    xFrom=""
+ *    xTo=""
+ *    yFrom=""
+ *    yTo=""
+ *  />
+ *

+ *
+ *  @see mx.effects.effectClasses.MaskEffectInstance
+ *  @see mx.effects.TweenEffect
+ */
+public class MaskEffect extends Effect
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static var AFFECTED_PROPERTIES:Array = [ "visible" ];
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param target The Object to animate with this effect.
+     */
+    public function MaskEffect(target:Object = null)
+    {
+        super(target);
+
+        instanceClass = MaskEffectInstance;
+        hideFocusRing = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  createMaskFunction
+    //----------------------------------
+
+    /**
+     *  Function called when the effect creates the mask.
+     *  The default value is a function that returns a Rectangle
+     *  with the same dimensions as the target.
+     *
+     *
The custom mask function has the following signature:

+     *
+     *

+     *  public function createLargeMask(targ:Object, bounds:Rectangle):Shape
+     *  {
+     *      var myMask:Shape = new FlexShape();
+     *
+     *      // Create mask.
+     *
+     *      return myMask;
+     *  }
+     *

+     *
+     *
Your custom mask function takes an argument
+     *  corresponding to the target component of the effect,
+     *  and a second argument that defines the dimensions of the
+     *  target so that you can correctly size the mask.
+     *  You use that argument to access properties of the target
+     *  component, such as width and height,
+     *  so that you can create a mask with the correct size.

+     *
+     *
The function returns a single Shape object
+     *  that defines the mask.

+     */
+    public var createMaskFunction:Function;
+
+    //----------------------------------
+    //  moveEasingFunction
+    //----------------------------------
+
+    /**
+     *  Easing function to use for moving the mask.
+     *  @default null
+     */
+    public var moveEasingFunction:Function;
+
+    //----------------------------------
+    //  persistAfterEnd
+    //----------------------------------
+
+    [Inspectable(category="General", format="Boolean", defaultValue="false")]
+
+    /**
+     *  @private
+     *  Flag indicating whether the mask is removed automatically
+     *  when the effect finishes. If false, it is removed.
+     *
+     *  @default true
+     */
+    mx_internal var persistAfterEnd:Boolean = false;
+
+    //----------------------------------
+    //  scaleEasingFunction
+    //----------------------------------
+
+    /**
+     *  Easing function to use for scaling the mask.
+     *  @default null
+     */
+    public var scaleEasingFunction:Function;
+
+    //----------------------------------
+    //  scaleXFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Initial scaleX for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  scaleXFrom, scaleYFrom,
+     *  scaleXTo, and scaleX.

+     */
+    public var scaleXFrom:Number;
+
+    //----------------------------------
+    //  scaleXTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Ending scaleX for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  scaleXFrom, scaleYFrom,
+     *  scaleXTo, and scaleX.

+     */
+    public var scaleXTo:Number;
+
+    //----------------------------------
+    //  scaleYFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Initial scaleY for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  scaleXFrom, scaleYFrom,
+     *  scaleXTo, and scaleX.

+     */
+    public var scaleYFrom:Number;
+
+    //----------------------------------
+    //  scaleYTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Ending scaleY for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  scaleXFrom, scaleYFrom,
+     *  scaleXTo, and scaleX.

+     */
+    public var scaleYTo:Number;
+
+    //----------------------------------
+    //  showTarget
+    //----------------------------------
+
+
+    /**
+     *  @private
+     *  Storage for the showTarget property.
+     */
+    private var _showTarget:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var _showExplicitlySet:Boolean = false;
+
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  Specifies that the target component is becoming visible,
+     *  true, or invisible, false.
+     *
+     *  If you specify this effect for a showEffect or
+     *  hideEffect trigger, Flex sets the
+     *  showTarget property for you, either to
+     *  true if the component becomes visible,
+     *  or false if the component becomes invisible.
+     *  If you use this effect with a different effect trigger,
+     *  you should set it yourself, often within the
+     *  event listener for the startEffect event.
+     *
+     *  @default true
+     */
+    public function get showTarget():Boolean
+    {
+        return _showTarget;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showTarget(value:Boolean):void
+    {
+        _showTarget = value;
+        _showExplicitlySet = true;
+    }
+
+    //----------------------------------
+    //  xFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Initial position's x coordinate for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  xFrom, yFrom, xTo,
+     *  and yTo.

+     */
+    public var xFrom:Number;
+
+    //----------------------------------
+    //  xTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Destination position's x coordinate for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  xFrom, yFrom, xTo,
+     *  and yTo.

+     */
+    public var xTo:Number;
+
+    //----------------------------------
+    //  yFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Initial position's y coordinate for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  xFrom, yFrom, xTo,
+     *  and yTo.

+     */
+    public var yFrom:Number;
+
+    //----------------------------------
+    //  yTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Destination position's y coordinate for mask.
+     *
+     *
To specify this property,
+     *  you must specify all four of these properties:
+     *  xFrom, yFrom, xTo,
+     *  and yTo.

+     */
+    public var yTo:Number;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set hideFocusRing(value:Boolean):void
+    {
+        super.hideFocusRing = value;
+    }
+
+    /**
+     *  @private
+     */
+    override public function get hideFocusRing():Boolean
+    {
+        return super.hideFocusRing;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Returns the component properties modified by this effect.
+     *  This method returns an Array containing:
+     *  [ "visible", "width", "height" ].
+     *  Since the WipeDown, WipeLeft, WipeRight, and WipeDown effect
+     *  subclasses all modify these same  properties, those classes
+     *  do not implement this method.
+     *
+     *
If you subclass the MaskEffect class to create a custom effect,
+     *  and it modifies a different set of properties on the target,
+     *  you must override this method
+     *  and return an Array containing a list of the properties
+     *  modified by your subclass.

+     *
+     *  @return An Array of Strings specifying the names of the
+     *  properties modified by this effect.
+     *
+     *  @see mx.effects.Effect#getAffectedProperties()
+     */
+    override public function getAffectedProperties():Array /* of String */
+    {
+        return AFFECTED_PROPERTIES;
+    }
+
+    /**
+     *  @private
+     */
+    override protected function initInstance(instance:IEffectInstance):void
+    {
+        super.initInstance(instance);
+
+        var maskEffectInstance:MaskEffectInstance = MaskEffectInstance(instance);
+
+        if (_showExplicitlySet)
+            maskEffectInstance.showTarget = showTarget;
+        maskEffectInstance.xFrom = xFrom;
+        maskEffectInstance.yFrom = yFrom;
+        maskEffectInstance.xTo = xTo;
+        maskEffectInstance.yTo = yTo;
+        maskEffectInstance.scaleXFrom = scaleXFrom;
+        maskEffectInstance.scaleXTo = scaleXTo;
+        maskEffectInstance.scaleYFrom = scaleYFrom;
+        maskEffectInstance.scaleYTo = scaleYTo;
+        maskEffectInstance.moveEasingFunction = moveEasingFunction;
+        maskEffectInstance.scaleEasingFunction = scaleEasingFunction;
+        maskEffectInstance.createMaskFunction = createMaskFunction;
+        maskEffectInstance.mx_internal::persistAfterEnd = mx_internal::persistAfterEnd;
+
+        EventDispatcher(maskEffectInstance).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
+        EventDispatcher(maskEffectInstance).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);
+        EventDispatcher(maskEffectInstance).addEventListener(TweenEvent.TWEEN_END, tweenEventHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Called when the TweenEffect dispatches a TweenEvent.
+     *  If you override this method, ensure that you call the super method.
+     *
+     *  @param event An event object of type TweenEvent.
+     */
+    protected function tweenEventHandler(event:TweenEvent):void
+    {
+        dispatchEvent(event);
+    }
+}
+
+}


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

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

 package mx.modules
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12786
Author:   chaase@adobe.com
Date:     2009-12-10T15:35:43.797679Z

Log Message:
-----------
Fixed bug with state property value assignments. SetProperty pseudonym values (width/explicitWidth, height/explicitHeight) were not getting set correctly, causing values to be incorrectly assigned to 0 in some cases.

QE notes: -
Doc notes: -
Bugs: sdk-24446
Reviewer: Corey
Tests run: checkintests, Mustella tests/States, tests/mx/states
Is noteworthy for integration: Yes (fix requested by tools)

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetProperty.as

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

--- frameworks/projects/framework/src/mx/states/SetProperty.as
+++ frameworks/projects/framework/src/mx/states/SetProperty.as
@@ -299,10 +299,6 @@
                 propName = name;
             }
         }
-        else
-        {
-            propName = name;
-        }
         return propName;
     }


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

--- frameworks/projects/framework/src/mx/styles/CSSSelector.as
+++ frameworks/projects/framework/src/mx/styles/CSSSelector.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.styles
 {


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

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

 package mx.rpc.soap.mxml
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18035
Author:   egeorgie@adobe.com
Date:     2010-10-06T19:01:59.480083Z

Log Message:
-----------
Fix SDK-27904 Spark Button icon property needs to be a style

In this change:
- remove the "icon" property and replace it with an "icon" non-inheriting style for Button & friends.
- exclude the "icon" style for CheckBox and RadioButton
- The protected "iconInstance" variable in ButtonSkinBase is replaced with protected methods "getIconDisplay()" and "setIcon()"

QE notes: Verify skins look as expected; Update mustella
Doc notes: Make sure doc reflects the change from property to style.
Bugs: SDK-27642
Reviewer: Corey, Glenn, Jason
Tests run: checkin tests, some mobile mustella
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/SparkButtonSkin.as</path>

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

--- frameworks/projects/spark/src/spark/components/CheckBox.as
+++ frameworks/projects/spark/src/spark/components/CheckBox.as
@@ -42,7 +42,7 @@
 //--------------------------------------

 [Exclude(name="cornerRadius", kind="style")]
-[Exclude(name="icon", kind="property")]
+[Exclude(name="icon", kind="style")]

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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

 package spark.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17841
Author:   hmuller@adobe.com
Date:     2010-09-24T15:36:59.172298Z

Log Message:
-----------
The ColumnHeaderBar classes have been substantially revised simplified and some of the horizontal scrolling flashing has been eliminated.  I've temporarily removed the column header bar event handling code since we weren't using it.   It will be restored when the column resizing feature is added.

The new versions of ColumnHeaderBar and ColumnHeaderBarLayout only depend on Grid (not GridDimensions or GridLayout).

QE notes: Failing mustella tests (bitmap and geometry changes) have been excluded
Doc notes:
Bugs: SDK-27967
Reviewer: Kevin
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRendererSkin.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowNode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridRowBackground.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DefaultColumnHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowList.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -437,7 +437,7 @@
         typicalItem: uint(1 << 9),
         variableRowHeight: uint(1 << 10),
         dataTipField: uint(1 << 11),
-        dataTipFunction: uint(1 << 12)
+        dataTipFunction: uint(1 << 12)
     };

     /**
@@ -602,7 +602,16 @@
     public function set columns(value:IList):void
     {
         if (setGridProperty("columns", value))
+        {
+            if (columnHeaderBar)
+            {
+                columnHeaderBar.layout.clearVirtualLayoutCache();
+                columnHeaderBar.invalidateSize();
+                columnHeaderBar.invalidateDisplayList();
+            }
+
             dispatchChangeEvent("columnsChanged");
+        }
     }

     /**
@@ -1120,21 +1129,31 @@
             const allStyles:Boolean = (styleName == null || styleName == "styleName");

             if (allStyles || styleManager.isSizeInvalidatingStyle(styleName))
-            {
-                grid.invalidateSize();
-                grid.clearGridLayoutCache(true);
+            {
+                if (grid)
+                {
+                    grid.invalidateSize();
+                    grid.clearGridLayoutCache(true);
+                }
+                if (columnHeaderBar)
+                {
+                    columnHeaderBar.layout.clearVirtualLayoutCache();
+                    columnHeaderBar.invalidateSize();
+                }
             }

             if (allStyles || (styleName == "alternatingRowColors"))
             {
                 initializeGridRowBackground();
-                // This is heavy-handed because only the row backgrounds need
-                // to be redrawn.
-                if (grid.layout)
+                if (grid && grid.layout)
                     grid.layout.clearVirtualLayoutCache();
             }

-            grid.invalidateDisplayList();
+            if (grid)
+                grid.invalidateDisplayList();
+
+            if (columnHeaderBar)
+                columnHeaderBar.invalidateDisplayList();
         }
     }

@@ -1305,7 +1324,6 @@
             grid.addEventListener(GridCaretEvent.CARET_CHANGE, grid_caretChangeHandler);
             grid.addEventListener(FlexEvent.VALUE_COMMIT, grid_valueCommitHandler);
             grid.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, grid_changeEventHandler);
-            grid.addEventListener("columnsChanged", grid_columnsChangedEventHandler);

             // Deferred operations (grid selection updates)

@@ -1318,10 +1336,7 @@
             initializeGridRowBackground();

         if (instance == columnHeaderBar)
-        {
-            columnHeaderBar.dataProvider = columns;
             columnHeaderBar.owner = this;
-        }
     }

     /**
@@ -1367,7 +1382,6 @@

         if (instance == columnHeaderBar)
         {
-            columnHeaderBar.dataProvider = null;
             columnHeaderBar.horizontalScrollPosition = 0;
             columnHeaderBar.owner = null;
         }
@@ -2904,11 +2918,5 @@
             columnHeaderBar.horizontalScrollPosition = Number(event.newValue);
     }

-    protected function grid_columnsChangedEventHandler(event:Event):void
-    {
-        if (columnHeaderBar)
-            columnHeaderBar.dataProvider = columns;
-    }
-
 }
 }