Transferred from the Adobe Open Source Subversion Repository

Revision: 5119
Author:   smgilson@adobe.com
Date:     2009-03-01T15:19:39.936226Z

Log Message:
-----------
Clean up some ASDoc tags from the addition of the @productversion/@playerversion tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<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/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/ResultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/videoClasses/NCManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/Base64Encoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/StringValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IInteractiveObjectInterface.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/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ContainerRawChildrenList.as</path>
<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/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/FaultEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDL.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.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/videoClasses/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/Schema.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/HexEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDisplayObjectContainerInterface.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/effects/effectClasses/SoundEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISpriteInterface.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/HaloRectBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as</path>

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

--- frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/HistoryManagerImpl.as
@@ -39,694 +39,679 @@
 {
     include "../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Implementation notes
-	//
-	//--------------------------------------------------------------------------
-
-	/*
-		HistoryManager works in conjunction with certain components
-		and with an invisible "history SWF".
-
-		The history SWF
-		---------------
-
-		The HTML wrapper for an MXML application contains an invisible iframe
-		named _history which contains history.swf.
-
-		This SWF's sole purpose is to encode state information for the
-		MXML application in the query parameters of its URL.
-
-		HistoryManager-aware components
-		-------------------------------
-
-		In order to support history management, a component must implement
-		the IHistoryManagerClient interface and must register with HistoryManager.
-
-		When the application state is considered to have changed, someone
-		must call HistoryManager.save(); in response, the HistoryManager calls
-		the saveState() method of all the registered components.
-
-		Each registered component returns an Object containing arbitrary
-		state information such as { selectedIndex: 1 }.
-
-		HistoryManager encodes the state information for all registered
-		components into the query parameters of a URL for the history SWF.
-		For example, the query parameters might be
-
-		    ?ce41-selectedIndex=1&10f7-selectedIndex=2
-
-		In order to keep the length of the URL within the browser's limits,
-		the identity of the component is specified by a short hash string
-		(such as "ce41" or "1047" above) computed from its toString() string.
-
-		The save() method reloads the _history iframe with the new URL
-		that contains the MXML apps' state info in its query parameters.
-
-		The browser stores these various URLs, representing various states
-		of the application, in its history cache.
-
-		When the user clicks the browser's Back button, the browser loads
-		a previous URL into the _history iframe. This causes the history.swf
-		to be reloaded.
-
-		When the history.swf is reloaded, it decodes its URL and calls
-		HistoryManager.load(). HistoryManager then calls the loadState()
-		methods of all registered components. It ensures that loadState()
-		is called on shallowly nested components before being called
-		on more deeply nested components, so that, for example, an Accordion
-		inside a ViewStack works properly.
-
-		Handshakes
-		----------
-
-		HistoryManager is initialized when the application starts.
-
-		When HistoryManager is initialized by the init() method,
-		it periodically attempts to contact the history.swf
-		using a LocalConnection to determine whether it has been loaded
-		and has completed its own initialization.
-
-		The "handshake" consists of the following sequence:
-			HistoryManager.initHandshake()
-			register() in history.swf
-			HistoryManager.registered()
-
-		A corresponding handshake is initiated by the initApp() method
-		of the history.swf.
-
-		It consists of the following sequence:
-			initHandshake() in history.swf
-			HistoryManager.registerHandshake()
-			registered() in history.swf
-			HistoryManager.load()
-
-	*
-
-	*  @langversion 3.0
-
-	*  @playerversion Flash 9
-
-	*  @playerversion AIR 1.1
-
-	*  @productversion Flex 3
-
-	*/
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 *  The interval between handshake attempts.
-	 */
-	private static const HANDSHAKE_INTERVAL:int = 500; // milliseconds
-
-	/**
-	 *  @private
-	 *  The maximum number of handshake attempts.
-	 */
-	private static const MAX_HANDSHAKE_TRIES:int = 100;
-
-	/*
-	 *  The following three constants are used to encode state information
-	 *  about multiple objects into the query parameters of an URL.
-	 *  The query parameters might look like this:
-	 *  ?8ce2-selectedIndex=1&47f0-selectedIndex=2
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-
-	/**
-	 *  @private
-	 *  The separator between the object identifier (the crc of its path)
-	 *  and the property name.
-	 */
-	private static const ID_NAME_SEPARATOR:String = "-";
-
-	/**
-	 *  @private
-	 *  The separator between the property name and the property value.
-	 */
-	private static const NAME_VALUE_SEPARATOR:String = "=";
-
-	/**
-	 *  @private
-	 *  The separator between consecutive object/property/value triples.
-	 */
-	private static const PROPERTY_SEPARATOR:String = "&";
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class variables
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
+    //--------------------------------------------------------------------------
+    //
+    //  Implementation notes
+    //
+    //--------------------------------------------------------------------------
+
+    /*
+        HistoryManager works in conjunction with certain components
+        and with an invisible "history SWF".
+
+        The history SWF
+        ---------------
+
+        The HTML wrapper for an MXML application contains an invisible iframe
+        named _history which contains history.swf.
+
+        This SWF's sole purpose is to encode state information for the
+        MXML application in the query parameters of its URL.
+
+        HistoryManager-aware components
+        -------------------------------
+
+        In order to support history management, a component must implement
+        the IHistoryManagerClient interface and must register with HistoryManager.
+
+        When the application state is considered to have changed, someone
+        must call HistoryManager.save(); in response, the HistoryManager calls
+        the saveState() method of all the registered components.
+
+        Each registered component returns an Object containing arbitrary
+        state information such as { selectedIndex: 1 }.
+
+        HistoryManager encodes the state information for all registered
+        components into the query parameters of a URL for the history SWF.
+        For example, the query parameters might be
+
+            ?ce41-selectedIndex=1&10f7-selectedIndex=2
+
+        In order to keep the length of the URL within the browser's limits,
+        the identity of the component is specified by a short hash string
+        (such as "ce41" or "1047" above) computed from its toString() string.
+
+        The save() method reloads the _history iframe with the new URL
+        that contains the MXML apps' state info in its query parameters.
+
+        The browser stores these various URLs, representing various states
+        of the application, in its history cache.
+
+        When the user clicks the browser's Back button, the browser loads
+        a previous URL into the _history iframe. This causes the history.swf
+        to be reloaded.
+
+        When the history.swf is reloaded, it decodes its URL and calls
+        HistoryManager.load(). HistoryManager then calls the loadState()
+        methods of all registered components. It ensures that loadState()
+        is called on shallowly nested components before being called
+        on more deeply nested components, so that, for example, an Accordion
+        inside a ViewStack works properly.
+
+        Handshakes
+        ----------
+
+        HistoryManager is initialized when the application starts.
+
+        When HistoryManager is initialized by the init() method,
+        it periodically attempts to contact the history.swf
+        using a LocalConnection to determine whether it has been loaded
+        and has completed its own initialization.
+
+        The "handshake" consists of the following sequence:
+            HistoryManager.initHandshake()
+            register() in history.swf
+            HistoryManager.registered()
+
+        A corresponding handshake is initiated by the initApp() method
+        of the history.swf.
+
+        It consists of the following sequence:
+            initHandshake() in history.swf
+            HistoryManager.registerHandshake()
+            registered() in history.swf
+            HistoryManager.load()
+
+    */
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The interval between handshake attempts.
+     */
+    private static const HANDSHAKE_INTERVAL:int = 500; // milliseconds
+
+    /**
+     *  @private
+     *  The maximum number of handshake attempts.
+     */
+    private static const MAX_HANDSHAKE_TRIES:int = 100;
+
+    /*
+     *  The following three constants are used to encode state information
+     *  about multiple objects into the query parameters of an URL.
+     *  The query parameters might look like this:
+     *  ?8ce2-selectedIndex=1&47f0-selectedIndex=2
+     */
+
+    /**
+     *  @private
+     *  The separator between the object identifier (the crc of its path)
+     *  and the property name.
+     */
+    private static const ID_NAME_SEPARATOR:String = "-";
+
+    /**
+     *  @private
+     *  The separator between the property name and the property value.
+     */
+    private static const NAME_VALUE_SEPARATOR:String = "=";
+
+    /**
+     *  @private
+     *  The separator between consecutive object/property/value triples.
+     */
+    private static const PROPERTY_SEPARATOR:String = "&";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
     private static var systemManager:ISystemManager;

-	/**
-	 *  @private
-	 */
-	private static var instance:IHistoryManager;
-
-	/**
-	 *  @private
-	 *  CRC for the app.
-	 */
-	private static var appID:String;
-
-	/**
-	 *  @private
-	 *  URL for history frame.
-	 *  This is passed to the SWF via the FlashStatic Vars in the HTML wrapper,
-	 *  and is currently "/dev/flex-internal?action=history_html".
-	 */
-	private static var historyURL:String;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	public static function getInstance():IHistoryManager
-	{
-		if (!instance)
-		{
-			systemManager = SystemManagerGlobals.topLevelSystemManagers[0];
-		    instance = new HistoryManagerImpl();
-		}
-
-		return instance;
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	public function HistoryManagerImpl()
-	{
-		super();
-
-		if (instance)
-		    throw new Error("Instance already exists.");
-
-		if (appID)
-			return;
-
-		if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
-            !ApplicationGlobals.application.historyManagementEnabled)
-			return;
-
-		var loaderInfo:LoaderInfo;
-
-		// Added to support Cross-versioning issue,
-		// so one needs to set the Singleton.loaderInfo object
-		// to the loaderInfo of the top-most object
-		if (HistoryManagerGlobals.loaderInfo)
-		{
-		    loaderInfo = HistoryManagerGlobals.loaderInfo;
-		}
-		else
-		{
-		    // Get values that were passed in via the FlashVars
-			// in the HTML wrapper.
-		    loaderInfo = DisplayObject(systemManager).loaderInfo;
-		}
-
-		var appURL:String;
-
-		// Use our URL as the unique CRC for this movie.
-		if (HistoryManagerGlobals.loaderInfo)
-		    appURL = HistoryManagerGlobals.loaderInfo.url;
-		else
-		    appURL = DisplayObject(systemManager).loaderInfo.url;
-
-
-		appID = calcCRC(appURL);
-
-		BrowserManager.getInstance().addEventListener(BrowserChangeEvent.BROWSER_URL_CHANGE, browserURLChangeHandler);
-		BrowserManager.getInstance().initForHistoryManager();
-
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Variables
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @Private
-	 *  An Array of objects that will save and load state information.
-	 *  Each object must implement the IHistoryManagerClient interface.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	private var registeredObjects:Array = [];
-
-	/**
-	 *  @private
-	 *  A map from a registed object's path to its RegistrationInfo
-	 *  (path crc and path depth).
-	 */
-	private var registrationMap:Dictionary;
-
-	/**
-	 *  @private
-	 *  Pending states for deferred restoration.
-	 */
-	private var pendingStates:Object = {};
-
-	/**
-	 *  @private
-	 *  Pending query string to be sent to history.swf.
-	 */
-	private var pendingQueryString:String;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Registers an object with the HistoryManager.
-	 *  The object must implement the IHistoryManagerClient interface.
-	 *
-	 *  @param obj Object to register.
-	 *
-	 *  @see mx.managers.IHistoryManagerClient
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function register(obj:IHistoryManagerClient):void
-	{
+    /**
+     *  @private
+     */
+    private static var instance:IHistoryManager;
+
+    /**
+     *  @private
+     *  CRC for the app.
+     */
+    private static var appID:String;
+
+    /**
+     *  @private
+     *  URL for history frame.
+     *  This is passed to the SWF via the FlashStatic Vars in the HTML wrapper,
+     *  and is currently "/dev/flex-internal?action=history_html".
+     */
+    private static var historyURL:String;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public static function getInstance():IHistoryManager
+    {
+        if (!instance)
+        {
+            systemManager = SystemManagerGlobals.topLevelSystemManagers[0];
+            instance = new HistoryManagerImpl();
+        }
+
+        return instance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public function HistoryManagerImpl()
+    {
+        super();
+
+        if (instance)
+            throw new Error("Instance already exists.");
+
+        if (appID)
+            return;
+
         if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
             !ApplicationGlobals.application.historyManagementEnabled)
-			return;
-
-		// Ensure that this object isn't already registered.
-		unregister(obj);
-
-		// Add the object to the Array of all registered objects.
-		registeredObjects.push(obj);
-
-		// Get a "path" string such as "Application_1.VBox0.hb:HBox.main:
-		// Panel.bodyStack:ViewStack.checkoutView:VBox.accordion:Accordion"
-		// that uniquely represents this object in the visual hierarchy
-		// of the application.
-		var path:String = getPath(obj);
-
-		// Calculate a 4-character hex CRC of this path as a short
-		// identifier for the object to be encoded into the
-		// query parameters of the history URL.
-		var crc:String = calcCRC(path);
-
-		// Determine the depth of the object in the visual hierarchy.
-		// This is important because state must be restored
-		var depth:int = calcDepth(path);
-
-		// Store the crc and depth of the registered object in a
-		// RegistrationInfo instance kept in the HistoryManager's
-		// registrationMap. Given a registed object, we can look up
-		// its crc and depth using getRegistrationInfo().
-		if (!registrationMap)
-			registrationMap = new Dictionary(true);
-		registrationMap[obj] = new RegistrationInfo(crc, depth);
-
-		// Sort the Array of all registered objects according to their depth.
-		registeredObjects.sort(depthCompare);
-
-		// See if there is a pending state for this object.
-		if (pendingStates[crc])
-		{
-			obj.loadState(pendingStates[crc]);
-			delete pendingStates[crc];
-		}
-	}
-
-	/**
-	 *  @private
-	 */
-	private function getPath(obj:IHistoryManagerClient):String
-	{
-		return obj.toString();
-	}
-
-	/**
-	 *  @private
-	 *  Function to calculate a cyclic rendundancy checksum (CRC).
-	 *  This returns a 4-character hex string representing a 16-bit uint
-	 *  calculated from the specified string using the CRC-CCITT mask.
-	 *  In http://www.joegeluso.com/software/articles/ccitt.htm,
-	 *  the following sample input and output is given to check
-	 *  this implementation:
-	 *  "" -> "1D0F"
-	 *  "A" -> "9479"
-	 *  "123456789" -> "E5CC"
-	 *  "AA...A" (256 A's) ->"E938"
-	 */
-	private function calcCRC(s:String):String
-	{
-		var crc:uint = 0xFFFF;
-
-		// Process each character in the string.
-		var n:int = s.length;
-		for (var i:int = 0; i < n; i++)
-		{
-			var charCode:uint = s.charCodeAt(i);
-
-			// Unicode characters can be greater than 255.
-			// If so, we let both bytes contribute to the CRC.
-			// If not, we let only the low byte contribute.
-			var loByte:uint = charCode & 0x00FF;
-			var hiByte:uint = charCode >> 8;
-			if (hiByte != 0)
-				crc = updateCRC(crc, hiByte);
-			crc = updateCRC(crc, loByte);
-		}
-
-		// Process 2 additional zero bytes, as specified by the CCITT algorithm.
-		crc = updateCRC(crc, 0);
-		crc = updateCRC(crc, 0);
-
-		return crc.toString(16);
-	}
-
-	/**
-	 *  @private
-	 */
-	private function updateCRC(crc:uint, byte:uint):uint
-	{
-		const poly:uint = 0x1021; // CRC-CCITT mask
-
-		var bitMask:uint = 0x80;
-
-		// Process each bit in the byte.
-		for (var i:int = 0; i < 8; i++)
-		{
-			var xorFlag:Boolean = (crc & 0x8000) != 0;
-
-			crc <<= 1;
-			crc &= 0xFFFF;
-
-			if ((byte & bitMask) != 0)
-				crc++;
-
-			if (xorFlag)
-				crc ^= poly;
-
-			bitMask >>= 1;
-		}
-
-		return crc;
-	}
-
-	/**
-	 *  @private
-	 */
-	private function calcDepth(path:String):int
-	{
-		return path.split(".").length;
-	}
-
-	/**
-	 *  @private
-	 */
-	private function depthCompare(a:Object, b:Object):int
-	{
-		var regInfoA:RegistrationInfo = getRegistrationInfo(IHistoryManagerClient(a));
-		var regInfoB:RegistrationInfo = getRegistrationInfo(IHistoryManagerClient(b));
-
-		// Guard against the possibility of an object's
-		// registration info not being found.
-		if (!regInfoA || !regInfoB)
-			return 0;
-
-		if (regInfoA.depth > regInfoB.depth)
-			return 1;
-
-		if (regInfoA.depth < regInfoB.depth)
-			return -1;
-
-		return 0;
-	}
-
-	/**
-	 *  @private
-	 */
-	private function getRegistrationInfo(
-								obj:IHistoryManagerClient):RegistrationInfo
-	{
-		return registrationMap ? registrationMap[obj] : null;
-	}
-
-	/**
-	 *  Unregisters an object with the HistoryManager.
-	 *
-	 *  @param obj Object to unregister.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function unregister(obj:IHistoryManagerClient):void
-	{
+            return;
+
+        var loaderInfo:LoaderInfo;
+
+        // Added to support Cross-versioning issue,
+        // so one needs to set the Singleton.loaderInfo object
+        // to the loaderInfo of the top-most object
+        if (HistoryManagerGlobals.loaderInfo)
+        {
+            loaderInfo = HistoryManagerGlobals.loaderInfo;
+        }
+        else
+        {
+            // Get values that were passed in via the FlashVars
+            // in the HTML wrapper.
+            loaderInfo = DisplayObject(systemManager).loaderInfo;
+        }
+
+        var appURL:String;
+
+        // Use our URL as the unique CRC for this movie.
+        if (HistoryManagerGlobals.loaderInfo)
+            appURL = HistoryManagerGlobals.loaderInfo.url;
+        else
+            appURL = DisplayObject(systemManager).loaderInfo.url;
+
+
+        appID = calcCRC(appURL);
+
+        BrowserManager.getInstance().addEventListener(BrowserChangeEvent.BROWSER_URL_CHANGE, browserURLChangeHandler);
+        BrowserManager.getInstance().initForHistoryManager();
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @Private
+     *  An Array of objects that will save and load state information.
+     *  Each object must implement the IHistoryManagerClient interface.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    private var registeredObjects:Array = [];
+
+    /**
+     *  @private
+     *  A map from a registed object's path to its RegistrationInfo
+     *  (path crc and path depth).
+     */
+    private var registrationMap:Dictionary;
+
+    /**
+     *  @private
+     *  Pending states for deferred restoration.
+     */
+    private var pendingStates:Object = {};
+
+    /**
+     *  @private
+     *  Pending query string to be sent to history.swf.
+     */
+    private var pendingQueryString:String;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Registers an object with the HistoryManager.
+     *  The object must implement the IHistoryManagerClient interface.
+     *
+     *  @param obj Object to register.
+     *
+     *  @see mx.managers.IHistoryManagerClient
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function register(obj:IHistoryManagerClient):void
+    {
         if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
             !ApplicationGlobals.application.historyManagementEnabled)
-			return;
-
-		// Find the index of the object in the Array of all
-		// registered objects; -1 means not found.
-		var index:int = -1;
-		var n:int = registeredObjects.length;
-		for (var i:int = 0; i < n; i++)
-		{
-			if (registeredObjects[i] == obj)
-			{
-				index = i;
-				break;
-			}
-		}
-
-		// If the object was found in the Array, remove it.
-		if (index >= 0)
-			registeredObjects.splice(index, 1);
-
-		// Remove it from the map as well.
-		if (obj && registrationMap)
-			delete registrationMap[obj];
-	}
-
-	/**
-	 *  Saves the application's current state so it can be restored later.
-	 *  This method is automatically called by navigator containers
-	 *  whenever their navigation state changes.
-	 *  If you registered an interface with the HistoryManager,
-	 *  you are responsible for calling the save() method
-	 *  when the application state changes.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function save():void
-	{
+            return;
+
+        // Ensure that this object isn't already registered.
+        unregister(obj);
+
+        // Add the object to the Array of all registered objects.
+        registeredObjects.push(obj);
+
+        // Get a "path" string such as "Application_1.VBox0.hb:HBox.main:
+        // Panel.bodyStack:ViewStack.checkoutView:VBox.accordion:Accordion"
+        // that uniquely represents this object in the visual hierarchy
+        // of the application.
+        var path:String = getPath(obj);
+
+        // Calculate a 4-character hex CRC of this path as a short
+        // identifier for the object to be encoded into the
+        // query parameters of the history URL.
+        var crc:String = calcCRC(path);
+
+        // Determine the depth of the object in the visual hierarchy.
+        // This is important because state must be restored
+        var depth:int = calcDepth(path);
+
+        // Store the crc and depth of the registered object in a
+        // RegistrationInfo instance kept in the HistoryManager's
+        // registrationMap. Given a registed object, we can look up
+        // its crc and depth using getRegistrationInfo().
+        if (!registrationMap)
+            registrationMap = new Dictionary(true);
+        registrationMap[obj] = new RegistrationInfo(crc, depth);
+
+        // Sort the Array of all registered objects according to their depth.
+        registeredObjects.sort(depthCompare);
+
+        // See if there is a pending state for this object.
+        if (pendingStates[crc])
+        {
+            obj.loadState(pendingStates[crc]);
+            delete pendingStates[crc];
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function getPath(obj:IHistoryManagerClient):String
+    {
+        return obj.toString();
+    }
+
+    /**
+     *  @private
+     *  Function to calculate a cyclic rendundancy checksum (CRC).
+     *  This returns a 4-character hex string representing a 16-bit uint
+     *  calculated from the specified string using the CRC-CCITT mask.
+     *  In http://www.joegeluso.com/software/articles/ccitt.htm,
+     *  the following sample input and output is given to check
+     *  this implementation:
+     *  "" -> "1D0F"
+     *  "A" -> "9479"
+     *  "123456789" -> "E5CC"
+     *  "AA...A" (256 A's) ->"E938"
+     */
+    private function calcCRC(s:String):String
+    {
+        var crc:uint = 0xFFFF;
+
+        // Process each character in the string.
+        var n:int = s.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var charCode:uint = s.charCodeAt(i);
+
+            // Unicode characters can be greater than 255.
+            // If so, we let both bytes contribute to the CRC.
+            // If not, we let only the low byte contribute.
+            var loByte:uint = charCode & 0x00FF;
+            var hiByte:uint = charCode >> 8;
+            if (hiByte != 0)
+                crc = updateCRC(crc, hiByte);
+            crc = updateCRC(crc, loByte);
+        }
+
+        // Process 2 additional zero bytes, as specified by the CCITT algorithm.
+        crc = updateCRC(crc, 0);
+        crc = updateCRC(crc, 0);
+
+        return crc.toString(16);
+    }
+
+    /**
+     *  @private
+     */
+    private function updateCRC(crc:uint, byte:uint):uint
+    {
+        const poly:uint = 0x1021; // CRC-CCITT mask
+
+        var bitMask:uint = 0x80;
+
+        // Process each bit in the byte.
+        for (var i:int = 0; i < 8; i++)
+        {
+            var xorFlag:Boolean = (crc & 0x8000) != 0;
+
+            crc <<= 1;
+            crc &= 0xFFFF;
+
+            if ((byte & bitMask) != 0)
+                crc++;
+
+            if (xorFlag)
+                crc ^= poly;
+
+            bitMask >>= 1;
+        }
+
+        return crc;
+    }
+
+    /**
+     *  @private
+     */
+    private function calcDepth(path:String):int
+    {
+        return path.split(".").length;
+    }
+
+    /**
+     *  @private
+     */
+    private function depthCompare(a:Object, b:Object):int
+    {
+        var regInfoA:RegistrationInfo = getRegistrationInfo(IHistoryManagerClient(a));
+        var regInfoB:RegistrationInfo = getRegistrationInfo(IHistoryManagerClient(b));
+
+        // Guard against the possibility of an object's
+        // registration info not being found.
+        if (!regInfoA || !regInfoB)
+            return 0;
+
+        if (regInfoA.depth > regInfoB.depth)
+            return 1;
+
+        if (regInfoA.depth < regInfoB.depth)
+            return -1;
+
+        return 0;
+    }
+
+    /**
+     *  @private
+     */
+    private function getRegistrationInfo(
+                                obj:IHistoryManagerClient):RegistrationInfo
+    {
+        return registrationMap ? registrationMap[obj] : null;
+    }
+
+    /**
+     *  Unregisters an object with the HistoryManager.
+     *
+     *  @param obj Object to unregister.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function unregister(obj:IHistoryManagerClient):void
+    {
         if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
             !ApplicationGlobals.application.historyManagementEnabled)
-			return;
-
-		var haveState:Boolean = false;
-
-		// Query string always starts with the application identifier.
-		var queryString:String = "app=" + appID;
-
-		// Call saveState() on every registered object
-		// to get an Object containing its state information.
-		var n:int = registeredObjects.length;
-		for (var i:int = 0; i < n; i++)
-		{
-			var registeredObject:IHistoryManagerClient = registeredObjects[i];
-			var stateInfo:Object = registeredObject.saveState();
-
-			// stateInfo might be something like { selectedIndex: 1 }
-
-			// Encode the stateInfo into the query string, building up
-			// a string like "ce41-selectedIndex=1&10f7-selectedIndex=2"
-			// that specifies objects (via the crcs of their paths),
-			// property names, and property values.
-			var crc:String = getRegistrationInfo(registeredObject).crc;
-			for (var name:String in stateInfo)
-			{
-				var value:Object = stateInfo[name];
-
-				if (queryString.length > 0)
-					queryString += PROPERTY_SEPARATOR;
-				queryString += crc;
-				queryString += ID_NAME_SEPARATOR;
-				queryString += escape(name);
-				queryString += NAME_VALUE_SEPARATOR;
-				queryString += escape(value.toString());
-				haveState = true;
-			}
-		}
-
-		// If any registered objects specified any state information to save,
-		// reload the history SWF with an URL that encodes all the state info.
-		if (haveState)
-		{
-			pendingQueryString = queryString;
-			ApplicationGlobals.application.callLater(this.submitQuery);
-		}
-	}
-
-	/**
-	 *  @private
-	 *  Reloads the _history iframe with the history SWF.
-	 */
-	private function submitQuery():void
-	{
-		if (pendingQueryString)
-		{
-			BrowserManager.getInstance().setFragment(pendingQueryString);
-			pendingQueryString = null;
-			if ("resetHistory" in ApplicationGlobals.application)
-			    ApplicationGlobals.application.resetHistory = true;
-		}
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Event handlers
-	//
-	//--------------------------------------------------------------------------
-
-
-	/**
-	 *  @private
-	 *  Loads state information.
-	 *  Called by the registered() method of history.swf
-	 *  after we have returned its handshake.
-	 *
-	 *  @param stateVars State information.
-	 */
-	public function browserURLChangeHandler(event:BrowserChangeEvent):void
-	{
-		var p:String;
-		var crc:String;
-
+            return;
+
+        // Find the index of the object in the Array of all
+        // registered objects; -1 means not found.
+        var index:int = -1;
+        var n:int = registeredObjects.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            if (registeredObjects[i] == obj)
+            {
+                index = i;
+                break;
+            }
+        }
+
+        // If the object was found in the Array, remove it.
+        if (index >= 0)
+            registeredObjects.splice(index, 1);
+
+        // Remove it from the map as well.
+        if (obj && registrationMap)
+            delete registrationMap[obj];
+    }
+
+    /**
+     *  Saves the application's current state so it can be restored later.
+     *  This method is automatically called by navigator containers
+     *  whenever their navigation state changes.
+     *  If you registered an interface with the HistoryManager,
+     *  you are responsible for calling the save() method
+     *  when the application state changes.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function save():void
+    {
         if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
             !ApplicationGlobals.application.historyManagementEnabled)
-			return;
-
-		var pieces:Array = event.url.split(PROPERTY_SEPARATOR);
-		var stateVars:Object = {};
-		var n:int = pieces.length;
-		for (var i:int = 0; i < n; i++)
-		{
-			var nameValuePair:Array = pieces[i].split(NAME_VALUE_SEPARATOR);
-			stateVars[nameValuePair[0]] = parseString(nameValuePair[1]);
-		}
-
-		var params:Object = {};
-
-
-		// Unpack the stateVars into parameter objects for each state interface.
-		// stateVars looks like
-		//   { ce41-selectedIndex: 1, 10f7-selectedIndex: 2 }
-		// params will look like
-		//   { ce41: { selectedIndex: 1 }, 10f7: { selectedIndex: 2 } }
-		for (p in stateVars)
-		{
-			var crclen:int = p.indexOf(ID_NAME_SEPARATOR)
-			if (crclen > -1)
-			{
-				crc = p.substr(0, crclen);
-				var name:String = p.substr(crclen + 1, p.length);
-				var value:Object = stateVars[p];
-
-				if (!params[crc])
-					params[crc] = {};
-
-				params[crc][name] = value;
-			}
-		}
-
-		// Call loadState() on all registered objects.
-		n = registeredObjects.length;
-		for (i = 0; i < n; i++)
-		{
-			var registeredObject:IHistoryManagerClient = registeredObjects[i];
-			crc = getRegistrationInfo(registeredObject).crc;
-
-			registeredObject.loadState(params[crc]);
-			delete params[crc];
-		}
-
-		// Save off any remaining state variables in the pendingStates object.
-		// This way the state can be restored if the interface
-		// is instantiated later.
-		for (p in params)
-		{
-			pendingStates[p] = params[p];
-		}
-
-	}
-
-	private function parseString(s:String):Object
-	{
-		if (s == "true")
-			return true;
-		if (s == "false")
-			return false;
-
-		var i:int = parseInt(s);
-		if (i.toString() == s)
-			return i;
-
-		var n:Number = parseFloat(s);
-		if (n.toString() == s)
-			return n;
-
-		return s;
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Deprecated
-	//
-	//--------------------------------------------------------------------------
-	public function registered():void {}
-	public function registerHandshake():void {}
-	public function load(stateVars:Object):void {}
-	public function loadInitialState():void {}
+            return;
+
+        var haveState:Boolean = false;
+
+        // Query string always starts with the application identifier.
+        var queryString:String = "app=" + appID;
+
+        // Call saveState() on every registered object
+        // to get an Object containing its state information.
+        var n:int = registeredObjects.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var registeredObject:IHistoryManagerClient = registeredObjects[i];
+            var stateInfo:Object = registeredObject.saveState();
+
+            // stateInfo might be something like { selectedIndex: 1 }
+
+            // Encode the stateInfo into the query string, building up
+            // a string like "ce41-selectedIndex=1&10f7-selectedIndex=2"
+            // that specifies objects (via the crcs of their paths),
+            // property names, and property values.
+            var crc:String = getRegistrationInfo(registeredObject).crc;
+            for (var name:String in stateInfo)
+            {
+                var value:Object = stateInfo[name];
+
+                if (queryString.length > 0)
+                    queryString += PROPERTY_SEPARATOR;
+                queryString += crc;
+                queryString += ID_NAME_SEPARATOR;
+                queryString += escape(name);
+                queryString += NAME_VALUE_SEPARATOR;
+                queryString += escape(value.toString());
+                haveState = true;
+            }
+        }
+
+        // If any registered objects specified any state information to save,
+        // reload the history SWF with an URL that encodes all the state info.
+        if (haveState)
+        {
+            pendingQueryString = queryString;
+            ApplicationGlobals.application.callLater(this.submitQuery);
+        }
+    }
+
+    /**
+     *  @private
+     *  Reloads the _history iframe with the history SWF.
+     */
+    private function submitQuery():void
+    {
+        if (pendingQueryString)
+        {
+            BrowserManager.getInstance().setFragment(pendingQueryString);
+            pendingQueryString = null;
+            if ("resetHistory" in ApplicationGlobals.application)
+                ApplicationGlobals.application.resetHistory = true;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+
+    /**
+     *  @private
+     *  Loads state information.
+     *  Called by the registered() method of history.swf
+     *  after we have returned its handshake.
+     *
+     *  @param stateVars State information.
+     */
+    public function browserURLChangeHandler(event:BrowserChangeEvent):void
+    {
+        var p:String;
+        var crc:String;
+
+        if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
+            !ApplicationGlobals.application.historyManagementEnabled)
+            return;
+
+        var pieces:Array = event.url.split(PROPERTY_SEPARATOR);
+        var stateVars:Object = {};
+        var n:int = pieces.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var nameValuePair:Array = pieces[i].split(NAME_VALUE_SEPARATOR);
+            stateVars[nameValuePair[0]] = parseString(nameValuePair[1]);
+        }
+
+        var params:Object = {};
+
+
+        // Unpack the stateVars into parameter objects for each state interface.
+        // stateVars looks like
+        //   { ce41-selectedIndex: 1, 10f7-selectedIndex: 2 }
+        // params will look like
+        //   { ce41: { selectedIndex: 1 }, 10f7: { selectedIndex: 2 } }
+        for (p in stateVars)
+        {
+            var crclen:int = p.indexOf(ID_NAME_SEPARATOR)
+            if (crclen > -1)
+            {
+                crc = p.substr(0, crclen);
+                var name:String = p.substr(crclen + 1, p.length);
+                var value:Object = stateVars[p];
+
+                if (!params[crc])
+                    params[crc] = {};
+
+                params[crc][name] = value;
+            }
+        }
+
+        // Call loadState() on all registered objects.
+        n = registeredObjects.length;
+        for (i = 0; i < n; i++)
+        {
+            var registeredObject:IHistoryManagerClient = registeredObjects[i];
+            crc = getRegistrationInfo(registeredObject).crc;
+
+            registeredObject.loadState(params[crc]);
+            delete params[crc];
+        }
+
+        // Save off any remaining state variables in the pendingStates object.
+        // This way the state can be restored if the interface
+        // is instantiated later.
+        for (p in params)
+        {
+            pendingStates[p] = params[p];
+        }
+
+    }
+
+    private function parseString(s:String):Object
+    {
+        if (s == "true")
+            return true;
+        if (s == "false")
+            return false;
+
+        var i:int = parseInt(s);
+        if (i.toString() == s)
+            return i;
+
+        var n:Number = parseFloat(s);
+        if (n.toString() == s)
+            return n;
+
+        return s;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Deprecated
+    //
+    //--------------------------------------------------------------------------
+    public function registered():void {}
+    public function registerHandshake():void {}
+    public function load(stateVars:Object):void {}
+    public function loadInitialState():void {}

 }

@@ -745,41 +730,41 @@
 {
     include "../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Constructor.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public function RegistrationInfo(crc:String, depth:int)
-	{
-		super();
-
-		this.crc = crc;
-		this.depth = depth;
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Variables
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	public var crc:String;
-
-	/**
-	 *  @private
-	 */
-	public var depth:int;
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function RegistrationInfo(crc:String, depth:int)
+    {
+        super();
+
+        this.crc = crc;
+        this.depth = depth;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    public var crc:String;
+
+    /**
+     *  @private
+     */
+    public var depth:int;
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5026
Author:   pfarland@adobe.com
Date:     2009-02-20T20:27:07.892548Z

Log Message:
-----------
Changing pseudo-selector matching by allowing an object to decide whether its state matches a pseudo-selector. This allows top level components like FxApplication to decide whether a pseudo-selector matches its document state OR its skin state.

Also modified StyleManager data structure to allow multiple identical selectors to exist per subject while retaining declaration order. This allows programmatic addition of CSSStyleDeclaration's with identical selectors.

Finally, added preparation for qualified vs unqualified class names in type selectors. This is not yet enabled.

QA: Yes, please retest SDK-19127
Doc: Not yet.
Checkintests: Pass
mustella: AdvancedCSS, and other component style testsuites such as Button and MenuBar passed.
Review: Discussed pseudo-selector approach with Glenn. Other API changes will be part of final PARB review.
Bugs:
SDK-19127 - [Advanced CSS] Pseudo Selectors do not work when you change the "currentState" property of an FxApplication.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.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/flex4/src/mx/graphics/baseClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager3.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as
+++ frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as
@@ -25,19 +25,6 @@
     //--------------------------------------------------------------------------

     //----------------------------------
-    //  pseudoSelectorState
-    //----------------------------------
-
-    /**
-     *  The current state of this component used to match CSS pseudo-selectors.
-     *  If no state exists, returns null.
-     *
-     *  Note Spark components use their skin state as the pseudo state, where
-     *  as Halo components use their currentState property.
-     */
-    function get pseudoSelectorState():String;
-
-    //----------------------------------
     //  id
     //----------------------------------

@@ -63,10 +50,19 @@
     //--------------------------------------------------------------------------

     /**
+     *  The current state of this component used to match CSS pseudo-selectors.
+     *  If no state exists, returns null.
+     *
+     *  Note Spark components use their skin state as the pseudo state, where
+     *  as Halo components use their currentState property.
+     */
+    function isPseudoSelectorMatch(pseudoState:String):Boolean;
+
+    /**
      *  Determines whether this instance is the same as - or is a subclass of -
      *  the given type.
      */
-    function isAssignableToType(type:String):Boolean;
+    function isTypeSelectorMatch(type:String):Boolean;

     /**
      *   Apply state specific styles.


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package mx.controls.scrollClasses
 {


Added New implemention of Drone Object

Added New implemention of Drone Object

--- DroneAnarchy/Resources/Scripts/GameObjects.as
+++ DroneAnarchy/Resources/Scripts/GameObjects.as
@@ -1,3 +1,13 @@
+//Drone Types Enum
+enum DroneType
+{
+	DT_NORMAL_DRONE,
+	DT_ALPHA_DRONE,
+	DT_SUPREME_DRONE,
+	DT_TOKEN_DRONE
+}
+
+
 ///Player Object

 class PlayerObject : ScriptObject
@@ -28,32 +38,72 @@
 	}
 }

-///Drone Object
-
-class DroneObject : ScriptObject
-{
-
+
+///Drone Base Class
+abstract class DroneObjectBase : ScriptObject
+{
 	float currentHealthLevel_;
 	float attackTime_;
 	float attackTimer_;
+	DroneType droneType_;

 	bool hasAttacked_;

-
-	DroneObject()
-	{
+	DroneType droneType
+	{
+		get const
+		{
+			return droneType_;
+		}
+	}
+
+	void DelayedStart()
+	{
+		SubscribeToEvent(node, "NodeCollision", "HandleNodeCollision");
+	}
+
+	void HandleNodeCollision(StringHash eventType, VariantMap& eventData){}
+
+	void Destroy()
+	{
+		Sprite@ nodeSprite = node.vars["Sprite"].GetPtr();
+		nodeSprite.Remove();
+		node.Remove();
+	}
+
+	void OnHit(float damagePoint)
+	{
+		currentHealthLevel_ -= damagePoint;
+	}
+
+}
+
+
+///Drone Object
+class LowLevelDrone : DroneObjectBase
+{
+	int killPoint_;
+	int damagePoint_;
+
+	LowLevelDrone()
+	{
+		droneType_ = DT_NORMAL_DRONE;
 		currentHealthLevel_ = 6;
 		attackTime_ = 37;
 		attackTimer_ = 0;
 		hasAttacked_ = false;
+		killPoint_ = 2;
+		damagePoint_ = 2;

 	}

 	void DelayedStart()
 	{
+
+		DroneObjectBase::DelayedStart();
 		SetupNodeAnimation();
-		SubscribeToEvent(node, "NodeCollision", "HandleNodeCollision");
+		Initialise();
 	}

 	void SetupNodeAnimation()
@@ -65,7 +115,6 @@
 		node.SetAttributeAnimation("Position", valAnim);
 	}

-
 	void FixedUpdate(float timestep)
 	{

@@ -74,6 +123,7 @@
 			//Add explosion Effects
 			VariantMap eventData;
 			eventData["DronePosition"] = node.worldPosition;
+			eventData["KillPoint"] = killPoint_;
 			SendEvent("DroneDestroyed", eventData);
 			Destroy();
 		}
@@ -96,7 +146,7 @@

 		if(playerObj !is null)
 		{
-			playerObj.OnHit();
+			playerObj.OnHit(damagePoint_);
 			Destroy();
 		}
 	}
@@ -114,17 +164,28 @@
 		hasAttacked_ = true;
 	}

-	void Destroy()
-	{
-		Sprite@ nodeSprite = node.vars["Sprite"].GetPtr();
-		nodeSprite.Remove();
-		node.Remove();
-	}
-
-	void OnHit()
-	{
-		currentHealthLevel_ -= 1;
-	}
+	void Initialise()
+	{
+		AnimatedModel@ droneBody = node.CreateComponent("AnimatedModel");
+		droneBody.model = cache.GetResource("Model", "Resources/Models/drone_body.mdl");
+		droneBody.material = cache.GetResource("Material", "Resources/Materials/alt_drone_body.xml");
+
+		AnimatedModel@ droneArm = node.CreateComponent("AnimatedModel");
+		droneArm.model = cache.GetResource("Model", "Resources/Models/drone_arm.mdl");
+		droneArm.material = cache.GetResource("Material", "Resources/Materials/alt_drone_arm.xml");
+
+		RigidBody@ droneRB = node.CreateComponent("RigidBody");
+		droneRB.mass = 1.0f;
+		droneRB.SetCollisionLayerAndMask(DRONE_COLLISION_LAYER, BULLET_COLLISION_LAYER | PLAYER_COLLISION_LAYER | FLOOR_COLLISION_LAYER);
+		droneRB.kinematic = true;
+
+		CollisionShape@ droneCS = node.CreateComponent("CollisionShape");
+		droneCS.SetSphere(0.3f);
+
+		AnimationController@ animController = node.CreateComponent("AnimationController");
+		animController.PlayExclusive("Resources/Models/open_arm.ani", 0, false);
+	}
+

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19890
Author:   chiedozi@adobe.com
Date:     2011-01-22T00:54:17.832168Z

Log Message:
-----------
PARB Changes for TabbedViewNavigator.

TabbedViewNavigator
The activeNavigator property has been renamed to selectedNavigator
The following properties and methods have been made mx_internal, thus don't need to be tested:
maintainNaigationStack
tabBarRenderer_clickHandler

TabbedViewNavigatorApplication
The navigator skinpart has been renamed to tabbedNavigator
The creationPolicy and destructionPolicy properties on ViewNavigatorBase have been removed.
The maintainNavigationStack and creationPolicy properties have been removed

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ScriptRunner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/.flexProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/.actionScriptProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -15,7 +15,6 @@
 import flash.events.IEventDispatcher;
 import flash.events.MouseEvent;

-import mx.core.ContainerCreationPolicy;
 import mx.core.ISelectableList;
 import mx.core.IVisualElement;
 import mx.core.UIComponent;
@@ -106,10 +105,7 @@
  *  the component.

  *
  *
The contents of a child view navigator is destroyed when it is deactivate,
- *  and dynamically created when activated.
- *  This logic can be altered by accessing the creationPolicy property
- *  of the TabbedViewNavigator and the destructionPolicy property
- *  of its child navigators and active View.

+ *  and dynamically created when activated.

  *
  *  @see spark.components.View
  *  @see spark.components.ViewNavigator
@@ -262,35 +258,10 @@
      */
     override public function get activeView():View
     {
-        if (activeNavigator)
-            return activeNavigator.activeView;
+        if (selectedNavigator)
+            return selectedNavigator.activeView;

         return null;
-    }
-
-    //----------------------------------
-    //  activeNavigator
-    //----------------------------------
-
-    [Bindable("change")]
-    /**
-     *  The active view navigator for the TabbedViewNavigator.
-     *  Only one view navigator can be active at a time.
-     *  The active view navigator can be set by changing the
-     *  selectedIndex property or by selecting
-     *  a tab in the TabBar control.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get activeNavigator():ViewNavigatorBase
-    {
-        if (!navigators || length == 0 || selectedIndex < 0)
-            return null;
-
-        return navigators[selectedIndex];
     }

     //----------------------------------
@@ -302,8 +273,8 @@
      */
     override mx_internal function get exitApplicationOnBackKey():Boolean
     {
-        if (activeNavigator)
-            return activeNavigator.exitApplicationOnBackKey;
+        if (selectedNavigator)
+            return selectedNavigator.exitApplicationOnBackKey;

         return super.exitApplicationOnBackKey;
     }
@@ -314,6 +285,7 @@
     private var _maintainNavigationStack:Boolean = true;

     /**
+     *  @private
      *  Specifies whether the navigation stack of the view navigator
      *  should remain intact when the view navigator is deactivated.
      *  If true, when reactivated the view history
@@ -330,7 +302,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function get maintainNavigationStack():Boolean
+    mx_internal function get maintainNavigationStack():Boolean
     {
         return _maintainNavigationStack;
     }
@@ -338,7 +310,7 @@
     /**
      *  @private
      */
-    public function set maintainNavigationStack(value:Boolean):void
+    mx_internal function set maintainNavigationStack(value:Boolean):void
     {
         _maintainNavigationStack = value;
     }
@@ -355,7 +327,7 @@
      *  of this TabbedViewNavigator.
      *  Only one view navigator can be active at a time.
      *  You can reference the active view navigator by using
-     *  the activeNavigator property.
+     *  the selectedNavigator property.
      *
      *
Changing this property causes the current view navigator to be removed,
      *  and sets the selectedIndex to 0.
@@ -428,6 +400,31 @@
         internalDispatchEvent(CollectionEventKind.RESET);
     }

+    //----------------------------------
+    //  selectedNavigator
+    //----------------------------------
+
+    [Bindable("change")]
+    /**
+     *  The selected view navigator for the TabbedViewNavigator.
+     *  Only one view navigator can be active at a time.
+     *  The active view navigator can be set by changing the
+     *  selectedIndex property or by selecting
+     *  a tab in the TabBar control.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get selectedNavigator():ViewNavigatorBase
+    {
+        if (!navigators || length == 0 || selectedIndex < 0)
+            return null;
+
+        return navigators[selectedIndex];
+    }
+
     //--------------------------------------------------------------------------
     //
     // Public Methods
@@ -528,8 +525,8 @@
      */
     override mx_internal function backKeyUpHandler():void
     {
-        if (activeNavigator)
-            activeNavigator.backKeyUpHandler();
+        if (selectedNavigator)
+            selectedNavigator.backKeyUpHandler();
     }

     /**
@@ -592,7 +589,7 @@
      */
     override mx_internal function canRemoveCurrentView():Boolean
     {
-        return (!activeNavigator || activeNavigator.canRemoveCurrentView());
+        return (!selectedNavigator || selectedNavigator.canRemoveCurrentView());
     }

     /**
@@ -630,12 +627,6 @@
         navigator.setActive(false);

         startTrackingUpdates(navigator);
-
-        // TODO (chiedozi): Consider moving this to ViewNavigator or refactoring
-        // Create the top view of the navigator if the creationPolicy
-        // property indicates that all children should be created.
-        if (creationPolicy == ContainerCreationPolicy.ALL)
-            navigator.createTopView();
     }

     /**
@@ -822,9 +813,17 @@

         tabBarVisibilityChanged = false;
     }
-
-    /**
-     *  @private
+
+    /**
+     *  Creates the effect to play when the TabBar control is shown.
+     *  The produced effect is responsible for animating both the
+     *  TabBar and the content group of the navigator.
+     *
+     *
TabbedViewNavigator will expect the includeInLayout
+     *  and visible properties of the tabBar to be true
+     *  after this effect is run.

+     *
+     *  @return An effect to play when the TabBar control is hidden.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -837,7 +836,15 @@
     }

     /**
-     *  @private
+     *  Creates the effect to play when the TabBar control is hidden.
+     *  The produced effect is responsible for animating both the
+     *  TabBar and the content group of the navigator.
+     *
+     *
TabbedViewNavigator will expect the includeInLayout
+     *  and visible properties of the tabBar to be false
+     *  after this effect is run.

+     *
+     *  @return An effect to play when the TabBar control is hidden.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
@@ -1010,7 +1017,7 @@

     /**
      *  @private
-     *  Redispatches the child navigators COMPLETE event.
+     *  Redispatches the child navigator's COMPLETE event.
      */
     private function navigator_viewChangeCompleteHandler(event:Event):void
     {
@@ -1047,7 +1054,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    protected function tabBarRenderer_clickHandler(event:MouseEvent):void
+    mx_internal function tabBarRenderer_clickHandler(event:MouseEvent):void
     {
         // lastSelectedIndex is used instead of tabBar.selectedIndex
         // because by the time this method is called, the tabBar's
@@ -1057,8 +1064,8 @@
         if ((event.target is IItemRenderer) &&
             (IItemRenderer(event.target).itemIndex == lastSelectedIndex))
         {
-            if (activeNavigator is ViewNavigator)
-                ViewNavigator(activeNavigator).popToFirstView();
+            if (selectedNavigator is ViewNavigator)
+                ViewNavigator(selectedNavigator).popToFirstView();
         }
     }

@@ -1296,7 +1303,6 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    // FIXME (chiedozi): Do a separate code path.  Should only dispatch value_commit.
     public function addItemAt(item:Object, index:int):void
     {
         // FIXME (chiedozi): Resource manager
@@ -1431,8 +1437,8 @@
         var len:int = length;

         // Deactive the active navigator and its view
-        if (activeNavigator)
-            activeNavigator.setActive(false);
+        if (selectedNavigator)
+            selectedNavigator.setActive(false);

         for (var i:int = 0; i < len; i++)
         {


Fix 554473  -  Selftest needs to quote strings that goes into verifyPass calls (r=edwsmith)

--- extensions/selftest.as
+++ extensions/selftest.as
@@ -229,7 +229,7 @@
 						break;
 					vs++;
 					i++;
-					t.push("verifyPass(" + res[1] + ", \"" + res[1] + "\", __FILE__, __LINE__);");
+					t.push("verifyPass(" + res[1] + ", \"" + quote(res[1]) + "\", __FILE__, __LINE__);");
 				}
 				if (vs == 0)
 					throw "No %%verify statements for test on line " + loc;
@@ -271,6 +271,9 @@
 			return t;
 		}

+		function quote(s) {
+		    return s.replace(/\"/g, "\\\"");
+		}
     }

     function formatSelftest(input, st) {


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

--- frameworks/projects/framework/src/mx/resources/IResourceModule.as
+++ frameworks/projects/framework/src/mx/resources/IResourceModule.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 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.resources
 {


now rendering polylines instead of individual segments

--- WeaveUISpark/src/weave/visualization/plotters/SimpleParallelCoordinatesPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/SimpleParallelCoordinatesPlotter.as
@@ -202,22 +202,22 @@

 				dataBounds.projectPointTo(tempPoint, screenBounds);

-				// if we aren't continuing a new line (it is a new line segment)
-				if (!continueLine)
-				{
-					// set the previous X and Y locations to be this new coordinate
-					_prevX = tempPoint.x;
-					_prevY = tempPoint.y;
-				}
-
-				if (curvedLines.value)
-				{
-					DrawUtils.drawDoubleCurve(graphics, _prevX, _prevY, tempPoint.x, tempPoint.y, true, 1);
+				if (continueLine)
+				{
+					if (curvedLines.value)
+					{
+						DrawUtils.drawDoubleCurve(graphics, _prevX, _prevY, tempPoint.x, tempPoint.y, true, 1);
+					}
+					else
+					{
+						//graphics.moveTo(_prevX, _prevY);
+						graphics.lineTo(tempPoint.x, tempPoint.y);
+					}
 				}
 				else
 				{
-					graphics.moveTo(_prevX, _prevY);
-					graphics.lineTo(tempPoint.x, tempPoint.y);
+					// we're not continuing a line, but we need to start the next line from the current point
+					graphics.moveTo(tempPoint.x, tempPoint.y);
 				}

 				continueLine = true;


Transferred from the Adobe Open Source Subversion Repository

Revision: 15011
Author:   cframpto@adobe.com
Date:     2010-03-25T00:53:17.253767Z

Log Message:
-----------
Merge changes 14914,14929,14952,14961,14987  from 4.x to trunk.  Includes TLF1.1 Build 587 and mirroring changes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/docs/flashx.textLayout.container.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/undo/UndoManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/compose/SimpleCompose.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/rsls/textLayout_1.0.0.595.swf</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/flex-config.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/docs/flashx.undo.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/factory/TextLineFactoryBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/4.x/frameworks/rsls/textLayout_1.1.0.597.swf" copyfrom-rev="14952" action="A">/flex/sdk/trunk/frameworks/rsls/textLayout_1.1.0.597.swf</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/conversion/TextLayoutImporter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/FlowElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/GlobalSettings.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/edit/IMEClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/formats/TextLayoutFormatInc.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/formats/TextLayoutFormatValueHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/air-config.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/container/TextContainerManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/edit/SelectionManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/formats/TextLayoutFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/docs/flashx.textLayout.compose.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/ReleaseNotes.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/container/ContainerController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/formats/ITabStopFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/BuildInfo.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/compose/ComposeState.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/conversion/HtmlImporter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/docs/flashx.textLayout.formats.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/operations/InsertTextOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/docs/flashx.textLayout.elements.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/formats/ITextLayoutFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/SubParagraphGroupElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/factory/StringTextLineFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/LinkElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/FlowLeafElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/docs/flashx.textLayout.conversion.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/SpanElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/TextFlow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/factory/TextFlowTextLineFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/compose/TextFlowLine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/compose/TextLineRecycler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/formats/TabStopFormatInc.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/ParagraphElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/formats/TabStopFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/conversion/TextConverter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/edit/EditManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/compose/StandardFlowComposer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/compose/BaseCompose.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/4.x/frameworks/projects/textLayout/src/flashx/textLayout/utils/Twips.as" copyfrom-rev="14952" action="A">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/utils/Twips.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/property/Property.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/textLayout/src/flashx/textLayout/elements/FlowGroupElement.as</path>

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

--- frameworks/projects/airframework/src/mx/core/Window.as
+++ frameworks/projects/airframework/src/mx/core/Window.as
@@ -2633,6 +2633,10 @@
             {
                 resizeHandler(new Event(Event.RESIZE));

+                // Validate transform.matrix after setting actual size.  This is normally done
+                // by validateDisplayList() before our updateDisplayList() is called.
+                validateMatrix();
+
                 if (!resizeHandlerAdded)
                 {
                     // weak reference


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

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

 package mx.core
 {


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

--- frameworks/projects/mx/src/mx/skins/halo/HaloColors.as
+++ frameworks/projects/mx/src/mx/skins/halo/HaloColors.as
@@ -0,0 +1,96 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.skins.halo
+{
+
+import mx.utils.ColorUtil;
+
+/**
+ *  Defines the colors used by components that support the Halo theme.
+ */
+public class HaloColors
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var cache:Object = {};
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Returns a unique hash key based on the colors that are passed in. This
+	 *  key is used to store the calculated colors so they only need to be
+	 *  calculated once.
+	 */
+	public static function getCacheKey(... colors):String
+	{
+		return colors.join(",");
+	}
+
+	/**
+	 *  Calculates colors that are used by components that support the Halo theme, such as the colors of beveled edges.
+	 *  This method uses the themeColor and fillColors properties to calculate its colors.
+	 *
+	 *  @param colors
+	 *  @param themeColor The value of the themeColor style property.
+	 *  @param fillColor0 The start color of a fill.
+	 *  @param fillColor1 The end color of a fill.
+	 */
+	public static function addHaloColors(colors:Object,
+										 themeColor:uint,
+										 fillColor0:uint,
+										 fillColor1:uint):void
+	{
+		var key:String = getCacheKey(themeColor, fillColor0, fillColor1);
+		var o:Object = cache[key];
+
+		if (!o)
+		{
+			o = cache[key] = {};
+
+			// Cross-component styles
+			o.themeColLgt = ColorUtil.adjustBrightness(themeColor, 100);
+			o.themeColDrk1 = ColorUtil.adjustBrightness(themeColor, -75);
+			o.themeColDrk2 = ColorUtil.adjustBrightness(themeColor, -25);
+			o.fillColorBright1 = ColorUtil.adjustBrightness2(fillColor0, 15);
+			o.fillColorBright2 = ColorUtil.adjustBrightness2(fillColor1, 15);
+			o.fillColorPress1 = ColorUtil.adjustBrightness2(themeColor, 85);
+			o.fillColorPress2 = ColorUtil.adjustBrightness2(themeColor, 60);
+			o.bevelHighlight1 = ColorUtil.adjustBrightness2(fillColor0, 40);
+			o.bevelHighlight2 = ColorUtil.adjustBrightness2(fillColor1, 40);
+		}
+
+		colors.themeColLgt = o.themeColLgt;
+		colors.themeColDrk1 = o.themeColDrk1;
+		colors.themeColDrk2 = o.themeColDrk2;
+		colors.fillColorBright1 = o.fillColorBright1;
+		colors.fillColorBright2 = o.fillColorBright2;
+		colors.fillColorPress1 = o.fillColorPress1;
+		colors.fillColorPress2 = o.fillColorPress2;
+		colors.bevelHighlight1 = o.bevelHighlight1;
+		colors.bevelHighlight2 = o.bevelHighlight2;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17194
Author:   chiedozi@adobe.com
Date:     2010-08-05T00:26:29.040687Z

Log Message:
-----------
Renamed View.showActionBar and View.showTabBar to actionBarVisible and tabBarVisible to match standard flex practices.

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
@@ -145,7 +145,7 @@
         if (tabBar)
         {
             tabBarWasVisible = componentIsVisible(tabBar);
-            if (tabBarWasVisible != nextView.showTabBar ||
+            if (tabBarWasVisible != nextView.tabBarVisible ||
                 nextView.overlayControls != currentView.overlayControls)
             {
                 cachedTabBar = generateBitmap(tabBar);


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

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

 package spark.transitions
 {


adding cleaned up SEI frame-type 6 logic for 608/708 captions

--- src/org/mangui/hls/demux/TSDemuxer.as
+++ src/org/mangui/hls/demux/TSDemuxer.as
@@ -11,6 +11,7 @@
     import flash.utils.Timer;
     import org.mangui.hls.flv.FLVTag;
     import org.mangui.hls.model.AudioTrack;
+    import by.blooddy.crypto.Base64;

     CONFIG::LOGGING {
         import org.mangui.hls.utils.Log;
@@ -470,6 +471,187 @@
                     pes.data.position = frame.start;
                     pes.data.readBytes(pps, 0, frame.length);
                     ppsvect.push(pps);
+                } else if (frame.type == 6) { // TODO: do we need to support 39 for H.265?
+                    var workerbyte1:uint;
+
+                    // We already know it's 6, so skip first byte
+                    pes.data.position = frame.start + 1;
+
+                    // get the SEI payload type
+                    var payload_type : uint = workerbyte1 = pes.data.readUnsignedByte();
+
+                    if (payload_type == 4)
+                    {
+                        var payload_size : uint = pes.data.readUnsignedByte();
+
+                        CONFIG::LOGGING {
+                            Log.debug("Picture User Data: payload_type: " + payload_type);
+                            Log.debug("Picture User Data: payload_size: " + payload_size);
+                        }
+
+                        var country_code : uint = pes.data.readUnsignedByte();
+
+                        if (country_code == 181)
+                        {
+                            var provider_code : uint = pes.data.readUnsignedShort();
+
+                            if (provider_code == 49)
+                            {
+                                var user_structure : uint = pes.data.readUnsignedInt();
+
+                                if (user_structure == 0x47413934)
+                                {
+                                    var user_data_type : uint = pes.data.readUnsignedByte();
+
+                                    if (user_data_type == 3)
+                                    {
+                                        // cc -- the first 8 bits are 1-Boolean-0 and the 5 bits for the number of CCs
+                                        var byte:uint = pes.data.readUnsignedByte();
+
+                                        // get the total number of cc_datas
+                                        var total:uint = 31 & byte;
+                                        var count:uint = 0;
+
+                                        // supposedly a flag to process the cc_datas or not
+                                        // isn't working for me, so i don't use it yet
+                                        var process:Boolean = !((64 & byte) == 0);
+
+                                        var size:uint = total * 3;
+
+                                        // em_data, do we need? It's not used for anything, but it's there, so i need to pull it out
+                                        var otherByte:uint = pes.data.readUnsignedByte();
+
+                                        if (pes.data.bytesAvailable >= size)
+                                        {
+                                            // ByteArray for onCaptionInfo event
+                                            var sei : ByteArray = new ByteArray();
+
+                                            // onCaptionInfo payloads need to know the size of the binary data
+                                            // there's two two bytes we just read, plus the cc_datas, which are 3 bytes each
+                                            sei.writeUnsignedInt(2+3*total);
+
+                                            // write those two bytes
+                                            sei.writeByte(byte);
+                                            sei.writeByte(otherByte);
+
+                                            // write the cc_datas
+                                            pes.data.readBytes(sei, 6, 3*total);
+
+                                            pes.data.position -= total * 3;
+
+                                            // The following code is for debug logging...
+                                            var byte:uint;
+                                            var ccbyte1:int;
+                                            var ccbyte2:int;
+                                            var ccValid:Boolean = false;
+                                            var ccType:int;
+
+                                            var output:String = "";
+                                            for (var i=0; i<total; i++)
+                                            {
+                                                byte = pes.data.readUnsignedByte();
+
+                                                ccValid = !((4 & byte) == 0);
+                                                ccType = (3 & byte);
+
+                                                if (true)
+                                                {
+                                                    if (ccType == 0)
+                                                    {
+                                                        ccbyte1 = 0x7F && pes.data.readUnsignedByte();
+                                                        ccbyte2 = 0x7F && pes.data.readUnsignedByte();
+
+
+                                                        if (ccbyte1 == 0x11 || ccbyte1 == 0x19)
+                                                        {
+                                                            // Extended North American character...
+                                                            // todo: output these characters
+                                                        }
+                                                        if (ccbyte1 >= 0x12 && ccbyte1 <= 0x1A)
+                                                        {
+                                                            // Spanish / French character
+                                                            // todo: output these characters
+                                                        }
+                                                        if (ccbyte1 >= 0x13 && ccbyte1 <= 0x1B)
+                                                        {
+                                                            // Portugese / German / Danish character
+                                                            // todo: output these characters
+                                                        }
+                                                        else if (ccbyte1 >= 0x10 && ccbyte1 <= 0x17)
+                                                        {
+                                                            // channel 0 command
+                                                        }
+                                                        else if (ccbyte1 >= 0x18 && ccbyte1 <= 0x1F)
+                                                        {
+                                                            // channel 1 command
+                                                        }
+                                                        else
+                                                        {
+                                                            output += getCharacterFromByte(ccbyte1) + " " + getCharacterFromByte(ccbyte2) + " | ";
+                                                        }
+                                                    }
+                                                    else if (ccType == 1 || ccType == 2 || ccType == 3)
+                                                    {
+                                                        // just read them out to move foward
+                                                        ccbyte1 = pes.data.readUnsignedByte();
+                                                        ccbyte2 = pes.data.readUnsignedByte();
+                                                    }
+                                                }
+
+                                            }
+
+                                            CONFIG::LOGGING {
+                                                Log.info("the_cc_data: " + output);
+                                            }
+
+                                            // onCaptionInfo expects Base64 data...
+                                            var sei_data:String = Base64.encode(sei);
+
+                                            var cc_data:Object = {
+                                                type: "708",
+                                                data: sei_data
+                                            };
+
+                                            // add a new FLVTag with the onCaptionInfo call
+                                            var tag:FLVTag = new FLVTag(FLVTag.METADATA, pes.pts, pes.pts, false);
+
+                                            var data : ByteArray = new ByteArray();
+                                            data.objectEncoding = ObjectEncoding.AMF0;
+                                            data.writeObject("onCaptionInfo");
+                                            data.objectEncoding = ObjectEncoding.AMF3;
+                                            data.writeByte(0x11);
+                                            data.writeObject(cc_data);
+                                            tag.push(data, 0, data.length);
+
+                                            // insert in correct order
+                                            // if i don't do this, the captions get more mangled than they are...
+                                            if (_tags.length == 0)
+                                            {
+                                                _tags.push(tag);
+                                            }
+                                            else
+                                            {
+                                                for (var t:Number=0; t<_tags.length; t++)
+                                                {
+                                                    if (_tags[t].pts > tag.pts)
+                                                    {
+                                                        _tags.splice(t, 0, tag);
+                                                        break;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                        else
+                                        {
+                                            CONFIG::LOGGING {
+                                                Log.info("not enough bytes!");
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
                 }
             }
             // if both SPS and PPS have been found, build AVCC and push tag if needed
@@ -534,6 +716,11 @@
             }
         }

+        public static function getCharacterFromByte(byte:uint):String
+        {
+            return String.fromCharCode(byte);
+        }
+
         // return true if same Byte Array
         private function compareByteArray(ba1 : ByteArray, ba2 : ByteArray) : Boolean {
             // compare the lengths