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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as
@@ -198,7 +198,7 @@
     [SkinPart(required="false")]

     /**
-     *  A skin part that defines the  label of the button.
+     *  A skin part that defines the label of the button.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/CheckBoxAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/CheckBoxAutomationImpl.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.controls


- new Flash controls

- new Flash controls

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -422,7 +422,7 @@
 			seconds = Math.floor(seconds % 60);
 			timeCode += ":" + ((seconds >= 10) ? seconds.toString() : "0" + seconds.toString());
 			return timeCode; //minutes.toString() + ":" + seconds.toString();
-		}
+		}

 		function positionControls() {
 			_controlBarBg.width = stage.stageWidth;


Use only FlashVars and ignore parameters passed via query string.

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -119,7 +119,21 @@
 			}

 			// get parameters
-			var params:Object = LoaderInfo(this.root.loaderInfo).parameters;
+			// Use only FlashVars, ignore QueryString
+			var params:Object, pos:int, query:Object;
+
+			params = LoaderInfo(this.root.loaderInfo).parameters;
+			pos = root.loaderInfo.url.indexOf('?');
+			if (pos !== -1) {
+				query = parseStr(root.loaderInfo.url.substr(pos + 1));
+
+				for (var key:String in params) {
+					if (query.hasOwnProperty(trim(key))) {
+						delete params[key];
+					}
+				}
+			}
+
 			_mediaUrl = (params['file'] != undefined) ? String(params['file']) : "";
 			_autoplay = (params['autoplay'] != undefined) ? (String(params['autoplay']) == "true") : false;
 			_debug = (params['debug'] != undefined) ? (String(params['debug']) == "true") : false;
@@ -394,6 +408,36 @@
 			}
 		}

+		private static function parseStr (str:String) : Object {
+			var hash:Object = {},
+				arr1:Array, arr2:Array;
+
+			str = unescape(str).replace(/\+/g, " ");
+
+			arr1 = str.split('&');
+			if (!arr1.length) {
+				return {};
+			}
+
+			for (var i:uint = 0, length:uint = arr1.length; i < length; i++) {
+				arr2 = arr1[i].split('=');
+				if (!arr2.length) {
+					continue;
+				}
+				hash[trim(arr2[0])] = trim(arr2[1]);
+			}
+			return hash;
+		}
+
+
+		private static function trim(str:String) : String {
+			if (!str) {
+				return str;
+			}
+
+			return str.toString().replace(/^\s*/, '').replace(/\s*$/, '');
+		}
+
 		private function isIllegalChar(s:String, isUrl:Boolean):Boolean {
 			var illegals:String = "' \" ( ) { } * + \\ < >";
 			if(isUrl) {


Remove allowDomain("*") and allowInsecureDomain("*").

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -95,11 +95,6 @@

 		public function FlashMediaElement() {
-
-			// show allow this player to be called from a different domain than the HTML page hosting the player
-			Security.allowDomain("*");
-			Security.allowInsecureDomain('*');
-
 			// check for security issues (borrowed from jPLayer)
 			checkFlashVars(loaderInfo.parameters);


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

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

 package mx.automation.codec
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22564
Author:   tkraikit@adobe.com
Date:     2011-09-14T19:50:07.656843Z

Log Message:
-----------
Update ASDoc "@productversion Flex 4.5.2" => "@productversion Flex 4.6"

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/OnDemandDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/FlexVersion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ArrowDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/calendarClasses/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/NumericDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateSpinnerItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
+++ frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
@@ -23,7 +23,7 @@
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
- *  @productversion Flex 4.5.2
+ *  @productversion Flex 4.6
  */
 public final class CalloutPosition
 {
@@ -33,7 +33,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public static const BEFORE:String = "before";

@@ -42,7 +42,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public static const START:String = "start";

@@ -51,7 +51,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public static const MIDDLE:String = "middle";

@@ -60,7 +60,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public static const END:String = "end";

@@ -69,7 +69,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public static const AFTER:String = "after";

@@ -79,7 +79,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
-     *  @productversion Flex 4.5.2
+     *  @productversion Flex 4.6
      */
     public static const AUTO:String = "auto";


Transferred from the Adobe Open Source Subversion Repository

Revision: 18500
Author:   cframpto@adobe.com
Date:     2010-11-09T16:53:19.948108Z

Log Message:
-----------
The column header group should not be a focusable component and when setting the GridDimension/columnCount need to clear the cache even when the column count has not changed because the columns themselves could have changed and the new list of columns could have the same number of columns as the old list of columns.

QE notes:
Doc notes:
Bugs: SDK-28449, SDK-28420
Reviewer: Kevin
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.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/gridClasses/GridDimensions.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -205,15 +205,29 @@

     /**
      *  @private
+     *
+     *  Clears the cache and resets GridDimensions such that the
+     *  number of columns is value.
      */
     public function set columnCount(value:int):void
     {
-        if (value == _columnCount)
-            return;
-
-        // if we change the columnCount, clear everything
-        // because we don't know which columns are valid anymore.
-        resetColumns(value);
+        // Don't short-circuit return if the column count didn't change.
+        // There might be a new set of columns which is the same length
+        // as the old set of columns.
+
+        // clear cached information
+        clear();
+
+        // fix up the number of columns
+        _columnCount = value;
+        _columnWidths.length = value;
+        typicalCellHeights.length = value;
+        typicalCellWidths.length = value;
+        rowList.numColumns = value;
+
+        // clear the rest of the vectors
+        clearTypicalCellWidthsAndHeights();
+        clearVector(_columnWidths, NaN, 0, _columnCount);
     }

     //----------------------------------
@@ -1304,28 +1318,7 @@
         recentNode = null;
         recentNode2 = null;
     }
-
-    /**
-     *  Clears the cache and resets GridDimensions such that the
-     *  number of columns is newLength.
-     */
-    public function resetColumns(columnsLength:int):void
-    {
-        // clear cached information
-        clear();
-
-        // fix up the number of columns
-        _columnCount = columnsLength;
-        _columnWidths.length = columnsLength;
-        typicalCellHeights.length = columnsLength;
-        typicalCellWidths.length = columnsLength;
-        rowList.numColumns = columnsLength
-
-        // clear the rest of the vectors
-        clearTypicalCellWidthsAndHeights();
-        clearVector(_columnWidths, NaN, 0, _columnCount);
-    }
-
+
     /**
      *  Moves count number of rows from the fromRow index to the toRow
      *  index. This operation will not affect rowCount.
@@ -1541,7 +1534,7 @@
             case CollectionEventKind.REFRESH:
             case CollectionEventKind.RESET:
             {
-                resetColumns(IList(event.target).length);
+                columnCount = IList(event.target).length;
                 break;
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18769
Author:   clucier@adobe.com
Date:     2010-11-22T13:37:11.326971Z

Log Message:
-----------
View transition bug fixes and some changes to help address some performance regression.

QE notes: None
Doc notes: None
Bugs: SDK-28634, SDK-28633.
Reviewer: Chiedo
Tests run: Checkin
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
@@ -22,6 +22,7 @@
 import spark.components.supportClasses.ButtonBarBase;
 import spark.components.supportClasses.ViewNavigatorBase;
 import spark.effects.Animate;
+import spark.effects.Move;
 import spark.effects.animation.MotionPath;
 import spark.effects.animation.SimpleMotionPath;

@@ -66,18 +67,29 @@

     /**
      *  @private
-     */
-    private var currentViewProps:Object;
-
-    /**
-     *  @private
-     */
-    private var nextViewProps:Object;
-
-	/**
-	 *  @private
-	 */
-	private var transitionGroup:Group;
+     *  Property bag used to save any start view properties that
+     *  are then restored after the transition is complete.
+     */
+    private var startViewProps:Object;
+
+    /**
+     *  @private
+     *  Property bag used to save any end view properties that
+     *  are then restored after the transition is complete.
+     */
+    private var endViewProps:Object;
+
+    /**
+     *  @private
+     *  Property bag used to save any navigator centric properties that
+     *  are then restored after the transition is complete.
+     */
+    private var navigatorProps:Object;
+
+    /**
+     *  @private
+     */
+    private var transitionGroup:Group;

     //--------------------------------------------------------------------------
     //
@@ -161,6 +173,11 @@
     {
         super.captureStartValues();

+        // Initialize the property bag used to save some of our
+        // properties that are then restored after the transition is over.
+        navigatorProps = new Object();
+
+        // Snapshot the entire navigator.
         var oldVisibility:Boolean = endView.visible;
         endView.visible = false;
         cachedNavigator = getSnapshot(targetNavigator);
@@ -176,16 +193,16 @@
      *  @productversion Flex 4.5
      */
     override protected function createViewEffect():IEffect
-    {
-		// Prepare our start and end views by positioning them prior to
-		// the start of our transition, ensuring that they are cached as
-		// surfaces, and adjust z-order if necessary.
-
-		var slideTargets:Array = new Array();
-
+    {
+        // Prepare our start and end views by positioning them prior to
+        // the start of our transition, ensuring that they are cached as
+        // surfaces, and adjust z-order if necessary.
+
+        var slideTargets:Array = new Array();
+
         if (startView)
         {
-            currentViewProps = { includeInLayout:startView.includeInLayout,
+            startViewProps = { includeInLayout:startView.includeInLayout,
                 cacheAsBitmap:startView.cacheAsBitmap };

             startView.includeInLayout = false;
@@ -197,7 +214,7 @@

         if (endView)
         {
-            nextViewProps = { includeInLayout:endView.includeInLayout,
+            endViewProps = { includeInLayout:endView.includeInLayout,
                 cacheAsBitmap:endView.cacheAsBitmap };

             endView.includeInLayout = false;
@@ -207,7 +224,7 @@
                 slideTargets.push(endView);

             if (mode == SlideViewTransitionMode.UNCOVER)
-				setComponentChildIndex(endView, navigator, 0);
+                setComponentChildIndex(endView, navigator, 0);
         }

         var slideDistance:Number;
@@ -244,19 +261,19 @@
                 break;
         }

-		// Position the end view prior to start of transition.
+        // Position the end view prior to start of transition.
         if (!(mode == SlideViewTransitionMode.UNCOVER))
             endView[animatedProperty] = -slideDistance - slideOffset;

-		// Construction animation sequence.
-        var animation:Animate = new Animate();
-        var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
-        vector.push(new SimpleMotionPath(animatedProperty, null, null, slideDistance + slideOffset));
-        animation.motionPaths = vector;
-        animation.easer = easer;
+        // Construction animation sequence.
+        var animation:Move = new Move();
         animation.targets = slideTargets;
         animation.duration = duration;
-
+		animation.easer = easer;
+        if (verticalTransition)
+            animation.yBy = slideDistance + slideOffset;
+        else
+            animation.xBy = slideDistance + slideOffset;
         return animation;
     }

@@ -270,32 +287,36 @@
      */
     override protected function createConsolidatedEffect():IEffect
     {
-		// Prepare our start and end view elements by positioning them prior to
-		// the start of our transition, ensuring that they are cached as
-		// surfaces, and adjust z-order if necessary.
-
-		var slideTargets:Array = new Array();
-
+        // Prepare our start and end view elements by positioning them prior to
+        // the start of our transition, ensuring that they are cached as
+        // surfaces, and adjust z-order if necessary.
+
+        var slideTargets:Array = new Array();
+
         if (!(mode == SlideViewTransitionMode.COVER))
             slideTargets.push(cachedNavigator);

         if (!(mode == SlideViewTransitionMode.UNCOVER))
             slideTargets.push(targetNavigator.contentGroup);

+        navigatorProps.contentGroupIncludeInLayout = targetNavigator.contentGroup.includeInLayout;
         targetNavigator.contentGroup.includeInLayout = false;
+
+        navigatorProps.contentGroupCacheAsBitmap = targetNavigator.contentGroup.cacheAsBitmap;
+        targetNavigator.contentGroup.cacheAsBitmap = true;

         transitionGroup = new Group();
         transitionGroup.includeInLayout=false;

-		// Ensure the views are in the right stacking order based on our
-		// transition mode (cover vs. uncover for instance).
+        // Ensure the views are in the right stacking order based on our
+        // transition mode (cover vs. uncover for instance).
         if (mode == SlideViewTransitionMode.COVER)
-		{
-			var childIndex:uint = targetNavigator.skin.getChildIndex(targetNavigator.contentGroup);
-		    addComponentToContainerAt(transitionGroup, targetNavigator.skin, childIndex);
-		}
+        {
+            var childIndex:uint = targetNavigator.skin.getChildIndex(targetNavigator.contentGroup);
+            addComponentToContainerAt(transitionGroup, targetNavigator.skin, childIndex);
+        }
         else
-			addComponentToContainer(transitionGroup, targetNavigator.skin);
+            addComponentToContainer(transitionGroup, targetNavigator.skin);

         if (targetNavigator is TabbedViewNavigator)
         {
@@ -305,6 +326,7 @@
             {
                 if (!(mode == SlideViewTransitionMode.UNCOVER))
                     slideTargets.push(tabBar);
+                navigatorProps.tabBarIncludeInLayout = tabBar.includeInLayout;
                 tabBar.includeInLayout = false;
             }
         }
@@ -314,13 +336,13 @@
             {
                 if (!(mode == SlideViewTransitionMode.UNCOVER))
                     slideTargets.push(actionBar);
+                navigatorProps.actionBarIncludeInLayout = actionBar.includeInLayout;
                 actionBar.includeInLayout = false;
             }
         }

         if (cachedNavigator)
         {
-            cachedNavigator.x = cachedNavigator.y = 0;
             cachedNavigator.includeInLayout = false;
             transitionGroup.addElement(cachedNavigator);
         }
@@ -329,7 +351,7 @@
         var animatedProperty:String;
         var verticalTransition:Boolean;

-		// Predetermine slide direction and distance.
+        // Predetermine slide direction and distance.
         switch (direction)
         {
             case ViewTransitionDirection.RIGHT:
@@ -356,8 +378,8 @@
                 break;
         }

-		// Position the control bars prior to our transition.
-
+        // Position the control bars prior to our transition.
+
         if (targetNavigator == parentNavigator)
         {
             if (targetNavigator is TabbedViewNavigator)
@@ -377,10 +399,10 @@
         if (!(mode == SlideViewTransitionMode.UNCOVER))
            targetNavigator.contentGroup[animatedProperty] = -slideDistance + targetNavigator.contentGroup[animatedProperty];

-		// Validate to ensure our snapshots are rendered.
+        // Validate to ensure our snapshots are rendered.
         transitionGroup.validateNow();

-		// Construction animation sequence.
+        // Construction animation sequence.
         var animation:Animate = new Animate();
         var vector:Vector.<MotionPath> = new Vector.<MotionPath>();
         vector.push(new SimpleMotionPath(animatedProperty, null, null, slideDistance));
@@ -402,9 +424,45 @@
      */
     override protected function cleanUp():void
     {
-        if (transitionGroup)
-			removeComponentFromContainer(transitionGroup, targetNavigator.skin);
-
+        // Restore original saved properties for includeInLayout and cacheAsBitmap.
+        if (!consolidatedTransition)
+        {
+            if (startView)
+            {
+                startView.includeInLayout = startViewProps.includeInLayout;
+                startView.cacheAsBitmap = startViewProps.cacheAsBitmap;
+                startViewProps = null;
+            }
+
+            if (endView)
+            {
+                endView.includeInLayout = endViewProps.includeInLayout;
+                endView.cacheAsBitmap = endViewProps.cacheAsBitmap;
+                endViewProps = null;
+            }
+        }
+        else
+        {
+            if (targetNavigator is TabbedViewNavigator)
+            {
+                var tabBar:ButtonBarBase = TabbedViewNavigator(targetNavigator).tabBar;
+
+                if (tabBar)
+                    tabBar.includeInLayout = navigatorProps.tabBarIncludeInLayout;
+            }
+            else if (targetNavigator is ViewNavigator)
+            {
+                if (actionBar)
+                    actionBar.includeInLayout = navigatorProps.actionBarIncludeInLayout;
+            }
+
+            if (transitionGroup)
+                removeComponentFromContainer(transitionGroup, targetNavigator.skin);
+
+            targetNavigator.contentGroup.includeInLayout = navigatorProps.contentGroupIncludeInLayout;
+            targetNavigator.contentGroup.cacheAsBitmap = navigatorProps.contentGroupCacheAsBitmap;
+        }
+
         transitionGroup = null;
         cachedNavigator = null;


Transferred from the Adobe Open Source Subversion Repository

Revision: 18825
Author:   deeptika@adobe.com
Date:     2010-11-29T09:53:40.426187Z

Log Message:
-----------
Adding delegate for SkinnableDataContainerTabularData

QE notes:
Doc notes:
Bugs: FLEXENT-1374 (Automation delegate for spark SkinnableDataContainer is not defined)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSkinnableDataContainerAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/manifest_automation_spark.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/AutomationSparkClasses.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as
+++ frameworks/projects/automation_spark/src/spark/automation/tabularData/SkinnableDataContainerTabularData.as
@@ -0,0 +1,230 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.automation.tabularData
+{
+
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationTabularData;
+	import mx.core.Repeater;
+	import mx.core.mx_internal;
+
+	use namespace mx_internal;
+
+	/**
+	 * @private
+	 */
+	public class SkinnableDataContainerTabularData
+		implements IAutomationTabularData
+	{
+		include "../../core/Version.as";
+
+		/**
+		 *  Constructor
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function SkinnableDataContainerTabularData(container:IAutomationObject)
+		{
+			super();
+
+			this.containerDelegate = container;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		private var containerDelegate:IAutomationObject;
+
+		/**
+		 *  @private
+		 */
+		private var _values:Array;
+
+		/**
+		 *  @private
+		 */
+		private var oldStart:uint;
+
+		/**
+		 *  @private
+		 */
+		private var oldEnd:int;
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get firstVisibleRow():int
+		{
+			return 0;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get lastVisibleRow():int
+		{
+			return Math.max(numRows - 1, 0);
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get numRows():int
+		{
+			var visibleChildren:int = 0;
+			// code modified to avoid the usage of numAutomationChildren and
+			// getAutomationChildAt in a loop
+			var childList:Array  =  containerDelegate.getAutomationChildren();
+
+			var n:int = childList?childList.length:0;
+			for (var i:int = 0; i < n; ++i)
+			{
+				var ao:IAutomationObject = childList[i] as IAutomationObject;
+				if (ao)
+				{
+					var disp:DisplayObject = ao as DisplayObject;
+					if (disp.visible && !(disp is Repeater))
+						++visibleChildren;
+				}
+			}
+			return visibleChildren;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get numColumns():int
+		{
+			var a:Array = _values || getValues(0, numRows);
+			return a && a.length > 0 ? a[0].length : 0;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get columnNames():Array
+		{
+			var result:Array = new Array(numColumns);
+			var n:int = result.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				result[i] = "";
+			}
+			return result;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getValues(start:uint = 0, end:uint = 0):Array
+		{
+			if (_values && oldStart == start && oldEnd == end)
+				return _values;
+
+			var longestRow:int = 1;
+			_values = [ ];
+			var k:int = 0;
+			// code modified to avoid the usage of numAutomationChildren and
+			// getAutomationChildAt in a loop
+			var childList:Array  =  containerDelegate.getAutomationChildren();
+
+			var n:int = childList? childList.length:0;
+			for (var i:int = 0; i < n && k <= end; i++)
+			{
+				var ao:IAutomationObject = childList[i] as IAutomationObject ;
+				if (ao)
+				{
+					var disp:DisplayObject = ao  as DisplayObject;
+					if (disp.visible && !(disp is Repeater))
+					{
+						if (k >=start && k <= end)
+						{
+							var av:Array = flattenArray(ao.automationValue);
+							_values.push(av);
+							longestRow = Math.max(longestRow, av.length);
+						}
+						++k;
+					}
+				}
+			}
+
+			n = _values.length;
+			// normalize the grid so all rows have the same number of columns
+			for (i = 0; i < n; i++)
+			{
+				for (var j:int = _values[i].length; j < longestRow; j++)
+				{
+					_values[i].push("");
+				}
+			}
+			oldStart = start;
+			oldEnd = end;
+			return _values;
+		}
+
+		/**
+		 *  @private
+		 */
+		private static function flattenArray(a:Array):Array
+		{
+			if (!a)
+				return [];
+			var n:int =  a.length;
+			for (var i:int = 0; i < n; ++i)
+			{
+				if (a[i] is Array)
+				{
+					var tmp:Array = [];
+
+					if (i > 0)
+						tmp = a.slice(0, i);
+
+					tmp = tmp.concat(a[i]);
+
+					if (i < a.length - 1)
+						tmp = tmp.concat(a.slice(i + 1));
+
+					a = tmp;
+					i = -1;
+				}
+			}
+			return a;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getAutomationValueForData(data:Object):Array
+		{
+			return [];
+		}
+	}
+}


Fix FLEX-33929 - NPE proxy.bitmapData is null on Android

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
@@ -1554,7 +1554,14 @@
     /** Dispose the proxy resources once it has been removed from the stage */
     protected function disposeProxy():void
     {
-        Bitmap(proxy).bitmapData.dispose();
+
+        var bd: BitmapData = Bitmap(proxy).bitmapData;
+        if (bd)
+           bd.dispose();
+        else {
+            trace("[WARN] SST found empty bitmap data in:", debugId)  ;
+        }
+
     }

     /**


- fixed bug in CSSProperty::clone

- fixed bug in CSSProperty::clone

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

--- src/reprise/css/CSSProperty.as
+++ src/reprise/css/CSSProperty.as
@@ -257,6 +257,11 @@
 						prop.m_computedValue = compValue;
 					}
 				}
+				else
+				{
+					prop.m_specifiedValue = m_specifiedValue;
+					prop.m_computedValue = m_computedValue;
+				}
 			}
 			else
 			{


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

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


Fix trace_properties.as to name Function and Function.prototype properly

--- test/trace/trace_properties.as
+++ test/trace/trace_properties.as
@@ -406,8 +406,12 @@
 {
   _global["mySecretId"] = "_global";
   _global.Object["mySecretId"] = "_global.Object";
+  _global.Function["mySecretId"] = "_global.Function";
+  _global.Function.prototype["mySecretId"] = "_global.Function.prototype";
   _global.XMLNode["mySecretId"] = "_global.XMLNode";
   generate_names (_global.Object, "_global", "Object");
+  generate_names (_global.Function, "_global", "Function");
+  generate_names (_global.Function.prototype, "_global", "Function.prototype");
   generate_names (_global.XMLNode, "_global", "XMLNode");
   generate_names (_global, "", "_global");


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

--- frameworks/projects/framework/src/mx/effects/easing/Elastic.as
+++ frameworks/projects/framework/src/mx/effects/easing/Elastic.as
@@ -0,0 +1,178 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-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.easing
+{
+
+/**
+ *  The Elastc class defines three easing functions to implement
+ *  motion with Flex effect classes, where the motion is defined by
+ *  an exponentially decaying sine wave.
+ *
+ *  For more information, see http://www.robertpenner.com/profmx.
+ */
+public class Elastic
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  The easeIn() method starts motion slowly,
+     *  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.
+     *
+     *  @param a Specifies the amplitude of the sine wave.
+     *
+     *  @param p Specifies the period of the sine wave.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeIn(t:Number, b:Number,
+								  c:Number, d:Number,
+								  a:Number = 0, p:Number = 0):Number
+	{
+		if (t == 0)
+			return b;
+
+		if ((t /= d) == 1)
+			return b + c;
+
+		if (!p)
+			p = d * 0.3;
+
+		var s:Number;
+		if (!a || a < Math.abs(c))
+		{
+			a = c;
+			s = p / 4;
+		}
+		else
+		{
+			s = p / (2 * Math.PI) * Math.asin(c / a);
+		}
+
+		return -(a * Math.pow(2, 10 * (t -= 1)) *
+				 Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
+	}
+
+    /**
+     *  The easeOut() method starts motion fast,
+     *  and then decelerates 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.
+     *
+     *  @param a Specifies the amplitude of the sine wave.
+     *
+     *  @param p Specifies the period of the sine wave.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeOut(t:Number, b:Number,
+								   c:Number, d:Number,
+								   a:Number = 0, p:Number = 0):Number
+	{
+		if (t == 0)
+			return b;
+
+		if ((t /= d) == 1)
+			return b + c;
+
+		if (!p)
+			p = d * 0.3;
+
+		var s:Number;
+		if (!a || a < Math.abs(c))
+		{
+			a = c;
+			s = p / 4;
+		}
+		else
+		{
+			s = p / (2 * Math.PI) * Math.asin(c / a);
+		}
+
+		return a * Math.pow(2, -10 * t) *
+			   Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
+	}
+
+    /**
+     *  The easeInOut() method combines the motion
+     *  of the easeIn() and easeOut() methods
+	 *  to start the motion slowly, accelerate motion, then decelerate.
+     *
+     *  @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.
+     *
+     *  @param a Specifies the amplitude of the sine wave.
+     *
+     *  @param p Specifies the period of the sine wave.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeInOut(t:Number, b:Number,
+									 c:Number, d:Number,
+									 a:Number = 0, p:Number = 0):Number
+	{
+		if (t == 0)
+			return b;
+
+		if ((t /= d / 2) == 2)
+			return b + c;
+
+		if (!p)
+			p = d * (0.3 * 1.5);
+
+		var s:Number;
+		if (!a || a < Math.abs(c))
+		{
+			a = c;
+			s = p / 4;
+		}
+		else
+		{
+			s = p / (2 * Math.PI) * Math.asin(c / a);
+		}
+
+		if (t < 1)
+		{
+			return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) *
+				   Math.sin((t * d - s) * (2 * Math.PI) /p)) + b;
+		}
+
+		return a * Math.pow(2, -10 * (t -= 1)) *
+			   Math.sin((t * d - s) * (2 * Math.PI) / p ) * 0.5 + c + b;
+	}
+}
+
+}


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8712
Author:   aharui@adobe.com
Date:     2009-07-21T17:39:03.273624Z

Log Message:
-----------
Fix embedded fonts in RSLs (and more complex module topologies)

QE Notes: None
Doc Notes: None
Bugs: SDK-22313
Reviewer: Darrell, Gordon
API Change: None
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/TextInput mustella/gumbo/components/TextArea

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -35,14 +35,11 @@
 import flash.system.Capabilities;
 import flash.text.Font;
 import flash.text.TextFormat;
-import flash.text.engine.TextBlock;
-import flash.text.engine.TextLine;
 import flash.ui.Keyboard;
 import flash.utils.ByteArray;
 import flash.utils.Dictionary;
 import flash.utils.Timer;
 import flash.utils.getQualifiedClassName;
-import flashx.textLayout.compose.ITextLineCreator;

 import mx.core.FlexSprite;
 import mx.core.IChildList;
@@ -163,7 +160,7 @@
  */
 public class SystemManager extends MovieClip
 						   implements IChildList, IFlexDisplayObject,
-						   IFlexModuleFactory, ISystemManager, ITextLineCreator
+						   IFlexModuleFactory, ISystemManager
 {
     include "../core/Version.as";

@@ -1784,54 +1781,6 @@
     public function info():Object
     {
         return {};
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Methods: ITextLineCreator
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-	 *  Calls createTextLine() on the specified TextBlock
-	 *  with the specified parameters.
-	 *  In order for a TextLine to use an embedded font,
-	 *  it must be created in the SWF where the font is.
-	 *  This factory method makes that possible.
-   	 */
-    public function createTextLine(textBlock:TextBlock,
-    							   previousLine:TextLine = null,
-    							   width:Number = 1000000,
-    							   lineOffset:Number = 0.0,
-    							   fitSomething:Boolean = false):TextLine
-    {
-	    return textBlock.createTextLine(previousLine, width,
-	    								lineOffset, fitSomething);
-    }
-
-    /**
-	 *  Calls recreateTextLine() on the specified TextBlock
-	 *  with the specified parameters.
-	 *  In order for a TextLine to use an embedded font,
-	 *  it must be recreated in the SWF where the font is.
-	 *  This factory method makes that possible.
-   	 */
-    public function recreateTextLine(textBlock:TextBlock,
-    								 textLine:TextLine,
-    								 previousLine:TextLine = null,
-    								 width:Number = 1000000,
-    								 lineOffset:Number = 0.0,
-    								 fitSomething:Boolean = false):TextLine
-    {
-	    // The recreateTextLine() method was added to TextBlock
-	    // in Player 10.1, so it must be looked up by name
-	    // since we are compiling for Player 10.0.
-	    var recreateTextLine:Function = textBlock["recreateTextLine"];
-	    if (recreateTextLine == null)
-	    	return null;
-
-	    return recreateTextLine(textLine, previousLine, width,
-	    	   					lineOffset, fitSomething);
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8574
Author:   aharui@adobe.com
Date:     2009-07-15T05:33:44.225721Z

Log Message:
-----------
Bugs related to TLF and focus.  Also TLF Marshall Plan adjustments, and some IME fixes

QE Notes: None
Doc Notes: None
Bugs: SDK-21278, SDK-21686, SDK-21375, SDK-18516, SDK-15093, SDK-21335
Reviewer: darrell, carol
tests: checkintests mustella/gumbo mustella/components

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IIMESupport.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/spark/src/spark/components/NumericStepper.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/core/UITextField.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/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.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/spark/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.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/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.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/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.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/controls/sliderClasses/Slider.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/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>

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

--- frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
+++ frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
@@ -547,8 +547,6 @@
     public function Slider()
     {
         super();
-
-        tabChildren = true;
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 14869
Author:   cframpto@adobe.com
Date:     2010-03-19T02:24:27.434644Z

Log Message:
-----------
Merge mirroring changes 14728-14730, 14772-14775, 14806 from 4.x to trunk.

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

Modified Paths:
--------------
<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/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml</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/spark/src/spark/components/VSlider.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</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/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/CheckBoxSkin.mxml</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/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>

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

--- frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
+++ frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
@@ -21,6 +21,7 @@

 import mx.core.IFlexDisplayObject;
 import mx.core.IUIComponent;
+import mx.core.LayoutDirection;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.effects.Tween;
@@ -2398,7 +2399,7 @@
         var tOffset:Number = getStyle("dataTipOffset");

         // If the layoutDirection is rtl, swap left and right placement
-        if (layoutDirection == "rtl")
+        if (layoutDirection == LayoutDirection.RTL)
         {
             if (tPlacement == "left")
                 tPlacement = "right";
@@ -2459,7 +2460,7 @@
             }
         }

-        if (layoutDirection == "rtl")
+        if (layoutDirection == LayoutDirection.RTL)
             relX += dataTip.width;

         var o:Point = new Point(relX, relY);


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

--- frameworks/projects/automation_dmv/src/mx/automation/delegates/advancedDataGrid/AdvancedListBaseContentHolderAutomationImpl.as
+++ frameworks/projects/automation_dmv/src/mx/automation/delegates/advancedDataGrid/AdvancedListBaseContentHolderAutomationImpl.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.advancedDataGrid
 {


使用小数以让代码更清楚

使用小数以让代码更清楚

--- as3/com/netease/protobuf/Int64.as
+++ as3/com/netease/protobuf/Int64.as
@@ -28,7 +28,7 @@
 		 * Convert to Number.
 		 */
 		public final function toNumber():Number {
-			return high * 4294967296 + low
+			return high * 4294967296.0 + low
 		}
 		public final function toString(radix:uint = 10):String {
 			if (radix < 2 || radix > 36) {


removed some unncessary checks on file names

--- src/flash/FlashMediaElement.as
+++ src/flash/FlashMediaElement.as
@@ -387,8 +387,8 @@
 		// https://github.com/happyworm/jPlayer/blob/e8ca190f7f972a6a421cb95f09e138720e40ed6d/actionscript/Jplayer.as#L228
 		private function checkFlashVars(p:Object):void {
 			var i:Number = 0;
-			for each (var s:String in p) {
-				if (isIllegalChar(s)) {
+			for (var s:String in p) {
+				if (isIllegalChar(p[s], s === 'file')) {
 					securityIssue = true; // Illegal char found
 				}
 				i++;
@@ -397,9 +397,12 @@
 				directAccess = true;
 			}
 		}
-
-		private function isIllegalChar(s:String):Boolean {
+
+		private function isIllegalChar(s:String, isUrl:Boolean):Boolean {
 			var illegals:String = "' \" ( ) { } * + \\ < >";
+			if(isUrl) {
+				illegals = "\" { } \\ < >";
+			}
 			if(Boolean(s)) { // Otherwise exception if parameter null.
 				for each (var illegal:String in illegals.split(' ')) {
 					if(s.indexOf(illegal) >= 0) {


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

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

 package mx.charts.chartClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18357
Author:   jasonsj@adobe.com
Date:     2010-10-28T22:43:40.124825Z

Log Message:
-----------
Mobile Theme feature work:
Implemented borderVisible and prompt for mobile TextInputSkin
Fixed focus exclusions for CheckBox and RadioButton
Fixed promptDisplay bug in TextInput
Moved textShadowAlpha and textShadowColor to BasicInheritingTextStyles from ActionBar and Button
Added leading and letterSpacing to BasicInheritingTextStyles

QE notes: Update mustella bitmaps for Button and RadioButton
Doc notes:
Bugs:
SDK-28239 Fixed visuals for Button and RadioButton skin
Reviewer: gruehle, aharui
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/StyleableTextFieldTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_downSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
@@ -38,30 +38,6 @@
  *  @productversion Flex 4.5
  */
 [Style(name="titleAlign", type="String", enumeration="left,right,center", inherit="no", theme="mobile")]
-
-/**
- *  Color of text shadows.
- *
- *  @default #FFFFFF
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="textShadowColor", type="uint", format="Color", inherit="yes", theme="mobile")]
-
-/**
- *  Alpha of text shadows.
- *
- *  @default 0.55
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Style(name="textShadowAlpha", type="Number", format="Color", inherit="yes", theme="mobile", minValue="0.0", maxValue="1.0")]

 /**
  *  @copy spark.components.supportClasses.GroupBase#style:accentColor


Transferred from the Adobe Open Source Subversion Repository

Revision: 19707
Author:   jasonsj@adobe.com
Date:     2011-01-11T19:29:35.125805Z

Log Message:
-----------
Added caret tracking to mobile TextArea skin while text changes and when using arrow keys.
Fixed mobile TextArea prompt sizing.
Updated mobile ButtonBar graphics with new shadows.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarLastButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarFirstButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarFirstButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarFirstButton_selected.fxg</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/mobile240/assets/ButtonBarFirstButton_selected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarFirstButton_selected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarMiddleButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarMiddleButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarMiddleButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarMiddleButton_selected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarLastButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarMiddleButton_selected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarLastButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarMiddleButton_selected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarLastButton_up.fxg</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/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarLastButton_selected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarLastButton_selected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarLastButton_selected.fxg</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/mobile320/assets/ButtonBarFirstButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarFirstButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarFirstButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarMiddleButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarMiddleButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/ButtonBarMiddleButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarLastButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/ButtonBarLastButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/ButtonBarFirstButton_up.fxg</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
@@ -12,16 +12,16 @@
 package spark.skins.mobile
 {

-import flash.display.Graphics;
 import flash.events.Event;
-import flash.events.FocusEvent;
+import flash.events.KeyboardEvent;
+import flash.geom.Rectangle;
 import flash.system.Capabilities;
+import flash.ui.Keyboard;

 import mx.core.DPIClassification;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;

-import spark.components.Group;
 import spark.components.Scroller;
 import spark.components.TextArea;
 import spark.components.VGroup;
@@ -33,7 +33,6 @@

 use namespace mx_internal;

-// FIXME (jasonsj): how to support TextArea#heightInLines?
 /**
  *  ActionScript-based skin for TextArea components in mobile applications.
  *
@@ -99,9 +98,6 @@
                 break;
             }
         }
-
-        // default the text display width to be layoutMeasuredWidth
-        oldUnscaledWidth = layoutMeasuredWidth;
     }

     //--------------------------------------------------------------------------
@@ -148,8 +144,10 @@
     //--------------------------------------------------------------------------

     private var textDisplayGroup:VGroup;
-
+
     private var _isIOS:Boolean;
+
+    private var invalidateCaretPosition:Boolean = true;

     /**
      *  @private
@@ -164,20 +162,20 @@
             textDisplay.multiline = true;
             textDisplay.editable = true;
             textDisplay.wordWrap = true;
+
+            // on iOS, resize the TextField and let the native control handle scrolling
+            _isIOS = (Capabilities.version.indexOf("IOS") == 0);
+
+            if (!_isIOS)
+                textDisplay.addEventListener(KeyboardEvent.KEY_DOWN, textDisplay_keyHandler);
+
             textDisplay.addEventListener(Event.CHANGE, textDisplay_changeHandler);
             textDisplay.addEventListener(FlexEvent.VALUE_COMMIT, textDisplay_changeHandler);
-
-            // on iOS, resize the TextField and let the native control handle scrolling
-            _isIOS = (Capabilities.version.indexOf("IOS") == 0);

             // wrap StyleableTextComponent in Group for viewport
             textDisplayGroup = new VGroup();
             textDisplayGroup.clipAndEnableScrolling = true;
             textDisplayGroup.addElement(textDisplay);
-
-            // scroll to the caret position
-            textDisplay.addEventListener(Event.CHANGE, caret_changeHandler);
-            textDisplay.addEventListener(FlexEvent.VALUE_COMMIT, caret_changeHandler);
         }

         if (!scroller)
@@ -192,6 +190,19 @@
             scroller.viewport = textDisplayGroup;

         super.createChildren();
+    }
+
+    /**
+     *  @private
+     *  TextArea prompt supports wrapping and multiline
+     */
+    override protected function createPromptDisplay():StyleableTextField
+    {
+        var prompt:StyleableTextField = super.createPromptDisplay();
+        prompt.editable = true;
+        prompt.wordWrap = true;
+
+        return prompt;
     }

     /**
@@ -227,20 +238,18 @@
         // is dependent on textDisplay's width.
         // Use the old textDisplay width as an estimte for the new one.
         // If we are wrong, we'll find out in updateDisplayList()
+        textDisplay.commitStyles();
         setElementSize(textDisplay, textDisplayEstimatedWidth, NaN);

         var textDisplayHeight:Number = getElementPreferredHeight(textDisplay);

+        // FIXME (jasonsj): how to support TextArea#heightInLines?
         measuredHeight = Math.max(layoutMeasuredHeight, textDisplayHeight + paddingTop + paddingBottom);
     }

-    /**
-     * @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-    {
-        drawBackground(unscaledWidth, unscaledHeight);
-
+    override protected function layoutContents(unscaledWidth:Number,
+                                               unscaledHeight:Number):void
+    {
         // position & size border
         if (border)
         {
@@ -262,16 +271,37 @@
         textDisplayGroup.paddingTop = paddingTop;
         textDisplayGroup.paddingBottom = paddingBottom;

-        // because the text is multi-line, measuring and layout
-        // can be somewhat tricky
         var unscaledTextWidth:Number = unscaledWidth - paddingLeft - paddingRight;
         var unscaledTextHeight:Number = unscaledHeight - paddingTop - paddingBottom;
         var textHeight:Number = unscaledTextHeight;

-        // TextField height should match its content or the TextArea bounds
-        // iOS special case to prevent Flex Scroller scrolling
+        // set width first to measure height correctly
+        textDisplay.commitStyles();
+        textDisplay.width = unscaledTextWidth;
+
+        // TextField height should match its content or the TextArea bounds at minimum
+        // iOS special case to prevent Flex Scroller scrolling when editable
         if (!_isIOS || !textDisplay.editable)
             textHeight = Math.max(textDisplay.measuredTextSize.y, textHeight);
+
+        // FIXME (jasonsj): iOS native scroll bar appears even when explictHeight
+        //                  is not specified. Focus-in is jumpy.
+
+        if (promptDisplay)
+        {
+            promptDisplay.commitStyles();
+            setElementSize(promptDisplay, unscaledTextWidth, textHeight);
+            setElementPosition(promptDisplay, paddingLeft, paddingTop);
+
+            // no need to update textDisplay if promptDisplay is present
+            return;
+        }
+
+        // TextField will auto scroll to a new line before we can resize it to
+        // fit the new text. Adjust scrollV so that all text is visible.
+        // FIXME (jasonsj): is this needed for iOS?
+        if (textDisplay.scrollV > 1)
+            textDisplay.scrollV = 1;

         // grab old measured textDisplay height before resizing it
         var oldPreferredTextHeight:Number = getElementPreferredHeight(textDisplay);
@@ -293,30 +323,130 @@
         if (oldPreferredTextHeight != newPreferredTextHeight)
             invalidateSize();

-        // Now that we're done with laying out the textDisplay,
-        // size the Group to the StyleableTextField plus padding
-        setElementSize(textDisplayGroup, unscaledWidth, paddingTop + textHeight + paddingBottom);
-
-        if (promptDisplay)
-        {
-            promptDisplay.commitStyles();
-            setElementSize(promptDisplay, unscaledTextWidth, unscaledTextHeight);
-            setElementPosition(promptDisplay, paddingLeft, paddingTop);
-        }
-    }
-
-    private function caret_changeHandler(event:Event):void
-    {
-        // TODO (jasonsj): caret positioning on iOS
-        // textDisplayGroup.verticalScrollPosition = textDisplay.getCharBoundaries(textDisplay.caretIndex).y;
-    }
-
-    /**
-     *  @private
+        // if height is unspecified, grow the StyleableTextField
+        if (isNaN(hostComponent.explicitHeight))
+        {
+            // explicitly size the scroller since the StyleableTextField does not
+            // invalidate it's parent
+            setElementSize(scroller, unscaledWidth, textHeight + paddingTop + paddingBottom);
+        }
+        else if (invalidateCaretPosition)
+        {
+            // if the caret is outside the viewport, update the Group verticalScrollPosition
+            var charIndex:int = textDisplay.selectionBeginIndex;
+            var caretBounds:Rectangle = textDisplay.getCharBoundaries(charIndex);
+            var lineIndex:int = textDisplay.getLineIndexOfChar(charIndex);
+
+            // getCharBoundaries() returns null for new lines
+            if (!caretBounds)
+            {
+                // temporarily insert a character at the caretIndex
+                textDisplay.replaceText(charIndex, charIndex, "W");
+                caretBounds = textDisplay.getCharBoundaries(charIndex);
+                lineIndex = textDisplay.getLineIndexOfChar(charIndex);
+                textDisplay.replaceText(charIndex, charIndex + 1, "");
+            }
+
+            if (caretBounds)
+            {
+                // caretTopPositon and caretBottomPosition are TextField-relative positions
+                // the TextField is inset by padding styles of the TextArea (via the VGroup)
+
+                // adjust top position to 0 when on the first line
+                // caretTopPosition will be negative when off stage
+                var caretTopPosition:Number = ((caretBounds.y) < 0 || (lineIndex == 0))
+                    ? 0 : caretBounds.y;
+
+                // caretBottomPosition is the y coordinate of the bottom bounds of the caret
+                var caretBottomPosition:Number = caretBounds.y + caretBounds.height;
+
+                // note that verticalScrollPosition min/max do not account for padding
+                var vspTop:Number = textDisplayGroup.verticalScrollPosition;
+
+                // vspBottom should be the max visible Y in the TextField
+                // coordinate space.
+                // remove paddingBottom for some clearance between caret and border
+                var vspBottom:Number = vspTop + unscaledHeight - paddingTop - paddingBottom;
+
+                // is the caret in or below the padding and viewport?
+                if (caretBottomPosition > vspBottom)
+                {
+                    // adjust caretBottomPosition to max scroll position when on the last line
+                    if (lineIndex + 1 == textDisplay.numLines)
+                    {
+                        // use textHeight+paddings instead of textDisplayGroup.contentHeight
+                        // Group has not been resized by this point
+                        textDisplayGroup.verticalScrollPosition = (textHeight + paddingTop + paddingBottom) - textDisplayGroup.height;
+                    }
+                    else
+                    {
+                        // bottom edge of the caret moves just inside the bottom edge of the scroller
+                        // add delta between caret and vspBottom
+                        textDisplayGroup.verticalScrollPosition = vspTop + (caretBottomPosition - vspBottom);
+                    }
+                }
+                // is the caret above the viewport?
+                else if (caretTopPosition < vspTop)
+                {
+                    // top edge of the caret moves inside the top edge of the scroller
+                    textDisplayGroup.verticalScrollPosition = caretTopPosition;
+                }
+            }
+
+            invalidateCaretPosition = false;
+        }
+    }
+
+    /**
+     *  @private
+     *  Handle size and caret position changes that occur when text content
+     *  changes.
      */
     private function textDisplay_changeHandler(event:Event):void
     {
-        textDisplayGroup.invalidateSize();
+        invalidateDisplayList();
+        invalidateCaretPosition = true;
+
+        if (isNaN(hostComponent.explicitHeight))
+        {
+            // invalidate TextAreaSkin size to grow/shrink with content
+            invalidateSize();
+        }
+        else
+        {
+            // invalidate the Group size to update the Scroller
+            textDisplayGroup.invalidateSize();
+        }
+    }
+
+    /**
+     *  @private
+     *  Adjust viewport when using key navigation
+     */
+    private function textDisplay_keyHandler(event:KeyboardEvent):void
+    {
+        // update scroll position when caret changes
+        if (!isNaN(hostComponent.explicitHeight) &&
+            (event.keyCode == Keyboard.UP
+                || event.keyCode == Keyboard.DOWN
+                || event.keyCode == Keyboard.LEFT
+                || event.keyCode == Keyboard.RIGHT))
+        {
+            invalidateDisplayList();
+            invalidateCaretPosition = true;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override public function styleChanged(styleProp:String):void
+    {
+        super.styleChanged(styleProp);
+
+        // propogate styleChanged explicitly to textDisplay
+        if (textDisplay)
+            textDisplay.styleChanged(styleProp);
     }
 }
 }