Transferred from the Adobe Open Source Subversion Repository

Revision: 14986
Author:   cframpto@adobe.com
Date:     2010-03-24T16:47:07.841079Z

Log Message:
-----------
Merge mirroring tool tip change 14985 from 4.x to trunk.

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

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>

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

--- frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
@@ -27,6 +27,7 @@
 import mx.core.IInvalidating;
 import mx.core.IToolTip;
 import mx.core.IUIComponent;
+import mx.core.LayoutDirection;
 import mx.core.mx_internal;
 import mx.effects.IAbstractEffect;
 import mx.effects.EffectManager;
@@ -36,6 +37,7 @@
 import mx.managers.IToolTipManagerClient;
 import mx.styles.IStyleClient;
 import mx.validators.IValidatorListener;
+import mx.core.ILayoutDirectionElement;

 use namespace mx_internal;

@@ -1003,8 +1005,9 @@
      *  and showTip() after.

      *
      *
If a normal ToolTip is being displayed, this method positions
-     *  its upper-left corner near the lower-right of the arrow cursor.
-     *  This method ensures that the ToolTip is completely in view.
+     *  its upper-left (upper-right) corner near the lower-right (lower-left)
+     *  of the arrow cursor.  This method ensures that the ToolTip is
+     *  completely in view.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -1013,52 +1016,96 @@
      */
     mx_internal function positionTip():void
     {
+        // Determine layoutDirection of the target component.
+        var layoutDirection:String;
+        if (currentTarget is ILayoutDirectionElement)
+            layoutDirection = ILayoutDirectionElement(currentTarget).layoutDirection;
+        else
+            layoutDirection = LayoutDirection.LTR;
+
+        const mirror:Boolean = (layoutDirection == LayoutDirection.RTL);
+
         var x:Number;
         var y:Number;
-
+
         var screenWidth:Number = currentToolTip.screen.width;
         var screenHeight:Number = currentToolTip.screen.height;
-
+
         if (isError)
         {
-            var targetGlobalBounds:Rectangle = getGlobalBounds(currentTarget, currentToolTip.root);
-
-            x = targetGlobalBounds.right + 4;
+            // Tooltips are laid out in the same direction as the target
+            // component.
+            var tipElt:ILayoutDirectionElement =
+                currentToolTip as ILayoutDirectionElement;
+
+            if (tipElt &&
+                tipElt.layoutDirection != layoutDirection)
+            {
+                tipElt.layoutDirection = layoutDirection;
+                // sizeTip below will call validateNow()
+                tipElt.invalidateLayoutDirection();
+            }
+
+            var targetGlobalBounds:Rectangle =
+                getGlobalBounds(currentTarget, currentToolTip.root, mirror);
+
+            x = mirror ?
+                    targetGlobalBounds.left - 4 :
+                    targetGlobalBounds.right + 4;
             y = targetGlobalBounds.top - 1;
-
-            // If there's no room to the right of the control, put it above
-            // or below, with the left edge of the error tip aligned with
-            // the left edge of the target.
-            if (x + currentToolTip.width > screenWidth)
+
+            // If there's no room to the right (left) of the control, put it
+            // above or below, with the left (right) edge of the error tip
+            // aligned with the left (right) edge of the target.
+            var noRoom:Boolean = mirror ?
+                                 x < currentToolTip.width :
+                                 x + currentToolTip.width > screenWidth;
+            if (noRoom)
             {
                 var newWidth:Number = NaN;
                 var oldWidth:Number = NaN;
-
-                x = targetGlobalBounds.left - 2;
-
+
+                x = mirror ?
+                        targetGlobalBounds.right + 2 - currentToolTip.width :
+                        targetGlobalBounds.left - 2;
+
                 // If the error tip would be too wide for the stage,
                 // reduce the maximum width to fit onstage. Note that
                 // we have to reassign the text in order to get the tip
                 // to relayout after changing the border style and maxWidth.
-                if (x + currentToolTip.width + 4 > screenWidth)
+                if (mirror)
                 {
-                    newWidth = screenWidth - x - 4;
+                    if (x < currentToolTip.width + 4)
+                    {
+                        // -4 on the left, +2 on the right = -2
+                        x = 4;
+                        newWidth = targetGlobalBounds.right - 2;
+                    }
+                }
+                else
+                {
+                    if (x + currentToolTip.width + 4 > screenWidth)
+                        newWidth = screenWidth - x - 4;
+                }
+
+                if (!isNaN(newWidth))
+                {
                     oldWidth = Object(toolTipClass).maxWidth;
                     Object(toolTipClass).maxWidth = newWidth;
                     if (currentToolTip is IStyleClient)
                         IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
                     currentToolTip["text"] = currentToolTip["text"];
-                }
-
-                // Even if the error tip will fit onstage, we still need to
-                // change the border style and get the error tip to relayout.
+                }
+
+                    // Even if the error tip will fit onstage, we still need to
+                    // change the border style and get the error tip to relayout.
                 else
                 {
                     if (currentToolTip is IStyleClient)
                         IStyleClient(currentToolTip).setStyle("borderStyle", "errorTipAbove");
                     currentToolTip["text"] = currentToolTip["text"];
                 }
-
+
                 if (currentToolTip.height + 2 < targetGlobalBounds.top)
                 {
                     // There's room to put it above the control.
@@ -1068,7 +1115,7 @@
                 {
                     // No room above, put it below the control.
                     y = targetGlobalBounds.bottom + 2;
-
+
                     if (!isNaN(newWidth))
                         Object(toolTipClass).maxWidth = newWidth;
                     if (currentToolTip is IStyleClient)
@@ -1076,42 +1123,55 @@
                     currentToolTip["text"] = currentToolTip["text"];
                 }
             }
-
+
             // Since the border style of the error tip may have changed,
             // we have to force a remeasurement and change its size.
             // This is because objects in the toolTips layer
             // don't undergo normal measurement and layout.
             sizeTip(currentToolTip)
-
-            // If we changed the tooltip max size, we change it back
+
+            // If we changed the tooltip max size, we change it back.
+            // Otherwise, if RTL, and x wasn't set for maxWidth, reposition
+            // because the width may have changed during the remeasure.
             if (!isNaN(oldWidth))
                 Object(toolTipClass).maxWidth = oldWidth;
+            else if (mirror)
+                x = targetGlobalBounds.right + 2 - currentToolTip.width;
         }
         else
         {
             var sm:ISystemManager = getSystemManager(currentTarget);
-            // Position the upper-left of the tooltip
-            // at the lower-right of the arrow cursor.
-            x = DisplayObject(sm).mouseX + 11;
+            // Position the upper-left (upper-right) of the tooltip
+            // at the lower-right (lower-left) of the arrow cursor.
+            x = DisplayObject(sm).mouseX + 11;
+            if (mirror)
+                x -= currentToolTip.width;
             y = DisplayObject(sm).mouseY + 22;
-
-            // If the tooltip is too wide to fit onstage, move it left.
+
+            // If the tooltip is too wide to fit onstage, move it left (right).
             var toolTipWidth:Number = currentToolTip.width;
-            if (x + toolTipWidth > screenWidth)
+            if (mirror)
+            {
+                if (x < 2)
+                    x = 2;
+            }
+            else if (x + toolTipWidth > screenWidth)
+            {
                 x = screenWidth - toolTipWidth;
-
+            }
+
             // If the tooltip is too tall to fit onstage, move it up.
             var toolTipHeight:Number = currentToolTip.height;
             if (y + toolTipHeight > screenHeight)
                 y = screenHeight - toolTipHeight;
-
-			var pos:Point = new Point(x, y);
-			pos = DisplayObject(sm).localToGlobal(pos);
-			pos = DisplayObject(sm.getSandboxRoot()).globalToLocal(pos);
-			x = pos.x;
-			y = pos.y;
-        }
-
+
+            var pos:Point = new Point(x, y);
+            pos = DisplayObject(sm).localToGlobal(pos);
+            pos = DisplayObject(sm.getSandboxRoot()).globalToLocal(pos);
+            x = pos.x;
+            y = pos.y;
+        }
+
         currentToolTip.move(x, y);
     }

@@ -1471,11 +1531,21 @@
     /**
      *  @private
      */
