Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation/src/mx/automation/delegates/core/UITextFieldAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/core/UITextFieldAutomationImpl.as
@@ -0,0 +1,294 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.core
+{
+
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	import flash.events.Event;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObject;
+	import mx.core.UITextField;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines the methods and properties required to perform instrumentation for the
+	 *  UITextField class.
+	 *
+	 *  @see mx.core.UITextField
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class UITextFieldAutomationImpl implements IAutomationObject
+	{
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(UITextField, UITextFieldAutomationImpl);
+		}
+
+		/**
+		 * Constructor.
+		 * @param obj UITextField object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function UITextFieldAutomationImpl(obj:UITextField)
+		{
+			super();
+			uiTextField = obj;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 * @private
+		 */
+		protected var uiTextField:UITextField;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+
+		//---------------------------------
+		//  automationEnabled
+		//---------------------------------
+		public function get automationEnabled():Boolean
+		{
+			trace ("This method should not be called on delegate.Should have been called on the component");
+			if(uiTextField)
+				return uiTextField.enabled;
+
+			return false;
+		}
+
+		//---------------------------------
+		//  automationOwner
+		//---------------------------------
+		public function get automationOwner():DisplayObjectContainer
+		{
+			trace ("This method should not be called on delegate.Should have been called on the component");
+
+			if(uiTextField)
+				return uiTextField.owner;
+
+			return null;
+		}
+
+		//---------------------------------
+		//  automationParent
+		//---------------------------------
+		public function get automationParent():DisplayObjectContainer
+		{
+			trace ("This method should not be called on delegate.Should have been called on the component");
+
+			if(uiTextField)
+				return uiTextField.parent;
+
+			return null;
+		}
+
+		//---------------------------------
+		//  automationVisible
+		//---------------------------------
+		public function get automationVisible():Boolean
+		{
+			trace ("This method should not be called on delegate.Should have been called on the component");
+			if(uiTextField)
+				return uiTextField.visible;
+
+			return false;
+		}
+
+		//----------------------------------
+		//  automationName
+		//----------------------------------
+
+		/**
+		 * @private
+		 */
+		public function get automationName():String
+		{
+			return uiTextField.text;
+		}
+
+		/**
+		 * @private
+		 */
+		public function set automationName(value:String):void
+		{
+
+			if( uiTextField is IAutomationObject)
+			{
+				var tempObj:IAutomationObject = IAutomationObject(uiTextField);
+				if(tempObj != null)
+				{
+					tempObj.automationName = value;
+				}
+			}
+		}
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get automationValue():Array
+		{
+			return [ uiTextField.text ];
+		}
+
+		/**
+		 *  @private
+		 */
+		public function createAutomationIDPart(child:IAutomationObject):Object
+		{
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
+		{
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function resolveAutomationIDPart(criteria:Object):Array
+		{
+			return [];
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get numAutomationChildren():int
+		{
+			return 0;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			return null;
+		}
+		/**
+		 *  @private
+		 */
+		public function getAutomationChildren():Array
+		{
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get automationTabularData():Object
+		{
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get showInAutomationHierarchy():Boolean
+		{
+			return true;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set showInAutomationHierarchy(value:Boolean):void
+		{
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get owner():DisplayObjectContainer
+		{
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function replayAutomatableEvent(event:Event):Boolean
+		{
+			return false;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set automationDelegate(val:Object):void
+		{
+			trace("Invalid setter function call. Should have been called on the component");
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get automationDelegate():Object
+		{
+			trace("Invalid setter function call. Should have been called on the component");
+			return this;
+		}
+
+	}
+
+}


ADDED 'advertisingId' and 'isLimitedAdTracking' APIs

--- actionscript/src/com/marpies/ane/gameanalytics/GameAnalytics.as
+++ actionscript/src/com/marpies/ane/gameanalytics/GameAnalytics.as
@@ -276,6 +276,30 @@
         }

         /**
+         * Retrives user's advertising id.
+         *
+         *
The value may be null on iOS (after the device has been restarted but
+         * before the user has unlocked the device) and Android (missing Google Play Services)
+         * so make sure to handle such cases in your code.

+         */
+        public static function get advertisingId():String {
+            if( !isSupported ) return null;
+            validateExtensionContext();
+
+            return mContext.call( "getAdvertisingId" ) as String;
+        }
+
+        /**
+         * Retrieves whether the user has limit ad tracking enabled or not
+         */
+        public static function get isLimitedAdTracking():Boolean {
+            if( !isSupported ) return null;
+            validateExtensionContext();
+
+            return mContext.call( "getLimitedAdTracking" ) as Boolean;
+        }
+
+        /**
          * Version of the extension.
          */
         public static function get version():String {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4889
Author:   jszeto@adobe.com
Date:     2009-02-07T01:21:29.010759Z

Log Message:
-----------
Reverting revision 4885

Something in this checkin is causing an ASDoc compile failure. I will track this down later and resubmit the changes.

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseDimensionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BevelFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientFilter.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/IFlexBitmapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateFilterInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as" copyfrom-rev="4884" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/filters/BaseFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as
+++ frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as
@@ -1,52 +1,12 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-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.filters
 {
-import flash.events.Event;
-import flash.events.EventDispatcher;
 import flash.filters.BitmapFilter;
 import flash.filters.ConvolutionFilter;
-import mx.filters.IFlexBitmapFilter;
+import mx.filters.BaseFilter;
+import mx.filters.IBitmapFilter;

-/**
- *  @review
- *  Dispatched when a property value has changed.
- */
-[Event(name="change", type="flash.events.Event")]
-
-/**
- *  @review
- *
- * 	The mx.filters.ConvolutionFilter class is based on flash.filters.ConvolutionFilter but adds
- *  support for dynamically updating property values.
- *  When a property changes, it dispatches an event that tells the filter owner to
- *  reapply the filter. Use this class instead of flash.filters.ConvolutionFilter if you plan
- *  to dynamically change the filter property values.
- *
- *  @see flash.filters.ConvolutionFilter
- */
-public class ConvolutionFilter extends EventDispatcher implements IFlexBitmapFilter
+public class ConvolutionFilter extends BaseFilter implements IBitmapFilter
 {
-	include "../core/Version.as";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-	/**
-	 * @copy flash.filters.ConvolutionFilter
-	 */
 	public function ConvolutionFilter(matrixX:Number = 0, matrixY:Number = 0,
 	                                  matrix:Array = null, divisor:Number = 1.0,
 	                                  bias:Number = 0.0,
@@ -54,8 +14,6 @@
 	                                  clamp:Boolean = true, color:uint = 0,
 	                                  alpha:Number = 0.0)
 	{
-		super();
-
 		this.matrixX = matrixX;
 		this.matrixY = matrixY;
 		this.matrix = matrix;
@@ -66,12 +24,6 @@
 		this.color = color;
 		this.alpha = alpha;
 	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Properties
-	//
-	//--------------------------------------------------------------------------

 	//----------------------------------
     //  alpha
@@ -308,40 +260,13 @@
 			notifyFilterChanged();
 		}
 	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-     * @private
-     * Notify of a change to our filter, so that filter stack is ultimately
-     * re-applied by the framework.
-     */
-	private function notifyFilterChanged():void
-	{
-		dispatchEvent(new Event(Event.CHANGE));
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  IFlexBitmapFilter
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Creates a flash.filters.ConvolutionFilter instance using the current
-	 *  property values.
-	 *
-	 *  @return flash.filters.ConvolutionFilter instance
-	 */
-	public function createBitmapFilter():BitmapFilter
+
+	public function clone():BitmapFilter
 	{
 		return new flash.filters.ConvolutionFilter(matrixX, matrixY, matrix, divisor,
 												   bias, preserveAlpha, clamp, color,
 												   alpha);
 	}
+
 }
 }


Add error message.

Add error message.

--- asn_visualization/ProgressBar.as
+++ asn_visualization/ProgressBar.as
@@ -70,12 +70,14 @@
 			ldr.addEventListener(Event.COMPLETE, function(evt:Event):void {
             	this.progress = 1; // set progress bar to complete
             	var timer:Timer = new Timer(1000);
+
             	timer.addEventListener(TimerEvent.TIMER, function(e:Event):void
             	{
             		timer.stop(); timer = null;
             		try {
 	            		if (onComplete!=null) onComplete();
-	             	} catch (err:Error) {
+	             	} catch (err:Error) {
+            			var stack_Trace:String = err.getStackTrace();
 	             		error(err);
 	             		return;
 	             	}


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6792
Author:   jimurphy@adobe.com
Date:     2009-05-11T18:24:09.346026Z

Log Message:
-----------
Merged revisions 6729,6731,6746,6755,6757,6765,6767-6768,6770-6772,6775,6784-6786,6790 from http://p01weblab02.corp.adobe.com/svn/opensource/flex/sdk/branches/beta1

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashContainerPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.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/flash-integration/src/mx/flash/FlexContentHolder.as</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/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.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/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/TypeHelper.java</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types" copyfrom-rev="6790" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</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/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/RadioButtonSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java" copyfrom-rev="6790" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -12,6 +12,7 @@
 package spark.primitives
 {

+import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
 import flash.display.Graphics;
 import flash.display.Shape;
@@ -638,7 +639,12 @@
         var textJustify:String = getStyle("textJustify");

 		// Set the TextBlock's content.
-        staticTextElement.text = text;
+		// Note: If there is no text, we do what TLF does and compose
+		// a paragraph terminator character, so that a TextLine
+		// gets created and we can measure it.
+		// It will have a width of 0 but a height equal
+		// to the font's ascent plus descent.
+        staticTextElement.text = text.length > 0 ? text : "\u2029";
 		staticTextElement.elementFormat = elementFormat;
 		staticTextBlock.content = staticTextElement;

@@ -689,11 +695,11 @@
      *  Returns true if all the text was composed into textLines.
 	 */
 	private function createTextLinesFromTextBlock(textBlock:TextBlock,
-                	                              textLines:Array,
+                	                              textLines:Vector.<DisplayObject>,
                 	                              bounds:Rectangle):Boolean
 	{
-       // Start with 0 text lines.
-	   mx_internal::releaseTextLines(textLines);
+		// Start with 0 text lines.
+		mx_internal::releaseTextLines(textLines);

 		// Get CSS styles for formats that we have to apply ourselves.
 		var direction:String = getStyle("direction");
@@ -984,7 +990,7 @@
                                          createdAllLines:Boolean,
                                          lineCountLimit:int):Boolean
     {
-        var textLines:Array = mx_internal::textLines;
+        var textLines:Vector.<DisplayObject> = mx_internal::textLines;

         // Not all text composed because it didn't fit within bounds.
         if (!createdAllLines)
@@ -1033,7 +1039,8 @@
             // as well as being dependent on the indicator string, they are
             // dependent on the given width.
             staticTextElement.text = mx_internal::truncationIndicatorResource;
-            var indicatorLines:Array = [];
+            var indicatorLines:Vector.<DisplayObject> =
+            	new Vector.<DisplayObject>();
             var indicatorBounds:Rectangle = new Rectangle(0, 0, width, NaN);

             createTextLinesFromTextBlock(staticTextBlock,
@@ -1138,7 +1145,7 @@
     private function computeLastAllowedLineIndex(height:Number,
                                                  lineCountLimit:int):int
     {
-        var textLines:Array = mx_internal::textLines;
+        var textLines:Vector.<DisplayObject> = mx_internal::textLines;
         var truncationLineIndex:int = textLines.length - 1;

         if (!isNaN(height))
@@ -1202,7 +1209,7 @@
     private function getNextTruncationPosition(truncationLineIndex:int,
                                                truncateAtCharPosition:int):int
     {
-        var textLines:Array = mx_internal::textLines;
+        var textLines:Vector.<DisplayObject> = mx_internal::textLines;

         // 1. Get the position of the last character of the preceding atom
         // truncateAtCharPosition-1, because truncateAtCharPosition is an


Comments.

Comments.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@699 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/video/VideoPlayer.as
+++ src/as/com/threerings/flash/video/VideoPlayer.as
@@ -12,30 +12,41 @@
 import com.threerings.util.ValueEvent;

 /**
+ * Dispatched when the state of the videoplayer changes, usually in response to commands
+ * such as play/pause, etc.
+ * value: an int state. @see VideoPlayerCodes
  *
  * @eventType com.threerings.flash.video.VideoPlayerCodes.STATE
  */
 [Event(name="state", type="com.threerings.util.ValueEvent")]

 /**
+ * Dispatched when the total duration of the video is known.
+ * value: a Number expressing the duration in seconds.
  *
  * @eventType com.threerings.flash.video.VideoPlayerCodes.DURATION
  */
 [Event(name="duration", type="com.threerings.util.ValueEvent")]

 /**
+ * Dispatched periodically as the position is updated, during playback.
+ * value: a Number expressing the position in seconds.
  *
  * @eventType com.threerings.flash.video.VideoPlayerCodes.POSITION
  */
 [Event(name="position", type="com.threerings.util.ValueEvent")]

 /**
+ * Disptached when the size of the video is known.
+ * value: a Point expressing the width/height.
  *
  * @eventType com.threerings.flash.video.VideoPlayerCodes.SIZE
  */
 [Event(name="size", type="com.threerings.util.ValueEvent")]

 /**
+ * Dispatched when there's a problem.
+ * value: a String error code/message.
  *
  * @eventType com.threerings.flash.video.VideoPlayerCodes.ERROR
  */
@@ -61,17 +72,23 @@
      */
     function getSize () :Point;

+    /**
+     * Play the video, if not already.
+     */
     function play () :void;

+    /**
+     * Pause the video, if not already.
+     */
     function pause () :void;

     /**
-     * Get the duration of the video, or NaN if not yet known.
+     * Get the duration of the video, in seconds, or NaN if not yet known.
      */
     function getDuration () :Number;

     /**
-     * Get the position of the video, or NaN if not yet ready.
+     * Get the position of the video, in seconds, or NaN if not yet ready.
      */
     function getPosition () :Number;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17967
Author:   rfrishbe@adobe.com
Date:     2010-09-30T20:42:13.559166Z

Log Message:
-----------
Making a performance change in MobileIconItemRenderer/MobileItemRenderer in how we measure text.  We don't call UIComponent.measureText() anymore as that creates another TextField behind the scenes and changes its text.  Instead we now just ask for the textWidth/textHeight of the TextField we are already using.  This change should give us about a 10-15% improvement.  I added a FIXME to change it in ButtonSkin and look for other places we need to change it as well.

Also, I'm making some changes in the way we measure FPS in TestHelper for RadioStations to be more consistent.

QE notes: None
Doc notes: None
Bugs: -
Reviewer: Glenn
Tests run: checkintests
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/MobileTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/RadioStations/src/TestHelper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as
@@ -18,7 +18,6 @@
 import flash.text.TextFieldType;
 import flash.text.TextFormat;
 import flash.text.TextFormatAlign;
-import flash.text.TextLineMetrics;

 import mx.controls.listClasses.*;
 import mx.core.IDataRenderer;
@@ -96,7 +95,7 @@
      *  @private
      *  Static icon image cache.  This is the default for iconContentLoader.
      */
-    static private var _imageCache:ContentCache;
+    static mx_internal var _imageCache:ContentCache;

     //--------------------------------------------------------------------------
     //
@@ -1147,7 +1146,9 @@
      */
     override protected function measure():void
     {
-        super.measure();
+        // don't call super.measure() because there's no need to do the work that's
+        // in there--we do it all in here.
+        //super.measure();

         // start them at 0, then go through icon, label, and decorator
         // and add to these
@@ -1169,27 +1170,32 @@
         }

         // Text is aligned next to icon
-        var labelLineMetrics:TextLineMetrics;
         var labelWidth:Number = 0;
         var labelHeight:Number = 0;
-        var messageLineMetrics:TextLineMetrics;
         var messageWidth:Number = 0;
         var messageHeight:Number = 0;

         if (labelDisplay)
         {
-            labelLineMetrics = measureText(labelText);
-
-            labelWidth = labelLineMetrics.width + UITextField.TEXT_WIDTH_PADDING;
-            labelHeight = labelLineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
+            // reset text if it was truncated before.
+            if (labelDisplay.isTruncated)
+                labelDisplay.text = labelText;
+
+            // commit styles to get an accurate measurement
+            labelDisplay.commitStyles();
+
+            labelWidth = labelDisplay.textWidth + UITextField.TEXT_WIDTH_PADDING;
+            labelHeight = labelDisplay.textHeight + UITextField.TEXT_HEIGHT_PADDING;
         }

         if (messageDisplay)
         {
-            messageLineMetrics = measureMessageText(messageText);
-
-            messageWidth = messageLineMetrics.width + UITextField.TEXT_WIDTH_PADDING;
-            messageHeight = messageLineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
+            // commit styles to get an accurate measurement
+            // FIXME (rfrishbe): should take in to account constrainedWidth here
+            messageDisplay.commitStyles();
+
+            messageWidth = messageDisplay.textWidth + UITextField.TEXT_WIDTH_PADDING;
+            messageHeight = messageDisplay.textHeight + UITextField.TEXT_HEIGHT_PADDING;
         }

         var verticalGap:Number = (labelDisplay && messageDisplay) ? getStyle("verticalGap") : 0;
@@ -1325,20 +1331,22 @@

         // calculte the natural height for the label
         var labelTextHeight:Number = 0;
-        var labelLineMetrics:TextLineMetrics;
-
-        if (labelDisplay && labelDisplay.text != "")
-        {
+
+        if (labelDisplay && labelText != "")
+        {
+            // reset text if it was truncated before.
+            if (labelDisplay.isTruncated)
+                labelDisplay.text = labelText;
+
+            // commit styles to get an accurate measurement
             labelDisplay.commitStyles();
-            labelLineMetrics = measureText(labelText);
-            labelTextHeight = labelLineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
-        }
-
-        if (messageDisplay && messageDisplay.text != "")
-        {
+            labelTextHeight = labelDisplay.textHeight + UITextField.TEXT_HEIGHT_PADDING;
+        }
+
+        if (messageDisplay && messageText != "")
+        {
+            // commit styles to get an accurate measurement
             messageDisplay.commitStyles();
-            // no need to measure the text width and height since the measure function only
-            // take in to account the first line.
         }

         // now size and position the elements, 3 different configurations we care about:
@@ -1373,9 +1381,7 @@
             labelDisplay.x = Math.round(labelComponentsX);
             labelDisplay.y = Math.round(paddingTop);

-            // reset text if it was truncated before.  then attempt to truncate it
-            if (labelDisplay.isTruncated)
-                labelDisplay.text = labelText;
+            // attempt to truncate text
             labelDisplay.truncateToFit();
         }

@@ -1387,6 +1393,8 @@
             messageHeight = Math.max(viewHeight - labelHeight - verticalGap, 0);

             messageDisplay.width = messageWidth;
+            // FIXME (rfrishbe): we should check to see if this causes textHeight to change because then we
+            // might need to remeasure
             messageDisplay.height = messageHeight;

             // FIXME (rfrishbe): figure out if this is right with regards to multi-line text.
@@ -1463,81 +1471,6 @@
         return styleValue;
     }

-    /**
-     *  @private
-     *  Function to help figure out the sizes of the header and message.  We cannot use
-     *  UIComponent.measureText() because we are adding a few additional styles
-     *  to it based on headerStyleName and messageStyleName.
-     */
-    private function measureMessageText(text:String):TextLineMetrics
-    {
-        // Copied from UIComponent.measureText()
-        cachedMessageTextFormat = determineTextFormatWithGetStyleFunction(messageGetStyleFunction, cachedMessageTextFormat);
-        return cachedMessageTextFormat.measureText(text);
-    }
-
-    /**
-     *  @private
-     *  Function to help figure out the sizes of the header and message.  We cannot use
-     *  UIComponent.measureText() because we are adding a few additional styles
-     *  to it based on headerStyleName and messageStyleName.
-     */
-    private function determineTextFormatWithGetStyleFunction(getStyleFunction:Function, cachedTextFormat:UITextFormat):UITextFormat
-    {
-        // copied and adapted from UIComponent.determineTextFormatFromStyles
-        var textFormat:UITextFormat = cachedTextFormat;
-
-        if (!textFormat)
-        {
-            var font:String =
-                StringUtil.trimArrayElements(getStyleFunction("fontFamily"), ",");
-            textFormat = new UITextFormat(getNonNullSystemManager(), font);
-            textFormat.moduleFactory = moduleFactory;
-
-            // Not all flex4 textAlign values are valid so convert to a valid one.
-            var align:String = getStyleFunction("textAlign");
-            if (align == "start")
-                align = TextFormatAlign.LEFT;
-            else if (align == "end")
-                align = TextFormatAlign.RIGHT;
-            textFormat.align = align;
-            textFormat.bold = getStyleFunction("fontWeight") == "bold";
-            textFormat.color = enabled ?
-                getStyleFunction("color") :
-                getStyleFunction("disabledColor");
-            textFormat.font = font;
-            textFormat.indent = getStyleFunction("textIndex");
-            textFormat.italic = getStyleFunction("fontStyle") == "italic";
-            textFormat.kerning = getStyleFunction("kerning");
-            textFormat.leading = getStyleFunction("leading");
-            textFormat.leftMargin = getStyleFunction("paddingLeft"); // FIXME (rfrishbe): should these be in here...?
-            textFormat.letterSpacing = getStyleFunction("letterSpacing")
-            textFormat.rightMargin = getStyleFunction("paddingRight");
-            textFormat.size = getStyleFunction("fontSize");
-            textFormat.underline =
-                getStyleFunction("textDecoration") == "underline";
-
-            textFormat.antiAliasType = getStyleFunction("fontAntiAliasType");
-            textFormat.gridFitType = getStyleFunction("fontGridFitType");
-            textFormat.sharpness = getStyleFunction("fontSharpness");
-            textFormat.thickness = getStyleFunction("fontThickness");
-
-            //textFormat.useFTE =
-            //    getTextFieldClassName() == "mx.core::UIFTETextField" ||
-            //    getTextInputClassName() == "mx.controls::MXFTETextInput";
-
-            //if (textFormat.useFTE)
-            //{
-            //    textFormat.direction = getStyleFunction("direction");
-            //    textFormat.locale = getStyleFunction("locale");
-            //}
-
-            cachedTextFormat = textFormat;
-        }
-
-        return textFormat;
-    }
-
 }

 }


Fixed latch tooltip

Fixed latch tooltip

--- src/Modules/Latch.as
+++ src/Modules/Latch.as
@@ -68,9 +68,10 @@
 				tuples.push(new NodeTuple(layout.ports[i], dataNode, writeOK));
 			}

+			var controlText:String = width == 1 ? "Stored value will be set to input value" : "Stored values will be set to input values";
 			var controlNode:StandardNode = new StandardNode(this, new Point(layout.ports[width].offset.x, layout.ports[width].offset.y + 2), [layout.ports[width]],
 															tuples, function getValue():BooleanValue { return writeOK() ? BooleanValue.TRUE : BooleanValue.FALSE; },
-															"Stored value(s) will be set to input value(s)");
+															controlText);
 			nodes.push(controlNode);
 			return new InternalLayout(nodes);
 		}


Export the new format as "resources.xml"

--- exporter/src/main/as/flump/export/BetwixtPublisher.as
+++ exporter/src/main/as/flump/export/BetwixtPublisher.as
@@ -60,7 +60,7 @@
         }

         // TODO(bruno): Remove this encoder
-        /*var dest :File = destDir.resolvePath("resources.xml");
+        var dest :File = destDir.resolvePath("resources-old.xml");
         var out :FileStream = new FileStream();
         out.open(dest, FileMode.WRITE);
         out.writeUTFBytes("<resources>\n");
@@ -77,9 +77,9 @@
         }
         for each (atlas in packer.atlases) out.writeUTFBytes(atlas.toXml());
         out.writeUTFBytes("</resources>");
-        out.close();*/
+        out.close();

-        publishMetadata(lib, packers, destDir.resolvePath("resources-new.xml"));
+        publishMetadata(lib, packers, destDir.resolvePath("resources.xml"));
         publishMetadata(lib, packers, destDir.resolvePath("resources.json"));
     }


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

--- frameworks/projects/rpc/src/mx/rpc/soap/SOAPResult.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/SOAPResult.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8487
Author:   smgilson@adobe.com
Date:     2009-07-09T18:57:21.985536Z

Log Message:
-----------
final checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Move3D.as
+++ frameworks/projects/spark/src/spark/effects/Move3D.as
@@ -41,7 +41,7 @@
  *
  *  @mxml
  *
- *
The <mx:Move3D> tag
+ *
The <s:Move3D> tag
  *  inherits all of the tag attributes of its superclass,
  *  and adds the following tag attributes:

  *


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/effects/effectClasses/WipeRightInstance.as
+++ frameworks/projects/mx/src/mx/effects/effectClasses/WipeRightInstance.as
@@ -22,6 +22,11 @@
  *  yourself.
  *
  *  @see mx.effects.WipeRight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class WipeRightInstance extends MaskEffectInstance
 {
@@ -37,6 +42,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function WipeRightInstance(target:Object)
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 17939
Author:   hmuller@adobe.com
Date:     2010-09-29T21:33:06.625950Z

Log Message:
-----------
Ensure that GridLayout/measure() only updates GridDimension typical cell sizes.

Changed GridLayout/layoutGridElement() to work around FP limitations with very large graphic elements.

QE notes:
Doc notes:
Bugs:
Reviewer: Kevin
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -105,6 +105,25 @@
      */
     private const visibleGridBounds:Rectangle = new Rectangle();

+
+    /**
+     *  @private
+     *  The elements available for reuse.  Maps from an IFactory to a list of the elements
+     *  that have been allocated by that factory and then freed.   The list is represented
+     *  by a Vector.<IVisualElement>.
+     *
+     *  Updated by allocateGridElement().
+     */
+    private const freeElementMap:Dictionary = new Dictionary();
+
+    /**
+     *  @private
+     *  Records the IFactory used to allocate a Element so that free(Element) can find it again.
+     *
+     *  Updated by createGridElement().
+     */
+    private const elementToFactoryMap:Dictionary = new Dictionary();
+
     //--------------------------------------------------------------------------
     //
     //  Class methods and properties
@@ -326,7 +345,7 @@
         if (enablePerformanceStatistics)
             startTime = getTimer();

-        layoutColumns(horizontalScrollPosition, verticalScrollPosition, NaN /* width */);
+        updateTypicalCellSizes();

         var measuredWidth:Number = gridDimensions.getTypicalContentWidth(grid.requestedColumnCount);
         var measuredHeight:Number = gridDimensions.getTypicalContentHeight(grid.requestedRowCount);
@@ -553,29 +572,15 @@
      *  The typicalCellWidth for GridColumns with an explicit width, is just
      *  the explicit width.  Otherwise an item renderer is created for the column
      *  and the item renderer's preferred bounds become the typical cell size.
-     *
-     *  This method also updates the column width in GridDimensions if the column
-     *  has an explicit width.
 	 */
-	private function updateTypicalCellSizes(width:Number, scrollX:Number, firstVisibleColumnIndex:int):void
+	private function updateVisibleTypicalCellSizes(width:Number, scrollX:Number, firstVisibleColumnIndex:int):void
 	{
 		const gridDimensions:GridDimensions = gridDimensions;
-
-        // If width isn't specified, then only update requestedColumnCount columns
-
-        const requestedColumnCount:int = grid.requestedColumnCount;
-        var columnCount:int = gridDimensions.columnCount;
-        if (isNaN(width) && (requestedColumnCount != -1))
-            columnCount = Math.min(columnCount, requestedColumnCount);
-
-        // Update the GridDimensions typicalCellWidth,Height values as needed.
-
+        const columnCount:int = gridDimensions.columnCount;
+		const startCellX:Number = gridDimensions.getCellX(0 /* rowIndex */, firstVisibleColumnIndex);
 		const columnGap:int = gridDimensions.columnGap;
-		const startCellX:Number = gridDimensions.getCellX(0 /* rowIndex */, firstVisibleColumnIndex);
-
-		for (var columnIndex:int = firstVisibleColumnIndex;
-                 (isNaN(width) || (width > 0)) && (columnIndex < columnCount);
-                 columnIndex++)
+
+		for (var columnIndex:int = firstVisibleColumnIndex; (width > 0) && (columnIndex < columnCount); columnIndex++)
 		{
             var cellHeight:Number = gridDimensions.getTypicalCellHeight(columnIndex);
 			var cellWidth:Number = gridDimensions.getTypicalCellWidth(columnIndex);
@@ -603,17 +608,57 @@
                 freeGridElement(renderer);
             }

-            if (!isNaN(width))
+            if (columnIndex == firstVisibleColumnIndex)
+                width -= startCellX + cellWidth - scrollX;
+            else
+                width -= cellWidth + columnGap;
+		}
+    }
+
+    /**
+     *  @private
+     *  Used by the measure() method to initialize the GridDimensions typical width,height of
+     *  requestedColumnCount columns, and the typical width of *all* columns with an explicit width.
+     */
+    private function updateTypicalCellSizes():void
+    {
+        const gridDimensions:GridDimensions = gridDimensions;
+        const columnCount:int = gridDimensions.columnCount;
+        const columnGap:int = gridDimensions.columnGap;
+        const requestedColumnCount:int = grid.requestedColumnCount;
+
+        for (var columnIndex:int = 0; (columnIndex < columnCount); columnIndex++)
+        {
+            var cellHeight:Number = gridDimensions.getTypicalCellHeight(columnIndex);
+            var cellWidth:Number = gridDimensions.getTypicalCellWidth(columnIndex);
+
+            var column:GridColumn = getGridColumn(columnIndex);
+            if (!isNaN(column.width))
             {
-    			if (columnIndex == firstVisibleColumnIndex)
-    				width -= startCellX + cellWidth - scrollX;
-    			else
-    				width -= cellWidth + columnGap;
+                cellWidth = column.width;
+                gridDimensions.setTypicalCellWidth(columnIndex, cellWidth);
             }
-		}
-    }
-
-	/**
+
+            var needTypicalRenderer:Boolean = (requestedColumnCount == -1) || (columnIndex < requestedColumnCount);
+            if (needTypicalRenderer && (isNaN(cellWidth) || isNaN(cellHeight)))
+            {
+                var renderer:IGridItemRenderer = createTypicalItemRenderer(columnIndex);
+                if (isNaN(cellWidth))
+                {
+                    cellWidth = renderer.getPreferredBoundsWidth();
+                    gridDimensions.setTypicalCellWidth(columnIndex, cellWidth);
+                }
+                if (isNaN(cellHeight))
+                {
+                    cellHeight = renderer.getPreferredBoundsHeight();
+                    gridDimensions.setTypicalCellHeight(columnIndex, cellHeight);
+                }
+                freeGridElement(renderer);
+            }
+        }
+    }
+
+    /**
 	 *  @private
 	 *  Update the column widths for the columns visible beginning at scrollX, that will fit
 	 *  within the specified width, or for all columns if width is NaN.  The width of
@@ -631,27 +676,19 @@
         if (columnCount <= 0)
             return;

-        // If width isn't specified (see measure()), then only update requestedColumnCount columns
-
-        const requestedColumnCount:int = grid.requestedColumnCount;
-        if (isNaN(width) && (requestedColumnCount != -1))
-            columnCount = Math.min(columnCount, requestedColumnCount);
-
         // Update the GridDimensions typicalCellWidth,Height values as needed.

 		const firstVisibleColumnIndex:int = gridDimensions.getColumnIndexAt(scrollX, scrollY);
-        updateTypicalCellSizes(width, scrollX, firstVisibleColumnIndex);
+        updateVisibleTypicalCellSizes(width, scrollX, firstVisibleColumnIndex);

         // Set the GridDimensions columnWidth for no more than columnCount columns.

         const columnGap:int = gridDimensions.columnGap;
         const startCellX:Number = gridDimensions.getCellX(0 /* rowIndex */, firstVisibleColumnIndex);
-        var availableWidth:Number = width;  // can be NaN
+        var availableWidth:Number = width;
         var flexibleColumnCount:uint = 0;

-        for (var columnIndex:int = firstVisibleColumnIndex;
-                (isNaN(availableWidth) || (availableWidth > 0)) && (columnIndex < columnCount);
-                 columnIndex++)
+        for (var columnIndex:int = firstVisibleColumnIndex; (availableWidth > 0) && (columnIndex < columnCount); columnIndex++)
         {
             var columnWidth:Number = gridDimensions.getTypicalCellWidth(columnIndex);
             var gridColumn:GridColumn = getGridColumn(columnIndex);
@@ -674,20 +711,16 @@

             gridDimensions.setColumnWidth(columnIndex, columnWidth);  // store the column width

-            if (!isNaN(availableWidth))
-            {
-                if (columnIndex == firstVisibleColumnIndex)
-                    availableWidth -= startCellX + columnWidth - scrollX;
-                else
-                    availableWidth -= columnWidth + columnGap;
-            }
-        }
-
-        // If a width was specified, we haven't scrolled horizontally, and
-        // there's space left over, widen the columns whose GridColumn width
-        // isn't set explicitly, to fill the extra space.
-
-        if ((scrollX != 0) || isNaN(width) || (availableWidth < 1.0) || (flexibleColumnCount == 0))
+            if (columnIndex == firstVisibleColumnIndex)
+                availableWidth -= startCellX + columnWidth - scrollX;
+            else
+                availableWidth -= columnWidth + columnGap;
+        }
+
+        // If we haven't scrolled horizontally, and there's space left over, widen
+        // the columns whose GridColumn width isn't set explicitly, to fill the extra space.
+
+        if ((scrollX != 0) || (availableWidth < 1.0) || (flexibleColumnCount == 0))
             return;

         const columnWidthDelta:Number = Math.ceil(availableWidth / flexibleColumnCount);
@@ -1012,14 +1045,18 @@
      */
     private function layoutLinearElements (
         factory:IFactory,
-        layer:GridLayer, // container:IVisualElementContainer,
+        layer:GridLayer,
         oldVisibleElements:Vector.<IVisualElement>,
         oldVisibleIndices:Vector.<int>,
         newVisibleIndices:Vector.<int>,
         layoutFunction:Function,
         lastIndex:int = -1):Vector.<IVisualElement>
     {
-        // If a factory wasn't provided, discard the old visible elements, then return
+
+        // TBD(hmuller): if the factory for any of the oldVisible elements isn't
+        // the specified factory (e.g. because factory is null) then
+        // removeGridElement all of them.  Maybe add removeGridElements(factory).
+        // Replace the following:

         if (factory == null)
         {
@@ -1303,6 +1340,9 @@
     {
         const selectionIndicatorFactory:IFactory = grid.selectionIndicator;

+        // TBD(hmuller): if selectionIndicatorFactory has -changed- get rid
+        // of the old selection indicators.   See layoutIndicator() for an example
+
         if (!selectionIndicatorFactory)
         {
             clearSelectionIndicators();
@@ -1318,8 +1358,7 @@
             if (visibleColumnSelectionIndices.length > 0)
                 clearSelectionIndicators();

-            var oldVisibleRowSelectionIndices:Vector.<int> =
-                visibleRowSelectionIndices;
+            var oldVisibleRowSelectionIndices:Vector.<int> = visibleRowSelectionIndices;

             // Load this up with the currently selected rows.
             visibleRowSelectionIndices = new Vector.<int>();
@@ -1425,11 +1464,15 @@
         rowIndex:int,
         columnIndex:int):IVisualElement
     {
-        if (!indicatorFactory)
-        {
-            freeGridElement(indicator);
+        // If the indicatorFactory has changed for the specified non-null indicator,
+        // then free the old indicator.
+
+        if (indicator && (indicatorFactory != elementToFactoryMap[indicator]))
+        {
+            removeGridElement(indicator);
             indicator = null;
-            return indicator;
+            if (indicatorFactory == null)
+                return null;
         }

         if (rowIndex == -1 || grid.selectionMode == GridSelectionMode.NONE)
@@ -1440,7 +1483,7 @@
         }

         if (!indicator && indicatorFactory)
-            indicator = indicatorFactory.newInstance() as IVisualElement;
+            indicator = createGridElement(indicatorFactory);

         if (indicator)
         {
@@ -1658,22 +1701,6 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  @private
-     *  The elements available for reuse.
-     *
-     *  Maps from an IFactory to a list of the elements that have been allocated by that factory
-     *  and then freed.   The list is represented by a Vector.<IVisualElement>.
-     */
-    private const freeElementMap:Dictionary = new Dictionary();
-
-    /**
-     *  @private
-     *  Records the IFactory used to allocate a Element so that free(Element)
-     *  can find it again.
-     */
-    private const elementToFactoryMap:Dictionary = new Dictionary();
-
     private function createGridElement(factory:IFactory):IVisualElement
     {
         const element:IVisualElement = factory.newInstance() as IVisualElement;
@@ -1681,6 +1708,11 @@
         return element;
     }

+    /**
+     *  @private
+     *  Return an element the factory-specific free-list, or create a new element,
+     *  with createGridElement, if a free element isn't available.
+     */
     private function allocateGridElement(factory:IFactory):IVisualElement
     {
         const elements:Vector.<IVisualElement> = freeElementMap[factory] as Vector.<IVisualElement>;
@@ -1699,8 +1731,8 @@
     /**
      *  @private
      *  Move the specified element to the free list after hiding it.  Return true if the
-     *  element was added to the free list (freeElements).   Note that we do not actually
-     *  remove the element from its parent.
+     *  element was added to the free list (freeElements).   Note that we do not remove
+     *  the element from its parent.
      */
     private function freeGridElement(element:IVisualElement):Boolean
     {
@@ -1738,7 +1770,34 @@
         for each (var elt:IVisualElement in elements)
             freeGridElement(elt);
         elements.length = 0;
-    }
+    }
+
+    /**
+     *  @private
+     *  Remove the element from the elementToFactory map and from the per-factory free list and, finally,
+     *  from its container.   On the off chance that someone is monitoring the visible property,
+     *  we set that to false, just for good measure.
+     */
+    private function removeGridElement(element:IVisualElement):void
+    {
+        const factory:IFactory = elementToFactoryMap[element];
+        const freeElements:Vector.<IVisualElement> = (factory) ? freeElementMap[factory] : null;
+        if (freeElements)
+        {
+            const index:int = freeElements.indexOf(element);
+            if (index != -1)
+                freeElements.splice(index, 1);
+            if (freeElements.length == 0)
+                delete freeElementMap[factory];
+        }
+
+        delete elementToFactoryMap[element];
+
+        element.visible = false;
+        const parent:IVisualElementContainer = element.parent as IVisualElementContainer;
+        if (parent)
+            parent.removeElement(element);
+    }

     /**
      *  @private
@@ -1788,14 +1847,51 @@
     private function layoutGridElementR(elt:IVisualElement, bounds:Rectangle):void
     {
         if (bounds)
-        {
-            elt.setLayoutBoundsSize(bounds.width, bounds.height);
-            elt.setLayoutBoundsPosition(bounds.x, bounds.y);
-        }
-    }
-
+            layoutGridElement(elt, bounds.x, bounds.y, bounds.width, bounds.height);
+    }
+
+    private static const MAX_ELEMENT_SIZE:Number = 8192;
+    private static const ELEMENT_EDGE_PAD:Number = 512;
+
+
+    /**
+     *  @private
+     *  Set the visual element's layoutBounds size and position.
+     *
+     *  Attempting to render graphics whose size is larger than MAX_ELEMENT_SIZE can cause the
+     *  Flash Player to fail.  We reduce the size of visual elements here and preserve
+     *  the visibility of edges.   For example if the element's left edge is not showing,
+     *  then we ensure that it's no more than ELEMENT_EDGE_PAD to the left of the left edge of
+     *  the scrollRect (that's the horizontalScrollPosition).   The unfortunate assumption here
+     *  is that shrinking the size of a visual element in this way will not affect the appearance
+     *  of the part of the element that overlaps the scrollRect.
+     */
     private function layoutGridElement(elt:IVisualElement, x:Number, y:Number, width:Number, height:Number):void
-    {
+    {
+        if (width > MAX_ELEMENT_SIZE)
+        {
+            const scrollX:Number = horizontalScrollPosition;
+            const gridWidth:Number = grid.getLayoutBoundsWidth();
+
+            const newX:Number = Math.max(x, scrollX - ELEMENT_EDGE_PAD);
+            const newRight:Number = Math.min(x + width, scrollX + gridWidth + ELEMENT_EDGE_PAD);
+
+            x = newX;
+            width = newRight - newX;
+        }
+
+        if (height > MAX_ELEMENT_SIZE)
+        {
+            const scrollY:Number = verticalScrollPosition;
+            const gridHeight:Number = grid.getLayoutBoundsHeight();
+
+            const newY:Number = Math.max(y, scrollY - ELEMENT_EDGE_PAD);
+            const newBottom:Number = Math.min(y + height, scrollY + gridHeight + ELEMENT_EDGE_PAD);
+
+            y = newY;
+            height = newBottom - newY;
+        }
+
         elt.setLayoutBoundsSize(width, height);
         elt.setLayoutBoundsPosition(x, y);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 16782
Author:   cframpto@adobe.com
Date:     2010-07-01T22:05:43.864588Z

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

Keep scrolling in sync with selection.

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -11,6 +11,7 @@

 package spark.components.supportClasses
 {
+import flash.geom.Point;
 import flash.geom.Rectangle;
 import flash.utils.Dictionary;

@@ -209,6 +210,40 @@
         // TBD(hmuller):DTRT when the target changes
     }

+    /**
+     *  @private
+     *  For the offset properties, a value of NaN means don't offset from that edge. A value
+     *  of 0 means to put the element flush against that edge.
+     *
+     *  @param topOffset Number of pixels to position the element below the top edge.
+     *  @param bottomOffset Number of pixels to position the element above the bottom edge.
+     *  @param leftOffset Number of pixels to position the element to the right of the left edge.
+     *  @param rightOffset Number of pixels to position the element to the left of the right edge.
+     */
+    override mx_internal function getScrollPositionDeltaToElementHelper(
+                                                               index:int, topOffset:Number = NaN,
+                                                               bottomOffset:Number = NaN,
+                                                               leftOffset:Number = NaN,
+                                                               rightOffset:Number = NaN):Point
+    {
+        var rowIndex:int = index / gridDimensions.rowCount;
+        var colIndex:int;
+
+        var elementR:Rectangle;
+        if (isRowSelectionMode())
+        {
+            elementR = gridDimensions.getRowBounds(rowIndex);
+        }
+        else if (isCellSelectionMode())
+        {
+            colIndex = index % gridDimensions.rowCount
+            elementR = gridDimensions.getCellBounds(rowIndex, colIndex);
+        }
+
+        return getScrollPositionDeltaToElementHelperHelper(
+                    elementR, topOffset, bottomOffset, leftOffset, rightOffset);
+    }
+
     //--------------------------------------------------------------------------
     //
     //  DataGrid Access
@@ -491,9 +526,6 @@
         {
             newVisibleRowIndices.push(rowIndex);

-            // The offset for the columns in this row.
-            const irOffsetForRow:int = newVisibleItemRenderers.length;
-
             // Returns the default height, if the row/cell height not previously
             // set.
             var rowHeight:Number = gridDimensions.getRowHeight(rowIndex);
@@ -525,10 +557,15 @@
             const finalRowHeight:Number = gridDimensions.getRowHeight(rowIndex);
             if (rowHeight != finalRowHeight)
             {
+                const visibleColumnsLength:int = newVisibleColumnIndices.length;
                 rowHeight = finalRowHeight;
                 for each (colIndex in newVisibleColumnIndices)
                 {
-                    renderer = newVisibleItemRenderers[irOffsetForRow + colIndex];
+                    const rowOffset:int = newVisibleRowIndices.indexOf(rowIndex);
+                    const colOffset:int = newVisibleColumnIndices.indexOf(colIndex);
+                    const index:int = (rowOffset * visibleColumnsLength) + colOffset;
+
+                    renderer = newVisibleItemRenderers[index];
                     layoutGridElement(renderer, renderer.x, renderer.y,
                                       renderer.width, rowHeight);
                     gridDimensions.setCellHeight(


Transferred from the Adobe Open Source Subversion Repository

Revision: 11181
Author:   smgilson@adobe.com
Date:     2009-10-27T15:58:59.190040Z

Log Message:
-----------
ASDoc updates for Spark List D&D

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/DropLocation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
@@ -59,10 +59,12 @@
  *  <s:LayoutBase
  *    Properties
  *    clipAndEnableScrolling="false"
+ *    dropIndicator="defined by the skin class"
  *    horizontalScrollPosition="0"
  *    target="null"
  *    typicalLayoutElement="null"
  *    useVirtualLayout="false"
+ *    verticalScrollPosition="0"
  *  />
  *

  *
@@ -297,6 +299,8 @@

     /**
      *  @copy spark.core.IViewport#verticalScrollPosition
+     *
+     *  @default 0
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -440,18 +444,18 @@
     private var _dropIndicator:DisplayObject;

     /**
-     *  The DisplayObject this layout uses for
-     *  drop indicator during drag and drop operation.
-     *
-     *  Typically developers don't set this property directly,
-     *  but instead rely on the List's default DragEvent
-     *  handlers.
-     *
-     *
The List sets this property in response to a
+     *  The DisplayObject that this layout uses for
+     *  the drop indicator during a drag-and-drop operation.
+     *
+     *  Typically you do not set this property directly,
+     *  but instead define a dropIndicator skin part in the
+     *  skin class of the drop target.
+     *
+     *
The List control sets this property in response to a
      *  DragEvent.DRAG_ENTER event.
-     *  The List initializes this property with an
+     *  The List initializes this property with an
      *  instance of its dropIndicator skin part.
-     *  The List clears this property in response to a
+     *  The List clears this property in response to a
      *  DragEvent.DRAG_EXIT event.

      *
      *  @langversion 3.0
@@ -470,22 +474,22 @@
     public function set dropIndicator(value:DisplayObject):void
     {
         if (_dropIndicator)
-			target.overlay.removeDisplayObject(_dropIndicator);
+            target.overlay.removeDisplayObject(_dropIndicator);

         _dropIndicator = value;

         if (_dropIndicator)
         {
             _dropIndicator.visible = false;
-			target.overlay.addDisplayObject(_dropIndicator, OverlayDepth.DROP_INDICATOR_DEPTH);
+            target.overlay.addDisplayObject(_dropIndicator, OverlayDepth.DROP_INDICATOR_DEPTH);

             if (_dropIndicator is ILayoutManagerClient)
                 UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(_dropIndicator), true);

-			// Set includeInLayout to false, otherwise it'll still invalidate
-			// the parent Group layout as we size and position the indicator.
-			if (_dropIndicator is ILayoutElement)
-				ILayoutElement(_dropIndicator).includeInLayout = false;
+            // Set includeInLayout to false, otherwise it'll still invalidate
+            // the parent Group layout as we size and position the indicator.
+            if (_dropIndicator is ILayoutElement)
+                ILayoutElement(_dropIndicator).includeInLayout = false;
         }
     }

@@ -1391,16 +1395,16 @@
     mx_internal var dragScrollHidesIndicator:Boolean = false;

     /**
-     *  Calculates the LayoutDragEventDropLocation for
+     *  Calculates the drop location in the data provider of the drop target for
      *  the specified dragEvent.
      *
-     *  @param dragEvent The dragEvent dispatched by the DragManager.
+     *  @param dragEvent The drag event dispatched by the DragManager.
      *
      *  @return Returns the drop location for this event, or null if the drop
      *  operation is not available.
      *
-     *  @see #showDropIndicator
-     *  @see #hideDropIndicator
+     *  @see #showDropIndicator()
+     *  @see #hideDropIndicator()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1424,18 +1428,17 @@
     }

     /**
-     *  Sizes, positions and parents the dropIndicator based on the specified
-     *  dropLocation.
-     *
-     *  Starts/stops drag-scrolling when necessary conditions are met.
-     *
-     *  @param dropLocation
Specifies the location where to show the indicator.
-     *  Drop location is obtained through the computeDropLocation() method.

+     *  Sizes, positions and parents the drop indicator based on the specified
+     *  drop location. Use the calculateDropLocation() method
+     *  to obtain the DropLocation object.
+     *
+     *
Starts/stops drag-scrolling when necessary conditions are met.

+     *
+     *  @param dropLocation Specifies the location where to show the drop indicator.
+     *  Drop location is obtained through the computeDropLocation() method.
      *
      *  @see #dropIndicator
-     *  @see #hideDropIndicator
-     *  @see #getDragEventContext
-     *  @see #dropIndicator
+     *  @see #hideDropIndicator()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1503,10 +1506,11 @@
     }

     /**
-     *  Hides the previously shown dropIndicator,
-     *  removes it from the display list and also stops the drag-scrolling.
-     *
-     *  @see #showDropIndicator
+     *  Hides the previously shown drop indicator,
+     *  created by the showDropIndicator() method,
+     *  removes it from the display list and also stops the drag scrolling.
+     *
+     *  @see #showDropIndicator()
      *  @see #dropIndicator
      *
      *  @langversion 3.0
@@ -1528,16 +1532,16 @@
      *
      *  Called by the calculatedDropLocation() method.
      *
-     *  @param x The x coordinate of the drag and drop gesture, in target's
+     *  @param x The x coordinate of the drag and drop gesture, in
      *  local coordinates.
      *
-     *  @param y The y coordinate of the drag and drop gesture, in target's
-     *  local coordinates.
+     *  @param y The y coordinate of the drag and drop gesture, in
+     *  the drop target's local coordinates.
      *
      *  @return The drop index or -1 if the drop operation is not available
      *  at the specified coordinates.
      *
-     *  @see #calculateDropLocation
+     *  @see #calculateDropLocation()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1551,20 +1555,20 @@
     }

     /**
-     *  Calculates the bounds for the drop indicator UI that provides visual feedback
+     *  Calculates the bounds for the drop indicator that provides visual feedback
      *  to the user of where the items will be inserted at the end of a drag and drop
      *  gesture.
      *
      *  Called by the showDropIndicator() method.
      *
-     *  @param dropLocation A valid DropLocation previously calculated
-     *  through the calculateDropLocation method.
+     *  @param dropLocation A valid DropLocation object previously returned
+     *  by the calculateDropLocation() method.
      *
      *  @return The bounds for the drop indicator or null.
      *
      *  @see spark.layouts.supportClasses.DropLocation
-     *  @see #calculateDropIndex
-     *  @see #calculateDragScrollDelta
+     *  @see #calculateDropIndex()
+     *  @see #calculateDragScrollDelta()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1580,23 +1584,21 @@
      *  Calculates how much to scroll for the specified dropLocation
      *  during a drag and drop gesture.
      *
-     *  Called by the showDropIndicator() method to figure out the
+     *  Called by the showDropIndicator() method to calculate the scroll
      *  during drag-scrolling.
      *
-     *  @param context A valid LayoutDragEventContext previously obtained
-     *  through the getDragEventContext method.
-     *
-     *  @param scrollDelta The Point to be filled with the computed scroll delta.
-     *
-     *  @param timeInterval The interval in milliseconds between two consecutive drag-scrolls.
-     *
-     *  @param timeElapsed The duration in milliseconds since the drag scrolling start.
+     *  @param context A valid DropLocation object previously obtained
+     *  by calling the calculateDropLocation() method.
+     *
+     *  @param timeInterval The interval, in milliseconds, between two consecutive drag-scrolls.
+     *
+     *  @param timeElapsed The duration, in milliseconds, since the drag scrolling start.
      *
      *  @return How much to drag scroll, or null if drag-scrolling is not needed.
      *
      *  @see spark.layouts.supportClasses.DropLocation
-     *  @see #calculateDropIndex
-     *  @see #calculateDropIndicatorBounds
+     *  @see #calculateDropIndex()
+     *  @see #calculateDropIndicatorBounds()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 5364
Author:   hmuller@adobe.com
Date:     2009-03-17T22:06:49.696808Z

Log Message:
-----------
More virtualization bug fixes.  This is the last of the current crop of A/B virtualization bugs.

Thanks to Evtim for the fix for 19388.

QE Notes: sdk-19847, sdk-19367, sdk-19388, sdk-19967
Doc Notes:
Bugs:
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -990,7 +990,7 @@
            case VerticalAlign.CONTENT_JUSTIFY:
                return Math.max(elt.getPreferredBoundsHeight(), containerHeight);
        }
-       return elt.getPreferredBoundsHeight();
+       return NaN; // not constrained
     }

     //  - virtual layout only -
@@ -1057,7 +1057,7 @@
         var maxVisibleX:Number = minVisibleX + layoutTarget.width;

         updateLLV(layoutTarget);
-        var startIndex:int = llv.indexOf(minVisibleX);
+        var startIndex:int = llv.indexOf(minVisibleX + gap);
         if (startIndex == -1)
             return;

@@ -1075,11 +1075,13 @@
         for (; (x < maxVisibleX) && (index < eltCount); index++)
         {
             var elt:ILayoutElement = layoutTarget.getVirtualElementAt(index);
-            var w:Number = (isNaN(fixedColumnWidth)) ? elt.getPreferredBoundsWidth() : fixedColumnWidth;
-            var h:Number = calculateElementHeight(elt, targetHeight, containerHeight);
+            var w:Number = fixedColumnWidth; // NaN for variable width columns
+            var h:Number = calculateElementHeight(elt, targetHeight, containerHeight); // can be NaN
+            elt.setLayoutBoundsSize(w, h);
+            w = elt.getLayoutBoundsWidth();
+            h = elt.getLayoutBoundsHeight();
             var y:Number = calculateElementY(elt, h, containerHeight);
             elt.setLayoutBoundsPosition(x, y);
-            elt.setLayoutBoundsSize(w, h);
             llv.cacheDimensions(index, elt);
             x += w + gap;
         }
@@ -1098,8 +1100,8 @@
                     elt = layoutTarget.getVirtualElementAt(index);
                     h = calculateElementHeight(elt, targetHeight, containerHeight);
                     y = calculateElementY(elt, h, containerHeight);
+                    elt.setLayoutBoundsSize(elt.getLayoutBoundsWidth(), h);
                     elt.setLayoutBoundsPosition(elt.getLayoutBoundsX(), y);
-                    elt.setLayoutBoundsSize(elt.getLayoutBoundsWidth(), h);
                 }
              }
         }


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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as
+++ frameworks/projects/spark/src/spark/filters/ConvolutionFilter.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.filters
 {


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

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

 package mx.core
 {


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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
 package spark.skins.mobile
 {
 import mx.core.ClassFactory;


Transferred from the Adobe Open Source Subversion Repository

Revision: 18199
Author:   klin@adobe.com
Date:     2010-10-19T06:15:05.005815Z

Log Message:
-----------
Add support for column sorting in DataGrid. Added basic support for interactively sorting the dataProvider by clicking on the column headers. Note that sorting currently only works if the dataProvider is an ICollectionView. We also provide the visibleSortIndicatorIndices property on the ColumnHeaderBar for developers to manually display the sort arrows. I've also changed the ColumnHeaderBarLayout to call prepare and discard on the allocated and created header renderers.

Notable added API include:

-In DataGrid, the sortableColumns property which toggles interactive sorting and sortByColumns() method which sorts the dataProvider by the provided column indices.
-In ColumnHeaderBar, the visibleSortIndicatorIndices allow the header renderers to determine whether to display their sort arrows.
-In GridColumn, the sortDescending property, the sortCompareFunction which has an additional parameter of the current GridColumn, and a read-only sortField property which constructs a SortField based on the current GridColumn.

QE notes: Can start testing column sorting
Doc notes: No
Bugs: No
Reviewer: Hans
Tests run: cyclone server
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.mxml</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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</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/ColumnHeaderBarLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as
@@ -202,9 +202,14 @@

             column = renderer.column;
             if (column && (visibleColumnIndices.indexOf(column.columnIndex) != -1))
+            {
                 oldRenderers[column] = renderer;
+            }
             else
+            {
                 freeVisualElement(renderer);
+                renderer.discard(true);
+            }
         }

         // Add all of the separators to the free-list, since laying them out is cheap
@@ -225,6 +230,9 @@
         const rendererY:Number = paddingTop;
         const rendererHeight:Number = unscaledHeight - paddingTop - paddingBottom;
         const maxRendererX:Number = columnHeaderBar.horizontalScrollPosition + unscaledWidth;
+
+        const allocatedItemRenderers:Vector.<IGridItemRenderer> = new Vector.<IGridItemRenderer>();
+        var createdItemRenderers:Vector.<IGridItemRenderer> = null;

         var columnIndex:int = -1;
         var visibleLeft:Number = 0;
@@ -251,12 +259,27 @@
             // reuse or create a new renderer

             renderer = oldRenderers[column];
+            oldRenderers[column] = null;
             if (!renderer)
             {
                 var factory:IFactory = column.headerRenderer;
                 if (!factory)
                     factory = columnHeaderBar.headerRenderer;
                 renderer = allocateVisualElement(factory) as IGridItemRenderer;
+
+                // Track which item renderers were created (uncommon) or recycled
+                // for the sake of the IGridItemRenderer prepare() method.
+
+                if (createdVisualElement)
+                {
+                    if (!createdItemRenderers)
+                        createdItemRenderers = new Vector.<IGridItemRenderer>();
+                    createdItemRenderers.push(renderer);
+                }
+                else
+                {
+                    allocatedItemRenderers.push(renderer);
+                }
             }

             // initialize the renderer
@@ -309,6 +332,16 @@
         visibleRenderersBounds.top = rendererY;
         visibleRenderersBounds.height = rendererHeight;

+        // Call prepare on renderers.
+        if (createdItemRenderers)
+        {
+            for each (var createdRenderer:IGridItemRenderer in createdItemRenderers)
+                createdRenderer.prepare(false);
+        }
+
+        for each (var allocatedRenderer:IGridItemRenderer in allocatedItemRenderers)
+            allocatedRenderer.prepare(true);
+
         // We may have created new renderers or changed their visibility.  Force
         // validation to avoid a display list flash.

@@ -560,11 +593,31 @@

     /**
      *  @private
+     *  Let the allocateGridElement() caller know if the returned element was
+     *  created or recycled.
+     */
+    private var createdVisualElement:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private function createVisualElement(factory:IFactory):IVisualElement
+    {
+        createdVisualElement = true;
+        const newElement:IVisualElement = factory.newInstance() as IVisualElement;
+        elementToFactoryMap[newElement] = factory;
+        return newElement;
+    }
+
+    /**
+     *  @private
      *  If the freeElementMap "free list" contains an instance of this factory, then
-     *  remove if from the free list and return it, otherwise return a new factory instance.
+     *  remove if from the free list and return it, otherwise create a new instance
+     *  using createVisualElement().
      */
     private function allocateVisualElement(factory:IFactory):IVisualElement
     {
+        createdVisualElement = false;
         const freeElements:Vector.<IVisualElement> = freeElementMap[factory] as Vector.<IVisualElement>;
         if (freeElements)
         {
@@ -575,9 +628,7 @@
                 return freeElement;
         }

-        const newElement:IVisualElement = factory.newInstance() as IVisualElement;
-        elementToFactoryMap[newElement] = factory;
-        return newElement;
+        return createVisualElement(factory);
     }

     /**


Code tidy

Code tidy

--- swc/src/com/mesmotronic/ane/AndroidFullScreen.as
+++ swc/src/com/mesmotronic/ane/AndroidFullScreen.as
@@ -56,14 +56,19 @@
 		{
 			var version:String = Capabilities.version.substr(0,3);

-			if (version == 'AND')
-			{
-				context = ExtensionContext.createExtensionContext('com.mesmotronic.ane.fullscreen', '');
-
-				if (isSupported)
-				{
-					context.call('init');
-					context.addEventListener(StatusEvent.STATUS, context_statusHandler);
+			switch (version)
+			{
+				case 'AND':
+				{
+					context = ExtensionContext.createExtensionContext('com.mesmotronic.ane.fullscreen', '');
+
+					if (isSupported)
+					{
+						context.call('init');
+						context.addEventListener(StatusEvent.STATUS, context_statusHandler);
+					}
+
+					break;
 				}
 			}
 		}


Cleaning all strings in Printer output for JUnit.

--- src/as3spec/Printer.as
+++ src/as3spec/Printer.as
@@ -24,9 +24,9 @@
       trace('<testsuite name="AllSpecs" errors="' + counter.errors + '" failures="' + counter.failures + '" tests="' + counter.specifications + '" time="' + (counter.time/1000) + '">');
       for(var countName:String in counter.contexts) {
         for each(var specification:Specification in counter.contexts[countName]) {
-          trace('<testcase classname="'+countName+"."+specification.story+'" name="'+specification.story+'" time="'+(specification.time/1000)+'">');
+          trace('<testcase classname="'+countName+"."+clean(specification.story)+'" name="'+clean(specification.story)+'" time="'+(specification.time/1000)+'">');
           if(specification.failure!=null) {
-            trace('<failure type="'+specification.failureType+'"><![CDATA['+specification.failure+']]></failure>');
+            trace('<failure type="'+clean(specification.failureType)+'"><![CDATA['+clean(specification.failure)+']]></failure>');
           }
           trace('</testcase>');
         }
@@ -37,5 +37,10 @@

 		}

+		private function clean(str:String) : String {
+		  var pat:RegExp = /"/g;
+		  return str.replace(pat, "'");
+		}
+
 	}
 }


FLEX-33978 fix for RTE

FLEX-33978 fix for RTE

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -1013,7 +1013,7 @@
         // if we already have the focus, no need to set it again.
         // if we do indeed set it again, we might end up scrolling the
         // TextField when we don't want that to happen (SDK-29453)
-        if (stage.focus != this)
+        if (stage && stage.focus != this)
             stage.focus = this;

         // Work around a runtime bug where calling setSelection(0,0) doesn't


Transferred from the Adobe Open Source Subversion Repository

Revision: 20494
Author:   jszeto@adobe.com
Date:     2011-03-01T00:00:17.318445Z

Log Message:
-----------
StyleableTextField selectRange bug fix

http://bugs.adobe.com/jira/browse/SDK-29569 - selectRange(0,0) selects the first character if the text is set in AS.

Fix the use case when selectable == false. In StyleableTextField.setFocus, if it is not selectable, then we call setSelection(0,0) after focus has been set. This is a workaround for a runtime bug.

QE notes: none
Doc notes: none
Bugs: SDK-29569
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: no

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -943,6 +943,12 @@
         if (stage.focus != this)
             stage.focus = this;

+        // Work around a runtime bug where calling setSelection(0,0) doesn't
+        // work if the text field is not in focus.
+        // This handles the read-only, non-selectable case
+        if (selectable == false)
+            setSelection(0,0);
+
         if (editable)
             requestSoftKeyboard();
     }