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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 12662
Author:   rfrishbe@adobe.com
Date:     2009-12-08T20:09:58.468617Z

Log Message:
-----------
Fixing a bunch of bugs for video player:

- Adding a "complete" event to VideoDisplay/VideoPlayer for when the playback has finished
- Adding metadata to the video resources passed in to OSMF so that it knows we're dealing with Video objects and can help resolve ambiguous URLs in terms of media type.
- Fixed up some fullScreen logic so that it works on MX Application and with Applications with controlBars.  It now uses PopUpManager.addPopUp() and sets explicitWidth/explicitHeight.

QE notes: -
Doc notes: -
Bugs: SDK-24531, SDK-24487, SDK-24484, SDK-24593
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: Yes (new "complete" event)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/osmf/src/org/osmf/composition/CompositeTemporalTrait.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/osmf/src/org/osmf/traits/TemporalTrait.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/osmf/src/org/osmf/traits/ITemporal.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/osmf/src/org/osmf/events/TimeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/osmf/src/org/osmf/proxies/TemporalProxyElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/osmf/src/org/osmf/proxies/ListenerProxyElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/osmf/src/org/osmf/media/MediaPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -14,6 +14,7 @@

 import flash.events.Event;
 import flash.geom.Point;
+import flash.geom.Rectangle;
 import flash.media.Video;

 import mx.core.IUIComponent;
@@ -39,6 +40,8 @@
 import org.osmf.media.MediaPlayer;
 import org.osmf.media.MediaPlayerState;
 import org.osmf.media.URLResource;
+import org.osmf.metadata.MediaType;
+import org.osmf.metadata.MediaTypeFacet;
 import org.osmf.net.NetLoader;
 import org.osmf.net.dynamicstreaming.DynamicStreamingItem;
 import org.osmf.net.dynamicstreaming.DynamicStreamingNetLoader;
@@ -60,15 +63,31 @@

 /**
  *  Dispatched when the data is received as a download operation progresses.
+ *  This event is only dispatched when playing a video by downloading it
+ *  directly from a server, typically by issuing an HTTP request.
+ *  It is not displatched when playing a video from a special media server,
+ *  such as Flash Media Server.
  *
  *  @eventType org.osmf.events.LoadEvent.BYTES_LOADED_CHANGE
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.0
- *  @productversion OSMF 1.0
+ *  @productversion Flex 4
  */
 [Event(name="bytesLoadedChange",type="org.osmf.events.LoadEvent")]
+
+/**
+ *  Dispatched when the playhead reaches the duration for playable media.
+ *
+ *  @eventType org.osmf.events.TimeEvent.COMPLETE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.0
+ *  @productversion Flex 4
+ */
+[Event(name="complete", type="org.osmf.events.TimeEvent")]

 /**
  *  Dispatched when the currentTime property of the MediaPlayer has changed.
@@ -78,8 +97,8 @@
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.0
- *  @productversion OSMF 1.0
- **/
+ *  @productversion Flex 4
+ */
 [Event(name="currentTimeChange",type="org.osmf.events.TimeEvent")]

 /**
@@ -90,7 +109,7 @@
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.0
- *  @productversion OSMF 1.0
+ *  @productversion Flex 4
  */
 [Event(name="durationChange", type="org.osmf.events.TimeEvent")]

@@ -102,7 +121,7 @@
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.0
- *  @productversion OSMF 1.0
+ *  @productversion Flex 4
  */
 [Event(name="mediaPlayerStateChange", type="org.osmf.events.MediaPlayerStateChangeEvent")]

@@ -1294,6 +1313,7 @@
         videoPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, dispatchEvent);
         videoPlayer.addEventListener(LoadEvent.BYTES_LOADED_CHANGE, dispatchEvent);
         videoPlayer.addEventListener(TimeEvent.DURATION_CHANGE, dispatchEvent);
+        videoPlayer.addEventListener(TimeEvent.COMPLETE, dispatchEvent);

         addChild(videoSprite);
     }
@@ -1350,12 +1370,21 @@

                 dsr.initialIndex = streamingSource.initialIndex;

+                // add video type metadata so if the URL is ambiguous, OSMF will
+                // know what type of file we're trying to connect to
+                dsr.metadata.addFacet(new MediaTypeFacet(MediaType.VIDEO));
+
                 videoElement = new org.osmf.video.VideoElement(new DynamicStreamingNetLoader(), dsr);
             }
         }
         else if (source is String)
         {
             var urlResource:URLResource = new URLResource(new URL(source as String));
+
+            // add video type metadata so if the URL is ambiguous, OSMF will
+            // know what type of file we're trying to connect to
+            urlResource.metadata.addFacet(new MediaTypeFacet(MediaType.VIDEO));
+
             videoElement = new org.osmf.video.VideoElement(new NetLoader(), urlResource);
         }
         else if (source is IMediaResource)
@@ -1677,14 +1706,6 @@
     /**
      *  @private
      */
-    private function videoPlayer_dimensionChangeHandler(event:DimensionEvent):void
-    {
-        invalidateSize();
-    }
-
-    /**
-     *  @private
-     */
     private function videoPlayer_volumeChangeHandler(event:AudioEvent):void
     {
         dispatchEvent(new Event("volumeChanged"));
@@ -1717,18 +1738,33 @@
             // we don't need to do anything.
             if (videoPlayer.playing)
                 return;
-
-            // going to call play(), pause(), seek().  These are asynchronous operations, but
-            // NetStream will "do the right thing" if I call play() and then pause().  However,
-            // seek is still asynchronous, so I need to keep the video muted until the
-            // seek is complete.
-            videoPlayer.addEventListener(SeekEvent.SEEK_END, videoPlayer_seekEndHandler);

             beforeLoadMuted = videoPlayer.muted;
             videoPlayer.muted = true;
+            videoPlayer.view.visible = false;

             inLoadingState = true;
+
+            // call play(), here, then wait to call pause() and seek(0) in the
+            // dimensionChangeHandler
             videoPlayer.play();
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function videoPlayer_dimensionChangeHandler(event:DimensionEvent):void
+    {
+        invalidateSize();
+
+        // if we're loading up the video, then let's finish the load in here
+        if (inLoadingState)
+        {
+            // the seek(0) is asynchronous so let's add an event listener to see when it's finsished:
+            videoPlayer.addEventListener(SeekEvent.SEEK_END, videoPlayer_seekEndHandler);
+
+            // called play(), now call pause() and seek(0);
             videoPlayer.pause();
             videoPlayer.seek(0);
         }
@@ -1746,6 +1782,7 @@
         videoPlayer.removeEventListener(SeekEvent.SEEK_END, videoPlayer_seekEndHandler);
         inLoadingState = false;
         videoPlayer.muted = beforeLoadMuted;
+        videoPlayer.view.visible = true;
     }
 }
 }


Default port should be set as convenience for developer. Some documentation from the XEP.

--- src/org/igniterealtime/xiff/core/XMPPBOSHConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPBOSHConnection.as
@@ -170,9 +170,44 @@
 			this.secure = secure;
 			_responseTimer = new Timer( 0.0, 1 );
 			_responseTimer.addEventListener( TimerEvent.TIMER_COMPLETE, processResponse );