-    private function getGlobalBounds(obj:DisplayObject, parent:DisplayObject):Rectangle
+    private function getGlobalBounds(obj:DisplayObject,
+                                     parent:DisplayObject,
+                                     mirror:Boolean):Rectangle
     {
         var upperLeft:Point = new Point(0, 0);
+
         upperLeft = obj.localToGlobal(upperLeft);
+
+        // If the layout has been mirrored, then the 0,0 is the uppper
+        // right corner; compensate here.
+        if (mirror)
+            upperLeft.x -= obj.width;
+
         upperLeft = parent.globalToLocal(upperLeft);
+
         return new Rectangle(upperLeft.x, upperLeft.y, obj.width, obj.height);
     }


fixing up org.igorcosta.hacks.SWF to allow reading serial numbers of any byte array, not just that of the current SWF

--- org/igorcosta/hacks/SWF.as
+++ org/igorcosta/hacks/SWF.as
@@ -12,19 +12,12 @@

 	public class SWF
 	{
-		public function SWF()
-		{
-		}
-
     ///////////////////////////////////////////////////////////////////////////
     // Returns compilation date of current module
     public static function readCompilationDate(serialNumber: ByteArray = null): Date
     {
       const compilationDate: Date = new Date;
       const DATETIME_OFFSET: uint = 18;
-
-      if (serialNumber == null)
-        serialNumber = readSerialNumber();

       /* example of filled SWF_SERIALNUMBER structure
       struct SWF_SERIALNUMBER
@@ -55,19 +48,16 @@

     ///////////////////////////////////////////////////////////////////////////
     // Returns contents of Adobe SerialNumber SWF tag
-    public static function readSerialNumber(): ByteArray
+    public static function readSerialNumber(src:ByteArray): ByteArray
     {
       const TAG_SERIAL_NUMBER: uint = 0x29;
-      return findAndReadTagBody(TAG_SERIAL_NUMBER);
+      return findAndReadTagBody(src, TAG_SERIAL_NUMBER);
     }

     ///////////////////////////////////////////////////////////////////////////
     // Returns the tag body if it is possible
-    public static function findAndReadTagBody(theTagCode: uint): ByteArray
+    public static function findAndReadTagBody(src:ByteArray, theTagCode: uint): ByteArray
     {
-      // getting direst access to unpacked SWF file
-      const src: ByteArray = LoaderInfo.getLoaderInfoByDefinition(SWF).bytes;
-
       /*
       SWF File Header
       Field      Type  Offset   Comment


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/automation_air/src/mx/automation/delegates/controls/FlexNativeMenuAutomationImpl.as
+++ frameworks/projects/automation_air/src/mx/automation/delegates/controls/FlexNativeMenuAutomationImpl.as
@@ -0,0 +1,536 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.automation.delegates.controls
+{
+
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	import flash.display.NativeMenu;
+	import flash.display.NativeMenuItem;
+	import flash.events.Event;
+	import flash.events.EventDispatcher;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationManager;
+	import mx.automation.IAutomationObject;
+	import mx.automation.events.AutomationFlexNativeMenuEvent;
+	import mx.controls.FlexNativeMenu;
+	import mx.core.mx_internal;
+	import mx.events.FlexNativeMenuEvent;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  Flex Native Menu.
+	 *
+	 *  @see mx.controls.FlexNativeMenu
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 4
+	 */
+	public class FlexNativeMenuAutomationImpl  extends EventDispatcher
+		implements IAutomationObject
+	{
+		include "../../../core/Version.as";
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(FlexNativeMenu, FlexNativeMenuAutomationImpl);
+		}
+
+		/**
+		 *  Constructor.
+		 *  @param obj FlexNativeMenu object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function FlexNativeMenuAutomationImpl(obj:FlexNativeMenu)
+		{
+			super();
+			menu = obj;
+			obj.addEventListener(FlexNativeMenuEvent.ITEM_CLICK, itemClickHandler);
+			obj.addEventListener(FlexNativeMenuEvent.MENU_SHOW, menuShowHandler);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		// Properties
+		//
+		//--------------------------------------------------------------------------
+
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+
+		//---------------------------------
+		//  automationEnabled
+		//---------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get automationEnabled():Boolean
+		{
+			return true;
+		}
+
+		//---------------------------------
+		//  automationOwner
+		//---------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get automationOwner():DisplayObjectContainer
+		{
+			return null;
+		}
+
+		//---------------------------------
+		//  automationParent
+		//---------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get automationParent():DisplayObjectContainer
+		{
+			return null;
+		}
+
+		//---------------------------------
+		//  automationVisible
+		//---------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get automationVisible():Boolean
+		{
+			return true;
+		}
+
+		//---------------------------------
+		// automationDelegate
+		//---------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function set automationDelegate(value:Object):void
+		{
+			trace("Invalid setter function call. Should have been called on the component");
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get automationDelegate():Object
+		{
+			trace("Invalid getter function call. Should have been called on the component");
+			return this;
+		}
+
+		//----------------------------------
+		//  automationName
+		//----------------------------------
+		/**
+		 * @private
+		 */
+		private var _automationName:String = "";
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get automationName():String
+		{
+			return _automationName;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set automationName(value:String):void
+		{
+			_automationName = value;
+		}
+
+		//----------------------------------
+		//  automationTabularData
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get automationTabularData():Object
+		{
+			return null;
+		}
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @inheritDoc
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get automationValue():Array
+		{
+			return [ automationName ];
+		}
+
+		//----------------------------------
+		//  menu
+		//----------------------------------
+		/**
+		 *  @private
+		 */
+		protected var _menu:FlexNativeMenu;
+
+		/**
+		 *  Returns the component instance associated with this delegate instance.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function get menu():FlexNativeMenu
+		{
+			return _menu;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set menu(obj:FlexNativeMenu):void
+		{
+			_menu = obj as FlexNativeMenu;
+		}
+
+		//----------------------------------
+		//  numAutomationChildren
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		public function get numAutomationChildren():int
+		{
+			return 0;
+		}
+
+		//----------------------------------
+		//  owner
+		//----------------------------------
+		/**
+		 *  @private
+		 */
+		public function get owner():DisplayObjectContainer
+		{
+			return (menu as IAutomationObject).automationOwner;
+		}
+
+
+		//----------------------------------
+		//  showInAutomationHierarchy
+		//----------------------------------
+		/**
+		 *  @private
+		 */
+		public function get showInAutomationHierarchy():Boolean
+		{
+			trace("Reading should not be done here");
+			return true;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function set showInAutomationHierarchy(value:Boolean):void
+		{
+			trace("Setting should not be done here");
+			if(menu is IAutomationObject)
+				IAutomationObject(menu).showInAutomationHierarchy = value;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 *  Replays interactions on the FlexNativeMenu.
+		 *  Dispatches Event.SELECT on the NativeMenuItem
+		 *  if the interaction is selection
+		 *  Dispatches Event.DISPLAYING on the NativeMenu
+		 *  if the interaction is open
+		 *
+		 *  @param event ReplayableClickEvent to replay.
+		 */
+		public function replayAutomatableEvent(event:Event):Boolean
+		{
+			var menuEvent:AutomationFlexNativeMenuEvent = event as AutomationFlexNativeMenuEvent;
+			if (!menuEvent)
+				return false;
+			var args:String = menuEvent.args;
+
+			// separate these to indivual menu items
+			var menuNames:Array = args.split(" ::-:: ");
+
+			var count:int = menuNames.length;
+			var index:int = 0;
+			var menuObj:NativeMenu = menu.nativeMenu;
+
+			if (event.type == AutomationFlexNativeMenuEvent.ITEM_CLICK)
+			{
+				if (args.length != 0)
+				{
+					// get the last NativeMenu
+					while ((menuObj) && (index < count-1))
+					{
+						menuObj = getNativeMenuByName(menuObj, menuNames[index]);
+						index ++;
+					}
+
+					// we got the last menuObj.
+					// we need the menu item with the required name and its index
+					if (menuObj)
+					{
+						var name:String = menuNames[menuNames.length-1];
+
+						// get the menu items of th last menu
+						var menuItems:Array = menuObj.items;
+						var count1:int = menuItems.length;
+						var index1:int = 0;
+						var menuFound:Boolean = false;
+						while ((!menuFound) && (index1 < count1))
+						{
+							if((menuItems[index1] as NativeMenuItem).label == name)
+								menuFound = true;
+
+							else
+								index1 ++;
+						}
+
+						//create the SELECT event and dispatch the event on the menuitem
+						if (menuFound)
+						{
+							var requiredMenuItem:NativeMenuItem = menuItems[index1] as NativeMenuItem;
+							var requiredMenu:NativeMenu = menuObj;
+							requiredMenuItem.dispatchEvent(new Event(flash.events.Event.SELECT));
+							return true;
+						}
+					}
+				}
+			}
+			else if(event.type == AutomationFlexNativeMenuEvent.MENU_SHOW)
+			{
+				if (args.length != 0)
+				{
+					while ((menuObj) && (index < count))
+					{
+						menuObj = getNativeMenuByName(menuObj, menuNames[index]);
+						index ++;
+					}
+
+					// we got the last menuObj. Dispatch DISPLAYING event on this menu
+					if (menuObj)
+					{
+						menuObj.dispatchEvent(new Event(Event.DISPLAYING));
+						return true;
+					}
+				}
+			}
+			return false;
+		}
+
+		private function getNativeMenuByName(menuObj:NativeMenu, name:String):NativeMenu
+		{
+			var menuItems:Array = menuObj.items;
+			var count:int = menuItems.length;
+			var index:int = 0;
+			var menuFound:Boolean = false;
+			while ((!menuFound) && (index < count))
+			{
+				if ((menuItems[index] as NativeMenuItem).label == name)
+					menuFound = true;
+
+				else
+					index ++;
+			}
+
+			if (menuFound)
+				return (menuItems[index] as NativeMenuItem).submenu;
+			else
+				return null;
+		}
+
+		private function getCompleteLabel(obj:NativeMenu):String
+		{
+			// we get the native menu , and the menu item.
+			// to replay we need the complete information about the heirarchy of the item,
+			// till the current selected menu item
+			var completeLabel:String = getMenuLabel(obj);
+			var parentObj:NativeMenu = obj.parent;
+
+			while ((parentObj)&&(parentObj.parent))
+			{
+				completeLabel = 	getMenuLabel(parentObj) + " ::-:: " +completeLabel;
+				parentObj = parentObj.parent;
+			}
+
+			return completeLabel;
+		}
+
+		private function getMenuLabel(item:NativeMenu):String
+		{
+			// nativemenu does not have the label. the menu item corresponding to that has the label.
+			// so we need to get the menu item corresponding to this menu.
+
+			var parentMenu:NativeMenu = item.parent;
+			if (!parentMenu)
+				return "";
+			var items:Array = parentMenu.items;
+			var count:int = items.length;
+			var index:int = 0;
+			var menuFound:Boolean = false;
+			var menuLabel:String = "";
+			while ((!menuFound) && (index < count))
+			{
+				if ((items[index] as NativeMenuItem).submenu == item)
+				{
+					menuFound = true;
+					menuLabel = (items[index] as NativeMenuItem).label;
+				}
+				index ++;
+			}
+
+			return menuLabel;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function createAutomationIDPart(child:IAutomationObject):Object
+		{
+			return null;
+		}
+
+		public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
+		{
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function resolveAutomationIDPart(criteria:Object):Array
+		{
+			return [];
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getAutomationChildren():Array
+		{
+			return null;
+		}
+
+		//-------------------------------------------------------------------------------------------
+		//
+		//    Event Handlers
+		//
+		//-------------------------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		protected function itemClickHandler(event:FlexNativeMenuEvent):void
+		{
+			var am:IAutomationManager = Automation.automationManager;
+			if (am && am.recording)
+			{
+				var automatedEvent:AutomationFlexNativeMenuEvent = new AutomationFlexNativeMenuEvent(AutomationFlexNativeMenuEvent.ITEM_CLICK);
+				var obj:NativeMenu = event.nativeMenu;
+				automatedEvent.args = getCompleteLabel(obj) + " ::-:: " + event.label;
+				am.recordAutomatableEvent(menu as IAutomationObject, automatedEvent, false);
+			}
+		}
+
+		/**
+		 *  @private
+		 */
+		protected function menuShowHandler(event:FlexNativeMenuEvent):void
+		{
+			var am:IAutomationManager = Automation.automationManager;
+			trace("In show");
+			if (am && am.recording)
+			{
+				var automatedEvent:AutomationFlexNativeMenuEvent = new AutomationFlexNativeMenuEvent(AutomationFlexNativeMenuEvent.MENU_SHOW);
+				var obj:NativeMenu = event.nativeMenu;
+				automatedEvent.args = getCompleteLabel(obj);
+				am.recordAutomatableEvent(menu as IAutomationObject, automatedEvent, false);
+			}
+		}
+	}
+
+}


170 Added some smarmy commends to ValidateUtil.isEmail. Too smarmy?

--- raw/src/org/yellcorp/string/ValidateUtil.as
+++ raw/src/org/yellcorp/string/ValidateUtil.as
@@ -7,11 +7,38 @@
         var atPos:int;
         var dotPos:int;

-        if (!email || email.length < 5) return false;
+        // shortest possible email is a@b.c -- 5 chars
+        // who knows, maybe they'll invent one-letter TLDs
+        if (!email || email.length < 5)
+        {
+            return false;
+        }
+
         atPos = email.lastIndexOf("@");
-        if (atPos <= 0 || atPos == email.length - 1) return false;
+        // check @ exists, and is neither the first or last character
+        if (atPos <= 0 || atPos == email.length - 1)
+        {
+            return false;
+        }
+
         dotPos = email.lastIndexOf(".");
-        if (dotPos <= atPos + 1 || dotPos == email.length - 1) return false;
+        // check . exists, and that the last occurrence of . is neither
+        // the last character, nor before the @
+        if (dotPos <= atPos + 1 || dotPos == email.length - 1)
+        {
+            return false;
+        }
+
+        // no further checks -- better to be permissive rather than
+        // overly restrictive.  a wide range of characters are
+        // actually permitted before the @, including extra @s
+
+        // here's a popular post on the subject
+        // http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx
+
+        // here's a popular regex on the subject
+        // http://cpansearch.perl.org/src/MAURICE/Email-Valid-0.14/Valid.pm
+
         return true;
     }
 }


Enhanced Attribute Inspector to display 'strike-out' visual cue in DropDownList editor having different values in multi-edit case.

--- Bin/Data/Scripts/Editor/AttributeEditor.as
+++ Bin/Data/Scripts/Editor/AttributeEditor.as
@@ -48,6 +48,7 @@
 UIElement@ SetValue(DropDownList@ element, int value, bool sameValue)
 {
     element.selection = sameValue ? value : M_MAX_UNSIGNED;
+    element.placeholder.children[0].visible = !sameValue;
     return element;
 }

@@ -194,6 +195,10 @@
         attrEdit.style = uiStyle;
         attrEdit.SetFixedHeight(ATTR_HEIGHT - 2);
         attrEdit.resizePopup = true;
+        Text@ placeHolderText = Text();
+        attrEdit.placeholder.AddChild(placeHolderText);
+        placeHolderText.style = uiStyle;
+        placeHolderText.text = STRIKED_OUT;
         attrEdit.vars["Index"] = index;
         attrEdit.vars["SubIndex"] = subIndex;
         attrEdit.SetLayout(LM_HORIZONTAL, 0, IntRect(4, 1, 4, 1));


Removed unnecessary support for NumberFormatter parameter in
formatNumber().

Change-Id: Iadba6e2a555e22d766f47f0cbb54d6ddd6bd43aa

--- WeaveCore/src/weave/compiler/StandardLib.as
+++ WeaveCore/src/weave/compiler/StandardLib.as
@@ -152,34 +152,31 @@
 		}

 		/**
+		 * This function will use a default NumberFormatter object to format a Number to a String.
 		 * @param number The number to format.
-		 * @param formatterOrPrecision The NumberFormatter to use, or a precision value to use for the default NumberFormatter.
-		 */
-		public static function formatNumber(number:Number, formatterOrPrecision:Object = null):String
-		{
-			var formatter:NumberFormatter = formatterOrPrecision as NumberFormatter;
-			if (formatter)
-				return formatter.format(number);
-
-			var precision:Number = asNumber(formatterOrPrecision);
+		 * @param precision A precision value to pass to the default NumberFormatter.
+		 * @see mx.formatters.NumberFormatter#format
+		 */
+		public static function formatNumber(number:Number, precision:Number = NaN):String
+		{
 			if (isFinite(precision))
 			{
-				_defaultNumberFormatter.precision = uint(precision);
+				_numberFormatter.precision = uint(precision);
 			}
 			else
 			{
 				if (Math.abs(number) < 1)
 					return String(number); // this fixes the bug where "0.1" gets converted to ".1" (we don't want the "0" to be lost)
-				_defaultNumberFormatter.precision = -1;
-			}
-
-			return _defaultNumberFormatter.format(number);
+				_numberFormatter.precision = -1;
+			}
+
+			return _numberFormatter.format(number);
 		}

 		/**
 		 * This is the default NumberFormatter to use inside the formatNumber() function.
 		 */
-		private static const _defaultNumberFormatter:NumberFormatter = new NumberFormatter();
+		private static const _numberFormatter:NumberFormatter = new NumberFormatter();

 		/**
 		 * This function returns -1 if the given value is negative, and 1 otherwise.


Transferred from the Adobe Open Source Subversion Repository

Revision: 11521
Author:   smgilson@adobe.com
Date:     2009-11-06T19:47:48.095501Z

Log Message:
-----------
ASDoc fixes for bugs FLEXDOCS-1102, FLEXDOCS-1103

QE notes: -
Doc notes: -
Bugs: - FLEXDOCS-1102, FLEXDOCS-1103
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.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/containers/TabNavigator.as</path>

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

--- frameworks/projects/mx/src/mx/containers/TabNavigator.as
+++ frameworks/projects/mx/src/mx/containers/TabNavigator.as
@@ -207,13 +207,15 @@
 [IconFile("TabNavigator.png")]

 /**
- *  The Halo TabNavigator container extends the Halo ViewStack container by including
- *  a TabBar container for navigating between its child Halo containers.
+ *  The MX TabNavigator container extends the MX ViewStack container by including
+ *  a TabBar container for navigating between its child containers.
  *
- *
Note: The direct children of a Halo navigator container must be
- *  Halo containers, either Halo layout or Halo navigator containers.
- *  You cannot directly nest a control or a Spark container within a navigator;
- *  they must be children of a child Halo container.

+ *
Note: The direct children of an MX navigator container must be
+ *  MX containers, either MX layout or MX navigator containers,
+ *  or the Spark NavigatorContent container.
+ *  You cannot directly nest a control or a Spark container
+ *  other than the Spark NavigatorContent container within a navigator;
+ *  they must be children of an child MX container.

  *
  *
Like a ViewStack container, a TabNavigator container has a collection
  *  of child containers, in which only one child at a time is visible.


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4271
Author:   anshulg@adobe.com
Date:     2008-12-10T05:42:29.977738Z

Log Message:
-----------
Checking in for netmon support for mx:DataService and mx:MessageService (for FB). We tested these changes with check in tests for network monitor. This has been reviewed by Seth Hodgson. No bugs were fixed with this change. No change in documentation in SDK. This needs to be backported to SDK3 (for support for SDK3 as well). This backporting would be done later.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.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/rpc/src/mx/messaging/MessageAgent.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/MessageAgent.as
+++ frameworks/projects/rpc/src/mx/messaging/MessageAgent.as
@@ -26,6 +26,7 @@
 import mx.messaging.events.ChannelEvent;
 import mx.messaging.events.ChannelFaultEvent;
 import mx.messaging.events.MessageAckEvent;
+import mx.messaging.events.MessageEvent;
 import mx.messaging.events.MessageFaultEvent;
 import mx.messaging.messages.AbstractMessage;
 import mx.messaging.messages.AcknowledgeMessage;
@@ -33,6 +34,7 @@
 import mx.messaging.messages.ErrorMessage;
 import mx.messaging.messages.IMessage;
 import mx.messaging.messages.MessagePerformanceUtils;
+import mx.netmon.NetworkMonitor;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
 import mx.utils.Base64Encoder;
@@ -675,7 +677,8 @@
                 flushClientIdWaitQueue();
         }

-        dispatchEvent(MessageAckEvent.createEvent(ackMsg, msg));
+        dispatchEvent(MessageAckEvent.createEvent(ackMsg, msg));
+        monitorRpcMessage(ackMsg,msg);
     }

     /**
@@ -727,8 +730,9 @@
                 flushClientIdWaitQueue();
         }

-        dispatchEvent(MessageFaultEvent.createEvent(errMsg));
-
+        dispatchEvent(MessageFaultEvent.createEvent(errMsg));
+        monitorRpcMessage(errMsg,msg);
+
         // If we get an authentication fault on the server and our authenticated
         // flag is true then the authentication fault must have been caused by a
         // session expiration on the server.  Set our authentication state to false.
@@ -1084,12 +1088,15 @@
             }

             channelSet.send(this, message);
+            monitorRpcMessage(message,message);
         }
         else if (destination.length > 0)
         {
             initChannelSet(message);
-            if (channelSet != null)
+            if (channelSet != null){
                 channelSet.send(this, message);
+                monitorRpcMessage(message,message);
+            }
         }
         else
         {
@@ -1098,7 +1105,39 @@
             throw new InvalidDestinationError(msg);
         }
     }
-
+
+    /**
+     * Monitor a rpc message that is being send
+    */
+
+    private function monitorRpcMessage(message:IMessage,actualMessage:IMessage):void
+    {
+        if (NetworkMonitor.isMonitoring())
+        {
+        	if (message is ErrorMessage)
+	        {
+	        		NetworkMonitor.monitorFault(actualMessage, MessageFaultEvent.createEvent(ErrorMessage(message)));
+	        }
+	        else if (message is AcknowledgeMessage)
+	        {
+	       	    	NetworkMonitor.monitorResult(message, MessageEvent.createEvent(MessageEvent.RESULT, actualMessage));
+	        }
+	        else{
+	        		NetworkMonitor.monitorInvocation(getNetmonId(), message);
+	        }
+
+        }
+    }
+
+	/**
+     * Return the id for the NetworkMonitor.
+     * @private
+     */
+    mx_internal function getNetmonId():String
+    {
+        return null;
+    }
+
     /**
      *  Used to automatically initialize the channelSet property for the
      *  MessageAgent before it connects for the first time.


Add type checking in Group constructor (warn when an object is not an IScene).

--- src/aerys/minko/scene/node/group/Group.as
+++ src/aerys/minko/scene/node/group/Group.as
@@ -66,12 +66,21 @@

 		private function initialize(children : Array) : void
 		{
+			_children = new Vector.<IScene>();
+
 			while (children.length == 1 && children[0] is Array)
 				children = children[0];
-
-			_numChildren = children.length;
-			_children = _numChildren ? Vector.<IScene>(children)
-									 : new Vector.<IScene>();
+
+			var childrenNum : uint = children.length;
+			for (var childrenIndex : uint = 0; childrenIndex < childrenNum; ++childrenIndex)
+			{
+				var child : IScene = children[childrenIndex] as IScene;
+
+				if (!child)
+					throw new Error("Constructor parameters must be IScene objects.");
+
+				addChild(child);
+			}
 		}

 		public function contains(scene : IScene) : Boolean


299 ErrorIDs: Some more common ones

299 ErrorIDs: Some more common ones

--- raw/src/org/yellcorp/lib/error/ErrorIDs.as
+++ raw/src/org/yellcorp/lib/error/ErrorIDs.as
@@ -2,8 +2,12 @@
 {
 public class ErrorIDs
 {
+    public static const CALL_NON_FUNCTION:uint = 1006;
+    public static const CALL_NEW_NON_CONSTRUCTOR:uint = 1007;
     public static const MEMBER_OF_NULL:uint = 1009;
     public static const MEMBER_OF_UNDEFINED:uint = 1010;
+    public static const ARGUMENT_COUNT_MISMATCH:uint = 1063;
+    public static const PROPERTY_NOT_FOUND:uint = 1069;

     public static const XML_ERROR_MIN:uint = 1090;
     public static const XML_MALFORMED_ELEMENT:uint = 1090;
@@ -15,6 +19,12 @@
     public static const XML_UNTERMINATED_ELEMENT:uint = 1096;
     public static const XML_UNTERMINATED_PI:uint = 1097;
     public static const XML_ERROR_MAX:uint = 1097;
+
+    public static const SCRIPT_TIMEOUT:uint = 1502;
+    public static const SCRIPT_TERMINATED:uint = 1503;
+
+    public static const NULL_ARGUMENT:uint = 1507;
+    public static const INVALID_ARGUMENT:uint = 1508;

     public static const SANDBOX_LOCAL_SPECIFIED_SECURITY_DOMAIN:uint = 2142;


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

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

 package mx.controls.olapDataGridClasses
 {


Don't make that const just to not use it.

--- runtime/src/main/as/flump/display/Movie.as
+++ runtime/src/main/as/flump/display/Movie.as
@@ -43,7 +43,6 @@
         _labels = src.labels;
         _frameRate = frameRate;
         _ticker = new Ticker(advanceTime);
-        const flipbook :Boolean = src.flipbook;
         if (src.flipbook) {
             _layers = new Vector.<Layer>(1, true);
             _layers[0] = new Layer(this, src.layers[0], idToDisplayObject, /*flipbook=*/true);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 12339
Author:   clucier@adobe.com
Date:     2009-12-01T22:28:31.107685Z

Log Message:
-----------
Reducing some of the event dispatching noise in the SDK.  Seeing pretty good results in our runtime performance tests and startup times... 5%-15% improvement over all.  This is about all we'll be able to commit to for Flex 4.0.  Added hasEventListener test before dispatching more of our lifecycle events.  Modified compiler binding code-gen to do the same.  Documented all public facing events where applicable to denote that they are no longer capturable by default.

QE notes: No
Doc notes: No
Bugs: SDK-24249
Reviewer: Alex
Tests run: Mustella, Checkin
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/BorderContainerSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.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/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.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/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientEntry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/State.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableSecondPassEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableProperty.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
+++ frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
@@ -1603,9 +1603,12 @@
      */
     private function dispatchInheritingStylesChangeEvent():void
     {
-        var event:Event = new FlexChangeEvent(FlexChangeEvent.STYLE_MANAGER_CHANGE,
-            false, false, {property: "inheritingStyles"});
-        dispatchEvent(event);
+        if (hasEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE))
+        {
+            var event:Event = new FlexChangeEvent(FlexChangeEvent.STYLE_MANAGER_CHANGE,
+                false, false, {property: "inheritingStyles"});
+            dispatchEvent(event);
+        }
     }

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


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

--- frameworks/projects/mx/src/mx/accessibility/DateFieldAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/DateFieldAccImpl.as
@@ -0,0 +1,271 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.accessibility
+{
+
+import flash.accessibility.Accessibility;
+import flash.events.Event;
+import mx.controls.DateField;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+use namespace mx_internal;
+
+/**
+ *  The DateFieldAccImpl class is the accessibility class for DateChooser.
+ *
+ *  @helpid
+ *  @tiptext This is the Button Accessibility Class.
+ *  @review
+ */
+public class DateFieldAccImpl extends AccImpl
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class initialization
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Static variable triggering the hookAccessibility() method.
+	 *  This is used for initializing DateFieldAccImpl class to hook its
+	 *  createAccessibilityImplementation() method to DateField class
+	 *  before it gets called from UIComponent.
+	 */
+	private static var accessibilityHooked:Boolean = hookAccessibility();
+
+	/**
+	 *  @private
+	 *  Static method for swapping the createAccessibilityImplementation()
+	 *  method of DateField with the DateFieldAccImpl class.
+	 */
+	private static function hookAccessibility():Boolean
+	{
+		DateField.createAccessibilityImplementation =
+			createAccessibilityImplementation;
+
+		return true;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_FOCUS:uint =  0x8005;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_SELECTION:uint =  0x8006;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Method for creating the Accessibility class. This
+	 *  method is called from UIComponent.
+	 *  @review
+	 */
+	mx_internal static function createAccessibilityImplementation(
+								component:UIComponent):void
+	{
+		component.accessibilityImplementation =
+			new DateFieldAccImpl(component);
+	}
+
+	/**
+	 *  Method call for enabling accessibility for a component.
+	 *  This method is required for the compiler to activate
+	 *  the accessibility classes for a component.
+	 */
+	public static function enableAccessibility():void
+	{
+		DateChooserAccImpl.enableAccessibility();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param master The UIComponent instance that this AccImpl instance
+	 *  is making accessible.
+	 */
+	public function DateFieldAccImpl(master:UIComponent)
+	{
+		super(master);
+
+		role = 0x2e;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var instructionsFlag:Boolean = false;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden properties: AccImpl
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  eventsToHandle
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *	Array of events that we should listen for from the master component.
+	 */
+	override protected function get eventsToHandle():Array
+	{
+		return super.eventsToHandle.concat([ "change", "focusIn", "focusOut", "open", "close" ]);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: AccessibilityImplementation
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  IAccessible method for returning the state of the DateField.
+	 *  States are predefined for all the components in MSAA.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return State uint
+	 *  @review
+	 */
+	override public function get_accState(childID:uint):uint
+	{
+		return getState(childID);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: AccImpl
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  method for returning the name of the DateField
+	 *  should return the selected date with weekday, month and year.
+	 *
+	 *  @param childID uint
+	 *
+	 *  @return Name String
+	 *  @review
+	 */
+	override protected function getName(childID:uint):String
+	{
+		var name:String = "Drop Down Calendar, ";
+
+		var dateField:DateField = DateField(master);
+
+		if (dateField.displayedMonth && !isNaN(dateField.displayedYear))
+		{
+			name += dateField.monthNames[dateField.displayedMonth] + " " +
+					dateField.displayedYear;
+		}
+
+		var instrString:String = ", to open press control down";
+
+		var selDate:Date = dateField.selectedDate;
+		if (selDate)
+		{
+			var tDate:String = "" + selDate.getDate() + " " +
+							   dateField.monthNames[selDate.getMonth()] + " " +
+							   selDate.getFullYear();
+
+			name = "Drop Down Calendar, " + tDate;
+		}
+
+		if (instructionsFlag)
+			name += instrString;
+
+		return name;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden event handlers: AccImpl
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Override the generic event handler.
+	 *  All AccImpl must implement this to listen
+	 *  for events from its master component.
+	 */
+	override protected function eventHandler(event:Event):void
+	{
+		switch (event.type)
+		{
+			case "change":
+			{
+				var childID:uint = 289; // not sure where 289 number has come from
+
+				var dateField:DateField = DateField(master);
+
+				// need to check != null for Date
+				if (dateField.selectedDate != null)
+					childID += dateField.selectedDate.getDate();
+
+				Accessibility.sendEvent(master, childID, EVENT_OBJECT_FOCUS);
+				Accessibility.sendEvent(master, childID, EVENT_OBJECT_SELECTION);
+				break;
+			}
+
+			case "close":
+			case "focusIn":
+			{
+				instructionsFlag = true;
+				break;
+			}
+
+			case "open":
+			case "focusOut":
+			{
+				instructionsFlag = false;
+				break;
+			}
+		}
+	}
+}
+
+}


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

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

 package mx.messaging.config
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7918
Author:   chaase@adobe.com
Date:     2009-06-17T16:55:30.271215Z

Log Message:
-----------
Round 2 of effects PARB changes. Some renames and removals of properties/functions, including:
AnimateTransform: removed 18 MotionPath properties, added applyChangesPostLayout property (replaces affectLayout property in subclasses), removed addMotionPath/addPostLayoutMotionPath protected functions
Animation: removed seek(), reverse()
SimpleMotionPath: removed 'duration' arg in constructor

QE Notes: Mustella will break on some of these changes (no surprise, just needs minor updates)
Doc Notes: API updates
Bugs: none
Reviewer: Jason
Tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransform.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransform.as
@@ -48,30 +48,6 @@
  *  This effect works by combining all current transform effects
  *  on a target into one single effect instance for that target.
  *
- *
The transform is controlled by animating the properties of
- *  translation (translationX, translationY,
- *  and translationZ),
- *  rotation (rotationX, rotationY,
- *  and rotationZ), and
- *  scale (scaleX, scaleY, scaleZ).
- *  If any of
- *  these properties are not provided in the set of MotionPath objects
- *  for this effect, then it is assumed that these properties can
- *  be derived from the object and are not changing during the course
- *  of this effect.

- *
- *
Note that the translation properties
- *  (translationX, translationY,
- *  and translationZ)
- *  specify how much the transform center of the target moves during
- *  the animation, not the absolute locations of the x, y, and z
- *  coordinate of the target. Typically, these mean the same thing
- *  because the transform center of the target is at (0, 0, 0) by default.

- *
- *
But if you explicitly set the location of the transform center, or set
- *  the autoCenterTransform property to true,
- *  the transform center of the target is not (0, 0, 0).

- *
  *
While this combination of multiple transform effects happens
  *  internally,
  *  it does force certain constraints that should be considered:

@@ -94,8 +70,13 @@
  *
An additional constraint of this effect and its subclasses is that
  *  the target must be of type UIComponent or GraphicElement (or a subclass
  *  of those classes), or any other object which has similarly
- *  defined and implements the transformAround() and
+ *  defined and implemented transformAround() and
  *  transformPointToParent() functions.

+ *
+ *
This effect is not intended to be used directly, but rather exposes
+ *  common functionality used by its subclasses. To use transform effects,
+ *  use the subclass effects (Move, Move3D, Scale, Scale3D, Rotate, and
+ *  Rotate3D).

  *
  *  @mxml
  *
@@ -108,6 +89,7 @@
  *    Properties
  *    id="ID"
  *    applyLocalProjection="false"
+ *    applyChangesPostLayout="false"
  *    autoCenterProjection="true"
  *    autoCenterTransform="false"
  *    fieldOfView="no default"
@@ -258,26 +240,38 @@
     // catch the stop() case.
     private var transformCenterPerTarget:Dictionary = new Dictionary(true);

-    /**
-     * @private
-     * This flag is set when any of the translationXYZ, rotationXYZ, scaleXYZ
-     * motion path properties are set directly
-     */
-    private var transformPropertiesSet:Boolean = false;
-
-    /**
-     * @private
-     * This flag is set when any of the post layout translationXYZ, rotationXYZ, scaleXYZ
-     * motion path properties are set directly
-     */
-    private var postLayoutTransformPropertiesSet:Boolean = false;
-
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------

+    //----------------------------------
+    //  applyChangesPostLayout
+    //----------------------------------
+    [Inspectable(category="General")]
+    private var _applyChangesPostLayout:Boolean = false;
+    /**
+     *  This flag is used by the subclasses of AnimateTransform to specify
+     *  whether the effect changes transform values used by the layout
+     *  manager, or whether it changes values used after layout is run.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get applyChangesPostLayout():Boolean
+    {
+        return _applyChangesPostLayout;
+    }
+    public function set applyChangesPostLayout(value:Boolean):void
+    {
+        _applyChangesPostLayout = value;
+    }
+
     //----------------------------------
     //  autoCenterTransform
     //----------------------------------
@@ -390,641 +384,6 @@
      *  @productversion Flex 4
      */
     public var transformZ:Number;
-
-    //----------------------------------
-    //  translationX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the translationX property
-     */
-    private var _translationX:MotionPath;
-    /**
-     *  The MotionPath object describing the change in x during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get translationX():MotionPath
-    {
-        return _translationX;
-    }
-    public function set translationX(value:MotionPath):void
-    {
-        _translationX = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _translationX.property = "translationX";
-        }
-    }
-
-    //----------------------------------
-    //  translationY
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the translationY property
-     */
-    private var _translationY:MotionPath;
-    /**
-     *  The MotionPath object describing the change in y during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get translationY():MotionPath
-    {
-        return _translationY;
-    }
-    public function set translationY(value:MotionPath):void
-    {
-        _translationY = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _translationY.property = "translationY";
-        }
-    }
-
-    //----------------------------------
-    //  translationX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the translationZ property
-     */
-    private var _translationZ:MotionPath;
-    /**
-     *  The MotionPath object describing the change in z during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get translationZ():MotionPath
-    {
-        return _translationZ;
-    }
-    public function set translationZ(value:MotionPath):void
-    {
-        _translationZ = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _translationZ.property = "translationZ";
-        }
-    }
-
-    //----------------------------------
-    //  rotationX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the rotationX property
-     */
-    private var _rotationX:MotionPath;
-    /**
-     *  The MotionPath object describing the change in rotation around the x
-     *  axis during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get rotationX():MotionPath
-    {
-        return _rotationX;
-    }
-    public function set rotationX(value:MotionPath):void
-    {
-        _rotationX = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _rotationX.property = "rotationX";
-        }
-    }
-
-    //----------------------------------
-    //  rotationY
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the rotationY property
-     */
-    private var _rotationY:MotionPath;
-    /**
-     *  The MotionPath object describing the change in rotation around the y
-     *  axis during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get rotationY():MotionPath
-    {
-        return _rotationY;
-    }
-    public function set rotationY(value:MotionPath):void
-    {
-        _rotationY = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _rotationY.property = "rotationY";
-        }
-    }
-
-    //----------------------------------
-    //  rotationZ
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the rotationZ property
-     */
-    private var _rotationZ:MotionPath;
-    /**
-     *  The MotionPath object describing the change in rotation around the z
-     *  axis during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get rotationZ():MotionPath
-    {
-        return _rotationZ;
-    }
-    public function set rotationZ(value:MotionPath):void
-    {
-        _rotationZ = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _rotationZ.property = "rotationZ";
-        }
-    }
-
-    //----------------------------------
-    //  scaleX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the scaleX property
-     */
-    private var _scaleX:MotionPath;
-    /**
-     *  The MotionPath object describing the change in scale in the x direction
-     *  during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get scaleX():MotionPath
-    {
-        return _scaleX;
-    }
-    public function set scaleX(value:MotionPath):void
-    {
-        _scaleX = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _scaleX.property = "scaleX";
-        }
-    }
-
-    //----------------------------------
-    //  scaleY
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the scaleY property
-     */
-    private var _scaleY:MotionPath;
-    /**
-     *  The MotionPath object describing the change in scale in the y direction
-     *  during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get scaleY():MotionPath
-    {
-        return _scaleY;
-    }
-    public function set scaleY(value:MotionPath):void
-    {
-        _scaleY = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _scaleY.property = "scaleY";
-        }
-    }
-
-    //----------------------------------
-    //  scaleZ
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the scaleZ property
-     */
-    private var _scaleZ:MotionPath;
-    /**
-     *  The MotionPath object describing the change in scale in the z direction
-     *  during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  and can cause the parent container to update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get scaleZ():MotionPath
-    {
-        return _scaleZ;
-    }
-    public function set scaleZ(value:MotionPath):void
-    {
-        _scaleZ = value;
-        if (value)
-        {
-            transformPropertiesSet = true;
-            _scaleZ.property = "scaleZ";
-        }
-    }
-
-
-    //----------------------------------
-    //  postLayoutTranslationX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutTranslationX property
-     */
-    private var _postLayoutTranslationX:MotionPath;
-    /**
-     *  The MotionPath describing the change in x during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutTranslationX():MotionPath
-    {
-        return _postLayoutTranslationX;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutTranslationX(value:MotionPath):void
-    {
-        _postLayoutTranslationX = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutTranslationX.property = "postLayoutTranslationX";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutTranslationY
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutTranslationY property
-     */
-    private var _postLayoutTranslationY:MotionPath;
-    /**
-     *  The MotionPath describing the change in y during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutTranslationY():MotionPath
-    {
-        return _postLayoutTranslationY;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutTranslationY(value:MotionPath):void
-    {
-        _postLayoutTranslationY = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutTranslationY.property = "postLayoutTranslationY";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutTranslationX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutTranslationZ property
-     */
-    private var _postLayoutTranslationZ:MotionPath;
-    /**
-     *  The MotionPath describing the change in z during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutTranslationZ():MotionPath
-    {
-        return _postLayoutTranslationZ;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutTranslationZ(value:MotionPath):void
-    {
-        _postLayoutTranslationZ = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutTranslationZ.property = "postLayoutTranslationZ";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutRotationX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutRotationX property
-     */
-    private var _postLayoutRotationX:MotionPath;
-    /**
-     *  The MotionPath object describing the change in rotation of the target
-     *  around the x axis during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutRotationX():MotionPath
-    {
-        return _postLayoutRotationX;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutRotationX(value:MotionPath):void
-    {
-        _postLayoutRotationX = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutRotationX.property = "postLayoutRotationX";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutRotationY
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutRotationY property
-     */
-    private var _postLayoutRotationY:MotionPath;
-    /**
-     *  The MotionPath describing the change in rotation of the target
-     *  around the y axis during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutRotationY():MotionPath
-    {
-        return _postLayoutRotationY;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutRotationY(value:MotionPath):void
-    {
-        _postLayoutRotationY = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutRotationY.property = "postLayoutRotationY";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutRotationZ
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutRotationZ property
-     */
-    private var _postLayoutRotationZ:MotionPath;
-    /**
-     *  The MotionPath describing the change in rotation of the target
-     *  around the z axis during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutRotationZ():MotionPath
-    {
-        return _postLayoutRotationZ;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutRotationZ(value:MotionPath):void
-    {
-        _postLayoutRotationZ = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutRotationZ.property = "postLayoutRotationZ";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutScaleX
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutScaleX property
-     */
-    private var _postLayoutScaleX:MotionPath;
-    /**
-     *  The MotionPath describing the change in scale of the target
-     *  in the x direction during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutScaleX():MotionPath
-    {
-        return _postLayoutScaleX;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutScaleX(value:MotionPath):void
-    {
-        _postLayoutScaleX = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutScaleX.property = "postLayoutScaleX";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutScaleY
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutScaleY property
-     */
-    private var _postLayoutScaleY:MotionPath;
-    /**
-     *  The MotionPath describing the change in scale of the target in the y direction
-     *  during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutScaleY():MotionPath
-    {
-        return _postLayoutScaleY;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutScaleY(value:MotionPath):void
-    {
-        _postLayoutScaleY = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutScaleY.property = "postLayoutScaleY";
-        }
-    }
-
-    //----------------------------------
-    //  postLayoutScaleZ
-    //----------------------------------
-
-    /**
-     * @private
-     * Storage for the postLayoutScaleZ property
-     */
-    private var _postLayoutScaleZ:MotionPath;
-    /**
-     *  The MotionPath describing the change in scale of the target in the z direction
-     *  during the effect.
-     *  Setting this property as part of an effect modifies the target,
-     *  but the parent container ignores the changes and does not update its layout.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get postLayoutScaleZ():MotionPath
-    {
-        return _postLayoutScaleZ;
-    }
-    /**
-     * @private
-     */
-    public function set postLayoutScaleZ(value:MotionPath):void
-    {
-        _postLayoutScaleZ = value;
-        if (value)
-        {
-            postLayoutTransformPropertiesSet = true;
-            _postLayoutScaleZ.property = "postLayoutScaleZ";
-        }
-    }
-

     //--------------------------------------------------------------------------
@@ -1269,9 +628,7 @@
                 // we still need to capture default start values, so let's initialize the offsets
                 // to a default set anyway.
             if(postLayoutTransformPropertiesSet && target.postLayoutTransformOffsets == null)
-                {
             	target.postLayoutTransformOffsets = new TransformOffsets();
-                }

                 // if the target doesn't have any offsets, there's no need to capture
                 // offset values.
@@ -1628,6 +985,8 @@
     }

     /**
+     *  @private
+     *
      *  Adds a MotionPath object to the transform effect with the
      *  given parameters.
      *  If a MotionPath object
@@ -1647,17 +1006,18 @@
      *  @param valueBy An optional parameter that specifies the delta with
      *  which to calculate either the from or to values, if one is omitted.
      */
-    protected function addPostLayoutMotionPath(property:String,
+    mx_internal function addPostLayoutMotionPath(property:String,
         valueFrom:Number = NaN, valueTo:Number = NaN, valueBy:Number = NaN):void
     {
         if(isNaN(valueFrom) && isNaN(valueTo) && isNaN(valueBy))
            return;

-        postLayoutTransformPropertiesSet = true;
         addMotionPath(property,valueFrom,valueTo,valueBy);
     }

     /**
+     *  @private
+     *
      *  Adds a MotionPath object to the transform effect with the
      *  given parameters.
      *  If a MotionPath object
@@ -1674,7 +1034,7 @@
      *  @param valueBy An optional parameter that specifies the delta with
      *  which to calculate either the from or to values, if one is omitted.
      */
-    protected function addMotionPath(property:String,
+    mx_internal function addMotionPath(property:String,
         valueFrom:Number = NaN, valueTo:Number = NaN, valueBy:Number = NaN):void
     {
         // First, nail down the from value with to/by, if possible
@@ -1728,6 +1088,21 @@
             (!(value is Number) && value !== null));
     }

+    /**
+     * @private
+     * Determine whether we are dealing with any post-layout properties
+     */
+    private function get postLayoutTransformPropertiesSet():Boolean
+    {
+        if (motionPaths)
+            for (var i:int = 0; i < motionPaths.length; ++i)
+            {
+                if (motionPaths[i].property.indexOf("postLayout", 0) == 0)
+                    return true;
+            }
+        return false;
+    }
+

     /**
@@ -1747,34 +1122,8 @@
             AnimateTransformInstance(instance);

-        if (transformPropertiesSet)
-        {
-            if (!motionPaths)
-                motionPaths = new Vector.<MotionPath>();
-            if (_translationX)
-                motionPaths.push(_translationX);
-            if (_translationY)
-                motionPaths.push(_translationY);
-            if (_translationZ)
-                motionPaths.push(_translationZ);
-            if (_rotationX)
-                motionPaths.push(_rotationX);
-            if (_rotationY)
-                motionPaths.push(_rotationY);
-            if (_rotationZ)
-                motionPaths.push(_rotationZ);
-            if (_scaleX)
-                motionPaths.push(_scaleX);
-            if (_scaleY)
-                motionPaths.push(_scaleY);
-            if (_scaleZ)
-                motionPaths.push(_scaleZ);
-        }
         if (postLayoutTransformPropertiesSet)
         {
-            if (!motionPaths)
-                motionPaths = new Vector.<MotionPath>();
-
             // there are two ways we can be affecting post-layout values.
             // first, if the user has explicity asked the motion paths to be post layout by setting the motionPathsAffectLayout
             // flag.  In that case, we can assume that they need an offsets object if one doesn't already exist.
@@ -1782,25 +1131,6 @@
             // offsets must already exist.
 	        if(target.postLayoutTransformOffsets == null)
 	            target.postLayoutTransformOffsets = new TransformOffsets();
-
-            if (_postLayoutTranslationX)
-                motionPaths.push(_postLayoutTranslationX);
-            if (_postLayoutTranslationY)
-                motionPaths.push(_postLayoutTranslationY);
-            if (_postLayoutTranslationZ)
-                motionPaths.push(_postLayoutTranslationZ);
-            if (_postLayoutRotationX)
-                motionPaths.push(_postLayoutRotationX);
-            if (_postLayoutRotationY)
-                motionPaths.push(_postLayoutRotationY);
-            if (_postLayoutRotationZ)
-                motionPaths.push(_postLayoutRotationZ);
-            if (_postLayoutScaleX)
-                motionPaths.push(_postLayoutScaleX);
-            if (_postLayoutScaleY)
-                motionPaths.push(_postLayoutScaleY);
-            if (_postLayoutScaleZ)
-                motionPaths.push(_postLayoutScaleZ);
         }
         // Feed startDelay directly into keyframe times
         if (motionPaths)


Transferred from the Adobe Open Source Subversion Repository

Revision: 2724
Author:   egeorgie@adobe.com
Date:     2008-08-04T17:33:18.787713Z

Log Message:
-----------
Add target property to ILayoutItem
Make ILayoutItemUIC work with IUIComponent
Switch Group.GetLayoutItemAt() to return ILayoutItem

Reviewed by Ryan, Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemFDO.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/intf/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemUIC.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -107,7 +107,7 @@
         var totalCount:uint = count; // How many items will be laid out
         for (var i:int = 0; i < count; i++)
         {
-            var layoutItem:ILayoutItem = LayoutItemFactory.getLayoutItemFor(layoutTarget.getLayoutItemAt(i));
+            var layoutItem:ILayoutItem = layoutTarget.getLayoutItemAt(i);
             if (!layoutItem || !layoutItem.includeInLayout)
             {
             	totalCount--;
@@ -149,7 +149,7 @@
         var totalCount:uint = count; // How many items will be laid out
         for (var i:int = 0; i < count; i++)
         {
-            var layoutItem:ILayoutItem = LayoutItemFactory.getLayoutItemFor(layoutTarget.getLayoutItemAt(i));
+            var layoutItem:ILayoutItem = layoutTarget.getLayoutItemAt(i);
             if (!layoutItem || !layoutItem.includeInLayout)
             {
             	totalCount--;


adding a check to not send invalid GET reauests

--- src/com/google/analytics/core/GIFRequest.as
+++ src/com/google/analytics/core/GIFRequest.as
@@ -16,6 +16,7 @@
  * Contributor(s):
  *   Zwetan Kjukov <zwetan@gmail.com>.
  *   Marc Alcaraz <ekameleon@gmail.com>.
+ *   Nick Mihailovski <nickski15@gmail.com>.
  */

 package com.google.analytics.core
@@ -33,7 +34,7 @@
     import flash.events.SecurityErrorEvent;
     import flash.net.URLRequest;
     import flash.system.LoaderContext;
-
+
     /**
      * Google Analytics Tracker Code (GATC)'s GIF request module.
      * This file encapsulates all the necessary components that are required to
@@ -41,6 +42,14 @@
      */
     public class GIFRequest
     {
+        /**
+         * The largest URI request length allowed by Google Analytics
+         * collectors. Requests URI lengths greater than this value will not
+         * be processed by Google Analytics.
+         * @private
+         */
+        private static const MAX_REQUEST_LENGTH:Number = 2048;
+
         private var _config:Configuration;
         private var _debug:DebugConfiguration;
         private var _buffer:Buffer;
@@ -51,7 +60,7 @@

         private var _count:int;
         private var _alertcount:int;
-
+
         /**
         * @private
         * contains the list of the different requests
@@ -334,8 +343,22 @@
             target.removeEventListener( Event.COMPLETE, onComplete );
         }

+        /*
+         * Sends a request to the server. Google Analytics collectors only
+         * support URIs < 2048 characters in length. If the request is too
+         * long, they will not get processed. Instead of sending erroneous
+         * data, this library will silently drop requests greater than the
+         * max request length.
+         * @param request The URLRequest object with the data to send to
+         *     Google Analytics.
+         */
         public function sendRequest( request:URLRequest ):void
         {
+            if (request.url.length > MAX_REQUEST_LENGTH)
+            {
+               _debug.failure("No request sent. URI length too long.");
+               return;
+            }

             /* note:
                when the gif request is send too fast
@@ -371,8 +394,8 @@
         }

         /**
-        * Send the Gif Request to the server(s).
-        */
+         * Send the Gif Request to the server(s).
+         */
         public function send( account:String, variables:Variables = null,
                               force:Boolean = false, rateLimit:Boolean = false ):void
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 13136
Author:   deeptika@adobe.com
Date:     2009-12-22T01:40:28.524956Z

Log Message:
-----------
Fix for FLEXENT-1196 (Replay of click on NavigatorContent does not close the combobox)

We need not record OPEN event when it is triggered from a KeyBoard event that types a character. Replaying the type event would automatically open the drop down.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkComboBoxAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkDropDownListBaseAutomationImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkDropDownListBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkDropDownListBaseAutomationImpl.as
@@ -109,6 +109,7 @@
 		//--------------------------------------------------------------------------
 		// variable added to track the opening
 		private var isOpen:Boolean = false;
+		protected var isKeyTypeEvent:Boolean = false;
 		/**
 		 *  @private
 		 */
@@ -125,7 +126,12 @@
 					sparkDropDownListBase.dataGroup.addEventListener(
 						RendererExistenceEvent.RENDERER_REMOVE, dataGroup_rendererRemoveHandler, false, 0 , true);
 				}
-				recordAutomatableEvent(event);
+				// Record the open event only if it is not triggered by typing a character
+				// This value is set to true by ComboBox when a key that types a value
+				// (basically when non-navigational key) is pressed.
+				if(!isKeyTypeEvent)
+					recordAutomatableEvent(event);
+
 				if(sparkDropDownListBase.dropDown)
 				{
 					sparkDropDownListBase.dropDown.addEventListener(AutomationRecordEvent.RECORD,
@@ -146,6 +152,8 @@
 			}
 			else
 			{
+				// Reset the isKeyTypeEvent on closing the dropDown.
+				isKeyTypeEvent = false;
 				if (sparkDropDownListBase.dropDown)
 					sparkDropDownListBase.dropDown.removeEventListener(AutomationRecordEvent.RECORD, dropdown_recordHandler);
 			}


added Weave.prototype.removeObject()

added Weave.prototype.removeObject()

--- WeaveJS/src/Weave.as
+++ WeaveJS/src/Weave.as
@@ -140,6 +140,14 @@
 			return null;
 		}

+		/**
+		 * Removes an object at the given path.
+		 * @param path The path
+		 */
+		public function removeObject(path:Array/*/<string|number>/*/):void
+		{
+			requestObject(path, null);
+		}

 		//////////////////////////////////////////////////////////////////////////////////
 		// static functions for linkable objects


switch to interfaces so it works on Buttons

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/UIUtils.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/UIUtils.as
@@ -19,7 +19,8 @@
 package org.apache.flex.utils
 {
 	import org.apache.flex.core.IPopUpHost;
-	import org.apache.flex.core.UIBase;
+    import org.apache.flex.core.IChild;
+	import org.apache.flex.core.IUIBase;

 	/**
 	 *  The UIUtils class is a collection of static functions that provide utility
@@ -52,7 +53,7 @@
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public static function center( item:UIBase, relativeTo:UIBase ):void
+		public static function center( item:IUIBase, relativeTo:IUIBase ):void
 		{
 			var xpos:Number = (relativeTo.width - item.width)/2;
 			var ypos:Number = (relativeTo.height - item.height)/2;
@@ -74,10 +75,10 @@
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public static function findPopUpHost(start:UIBase):IPopUpHost
+		public static function findPopUpHost(start:IUIBase):IPopUpHost
 		{
-			while( start != null && !(start is IPopUpHost) ) {
-				start = start.parent as UIBase;
+			while( start != null && !(start is IPopUpHost) && start is IChild ) {
+				start = IChild(start).parent as IUIBase;
 			}

 			return start as IPopUpHost;
@@ -94,7 +95,7 @@
 		 *  @playerversion AIR 2.6
 		 *  @productversion FlexJS 0.0
 		 */
-		public static function removePopUp(popUp:UIBase):void
+		public static function removePopUp(popUp:IChild):void
 		{
 			var host:IPopUpHost = popUp.parent as IPopUpHost;
 			host.removeElement(popUp);


Transferred from the Adobe Open Source Subversion Repository

Revision: 23017
Author:   jasonsj@adobe.com
Date:     2011-10-15T00:41:19.242956Z

Log Message:
-----------
Restore start values on pop-up after soft keyboard is deactivated due to pop-up closing or orientation change. Fix logic for capturing start values before blocking external changes to start values. Simplify soft keyboard effect state tracking.

QE notes: None
Doc notes: None
Bugs:
SDK-31842 SPUC SK Effects [iOS] [Android] : SPUC does not resize on landscape
Reviewer: tkraikit
Tests run: checkintests, cyclone SK effects w/ Lavayna
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/Callout.as
+++ frameworks/projects/mobilecomponents/src/spark/components/Callout.as
@@ -787,7 +787,7 @@
         // and explicit max sizes aren't set, then invalidate size here so that
         // callout's max size is applied.
         if (!canSkipMeasurement() && !isMaxSizeSet)
-            invalidateSize();
+            skin.invalidateSize();
     }

     /**
@@ -1628,6 +1628,19 @@
      */
     private function systemManager_resizeHandler(event:Event):void
     {
+        // Watch out for explicit sizes temporarily set by a soft keyboard
+        // resize effect. canSkipMeasurement() will return false unless these
+        // values are cleared.
+        if (isSoftKeyboardEffectActive)
+        {
+            // Clear temporary explicit sizes
+            if (!softKeyboardEffectExplicitWidthFlag)
+                width = NaN;
+
+            if (!softKeyboardEffectExplicitHeightFlag)
+                height = NaN;
+        }
+
         // Screen resize might require a new arrow direction and callout position
         invalidatePosition();
     }