-		}
-
-		/**
+
+			// Default values for super class
+			port = XMPPBOSHConnection.HTTP_PORT;
+		}
+
+		/**
+		 * The first request from the client to the connection manager requests a new session.
+		 *
+		 *
The body element of the first request SHOULD possess
+		 * the following attributes (they SHOULD NOT be included in any other requests
+		 * except as specified under Adding Streams To A Session):

+		 *
+		 *

+		 *
'to' -- This attribute specifies the target domain of the first stream.

+		 *
'xml:lang' -- This attribute (as defined in Section 2.12 of XML 1.0 [17])
+		 *   specifies the default language of any human-readable XML character data
+		 *   sent or received during the session.

+		 *
'ver' -- This attribute specifies the highest version of the BOSH protocol
+		 *   that the client supports. The numbering scheme is "major.minor" (where
+		 *   the minor number MAY be incremented higher than a single digit, so it
+		 *   MUST be treated as a separate integer). Note: The 'ver' attribute should
+		 *   not be confused with the version of any protocol being transported.

+		 *
'wait' -- This attribute specifies the longest time (in seconds) that
+		 *   the connection manager is allowed to wait before responding to any request
+		 *   during the session. This enables the client to limit the delay before it
+		 *   discovers any network failure, and to prevent its HTTP/TCP connection
+		 *   from expiring due to inactivity.

+		 *
'hold' -- This attribute specifies the maximum number of requests the
+		 *   connection manager is allowed to keep waiting at any one time during the
+		 *   session. If the client is not able to use HTTP Pipelining then this SHOULD
+		 *   be set to "1".

+		 *

+		 *
+		 *
Note: Clients that only support Polling Sessions MAY prevent the connection
+		 * manager from waiting by setting 'wait' or 'hold' to "0". However, polling is
+		 * NOT RECOMMENDED since the associated increase in bandwidth consumption and
+		 * the decrease in responsiveness are both typically one or two orders of
+		 * magnitude!

 		 *
 		 * @param	streamType Not used
 		 * @see http://xmpp.org/extensions/xep-0206.html#initiate
@@ -247,8 +282,57 @@
 		}

 		/**
+		 * Session Creation Response
+		 *
+		 *
After receiving a new session request, the connection manager MUST generate
+		 * an opaque, unpredictable session identifier (or SID). The SID MUST be unique
+		 * within the context of the connection manager application. The body
+		 * element of the connection manager's response to the client's session creation
+		 * request MUST possess the following attributes (they SHOULD NOT be included in
+		 * any other responses):

+		 *
+		 *

+		 *
'sid' -- This attribute specifies the SID

+		 *
'wait' -- This is the longest time (in seconds) that the connection manager
+		 *   will wait before responding to any request during the session. The time MUST be
+		 *   less than or equal to the value specified in the session request.

+		 *

+		 *
+		 *
The body element SHOULD also include the following attributes
+		 * (they SHOULD NOT be included in any other responses):

+		 *
+		 *

+		 *
'ver' -- This attribute specifies the highest version of the BOSH protocol
+		 *   that the connection manager supports, or the version specified by the client in
+		 *   its request, whichever is lower.

+		 *
'polling' -- This attribute specifies the shortest allowable polling
+		 *   interval (in seconds). This enables the client to not send empty request
+		 *   elements more often than desired (see Polling Sessions and Overactivity).

+		 *
'inactivity' -- This attribute specifies the longest allowable inactivity
+		 *   period (in seconds). This enables the client to ensure that the periods with
+		 *   no requests pending are never too long (see Polling Sessions and Inactivity).

+		 *
'requests' -- This attribute enables the connection manager to limit the
+		 *   number of simultaneous requests the client makes (see Overactivity and
+		 *   Polling Sessions). The RECOMMENDED values are either "2" or one more than
+		 *   the value of the 'hold' attribute specified in the session request.

+		 *
'hold' -- This attribute informs the client about the maximum number
+		 *   of requests the connection manager will keep waiting at any one time during
+		 *   the session. This value MUST NOT be greater than the value specified by the
+		 *   client in the session request.

+		 *
'to' -- This attribute communicates the identity of the backend server
+		 *   to which the client is attempting to connect.

+		 *

+		 *
+		 *
The connection manager MAY include an 'accept' attribute in the session
+		 * creation response element, to specify a space-separated list of the content
+		 * encodings it can decompress. After receiving a session creation response
+		 * with an 'accept' attribute, clients MAY include an HTTP Content-Encoding
+		 * header in subsequent requests (indicating one of the encodings specified
+		 * in the 'accept' attribute) and compress the bodies of the requests
+		 * accordingly.

 		 *
 		 * @param	responseBody
+		 * @see http://xmpp.org/extensions/xep-0124.html#session-response
 		 * @see http://xmpp.org/extensions/xep-0206.html#create
 		 */
 		public function processConnectionResponse( responseBody:XML ):void
@@ -286,7 +370,9 @@
 			addEventListener( LoginEvent.LOGIN, handleLogin );
 		}

-		//do nothing, we use polling instead
+		/**
+		 * Does nothing, BOSH uses polling instead.
+		 */
 		override public function sendKeepAlive():void
 		{
 		}
@@ -318,6 +404,9 @@
 			_streamRestarted = true;
 		}

+		/**
+		 * TODO: Is this somthing that could be safely removed?
+		 */
 		override protected function handleNodeType( node:XML ):void
 		{
 			super.handleNodeType( node );
@@ -429,6 +518,7 @@
 				active = false;
 			}

+			// sid is supposed to be only available when creating a new session
 			// http://xmpp.org/extensions/xep-0206.html#create
 			if ( xmlData.hasOwnProperty("@sid") && !loggedIn )
 			{
@@ -608,6 +698,8 @@
 		 */
 		override protected function sendDataToServer( data:ByteArray ):void
 		{
+			trace("XMPPBOSHConnection::sendDataToServer. httpServer: " + httpServer);
+
 			var req:URLRequest = new URLRequest( httpServer );
 			req.method = URLRequestMethod.POST;
 			req.contentType = "text/xml"; // How about while compressed data?
@@ -673,6 +765,8 @@
 		/**
 		 * HTTP bind requests type. If secure, the requests will be sent
 		 * through HTTPS. If not, through HTTP.
+		 *
+		 *
Please note that the port needs to be set separately.

 		 */
 		public function get secure():Boolean
 		{


Fix bug on uploading vector4 arrays shader parameters to renderStates

--- src/aerys/minko/render/shader/Shader.as
+++ src/aerys/minko/render/shader/Shader.as
@@ -286,6 +286,8 @@

 				for (var j : uint = 0; j < vectorVectorDataLength; ++j)
 				{
+					vectorData = vectorVectorData[j];
+
 					constData[offset + 4 * j] = vectorData.x;
 					constData[int(offset + 4 * j + 1)] = vectorData.y;
 					constData[int(offset + 4 * j + 2)] = vectorData.z;
@@ -298,7 +300,9 @@
 				var matrixVectorDataLength	: uint					= matrixVectorData.length;

 				for (var i : uint = 0; i < matrixVectorDataLength; ++i)
+				{
 					matrixVectorData[i].getRawData(constData, offset + i * 16, true);
+				}
 			}
 			else if (data == null)
 			{
@@ -312,6 +316,5 @@
 					'map it to a shader constant.');
 			}
 		}
-
 	}
-}+}


minor bug fixed

minor bug fixed

--- Arguments/src/classes/Inference.as
+++ Arguments/src/classes/Inference.as
@@ -345,13 +345,17 @@
 			}

 			//the first claim is not set to multistatement by default
-			if(claim.multiStatement && !schemeSelected)
+			if(claim.multiStatement)
 			{
 				//claim is a multistatement and claim is of type P->Q
 				//Only one possible scheme - conditional syllogism
 				if(claim.implies)
 				{
-
+
+					if(!schemeSelected)
+					{
+						reasons[0].makeEditable();
+					}
 					//typeArr = ["Conditional Syllogism"];
 					//the language type is already determined
 					//It is that of the enabler.
@@ -382,7 +386,8 @@
 					parentMap.option.visible = false;
 					claim.removeEventListeners();
 					this.visible = true;
-					reasons[0].makeEditable();
+
+
 					//dispatchEvent(new Event(REASON_ADDED));
 				}
 				else


fixed bug passing keySet to joinColumns()

--- WeaveJS/src/weavejs/path/WeavePathData.as
+++ WeaveJS/src/weavejs/path/WeavePathData.as
@@ -334,15 +334,15 @@
 		public function retrieveRecords(pathMapping:Object, options:Object):Array
 		{
 			var dataType:String = options ? options['dataType'] : null;
-			var keySet:WeavePath = options ? options['keySet'] : null;
+			var keySetPath:WeavePath = options ? options['keySet'] : null;

-			if (!keySet && options is WeavePath)
-				keySet = options as WeavePath;
+			if (!keySetPath && options is WeavePath)
+				keySetPath = options as WeavePath;

 			// if only one argument given and it's a WeavePath object, assume it's supposed to be keySetPath.
 			if (arguments.length == 1 && pathMapping is WeavePath)
 			{
-				keySet = pathMapping as WeavePath;
+				keySetPath = pathMapping as WeavePath;
 				pathMapping = null;
 			}

@@ -358,10 +358,10 @@
 		    }

 		    // pathMapping is a nested object mapping property chains to WeavePath objects
-		    var obj:Object = listChainsAndNodes(pathMapping);
+		    var obj:Object = listChainsAndColumns(pathMapping);

 		    /* Perform the actual retrieval of records */
-		    var results:Array = ColumnUtils.joinColumns(obj.paths, dataType, true, keySet);
+		    var results:Array = ColumnUtils.joinColumns(obj.columns, dataType, true, keySetPath ? keySetPath.getObject() : null);
 		    return results[0]
 		        .map(this.qkeyToString)
 		        .map(function(key:String, iRow:int, a:Array):Object {
@@ -412,15 +412,15 @@
 		 * Recursively builds a mapping of property chains to WeavePath objects from a path specification as used in retrieveRecords
 		 * @param obj A path spec object
 		 * @param prefix A property chain prefix (optional)
-		 * @param output Output object with "chains" and "paths" properties (optional)
-		 * @return An object like {"chains": [], "paths": []}, where "chains" contains property name chains and "paths" contains WeavePath objects
-		 */
-		protected function listChainsAndNodes(obj:Object, prefix:Array = null, output:Object = null):Object
+		 * @param output Output object with "chains" and "columns" properties (optional)
+		 * @return An object like {"chains": [], "columns": []}, where "chains" contains property name chains and "columns" contains IAttributeColumn objects
+		 */
+		protected function listChainsAndColumns(obj:Object, prefix:Array = null, output:Object = null):Object
 		{
 		    if (!prefix)
 		        prefix = [];
 		    if (!output)
-		        output = {chains: [], paths: []};
+		        output = {chains: [], columns: []};

 		    for (var key:String in obj)
 		    {
@@ -431,12 +431,12 @@
 		            if (column is IAttributeColumn)
 		            {
 		                output.chains.push(prefix.concat(key));
-		                output.paths.push(column);
+		                output.columns.push(column);
 		            }
 		        }
 		        else
 		        {
-		            listChainsAndNodes(item, prefix.concat(key), output);
+		            listChainsAndColumns(item, prefix.concat(key), output);
 		        }
 		    }
 		    return output;


UPDATE FIX FLEX-33861 Flex Incorrectly Scaling Down Application set 1024 and 2048 as static vars so that they can be changed if needed

--- frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as
+++ frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as
@@ -71,6 +71,10 @@
  */
 public class RuntimeDPIProvider
 {
+
+    mx_internal static const IPAD_MAX_EXTENT:int = 1024;
+    mx_internal static const IPAD_RETINA_MAX_EXTENT: int = 2048;
+
     /**
      *  Constructor.
      *
@@ -129,9 +133,9 @@
                     /*  as of Dec 2013,  iPad (resp. iPad retina)   are the only iOS devices to have 1024 (resp. 2048) screen width or height
                      cf http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density#Apple
                      * */
-                    if ((scX == 2048 || scY == 2048))
+                    if ((scX == IPAD_RETINA_MAX_EXTENT || scY == IPAD_RETINA_MAX_EXTENT))
                         return DPIClassification.DPI_320;
-                    else if (scX == 1024 || scY == 1024)
+                    else if (scX == IPAD_MAX_EXTENT || scY == IPAD_MAX_EXTENT)
                         return DPIClassification.DPI_160;
                 }
             }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/textClasses/TextRange.as
+++ frameworks/projects/mx/src/mx/controls/textClasses/TextRange.as
@@ -0,0 +1,696 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.controls.textClasses
+{
+
+import flash.text.TextField;
+import flash.text.TextFormat;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import mx.styles.StyleManager;
+import mx.utils.StringUtil;
+
+use namespace mx_internal;
+
+/**
+ *  The TextRange class provides properties that select and format a range of
+ *  text in the Label, Text, TextArea, TextEditor, and RichTextEditor controls.
+ *
+ *  @see mx.controls.Label
+ *  @see mx.controls.RichTextEditor
+ *  @see mx.controls.Text
+ *  @see mx.controls.TextArea
+ *  @see mx.controls.TextInput
+ *  @see flash.text.TextFormatAlign
+ */
+public class TextRange
+{
+	include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var htmlTextField:TextField;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Create a new TextRange Object that represents a subset of the contents
+	 *  of a text control, including the formatting information.
+	 *
+	 *  @param owner The control that contains the text. The control must have
+	 *  a textField property, or, as is the case of the
+	 *  RichTextEditor control, a textArea property.
+	 *
+	 *  @param modifiesSelection Whether to select the text in the range.
+	 *  If you set this parameter to true and do not specify a
+	 *  begin or end index that corresponds to text in the control, Flex
+	 *  uses the begin or end index of the current text selection.
+	 *  If this parameter is true, you omit the
+	 *  beginIndex and endIndex
+	 *  parameters, and there is no selection, the TextRange object is empty.
+	 *
+	 *  @param beginIndex Zero-based index of the first character in the range.
+	 *  If the modifiesSelection parameter is false
+	 *  and you omit this parameter or specify a negative value,
+	 *  the range starts with the first text character.
+	 *
+	 *  @param endIndex Zero-based index of the position after the
+	 *  last character in the range.
+	 *  If the modifiesSelection parameter is false
+	 *  and you omit this parameter, specify a negative value, or specify
+	 *  a value past the end of the text, the range ends with the last
+	 *  text character.
+	 */
+	public function TextRange(owner:UIComponent,
+							  modifiesSelection:Boolean = false,
+							  beginIndex:int = -1, endIndex:int = -1)
+	{
+		super();
+
+		_owner = owner;
+
+		try
+		{
+			textField = _owner["textArea"].mx_internal::getTextField();
+		}
+		catch(e:Error)
+		{
+			textField = this["_owner"].mx_internal::getTextField();
+		}
+
+		_modifiesSelection = modifiesSelection;
+
+		if (!_modifiesSelection)
+		{
+			if (beginIndex < 0)
+				beginIndex = 0;
+
+			if (beginIndex > textField.length)
+				beginIndex = textField.length;
+
+			if (endIndex < 0 || endIndex > textField.length)
+				endIndex = textField.length;
+
+			_beginIndex = beginIndex;
+			_endIndex = endIndex;
+		}
+		else
+		{
+			if (beginIndex < 0 || beginIndex > textField.length)
+				beginIndex = textField.selectionBeginIndex;
+
+			if (endIndex < 0 || endIndex > textField.length)
+				endIndex = textField.selectionEndIndex;
+
+			textField.selectable = true;
+
+			if (beginIndex != textField.selectionBeginIndex ||
+				endIndex != textField.selectionEndIndex)
+			{
+				textField.setSelection(beginIndex, endIndex);
+			}
+		}
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var textField:TextField;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  beginIndex
+    //----------------------------------
+
+	/**
+	 *  Storage for the beginIndex property.
+	 */
+	private var _beginIndex:int;
+
+	/**
+	 *  Zero-based index in the control's text field of the first
+	 *  character in the range.
+	 *  If the fifth character in the text is the first character in the
+	 *  range, this property has a value of 4.
+	 */
+	public function get beginIndex():int
+	{
+		if (_modifiesSelection)
+			return textField.selectionBeginIndex;
+		else
+			return _beginIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set beginIndex(value:int):void
+	{
+		if (_modifiesSelection)
+			textField.setSelection(value, textField.selectionEndIndex);
+		else
+			_beginIndex = value;
+	}
+
+    //----------------------------------
+	//  bullet
+    //----------------------------------
+
+	/**
+	 *  Whether the text in the range is in a bulleted list.
+	 *  If only part of the range is in a bulleted list,
+	 *  this value is false.
+	 */
+	public function get bullet():Boolean
+	{
+		return getTextFormat().bullet;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set bullet(value:Boolean):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.bullet = value;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  color
+    //----------------------------------
+
+	/**
+	 *  Color of the text in the range.
+	 *  You can set this value using any valid color identifier.
+	 *  The property returns the value as a numeric value.
+	 *  If the range has multiple colors, this value is null.
+	 */
+	public function get color():Object
+	{
+		return getTextFormat().color;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set color(value:Object):void
+	{
+		var tf:TextFormat = getTextFormat();
+		var colorNumber:uint = StyleManager.getColorName(value);
+		if (colorNumber != StyleManager.NOT_A_COLOR)
+			value = colorNumber;
+		else
+			value = 0;
+		tf.color = value;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  endIndex
+    //----------------------------------
+
+	/**
+	 *  Storage for the beginIndex property.
+	 */
+	private var _endIndex:int;
+
+	/**
+	 *  Zero-based index in the control's text field of the point
+	 *  immediately after the last character in the range; equivalent to
+	 *  the One-based index of the last character.
+	 *  If the fifth character in the text is the last character in the
+	 *  range, this property has a value of 5.
+	 */
+	public function get endIndex():int
+	{
+		if (_modifiesSelection)
+			return textField.selectionEndIndex;
+		else
+			return _endIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set endIndex(value:int):void
+	{
+		if (_modifiesSelection)
+			textField.setSelection(textField.selectionBeginIndex, value);
+		else
+			_endIndex = value;
+	}
+
+    //----------------------------------
+	//  fontFamily
+    //----------------------------------
+
+	/**
+	 *  Name of the font for text in the range.
+	 *  If the range has multiple fonts, this value is null.
+	 */
+	public function get fontFamily():String
+	{
+		return getTextFormat().font;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set fontFamily(value:String):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.font = StringUtil.trimArrayElements(value,",");
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  fontSize
+    //----------------------------------
+
+	/**
+	 *  Point size of the text in the range.
+	 *  If the range has multiple sizes, this value is 0.
+	 */
+	public function get fontSize():int
+	{
+		return int(getTextFormat().size);
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set fontSize(value:int):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.size = value;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  fontStyle
+    //----------------------------------
+
+	/**
+	 *  Style of the font in the range, as "italic"
+	 *  or "normal". Setting the property to any other string results
+	 *  in normal style.
+	 *  If the range has multiple styles, this value is null.
+	 */
+	public function get fontStyle():String
+	{
+		return getTextFormat().italic ? "italic" : "normal";
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set fontStyle(value:String):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.italic = (value == "italic") ? true : false;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  fontWeight
+    //----------------------------------
+
+	/**
+	 *  Weight of the font in the range, as "bold"
+	 *  or "normal". Setting the property to any other string results
+	 *  in normal weight.
+	 *  If the range has multiple weights, this value is null.
+	 */
+	public function get fontWeight():String
+	{
+		return getTextFormat().bold ? "bold" : "normal";
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set fontWeight(value:String):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.bold = (value == "bold") ? true : false;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  htmlText
+    //----------------------------------
+
+	/**
+	 *  Contents of the range in the form of HTML text.
+	 *  This property returns all HTML markup for the range, including
+	 *  markup for formatting that is applied by Flex, not just
+	 *  HTML that you specify in using an htmlText property.
+	 *  This property is, therefore, a full HTML representation of the
+	 *  text as it appears in the control.
+	 */
+	public function get htmlText():String
+	{
+		if (beginIndex == endIndex)
+			return "";
+
+		if (!htmlTextField)
+		{
+			htmlTextField = new TextField();
+			htmlTextField.multiline = true;
+		}
+
+		htmlTextField.defaultTextFormat = textField.defaultTextFormat;
+		htmlTextField.htmlText = "";
+
+		htmlTextField.insertXMLText(
+			0, 0, textField.getXMLText(beginIndex, endIndex))
+
+		return htmlTextField.htmlText;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set htmlText(value:String):void
+	{
+
+		if (!htmlTextField)
+		{
+			htmlTextField = new TextField();
+			htmlTextField.multiline = true;
+		}
+
+		htmlTextField.defaultTextFormat = textField.defaultTextFormat;
+		htmlTextField.htmlText = value;
+		var length:int = htmlTextField.length;
+
+		var oldBeginIndex:int = beginIndex;
+		textField.insertXMLText(
+			beginIndex, endIndex, htmlTextField.getXMLText());
+		// workaround for what seems to be a player bug (#207147)
+		// where a zero length selection is shifted
+		// (if no bug, this code should never execute)
+		if ((oldBeginIndex == 0) && (beginIndex > 0))
+			beginIndex = 0;
+
+		endIndex = beginIndex + length;
+	}
+
+    //----------------------------------
+	//  kerning
+    //----------------------------------
+
+	/**
+	 *  A Boolean value that indicates whether kerning
+	 *  is enabled (true) or disabled (false).
+	 *  Kerning adjusts the pixels between certain character pairs
+	 *  to improve readability, and should be used only when necessary,
+	 *  such as with headings in large fonts.
+	 *  Kerning is supported for embedded fonts only.
+	 *  Certain fonts, such as Verdana, and monospaced fonts,
+	 *  such as Courier New, do not support kerning.
+	 *
+	 *  @default false
+	 */
+	public function get kerning():Boolean
+	{
+		return Boolean(getTextFormat().kerning);
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set kerning(value:Boolean):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.kerning = value;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  letterSpacing
+    //----------------------------------
+
+	/**
+	 *  The number of additional pixels to appear between each character.
+	 *  A positive value increases the character spacing
+	 *  beyond the normal spacing, while a negative value decreases it.
+	 *
+	 *  @default 0
+	 */
+	public function get letterSpacing():Number
+	{
+		return Number(getTextFormat().letterSpacing);
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set letterSpacing(value:Number):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.letterSpacing = value;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  modifiesSelection
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the modifiesSelection property.
+	 */
+	private var _modifiesSelection:Boolean;
+
+	/**
+	 *  Whether the TextRange modifies the currenly selected text.
+	 *  Set by the constructor.
+	 */
+	public function get modifiesSelection():Boolean
+	{
+		return _modifiesSelection;
+	}
+
+    //----------------------------------
+	//  owner
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the owner property.
+	 */
+	private var _owner:UIComponent;
+
+	/**
+	 *  The control that contains the text.
+	 *  The owner control must have a textField property,
+	 *  or, as is the case of the RichTextEditor control,
+	 *  a textArea property.
+	 *  The owner of the text in a RichTextEditor control is the
+	 *  RichTextEditor control, not its TextArea subcontrol.
+	 *  Initially set by the constructor.
+	 */
+	public function get owner():UIComponent
+	{
+		return _owner;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set owner(value:UIComponent):void
+	{
+		_owner = value;
+
+		try
+		{
+			textField = _owner["textArea"]["textField"];
+		}
+		catch(e:Error)
+		{
+			textField = _owner["textField"];
+		}
+	}
+
+    //----------------------------------
+	//  text
+    //----------------------------------
+
+	/**
+	 *  Plain-text contents of the range.
+	 */
+	public function get text():String
+	{
+		return textField.text.substring(beginIndex, endIndex);
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set text(value:String):void
+	{
+		var oldBeginIndex:int = beginIndex;
+		textField.replaceText(beginIndex,endIndex,value);
+		// workaround for what seems to be a player bug (#207147)
+		// where a zero length selection is shifted
+		// (if no bug, this code should never execute)
+		if ((oldBeginIndex == 0) && (beginIndex > 0))
+			beginIndex = 0;
+		endIndex = beginIndex + value.length;
+	}
+
+    //----------------------------------
+	//  textAlign
+    //----------------------------------
+
+	/**
+	 *  Alignment of the text in the range.
+	 *  The flash.text.TextFormatAlign constants specify the valid values.
+	 *  Setting this property to any other value has no effect.
+	 *  If the range has multiple alignments, this value is null.
+	 *
+	 *  @see flash.text.TextFormatAlign
+	 */
+	public function get textAlign():String
+	{
+		return getTextFormat().align;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set textAlign(value:String):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.align = value;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  textDecoration
+    //----------------------------------
+
+	/**
+	 *  Decoration of the font in the range, as "underline"
+	 *  or "normal". Setting the property to any other string results
+	 *  in normal text.
+	 *  If the range has multiple decoration settings, this value is
+	 *  null.
+	 */
+	public function get textDecoration():String
+	{
+		return getTextFormat().underline ? "underline" : "normal";
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set textDecoration(value:String):void
+	{
+		var tf:TextFormat = getTextFormat();
+		tf.underline = (value == "underline") ? true : false;
+		setTextFormat(tf);
+	}
+
+    //----------------------------------
+	//  url
+    //----------------------------------
+
+	/**
+	 *  URL for a hypertext link in the range.
+	 *  If the range does not include a link, the value
+	 *  is the empty string.
+	 *  If the range includes multiple links, the value
+	 *  is null.
+	 */
+	public function get url():String
+	{
+		return getTextFormat().url;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set url(value:String):void
+	{
+		var tf:TextFormat = getTextFormat();
+
+		if (value != "")
+		{
+			tf.url = value;
+			tf.target = "_blank";
+		}
+		else if (tf.url != "")
+		{
+			tf.url = "";
+			tf.target = "";
+		}
+
+		setTextFormat(tf);
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function getTextFormat():TextFormat
+	{
+		var tf:TextFormat;
+		if (_modifiesSelection && beginIndex == endIndex)
+			tf = textField.defaultTextFormat;
+		else
+			tf = textField.getTextFormat(beginIndex, endIndex);
+		return tf;
+	}
+
+	/**
+	 *  @private
+	 */
+	private function setTextFormat(tf:TextFormat):void
+	{
+		if (_modifiesSelection && beginIndex == endIndex)
+			textField.defaultTextFormat = tf;
+		else
+			textField.setTextFormat(tf,beginIndex, endIndex);
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3184
Author:   shodgson@adobe.com
Date:     2008-09-11T22:51:31.586220Z

Log Message:
-----------
Update to Channel failover to survive transient network disconnects (i.e. HTTP proxy connection severing)

Bug: NA
QA: Yes - testable via judicious breakpointing or via an automated test run in concert with Shunra or something similar perhaps?
Doc: No
Checkintests Pass: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as
@@ -301,7 +301,7 @@
     override protected function internalDisconnect(rejected:Boolean = false):void
     {
         // Attempt to notify the server of the disconnect.
-        if (!rejected)
+        if (!rejected && !shouldBeConnected)
         {
             var msg:CommandMessage = new CommandMessage();
             msg.operation = CommandMessage.DISCONNECT_OPERATION;


ADDED API to enable in app alert notification

--- actionscript/src/com/marpies/ane/onesignal/OneSignal.as
+++ actionscript/src/com/marpies/ane/onesignal/OneSignal.as
@@ -297,6 +297,22 @@
             }

             mContext.call( "postNotification", parametersString, registerCallback( callback ) );
+        }
+
+        /**
+         * By default this is false and notifications will not be shown when the user is in your app.
+         * If set to true notifications will be shown as native alert boxes if a notification is
+         * received when the user is in your app.
+         *
+         *
Extension must be initialized using OneSignal.init() before calling this method.

+         *
+         * @param value Set to true to enable native in app alert.
+         */
+        public static function enableInAppAlertNotification( value:Boolean ):void {
+            if( !isSupported ) return;
+            validateExtensionContext();
+
+            mContext.call( "enableInAppAlert", value );
         }

         /**


fixed bug in WeaveArchive.loadUrl()

fixed bug in WeaveArchive.loadUrl()

--- WeaveJS/src/weavejs/core/WeaveArchive.as
+++ WeaveJS/src/weavejs/core/WeaveArchive.as
@@ -118,10 +118,12 @@
 		 */
 		public static function loadUrl(weave:Weave, fileUrl:String):WeavePromise
 		{
-			return new WeavePromise(weave.root, function(resolve:Function, reject:Function):void {
+			var promise:WeavePromise = new WeavePromise(weave.root);
+			promise.setResult(
 				WeaveAPI.URLRequestUtils.request(weave.root, URLRequestUtils.METHOD_GET, fileUrl, null, null, URLRequestUtils.RESPONSE_ARRAYBUFFER)
-					.then(loadFileContent.bind(WeaveArchive, weave));
-			});
+					.then(loadFileContent.bind(WeaveArchive, weave))
+			);
+			return promise;
 		}

 		/**


Transferred from the Adobe Open Source Subversion Repository

Revision: 3694
Author:   jszeto@adobe.com
Date:     2008-10-16T21:23:02.402664Z

Log Message:
-----------
Fix masking for Group

SDK-17365 Masking broken for Group

Moved the call to super.commitProperties to occur after we initialize our items. When we do the init, we remove all of the display objects and then reattach them. Because this was called after we added the mask, the mask was getting removed.

Bug: SDK-17365
QA: yes
Doc: No
Review: Evtim

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -275,15 +275,18 @@
      */
     override protected function commitProperties():void
     {
-        super.commitProperties();
-
-        if (contentChanged)
+    	if (contentChanged)
         {
             contentChanged = false;
             initializeChildrenArray();

-            // maskChanged = true; TODO (rfrishbe): need this maskChanged?
-        }
+            maskChanged = true; //TODO (rfrishbe): need this maskChanged?
+        }
+
+    	// Need to initializeChildrenArray before calling super.commitProperties
+    	// initializeChildrenArray removes all of the display list children.
+    	// GroupBase's commitProperties reattaches the mask
+        super.commitProperties();

         if (blendModeChanged)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22054
Author:   jasonsj@adobe.com
Date:     2011-08-17T18:31:43.331814Z

Log Message:
-----------
Adding new BitmapScaleMode.ZOOM scaling option for BitmapImage primitive and Image component. scaleMode="zoom" will fit the bitmap by scaling the smaller dimension ratio up or down such that one dimension fits the component dimension while the other is cropped based on horizontalAlign and verticalAlign values.

QE notes:
Doc notes:
Bugs: SDK-30046
Reviewer: jszeto
Tests run: checkintests, mustella BitmapImage and Image
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>

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

--- frameworks/projects/spark/src/spark/components/Image.as
+++ frameworks/projects/spark/src/spark/components/Image.as
@@ -787,7 +787,7 @@
     //  scaleMode
     //----------------------------------

-    [Inspectable(category="General", enumeration="stretch,letterbox", defaultValue="letterbox")]
+    [Inspectable(category="General", enumeration="stretch,letterbox,zoom", defaultValue="letterbox")]

     /**
      *  @copy spark.primitives.BitmapImage#scaleMode


Transferred from the Adobe Open Source Subversion Repository

Revision: 7535
Author:   cframpto@adobe.com
Date:     2009-06-03T19:57:04.158062Z

Log Message:
-----------
Don't set kerning to the invalid string value "null".

QA Notes:
Doc Notes:
Bugs:
Reviewers: Hans

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -548,9 +548,8 @@
         else if (kerning === false)
             kerning = Kerning.OFF;

-        var s:String = String(kerning);
-        if (s != null)
-           elementFormat.kerning = s;
+        if (kerning != null)
+           elementFormat.kerning = String(kerning);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 6265
Author:   gosmith@adobe.com
Date:     2009-04-24T22:52:56.350830Z

Log Message:
-----------
To make RichText more lightweight, it now uses the same technique as RichEditableText2 for its TLF hostFormat. In particular, it uses an object which is not actually a TextLayoutFormat, but instead simply implements ITextLayoutFormat by pulling the format properties directly from the component's CSS styles using getStyle(). This object is now implemented in a new CSSTextLayoutFormat class. It is smaller because it has only one var (for the object to call getStyle() on) rather than a var for every format property.

Also, the code in SimpleText, RichText, and RichEditableText2 for handling embedded fonts is now more uniform; all three classes use an identical getEmbeddedFontContext() method, which can eventually be factored into a base class or utility class after we determine the constellation of text classes that we'll ship with. I also made this code more efficient by using only a static instance of EmbeddedFont and TextFormat.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/CSSTextLayoutFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.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/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -75,9 +75,39 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class SimpleText extends TextGraphicElement implements IFontContextComponent
+public class SimpleText extends TextGraphicElement
+	implements IFontContextComponent
 {
     include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+    //
+    //  Class initialization
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 */
+	private static function initClass():void
+	{
+		staticTextBlock = new TextBlock();
+
+		staticTextElement = new TextElement();
+
+		staticSpaceJustifier = new SpaceJustifier();
+
+		staticEastAsianJustifier = new EastAsianJustifier();
+
+		staticEmbeddedFont = new EmbeddedFont("", false, false);
+
+		staticTextFormat = new TextFormat();
+
+		if ("recreateTextLine" in staticTextBlock)
+			recreateTextLine = staticTextBlock["recreateTextLine"];
+	}
+
+	initClass();

 	//--------------------------------------------------------------------------
     //
@@ -91,24 +121,43 @@
     /**
 	 *  @private
 	 */
-	private static var staticTextBlock:TextBlock = new TextBlock();
+	private static var staticTextBlock:TextBlock;

 	/**
 	 *  @private
 	 */
-	private static var staticTextElement:TextElement = new TextElement();
-
-    /**
-     *  @private
-     */
-    private static var staticSpaceJustifier:SpaceJustifier =
-        new SpaceJustifier();
-
-    /**
-     *  @private
-     */
-    private static var staticEastAsianJustifier:EastAsianJustifier =
-        new EastAsianJustifier();
+	private static var staticTextElement:TextElement;
+
+    /**
+     *  @private
+     */
+    private static var staticSpaceJustifier:SpaceJustifier;
+
+    /**
+     *  @private
+     */
+    private static var staticEastAsianJustifier:EastAsianJustifier;
+
+    /**
+     *  @private
+     *  Used in getEmbeddedFontContext().
+     */
+    private static var staticEmbeddedFont:EmbeddedFont;
+
+    /**
+     *  @private
+     *  Used in getEmbeddedFontContext().
+     */
+    private static var staticTextFormat:TextFormat;
+
+    /**
+     *  @private
+     *  A reference to the recreateTextLine() method in staticTextBlock,
+     *  if it exists. This method was added in player 10.1.
+     *  It allows better performance by making it possible to reuse
+     *  existing TextLines instead of having to create new ones.
+     */
+    private static var recreateTextLine:Function;

     //----------------------------------
     //  embeddedFontRegistry
@@ -198,21 +247,15 @@
     //--------------------------------------------------------------------------

     /**
-     * @private
-     *
-     * Cache last value of embedded font.
-     */
-    private var cachedEmbeddedFont:EmbeddedFont = null;
-
-    /**
-     *  @private
-     * Holds the last recorded value of the module factory used to create the font.
-     */
-    private var embeddedFontContext:IFlexModuleFactory = null;
+     *  @private
+     *  Holds the last recorded value of the module factory
+     *  used to create the font.
+     */
+    private var embeddedFontContext:IFlexModuleFactory;

     //--------------------------------------------------------------------------
     //
-    //  Properties
+    //  Properties: IFontContextComponent
     //
     //--------------------------------------------------------------------------

@@ -220,6 +263,9 @@
     //  fontContext
     //----------------------------------

+    /**
+     *  @private
+     */
     private var _fontContext:IFlexModuleFactory;

     /**
@@ -246,6 +292,12 @@

     /**
      *  @private
+     *  This helper method is used by measure() and updateDisplayList().
+     *  It composes TextLines to render the 'text' String,
+     *  using the staticTextBlock as a factory,
+     *  and using the 'width' and 'height' parameters to define the size
+     *  of the composition rectangle, with NaN meaning "no limit".
+     *  It stops composing when the composition rectangle has been filled.
      *  Returns true if all lines were composed, otherwise false.
      */
     override protected function composeTextLines(width:Number = NaN,
@@ -270,7 +322,7 @@
         // Remove the text lines from the container.  If we're recycling the
         // text lines, leave them in mx_internal::textLines.
         mx_internal::removeTextLines();
-        if (!recycleTextLines)
+        if (recreateTextLine == null)
             mx_internal::textLines.length = 0;

 		var allLinesComposed:Boolean = createTextLines(elementFormat);
@@ -291,8 +343,8 @@
         releaseLinesFromTextBlock();

         // If toFit and explicit width, adjust the bounds to match.
-        // This will save a recompose and/or clip in updateDisplayList() if
-        // the bounds width matches the unscaled width.
+        // This will save a recompose and/or clip in updateDisplayList()
+        // if  bounds width matches the unscaled width.
         if (getStyle("lineBreak") == "toFit" &&
             !isNaN(width) && mx_internal::bounds.width < width)
         {
@@ -311,36 +363,16 @@
         return allLinesComposed;
     }

-	/**
-	 *  @private
-     *  Cleans up and sets the validity of the lines disassociated with the
-     *  TextBlock to TextLineValidity.INVALID.
-     */
-    private function releaseLinesFromTextBlock():void
-    {
-        var firstLine:TextLine = staticTextBlock.firstLine;
-        var lastLine:TextLine = staticTextBlock.lastLine;
-
-        if (firstLine)
-            staticTextBlock.releaseLines(firstLine, lastLine);
-     }
-
-    /**
-     *  @private
-     *  Returns true if the player being used supports recycling
-     *  text lines.  Support was added in FP 10.1.
-     */
-    private function get recycleTextLines():Boolean
-    {
-        return "recreateTextLine" in staticTextBlock;
-    }
-
 	/**
 	 *  @private
 	 *  Creates an ElementFormat (and its FontDescription)
 	 *  based on the SimpleText's CSS styles.
 	 *  These must be recreated each time because FTE
 	 *  does not allow them to be reused.
+	 *  As a side effect, this method also sets embeddedFontContext
+	 *  so that we know which SWF should be used to create TextLines.
+	 *  (TextLines using an embedded font must be created in the SWF
+	 *  where the font is.)
 	 */
 	private function createElementFormat():ElementFormat
 	{
@@ -350,11 +382,18 @@
 		// Setting null values for properties in an FTE FontDescription
 		// or ElementFormat throw an error, so the following code does
 		// null-checking on the problematic properties.
-
-        var checkForEmbed:Boolean = false;

         var s:String;

+        // If the CSS styles for this component specify an embedded font,
+        // embeddedFontContext will be set to the module factory that
+        // should create TextLines (since they must be created in the
+        // SWF where the embedded font is.)
+        // Otherwise, this will be null.
+        embeddedFontContext = getEmbeddedFontContext();
+
+        // Fill out a FontDescription based on the CSS styles.
+
         var fontDescription:FontDescription = new FontDescription();

         s = getStyle("cffHinting");
@@ -362,10 +401,21 @@
         	fontDescription.cffHinting = s;

         s = getStyle("fontLookup");
-        if (s != null && s != "auto")
-        	fontDescription.fontLookup = s;
-        else
-            checkForEmbed = true;
+        if (s != null)
+        {
+        	// FTE understands only "device" and "embeddedCFF"
+        	// for fontLookup. But Flex allows this style to be
+        	// set to "auto", in which case we automatically
+        	// determine it based on whether the CSS styles
+        	// specify an embedded font.
+        	if (s == "auto")
+        	{
+        		s = embeddedFontContext ?
+        			FontLookup.EMBEDDED_CFF :
+                	FontLookup.DEVICE;
+        	}
+	       	fontDescription.fontLookup = s;
+        }

         s = getStyle("fontFamily");
         if (s != null)
@@ -378,49 +428,12 @@
         s = getStyle("fontWeight");
         if (s != null)
         	fontDescription.fontWeight = s;
-
-        if (checkForEmbed)
-        {
-            var embeddedFont:EmbeddedFont = getEmbeddedFont(
-                fontDescription.fontName,
-                fontDescription.fontWeight == "bold",
-                fontDescription.fontPosture == "italic");
-
-            embeddedFontContext =
-                embeddedFontRegistry.getAssociatedModuleFactory(
-                    embeddedFont, fontContext);
-
-            // if we found the font, then it is embedded.
-            // Some fonts are not listed in info(), so are not in the above registry.
-            // Call isFontFaceEmbedded() which get the list of embedded fonts from the player.
-            if (embeddedFontContext != null)
-            {
-                fontDescription.fontLookup = FontLookup.EMBEDDED_CFF;
-            }
-            else
-            {
-                var sm:ISystemManager = creatingSystemManager();
-                var textFormat:TextFormat = new TextFormat();
-                textFormat.font = fontDescription.fontName;
-                textFormat.bold = fontDescription.fontWeight == "bold";
-                textFormat.italic = fontDescription.fontPosture == "italic";
-                if (sm != null && sm.isFontFaceEmbedded(textFormat))
-                {
-                    fontDescription.fontLookup = FontLookup.EMBEDDED_CFF;
-                }
-            }
-        }
-        else
-        {
-            if (fontDescription.fontLookup == FontLookup.EMBEDDED_CFF)
-                embeddedFontContext = fontContext;
-            else
-                embeddedFontContext = null;
-        }
-
+
         s = getStyle("renderingMode");
         if (s != null)
         	fontDescription.renderingMode = s;
+
+        // Fill our an ElementFormat based on the CSS styles.

         var elementFormat:ElementFormat = new ElementFormat();

@@ -471,6 +484,58 @@
         	elementFormat.typographicCase = s;

 		return elementFormat;
+	}
+
+	/**
+	 *  @private
+	 *  Uses the component's CSS styles to determine the module factory
+	 *  that should creates its TextLines.
+	 */
+	private function getEmbeddedFontContext():IFlexModuleFactory
+	{
+		var moduleFactory:IFlexModuleFactory;
+
+		var fontLookup:String = getStyle("fontLookup");
+		if (fontLookup == "auto")
+        {
+			var font:String = getStyle("fontFamily");
+			var bold:Boolean = getStyle("fontWeight") == "bold";
+			var italic:Boolean = getStyle("fontStyle") == "italic";
+
+			staticEmbeddedFont.initialize(font, bold, italic);
+
+            moduleFactory = embeddedFontRegistry.getAssociatedModuleFactory(
+            	staticEmbeddedFont, fontContext);
+
+            // If we found the font, then it is embedded.
+            // But some fonts are not listed in info()
+            // and are therefore not in the above registry.
+            // So we call isFontFaceEmbedded() which gets the list
+            // of embedded fonts from the player.
+            if (!moduleFactory)
+            {
+                var sm:ISystemManager;
+                if (fontContext != null && fontContext is ISystemManager)
+                	sm = ISystemManager(fontContext);
+                else if (parent is IUIComponent)
+                	sm = IUIComponent(parent).systemManager;
+
+                staticTextFormat.font = font;
+                staticTextFormat.bold = bold;
+                staticTextFormat.italic = italic;
+
+                if (sm != null && sm.isFontFaceEmbedded(staticTextFormat))
+                    moduleFactory = sm;
+            }
+        }
+        else
+        {
+            moduleFactory = fontLookup == FontLookup.EMBEDDED_CFF ?
+                			fontContext :
+            				null;
+        }
+
+        return moduleFactory;
 	}

     /**
@@ -634,16 +699,18 @@

         var maxTextWidth:Number = 0;
 		var totalTextHeight:Number = 0;
-
 		var n:int = 0;
-        var nRecycleLines:int = recycleTextLines ? textLines.length : 0;
+        var nRecycleLines:int = recreateTextLine != null ? textLines.length : 0;
 		var nextTextLine:TextLine;
 		var nextY:Number = 0;
 		var textLine:TextLine;

+        var textLineCreator:ITextLineCreator =
+        	ITextLineCreator(embeddedFontContext);
+
 		// For truncation, need to know if all lines have been composed.
         var createdAllLines:Boolean = false;
-
+
 		// Generate TextLines, stopping when we run out of text
 		// or reach the bottom of the requested bounds.
 		// In this loop the lines are positioned within the rectangle
@@ -654,21 +721,32 @@
 		    {
 		        //trace("recreateTextLine", n);
 		        var recycleLine:TextLine = textLines[n];
-                if (embeddedFontContext)
-                    nextTextLine = TextLine(ITextLineCreator(embeddedFontContext).recreateTextLine
-                                    (textBlock, recycleLine, textLine, maxLineWidth));
+
+                if (textLineCreator)
+                {
+                    nextTextLine = textLineCreator.recreateTextLine(
+                    	textBlock, recycleLine, textLine, maxLineWidth);
+                }
                 else
-                    nextTextLine = textBlock["recreateTextLine"]
-                                    (recycleLine, textLine, maxLineWidth);
+                {
+                    nextTextLine = recreateTextLine(
+                    	recycleLine, textLine, maxLineWidth);
+                }
+
                 nRecycleLines--;
 		    }
 		    else
 		    {
-                if (embeddedFontContext)
-                    nextTextLine = TextLine(ITextLineCreator(embeddedFontContext).createTextLine
-                                    (textBlock, textLine, maxLineWidth));
+                if (textLineCreator)
+                {
+                    nextTextLine = textLineCreator.createTextLine(
+               			textBlock, textLine, maxLineWidth);
+                }
                 else
-    			    nextTextLine = textBlock.createTextLine(textLine, maxLineWidth);
+                {
+    			    nextTextLine = textBlock.createTextLine(
+    			    	textLine, maxLineWidth);
+                }
             }

 			if (!nextTextLine)
@@ -856,6 +934,35 @@
 	}

     /**
+     *  Determines if the composed text fits in the given height and
+     *  line count limit.
+     */
+    private function doesComposedTextFit(height:Number,
+                                         createdAllLines:Boolean,
+                                         lineCountLimit:int):Boolean
+    {
+        var textLines:Array = mx_internal::textLines;
+
+        // Not all text composed because it didn't fit within bounds.
+        if (!createdAllLines)
+            return false;
+
+        // More text lines than allowed lines.
+        if (lineCountLimit != -1 && textLines.length > lineCountLimit)
+            return false;
+
+        // No lines or no height restriction.
+        if (!textLines.length || isNaN(height))
+            return true;
+
+        // Does the bottom of the last line fall within the bounds?
+        var lastLine:TextLine = TextLine(textLines[textLines.length - 1]);
+        var lastLineExtent:Number = lastLine.y + lastLine.descent;
+
+        return lastLineExtent <= height;
+    }
+
+    /**
      *  @private
      *  width and height are the ones used to do the compose, not the measured
      *  results resulting from the compose.
@@ -883,7 +990,7 @@
             // as well as being dependent on the indicator string, they are
             // dependent on the given width.
             staticTextElement.text = mx_internal::truncationIndicatorResource;
-            var indicatorLines:Array = new Array();
+            var indicatorLines:Array = [];
             var indicatorBounds:Rectangle = new Rectangle(0, 0, width, NaN);

             createTextLinesFromTextBlock(staticTextBlock,
@@ -950,10 +1057,10 @@

                     // Try again by truncating at the beginning of the
                     // preceding atom.
-                    truncateAtCharPosition =
-                            getNextTruncationPosition(truncLineIndex,
-                                                      truncateAtCharPosition);
-                } while (true);
+                    truncateAtCharPosition = getNextTruncationPosition(
+                    	truncLineIndex, truncateAtCharPosition);
+                }
+                while (true);
             }
         }

@@ -975,35 +1082,6 @@
         }
     }

-    /**
-     * Determines if the composed text fits in the given height and
-     * line count limit.
-     */
-    private function doesComposedTextFit(height:Number,
-                                         createdAllLines:Boolean,
-                                         lineCountLimit:int):Boolean
-    {
-        var textLines:Array = mx_internal::textLines;
-
-        // Not all text composed because it didn't fit within bounds.
-        if (!createdAllLines)
-            return false;
-
-        // More text lines than allowed lines.
-        if (lineCountLimit != -1 && textLines.length > lineCountLimit)
-            return false;
-
-        // No lines or no height restriction.
-        if (!textLines.length || isNaN(height))
-            return true;
-
-        // Does the bottom of the last line fall within the bounds?
-        var lastLine:TextLine = TextLine(textLines[textLines.length - 1]);
-        var lastLineExtent:Number = lastLine.y + lastLine.descent;
-
-        return lastLineExtent <= height;
-    }
-
     /**
      * Calculates the last line that fits in the given height and line count
      * limit.
@@ -1037,14 +1115,14 @@
     }

     /**
-     * Gets the truncation position on a line given the allowed width.
-     * - Must be at an atom boundary.
-     * - Must scan the line for atoms in logical order, not physical position
-     *   order.
-     * For example, given bi-di text ABאבCD
-     * atoms must be scanned in this order:
-     * A, B, א
-     * ג, C, D
+     *  Gets the truncation position on a line given the allowed width.
+     *  - Must be at an atom boundary.
+     *  - Must scan the line for atoms in logical order, not physical position
+     *    order.
+     *  For example, given bi-di text ABאבCD
+     *  atoms must be scanned in this order:
+     *  A, B, א
+     *  ג, C, D
      */
     private function getTruncationPosition(line:TextLine,
                                            allowedWidth:Number):int
@@ -1069,8 +1147,8 @@
     }

     /**
-     * Gets the next truncation position by shedding an atom's worth of
-     * characters.
+     *  Gets the next truncation position by shedding an atom's worth of
+     *  characters.
      */
     private function getNextTruncationPosition(truncationLineIndex:int,
                                                truncateAtCharPosition:int):int
@@ -1099,10 +1177,12 @@
             {
                 break;
             }
+
             if (truncateAtCharPosition < line.textBlockBeginIndex)
                 truncationLineIndex--;
             else
                 truncationLineIndex++;
+
             line = TextLine(textLines[truncationLineIndex]);
         }
         while (true);
@@ -1118,36 +1198,21 @@
         line.flushAtomData();

         return nextTruncationPosition;
-    }
-
-    private function creatingSystemManager():ISystemManager
-    {
-        return ((fontContext != null) && (fontContext is ISystemManager))
-                ? ISystemManager(fontContext)
-                : IUIComponent(parent).systemManager;
     }

     /**
-     * @private
-     *
-     * Get the embedded font for a set of font attributes.
-     */
-    private function getEmbeddedFont(fontName:String, bold:Boolean, italic:Boolean):EmbeddedFont
+	 *  @private
+     *  Cleans up and sets the validity of the lines disassociated
+     *  with the TextBlock to TextLineValidity.INVALID.
+     */
+    private function releaseLinesFromTextBlock():void
     {
-        // Check if we can reuse a cached value.
-        if (cachedEmbeddedFont)
-        {
-            if (cachedEmbeddedFont.fontName == fontName &&
-                cachedEmbeddedFont.fontStyle == EmbeddedFontRegistry.getFontStyle(bold, italic))
-            {
-                return cachedEmbeddedFont;
-            }
-        }
-
-        cachedEmbeddedFont = new EmbeddedFont(fontName, bold, italic);
-
-        return cachedEmbeddedFont;
-    }
+        var firstLine:TextLine = staticTextBlock.firstLine;
+        var lastLine:TextLine = staticTextBlock.lastLine;
+
+        if (firstLine)
+            staticTextBlock.releaseLines(firstLine, lastLine);
+     }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7288
Author:   chaase@adobe.com
Date:     2009-05-26T22:42:32.255273Z

Log Message:
-----------
Fixed bug in Rotate3D introduced when it moved out from under Rotate, which used to be its superclass. The problem was that we were not re-initializing the motionPaths array of AnimateTransform every time the Rotate3D effect was played, so we would just end up adding more and more keyframes, which ended up giving conflicting animation information to the effect.
The fix was to pull in the same createInstance() override which is already in Move, Rotate, and Scale, and do the same initialization of motionPaths[] as we do in those other subclasses of AnimateTransform.

QE Notes: None
Doc Notes: None
Bugs: sdk-21170
Reviewer: Evtim
tests: checkintests mustella spark/effects/Rotate3D

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as

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

--- frameworks/projects/spark/src/spark/effects/Rotate3D.as
+++ frameworks/projects/spark/src/spark/effects/Rotate3D.as
@@ -307,6 +307,14 @@
      */
     public var angleZBy:Number;

+    /**
+     * @private
+     */
+    override public function createInstance(target:Object = null):IEffectInstance
+    {
+        motionPaths = [];
+        return super.createInstance(target);
+    }

     /**
      * @private


用Vector实现WritingBuffer，发布的二进制版本不支持Flash Player 9。Flash Player 9需要切换成Array模式才能使用

--- as3/com/netease/protobuf/WritingBuffer.as
+++ as3/com/netease/protobuf/WritingBuffer.as
@@ -17,49 +17,44 @@
 		public function WritingBuffer() {
 			endian = Endian.LITTLE_ENDIAN
 		}
-		private const slices:ByteArray = new ByteArray
+		/*
+			// for Flash Player 9
+			[ArrayElementType("uint")]
+			private const slices:Array = []
+		/*/
+			// for Flash Player 10
+			private const slices:Vector.<uint> = new Vector.<uint>
+		//*/
 		public function beginBlock():uint {
-			slices.writeUnsignedInt(position)
+			slices.push(position)
 			const beginSliceIndex:uint = slices.length
-			if (beginSliceIndex % 8 != 4) {
-				throw new IllegalOperationError
-			}
-			slices.writeDouble(0)
-			slices.writeUnsignedInt(position)
+			slices.length += 2
+			slices.push(position)
 			return beginSliceIndex
 		}
 		public function endBlock(beginSliceIndex:uint):void {
-			if (slices.length % 8 != 0) {
-				throw new IllegalOperationError
-			}
-			slices.writeUnsignedInt(position)
-			slices.position = beginSliceIndex + 8
-			const beginPosition:uint = slices.readUnsignedInt()
-			slices.position = beginSliceIndex
-			slices.writeUnsignedInt(position)
+			slices.push(position)
+			const beginPosition:uint = slices[beginSliceIndex + 2]
+			slices[beginSliceIndex] = position
 			WriteUtils.write$TYPE_UINT32(this, position - beginPosition)
-			slices.writeUnsignedInt(position)
-			slices.position = slices.length
-			slices.writeUnsignedInt(position)
+			slices[beginSliceIndex + 1] = position
+			slices.push(position)
 		}
 		public function toNormal(output:IDataOutput):void {
-			if (slices.length % 8 != 0) {
-				throw new IllegalOperationError
-			}
-			slices.position = 0
+			var i:uint = 0
 			var begin:uint = 0
-			while (slices.bytesAvailable > 0) {
-				var end:uint = slices.readUnsignedInt()
+			while (i < slices.length) {
+				var end:uint = slices[i]
+				++i
 				if (end > begin) {
 					output.writeBytes(this, begin, end - begin)
 				} else if (end < begin) {
 					throw new IllegalOperationError
 				}
-				begin = slices.readUnsignedInt()
+				begin = slices[i]
+				++i
 			}
-			if (begin < length) {
-				output.writeBytes(this, begin)
-			}
+			output.writeBytes(this, begin)
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2464
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:50:33.449468Z

Log Message:
-----------
add flex 4 to trunk

Modified Paths:
--------------
134 paths were modified

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

--- frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as
+++ frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as
@@ -0,0 +1,45 @@
+package flex.filters
+{
+import flash.filters.BitmapFilter;
+import flash.filters.ColorMatrixFilter;
+
+public class ColorMatrixFilter extends BaseFilter implements IBitmapFilter
+{
+	public function ColorMatrixFilter(matrix:Array = null)
+	{
+		this.matrix = matrix;
+	}
+
+	//----------------------------------
+    //  matrix
+    //----------------------------------
+
+	private var _matrix:Array = [];
+
+	/**
+	 *  The amount of horizontal blur. Valid values are 0 to 255. A blur of 1
+	 *  or less means that the original image is copied as is. The default
+	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
+	 *  are optimized to render more quickly than other values.
+	 */
+	public function get matrix():Array
+	{
+		return _matrix;
+	}
+
+	public function set matrix(value:Array):void
+	{
+		if (value != _matrix)
+		{
+			_matrix = value;
+			notifyFilterChanged();
+		}
+	}
+
+	public function clone():BitmapFilter
+	{
+		return new flash.filters.ColorMatrixFilter(matrix);
+	}
+
+}
+}


Only prerender into a bitmap for downscaling

--- exporter/src/main/as/flump/SwfTexture.as
+++ exporter/src/main/as/flump/SwfTexture.as
@@ -73,8 +73,8 @@
     public function toBitmapData () :BitmapData {
         const holder :Sprite = new Sprite();

-        if (scale != 1) {
-            // render at normal size first, then scale to get the
+        if (scale < 1) {
+            // for downlscaling, render at normal size first, then scale to get the
             // benefit of bitmap smoothing. BitmapData.draw smoothing only works
             // when the source is itself a BitmapData object.
             const fullsizeOffset :Point = getOffset(_disp, 1);
@@ -86,10 +86,10 @@
             return renderToBitmapData(bmd, w, h, scale);

         } else {
-            _disp.x = -offset.x;
-            _disp.y = -offset.y;
+            _disp.x = getOffset(_disp, scale).x;
+            _disp.y = getOffset(_disp, scale).y;
             holder.addChild(_disp);
-            return renderToBitmapData(holder, w, h, 1);
+            return renderToBitmapData(holder, w, h, scale);
         }
     }


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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/framework/src/mx/controls/IFlexContextMenu.as
+++ frameworks/projects/framework/src/mx/controls/IFlexContextMenu.as
@@ -17,6 +17,11 @@
  *  Flex context menus.
  *
  *  @see mx.core.UIComponent#flexContextMenu
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public interface IFlexContextMenu
 {
@@ -28,6 +33,11 @@
 	 *  menu for this InteractiveObject, such as adding listeners, etc..
 	 *
 	 *  @param component InteractiveObject to set context menu on
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	function setContextMenu(component:InteractiveObject):void;

@@ -37,6 +47,11 @@
 	 *  menu for this InteractiveObject, such as removing listeners, etc..
 	 *
 	 *  @param component InteractiveObject to unset context menu on
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	function unsetContextMenu(component:InteractiveObject):void;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.accessibility
 {


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/framework/src/mx/core/ButtonAsset.as
+++ frameworks/projects/framework/src/mx/core/ButtonAsset.as
@@ -28,6 +28,11 @@
  *  However, Flex applications do not typically use embedded SimpleButtons.
  *  Refer to more commonly-used asset classes such as BitmapAsset
  *  for more information about how embedded assets work in Flex.</p>
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ButtonAsset extends FlexSimpleButton
                          implements IFlexAsset, IFlexDisplayObject
@@ -42,6 +47,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ButtonAsset()
     {
@@ -70,6 +80,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get measuredHeight():Number
     {
@@ -88,6 +103,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get measuredWidth():Number
     {
@@ -102,6 +122,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function move(x:Number, y:Number):void
     {
@@ -111,6 +136,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function setActualSize(newWidth:Number, newHeight:Number):void
     {


Make 4.12 the new version

Make 4.12 the new version

--- frameworks/projects/framework/src/mx/core/FlexVersion.as
+++ frameworks/projects/framework/src/mx/core/FlexVersion.as
@@ -56,7 +56,21 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public static const CURRENT_VERSION:uint = 0x040B0000;
+    public static const CURRENT_VERSION:uint = 0x040C0000;
+
+	/**
+	 *  The compatibilityVersion value of Flex 4.12,
+	 *  encoded numerically as a uint.
+	 *  Code can compare this constant against
+	 *  the compatibilityVersion
+	 *  to implement version-specific behavior.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 11
+	 *  @playerversion AIR 3
+	 *  @productversion Apache Flex 4.12
+	 */
+	public static const VERSION_4_12:uint = 0x040C0000;

 	/**
 	 *  The compatibilityVersion value of Flex 4.11,


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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19467
Author:   cframpto@adobe.com
Date:     2010-12-17T21:27:38.093578Z

Log Message:
-----------
Fix DG tooltips for rtl layoutDirection and centralize the toolTipShowHandler() for the DG item renderers.  Fix optimization in scrollPositionChanged so it works as intended.
Added for tooling - if UIComponentGlobals.designMode, initialize exceptions will be caught and an intializeError event dispatched.

QE notes:
Doc notes:
Bugs: SDK-28743, SDK-28894
Reviewer: Ryan (SDK-28743), Hans (SDK-28894)
Tests run: cyclone
Is noteworthy for integration: yes: if UIComponentGlobals.designMode, initialize exceptions will be caught and an intializeError event dispatched

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -7522,15 +7522,41 @@
      */
     mx_internal function childAdded(child:DisplayObject):void
     {
-        if (child is UIComponent)
-        {
-            if (!UIComponent(child).initialized)
-                UIComponent(child).initialize();
-        }
-        else if (child is IUIComponent)
-        {
-            IUIComponent(child).initialize();
-        }
+		if (!UIComponentGlobals.designMode)
+		{
+	        if (child is UIComponent)
+	        {
+	            if (!UIComponent(child).initialized)
+	                UIComponent(child).initialize();
+	        }
+	        else if (child is IUIComponent)
+	        {
+	            IUIComponent(child).initialize();
+	        }
+		}
+		else
+		{
+			try
+			{
+				if (child is UIComponent)
+				{
+					if (!UIComponent(child).initialized)
+						UIComponent(child).initialize();
+				}
+				else if (child is IUIComponent)
+				{
+					IUIComponent(child).initialize();
+				}
+			}
+			catch (e:Error)
+			{
+				// Dispatch a initializeError dynamic event for tooling.
+				var initializeErrorEvent:DynamicEvent = new DynamicEvent("initializeError");
+				initializeErrorEvent.error = e;
+				initializeErrorEvent.source = this;
+				systemManager.dispatchEvent(initializeErrorEvent);
+			}
+		}
     }

     /**
@@ -7622,7 +7648,7 @@
     {
         if (initialized)
             return;
-
+
         // The "preinitialize" event gets dispatched after everything about this
         // DisplayObject has been initialized, and it has been attached to
         // its parent, but before any of its children have been created.
@@ -7656,7 +7682,7 @@

         // This should always be the last thing that initialize() calls.
         initializationComplete();
-    }
+	}

     /**
      *  Finalizes the initialization of this component.


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/core/UITextField.as
+++ frameworks/projects/framework/src/mx/core/UITextField.as
@@ -22,7 +22,6 @@
 import flash.text.TextFormatAlign;
 import flash.text.TextLineMetrics;
 import mx.automation.IAutomationObject;
-import mx.core.FlexVersion;
 import mx.managers.ISystemManager;
 import mx.managers.IToolTipManagerClient;
 import mx.managers.SystemManager;
@@ -638,12 +637,6 @@
     public function get baselinePosition():Number
     {
         var tlm:TextLineMetrics;
-
-        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-        {
-            tlm = getLineMetrics(0);;
-            return height - 4 - tlm.descent;
-        }

         // The text styles aren't known until there is a parent.
         if (!parent)