Transferred from the Adobe Open Source Subversion Repository

Revision: 19859
Author:   deeptika@adobe.com
Date:     2011-01-21T05:08:25.901634Z

Log Message:
-----------
Fixing NPE in case of null contentGroup

QE notes:
Doc notes:
Bugs: FLEXENT-1337 (SkinnableContainerSkin with optional contentGroup causes Automation Exception)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkApplicationAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSkinnableContainerAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkPanelAutomationImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSkinnableContainerAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSkinnableContainerAutomationImpl.as
@@ -11,381 +11,387 @@

 package spark.automation.delegates.components
 {
-    import flash.display.DisplayObject;
-    import flash.events.Event;
-    import flash.events.KeyboardEvent;
-    import flash.events.MouseEvent;
-
-    import mx.automation.Automation;
-    import mx.automation.IAutomationObject;
-    import mx.automation.IAutomationObjectHelper;
-    import mx.core.EventPriority;
-    import mx.core.mx_internal;
-
-    import spark.automation.delegates.components.supportClasses.SparkSkinnableContainerBaseAutomationImpl;
-    import spark.automation.tabularData.SkinnableContainerTabularData;
-    import spark.components.Scroller;
-    import spark.components.SkinnableContainer;
-    import spark.core.IViewport;
-
-    use namespace mx_internal;
-
-
-
-    [Mixin]
-    /**
-     *
-     *  Defines the methods and properties required to perform instrumentation for the
-     *  SkinnableContainer class.
-     *
-     *  @see spark.components.SkinnableContainer
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     *
-     */
-    public class SparkSkinnableContainerAutomationImpl extends SparkSkinnableContainerBaseAutomationImpl
-    {
-        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.5
-         *  @productversion Flex 4
-         */
-        public static function init(root:DisplayObject):void
-        {
-            Automation.registerDelegateClass(spark.components.SkinnableContainer, SparkSkinnableContainerAutomationImpl);
-
-        }
-
-        /**
-         *  Constructor.
-         * @param obj SkinnableContainer object to be automated.
-         *
-         *  @langversion 3.0
-         *  @playerversion Flash 9
-         *  @playerversion AIR 1.5
-         *  @productversion Flex 4
-         */
-        public function SparkSkinnableContainerAutomationImpl(obj:spark.components.SkinnableContainer)
-        {
-            super(obj);
-
-            obj.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler,
-                false, EventPriority.DEFAULT+1, true );
-            obj.addEventListener(MouseEvent.CLICK, clickHandler, false, EventPriority.DEFAULT+1, true);
-        }
-
-
-        /**
-         *  @private
-         */
-        private function get container():spark.components.SkinnableContainer
-        {
-            return uiComponent as spark.components.SkinnableContainer;
-        }
-
-
-
-
-        //----------------------------------
-        //  automationName
-        //----------------------------------
-
-        /**
-         *  @private
-         */
-        override public function get automationName():String
-        {
-            return container.id || super.automationName;
-        }
-
-        //----------------------------------
-        //  automationValue
-        //----------------------------------
-
-        /**
-         *  @private
-         */
-        override public function get automationValue():Array
-        {
-            if (container.id && container.id.length != 0)
-                return [ container.id ];
-
-            var result:Array = [];
-            var childList:Array = getAutomationChildren();
-            var n:int = childList ? childList.length : 0;
-            for (var i:int = 0; i < n; i++)
-            {
-                var child:IAutomationObject = childList[i];
-                if(child != null) // we can have non automation elements like graphic elements also.
-                {
-                    var x:Array = child.automationValue;
-                    if (x && x.length != 0)
-                        result.push(x);
-                }
-            }
-
-            return result;
-        }
-
-        //--------------------------------------------------------------------------
-        //
-        //  Overridden methods
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         */
-
-        override public function replayAutomatableEvent(event:Event):Boolean
-        {
-            if (event is MouseEvent && event.type == MouseEvent.MOUSE_WHEEL)
-            {
-                // the mouse wheel happens on the content group
-                var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-                help.replayMouseEvent(container.contentGroup, event as MouseEvent);
-                return true;
-            }
-            else if (event is KeyboardEvent)
-            {
-                // the key board events happens on the scroller.
-                var scroller:spark.components.Scroller = getScroller(container,container.contentGroup);
-                if(!scroller)
-                    scroller = getInternalScroller();
-
-                if(scroller)
-                {
-                    var helper:IAutomationObjectHelper = Automation.automationObjectHelper;
-                    if(helper)
-                        helper.replayKeyboardEvent(scroller,event as KeyboardEvent);
-
-                }
-            }
-
-            return super.replayAutomatableEvent(event);
-        }
-
-
-        /**
-         *  @private
-         */
-        override public function createAutomationIDPart(child:IAutomationObject):Object
-        {
-            var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-            return help.helpCreateIDPart(uiAutomationObject, child);
-        }
-
-        /**
-         *  @private
-         */
-        override public function resolveAutomationIDPart(part:Object):Array
-        {
-            var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-            return help.helpResolveIDPart(uiAutomationObject, part);
-        }
-
-        /**
-         *  @private
-         */
-        override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
-        {
-            var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-            return help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child,properties);
-
-        }
-
-
-
-        /**
-         *  @private
-         */
-        protected function getInternalScroller():spark.components.Scroller
-        {
-            var chilArray:Array = new Array();
-            var n:int = container.contentGroup.numChildren;
-
-            for (var i:int = 0; i<n ; i++)
-            {
-                var obj:Object = container.contentGroup.getChildAt(i);
-                // here if are getting scrollers, we need to add the viewport's children as the actual children
-                // instead of the scroller
-                if(obj is spark.components.Scroller)
-                    return obj as spark.components.Scroller;
-            }
-            return null;
-        }
-
-        /**
-         *  @private
-         */
-
-        override public function get numAutomationChildren():int
-        {
-
-            var objArray:Array = getAutomationChildren();
-            return (objArray?objArray.length:0);
-        }
-
-        /**
-         *  @private
-         */
-
-        override public function getAutomationChildAt(index:int):IAutomationObject
-        {
-            var numChildren:int = container.contentGroup.numChildren;
-            if(index < numChildren )
-                return   container.contentGroup.getChildAt(index) as IAutomationObject;
-            else
-            {
-                index = index - numChildren;
-                var scrollBars:Array = getScrollBars(container,container.contentGroup);
-                if(scrollBars && index < scrollBars.length)
-                    return scrollBars[index];
-            }
-
-
-            return null;
-        }
-
-
-        /**
-         *  @private
-         */
-        override public function getAutomationChildren():Array
-        {
-
-            var chilArray:Array = new Array();
-            var n:int = container.contentGroup.numChildren;
-
-            for (var i:int = 0; i<n ; i++)
-            {
-                var obj:Object = container.contentGroup.getChildAt(i);
-                // here if are getting scrollers, we need to add the viewport's children as the actual children
-                // instead of the scroller
-                if(obj is spark.components.Scroller)
-                {
-                    var scroller:spark.components.Scroller = obj as spark.components.Scroller;
-                    var viewPort:IViewport =  scroller.viewport;
-                    if(viewPort is IAutomationObject)
-                        chilArray.push(viewPort);
-                    if(scroller.horizontalScrollBar)
-                        chilArray.push(scroller.horizontalScrollBar);
-                    if(scroller.verticalScrollBar)
-                        chilArray.push(scroller.verticalScrollBar);
-                }
-                else
-                    chilArray.push(obj);
-            }
-            var scrollBars:Array = getScrollBars(null,container.contentGroup);
-            n = scrollBars? scrollBars.length : 0;
-
-            for ( i=0; i<n ; i++)
-            {
-                chilArray.push(scrollBars[i]);
-            }
-
-
-            return chilArray;
-        }
-
-
-        //----------------------------------
-        //  automationTabularData
-        //----------------------------------
-
-        /**
-         *  @private
-         */
-
-        override public function get automationTabularData():Object
-        {
-            return new SkinnableContainerTabularData(uiAutomationObject);
-        }
-
-
-        //--------------------------------------------------------------------------
-        //
-        //  Event handlers
-        //
-        //--------------------------------------------------------------------------
-
-        /**
-         *  @private
-         */
-
-        /**
-         *  @private
-         */
-
-        private function mouseWheelHandler(event:MouseEvent):void
-        {
-            if( isEventTargetApplicabale(event)  )
-                recordAutomatableEvent(event, true);
-        }
-
-        /**
-         *  @private
-         */
-        private function isEventTargetApplicabale(event:Event):Boolean
-        {
-            // we decide to continue with the mouse events when they are
-            // on the same container group
-
-            return (event.target == container.contentGroup);
-        }
-        /**
-         *  @private
-         */
-        protected function clickHandler(event:MouseEvent):void
-        {
-            if(isEventTargetApplicabale(event))
-            {
-                //var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.CLICK);
-                recordAutomatableEvent(event);
-            }
-        }
-
-        /**
-         *  @private
-         */
-        override protected function keyDownHandler(event:KeyboardEvent):void
-        {
-
-            if( event.target == getInternalScroller()||
-                (event.target == getScroller(container,container.contentGroup)))
-                recordAutomatableEvent(event);
-        }
-
-        /**
-         *  @private
-         */
-        public function getContainerChildren():Array
-        {
-            var tempArray:Array = new Array();
-            var n:int = container.numChildren;
-            for(var i:int=0; i<n ; i++)
-            {
-                tempArray.push(container.getChildAt(i));
-            }
-
-            return tempArray;
-        }
-
-    }
-
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.events.KeyboardEvent;
+	import flash.events.MouseEvent;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.core.EventPriority;
+	import mx.core.mx_internal;
+
+	import spark.automation.delegates.components.supportClasses.SparkSkinnableContainerBaseAutomationImpl;
+	import spark.automation.tabularData.SkinnableContainerTabularData;
+	import spark.components.Scroller;
+	import spark.components.SkinnableContainer;
+	import spark.core.IViewport;
+
+	use namespace mx_internal;
+
+
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines the methods and properties required to perform instrumentation for the
+	 *  SkinnableContainer class.
+	 *
+	 *  @see spark.components.SkinnableContainer
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
+	 *
+	 */
+	public class SparkSkinnableContainerAutomationImpl extends SparkSkinnableContainerBaseAutomationImpl
+	{
+		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.5
+		 *  @productversion Flex 4
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.SkinnableContainer, SparkSkinnableContainerAutomationImpl);
+
+		}
+
+		/**
+		 *  Constructor.
+		 * @param obj SkinnableContainer object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.5
+		 *  @productversion Flex 4
+		 */
+		public function SparkSkinnableContainerAutomationImpl(obj:spark.components.SkinnableContainer)
+		{
+			super(obj);
+
+			obj.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler,
+				false, EventPriority.DEFAULT+1, true );
+			obj.addEventListener(MouseEvent.CLICK, clickHandler, false, EventPriority.DEFAULT+1, true);
+		}
+
+
+		/**
+		 *  @private
+		 */
+		private function get container():spark.components.SkinnableContainer
+		{
+			return uiComponent as spark.components.SkinnableContainer;
+		}
+
+
+
+
+		//----------------------------------
+		//  automationName
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationName():String
+		{
+			return container.id || super.automationName;
+		}
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationValue():Array
+		{
+			if (container.id && container.id.length != 0)
+				return [ container.id ];
+
+			var result:Array = [];
+			var childList:Array = getAutomationChildren();
+			var n:int = childList ? childList.length : 0;
+			for (var i:int = 0; i < n; i++)
+			{
+				var child:IAutomationObject = childList[i];
+				if(child != null) // we can have non automation elements like graphic elements also.
+				{
+					var x:Array = child.automationValue;
+					if (x && x.length != 0)
+						result.push(x);
+				}
+			}
+
+			return result;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+
+		override public function replayAutomatableEvent(event:Event):Boolean
+		{
+			if (event is MouseEvent && event.type == MouseEvent.MOUSE_WHEEL)
+			{
+				// the mouse wheel happens on the content group
+				var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+				help.replayMouseEvent(container.contentGroup, event as MouseEvent);
+				return true;
+			}
+			else if (event is KeyboardEvent)
+			{
+				// the key board events happens on the scroller.
+				var scroller:spark.components.Scroller = getScroller(container,container.contentGroup);
+				if(!scroller)
+					scroller = getInternalScroller();
+
+				if(scroller)
+				{
+					var helper:IAutomationObjectHelper = Automation.automationObjectHelper;
+					if(helper)
+						helper.replayKeyboardEvent(scroller,event as KeyboardEvent);
+
+				}
+			}
+
+			return super.replayAutomatableEvent(event);
+		}
+
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPart(child:IAutomationObject):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help.helpCreateIDPart(uiAutomationObject, child);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function resolveAutomationIDPart(part:Object):Array
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help.helpResolveIDPart(uiAutomationObject, part);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			return help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child,properties);
+
+		}
+
+
+
+		/**
+		 *  @private
+		 */
+		protected function getInternalScroller():spark.components.Scroller
+		{
+			var chilArray:Array = new Array();
+			if(container.contentGroup)
+			{
+				var n:int = container.contentGroup.numChildren;
+
+				for (var i:int = 0; i<n ; i++)
+				{
+					var obj:Object = container.contentGroup.getChildAt(i);
+					// here if are getting scrollers, we need to add the viewport's children as the actual children
+					// instead of the scroller
+					if(obj is spark.components.Scroller)
+						return obj as spark.components.Scroller;
+				}
+			}
+			return null;
+		}
+
+		/**
+		 *  @private
+		 */
+
+		override public function get numAutomationChildren():int
+		{
+
+			var objArray:Array = getAutomationChildren();
+			return (objArray?objArray.length:0);
+		}
+
+		/**
+		 *  @private
+		 */
+
+		override public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			var numChildren:int = container.contentGroup.numChildren;
+			if(index < numChildren )
+				return   container.contentGroup.getChildAt(index) as IAutomationObject;
+			else
+			{
+				index = index - numChildren;
+				var scrollBars:Array = getScrollBars(container,container.contentGroup);
+				if(scrollBars && index < scrollBars.length)
+					return scrollBars[index];
+			}
+
+
+			return null;
+		}
+
+
+		/**
+		 *  @private
+		 */
+		override public function getAutomationChildren():Array
+		{
+
+			var chilArray:Array = new Array();
+			if(container.contentGroup)
+			{
+				var n:int = container.contentGroup.numChildren;
+
+				for (var i:int = 0; i<n ; i++)
+				{
+					var obj:Object = container.contentGroup.getChildAt(i);
+					// here if are getting scrollers, we need to add the viewport's children as the actual children
+					// instead of the scroller
+					if(obj is spark.components.Scroller)
+					{
+						var scroller:spark.components.Scroller = obj as spark.components.Scroller;
+						var viewPort:IViewport =  scroller.viewport;
+						if(viewPort is IAutomationObject)
+							chilArray.push(viewPort);
+						if(scroller.horizontalScrollBar)
+							chilArray.push(scroller.horizontalScrollBar);
+						if(scroller.verticalScrollBar)
+							chilArray.push(scroller.verticalScrollBar);
+					}
+					else
+						chilArray.push(obj);
+				}
+			}
+			var scrollBars:Array = getScrollBars(null,container.contentGroup);
+			n = scrollBars? scrollBars.length : 0;
+
+			for ( i=0; i<n ; i++)
+			{
+				chilArray.push(scrollBars[i]);
+			}
+
+
+			return chilArray;
+		}
+
+
+		//----------------------------------
+		//  automationTabularData
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+
+		override public function get automationTabularData():Object
+		{
+			return new SkinnableContainerTabularData(uiAutomationObject);
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Event handlers
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+
+		/**
+		 *  @private
+		 */
+
+		private function mouseWheelHandler(event:MouseEvent):void
+		{
+			if( isEventTargetApplicabale(event)  )
+				recordAutomatableEvent(event, true);
+		}
+
+		/**
+		 *  @private
+		 */
+		private function isEventTargetApplicabale(event:Event):Boolean
+		{
+			// we decide to continue with the mouse events when they are
+			// on the same container group
+
+			return (event.target == container.contentGroup);
+		}
+		/**
+		 *  @private
+		 */
+		protected function clickHandler(event:MouseEvent):void
+		{
+			if(isEventTargetApplicabale(event))
+			{
+				//var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.CLICK);
+				recordAutomatableEvent(event);
+			}
+		}
+
+		/**
+		 *  @private
+		 */
+		override protected function keyDownHandler(event:KeyboardEvent):void
+		{
+
+			if( event.target == getInternalScroller()||
+				(event.target == getScroller(container,container.contentGroup)))
+				recordAutomatableEvent(event);
+		}
+
+		/**
+		 *  @private
+		 */
+		public function getContainerChildren():Array
+		{
+			var tempArray:Array = new Array();
+			var n:int = container.numChildren;
+			for(var i:int=0; i<n ; i++)
+			{
+				tempArray.push(container.getChildAt(i));
+			}
+
+			return tempArray;
+		}
+
+	}
+
 }


Fixed bug in stepBackward() where current position changed when history stack wasn't actually moved through

--- src/org/robotlegs/utilities/undoablecommand/CommandHistory.as
+++ src/org/robotlegs/utilities/undoablecommand/CommandHistory.as
@@ -31,16 +31,14 @@

 		public function stepForward():void {
 			if (canStepForward) {
-				_historyStack[currentPosition].execute();
+				_historyStack[currentPosition++].execute();
 			}
-			currentPosition++;
 		}

 		public function stepBackward():void {
 			if (canStepBackward) {
-				_historyStack[currentPosition - 1].undo();
+				_historyStack[--currentPosition].undo();
 			}
-			currentPosition--;
 		}

 		public function rewind():void {


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

--- frameworks/projects/rpc/src/mx/rpc/http/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/http/Operation.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.rpc.http
 {


patched the BasicShader to flip the normal when triangle culling == front

--- src/aerys/minko/render/effect/basic/BasicShader.as
+++ src/aerys/minko/render/effect/basic/BasicShader.as
@@ -98,8 +98,10 @@
 	 */
 	public class BasicShader extends Shader
 	{
-		private var _vertexAnimationPart	: VertexAnimationShaderPart;
-		private var _diffuseShaderPart		: DiffuseShaderPart;
+		private var _vertexAnimationPart	: VertexAnimationShaderPart	= null;
+		private var _diffuseShaderPart		: DiffuseShaderPart			= null;
+
+		private var _vertexNormal			: SFloat					= null;

 		protected function get diffuse() : DiffuseShaderPart
 		{
@@ -190,6 +192,16 @@
 		 */
 		override protected function getVertexPosition() : SFloat
 		{
+			var triangleCulling	: uint	= meshBindings.getConstant(
+				BasicProperties.TRIANGLE_CULLING, TriangleCulling.BACK
+			);
+
+			_vertexNormal = _vertexAnimationPart.getAnimatedVertexNormal();
+			// flip the normal when the triangle culling is flipped
+			if (triangleCulling == TriangleCulling.FRONT)
+				_vertexNormal = multiply(vertexNormal, float4(-1, -1, -1, 1));
+			_vertexNormal = deltaLocalToWorld(_vertexNormal);
+
 			return localToScreen(
 				_vertexAnimationPart.getAnimatedVertexPosition()
 			);
@@ -201,36 +213,32 @@
 		 */
 		override protected function getPixelColor() : SFloat
 		{
-			var diffuse			: SFloat = _diffuseShaderPart.getDiffuse();
-			var vertexNormal	: SFloat = _vertexAnimationPart.getAnimatedVertexNormal();
+			var diffuse	: SFloat = _diffuseShaderPart.getDiffuse();

 			// directional lighting
 			if (sceneBindings.getConstant('lightEnabled', false)
 				&& meshBindings.getConstant('lightEnabled', false))
 			{
-				var lightDirection	: SFloat = sceneBindings.getParameter("lightDirection", 3);
-				var normal			: SFloat = normalize(
-					interpolate(
-						float4(multiply3x3(vertexNormal, localToWorldMatrix), 1)
-					)
-				);
+				var lightDirection	: SFloat = sceneBindings.getParameter('lightDirection', 3);
+				var normal			: SFloat = normalize(interpolate(_vertexNormal));
+
 				var lambert			: SFloat = saturate(negate(dotProduct3(
 					normal,
 					normalize(lightDirection)
 				)));

-				lambert.scaleBy(sceneBindings.getParameter("lightDiffuse", 1));
+				lambert.scaleBy(sceneBindings.getParameter('lightDiffuse', 1));

 				var lightColor		: SFloat = add(
 					// ambient
 					multiply(
-						sceneBindings.getParameter("lightAmbient", 1),
-						sceneBindings.getParameter("lightAmbientColor", 3)
+						sceneBindings.getParameter('lightAmbient', 1),
+						sceneBindings.getParameter('lightAmbientColor', 3)
 					),
 					// diffuse
 					multiply(
 						lambert,
-						sceneBindings.getParameter("lightDiffuseColor", 3)
+						sceneBindings.getParameter('lightDiffuseColor', 3)
 					)
 				);


Transferred from the Adobe Open Source Subversion Repository

Revision: 4593
Author:   jimurphy@adobe.com
Date:     2009-01-20T14:40:09.728921Z

Log Message:
-----------
Merged 3.x revisions 4591

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/framework/src/mx/controls/SWFLoader.as
+++ frameworks/projects/framework/src/mx/controls/SWFLoader.as
@@ -1744,7 +1744,6 @@

             contentHolder.x = x;
             contentHolder.y = y;
-
         }
         else
         {
@@ -1764,32 +1763,27 @@
                     {
                         var sizeSet:Boolean = false;

-                            if (holder.contentLoaderInfo.contentType == "application/x-shockwave-flash")
+                        if (holder.contentLoaderInfo.contentType == "application/x-shockwave-flash")
                         {
-                                                        if (childAllowsParent)
-                                                        {
-                                                                if (holder.content is IFlexDisplayObject)
-                                                                {
-                                                                        IFlexDisplayObject(holder.content).setActualSize(w, h);
-                                                                        sizeSet = true;
-                                                                }
-                                                        }
-
-                                                        if (!sizeSet)
-                                                        {
-                                                                if (swfBridge)
-                                                                {
-                                                                        swfBridge.dispatchEvent(new SWFBridgeRequest(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, false, false, null,
-                                                                                { width: w, height: h}));
-                                                                        sizeSet = true;
-                                                                }
-                                                        }
+                            if (childAllowsParent)
+                            {
+                                if (holder.content is IFlexDisplayObject)
+                                {
+                                    IFlexDisplayObject(holder.content).setActualSize(w, h);
+                                    sizeSet = true;
+                                }
+                            }
+
+                            if (!sizeSet && swfBridge)
+                            {
+                                swfBridge.dispatchEvent(new SWFBridgeRequest(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST,
+                                                        false, false, null,
+                                                        { width: w, height: h}));
+                                sizeSet = true;
+                            }
                         }
-//                        if (holder.content is IFlexDisplayObject)
-//                        {
-//                            IFlexDisplayObject(holder.content).setActualSize(w, h);
-//                        }
-                        else
+
+                        if (!sizeSet)
                         {
                             // Bug 142705 - we can't just set width and height here. If the SWF content
                             // does not fill the stage, the width/height of the content holder is NOT
@@ -1801,15 +1795,12 @@
                             {
                                 contentHolder.scaleX = w / lInfo.width;
                                 contentHolder.scaleY = h / lInfo.height;
-                                sizeSet = true;
                             }
-                        }
-
-                        // set the size of the loader now if we haven't set the content size yet.
-                        if (!sizeSet)
-                        {
-                            contentHolder.width = w;
-                            contentHolder.height = h;
+                            else
+                            {
+                                contentHolder.width = w;
+                                contentHolder.height = h;
+                            }
                         }
                     }
                     else if (childAllowsParent &&
@@ -1826,9 +1817,9 @@
                 }

                 if (!parentAllowsChild)
-                        contentHolder.scrollRect = new Rectangle(0, 0,
-                                                                                w / contentHolder.scaleX,
-                                                                                h / contentHolder.scaleY);
+                    contentHolder.scrollRect = new Rectangle(0, 0,
+                                                             w / contentHolder.scaleX,
+                                                             h / contentHolder.scaleY);
             }
             else
             {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 18131
Author:   hmuller@adobe.com
Date:     2010-10-11T22:43:35.924917Z

Log Message:
-----------
IDataGridElement and some minor Doc/API changes:

Defined IDataGridElement.  Grid and ColumnHeaderBar implement it.

Removed the Grid gridOwner property.  The IDataGridElement dataGrid property serves the same purpose.

Added public grid ColumnHeaderBar property that's set/cleared by DataGrid partAdded/Removed().  ColumnHeaderBar is now responsible for syncing its scroll position with its grid.

Removed DataGrid headerRenderer property and headerColunmSeparator skin part.  These values can be changed by reconfiguring the default skin.

Corrected GridItemEditor event type metadata in DataGrid.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IDataGridElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/GridItemEditorEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -280,7 +280,7 @@
  *
  *
If this event is cancelled the item editor will not be created.

  *
- *  @eventType spark.events.DataGridEditEvent.START_GRID_ITEM_EDITOR_SESSION
+ *  @eventType spark.events.GridItemEditorEvent.START_GRID_ITEM_EDITOR_SESSION
  *
  *  @see spark.components.DataGrid.itemEditorInstance
  *  @see flash.events.Event
@@ -290,12 +290,12 @@
  *  @playerversion AIR 2.0
  *  @productversion Flex 4.5
  */
-[Event(name="startGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+[Event(name="startGridItemEditorSession", type="spark.events.GridItemEditorEvent")]

 /**
  *  Dispatched immediately after an item editor has been opened.
  *
- *  @eventType spark.events.DataGridEditEvent.OPEN_GRID_ITEM_EDITOR_SESSION
+ *  @eventType spark.events.GridItemEditorEvent.OPEN_GRID_ITEM_EDITOR_SESSION
  *
  *  @see spark.components.DataGrid.itemEditorInstance
  *
@@ -304,13 +304,13 @@
  *  @playerversion AIR 2.0
  *  @productversion Flex 4.5
  */
-[Event(name="openGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+[Event(name="openGridItemEditorSession", type="spark.events.GridItemEditorEvent")]

 /**
  *  Dispatched after the data in item editor has been saved into the data provider
  *  and the editor has been closed.
  *
- *  @eventType spark.events.DataGridEditEvent.SAVE_GRID_ITEM_EDITOR_SESSION
+ *  @eventType spark.events.GridItemEditorEvent.SAVE_GRID_ITEM_EDITOR_SESSION
  *
  *  @see spark.components.DataGrid.itemEditorInstance
  *
@@ -319,12 +319,12 @@
  *  @playerversion AIR 2.0
  *  @productversion Flex 4.5
  */
-[Event(name="saveGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+[Event(name="saveGridItemEditorSession", type="spark.events.GridItemEditorEvent")]

 /**
  *  Dispatched after the item editor has been closed without saving its data.
  *
- *  @eventType spark.events.DataGridEditEvent.CANCEL_GRID_ITEM_EDITOR_SESSION
+ *  @eventType spark.events.GridItemEditorEvent.CANCEL_GRID_ITEM_EDITOR_SESSION
  *
  *  @see spark.components.DataGrid.itemEditorInstance
  *
@@ -333,7 +333,7 @@
  *  @playerversion AIR 2.0
  *  @productversion Flex 4.5
  */
-[Event(name="cancelGridItemEditorSession", type="spark.events.DataGridEditEvent")]
+[Event(name="cancelGridItemEditorSession", type="spark.events.GridItemEditorEvent")]

 //--------------------------------------
 //  Other metadata
@@ -494,18 +494,6 @@
      *  A reference to the Grid that displays the dataProvider.
      */
     public var grid:spark.components.Grid;
-
-    //----------------------------------
-    //  headerColumnSeparator
-    //----------------------------------
-
-    [Bindable]
-    [SkinPart(required="false", type="mx.core.IFactory")]
-
-    /**
-     *  The IVisualElement class used to render the vertical separator between header columns.
-     */
-    public var headerColumnSeparator:IFactory;

     //----------------------------------
     //  hoverIndicator
@@ -1210,50 +1198,7 @@
     {
         if (setGridProperty("itemRenderer", value))
             dispatchChangeEvent("itemRendererChanged");
-    }
-
-    //----------------------------------
-    //  headerRenderer
-    //----------------------------------
-
-    [Bindable("headeRendererChanged")]
-
-    private var _headerRenderer:IFactory;
-
-    /**
-     *  The default headerRenderer for the columnHeaderBar skin part.
-     *
-     *  @default null
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4.5
-     */
-    public function get headerRenderer():IFactory
-    {
-        return _headerRenderer;
-    }
-
-    /**
-     *  @private
-     */
-    public function set headerRenderer(value:IFactory):void
-    {
-        if (value == _headerRenderer)
-            return;
-
-        _headerRenderer = value;
-
-        if (columnHeaderBar)
-        {
-            columnHeaderBar.layout.clearVirtualLayoutCache();
-            columnHeaderBar.invalidateSize();
-            columnHeaderBar.invalidateDisplayList();
-        }
-
-        dispatchChangeEvent("headerRendererChanged");
-    }
+    }

     //----------------------------------
     //  preserveSelection (delegates to grid.preserveSelection)
@@ -1801,7 +1746,7 @@
             grid.gridDimensions = layout.gridDimensions = gridDimensions;
             gridSelection.grid = grid;
             grid.gridSelection = gridSelection;
-            grid.gridOwner = this;
+            grid.dataGrid = this;

             // Grid cover Properties

@@ -1832,7 +1777,6 @@
             grid.addEventListener(GridEvent.GRID_ROLL_OUT, grid_RollOutHandler);
             grid.addEventListener(GridCaretEvent.CARET_CHANGE, grid_caretChangeHandler);
             grid.addEventListener(FlexEvent.VALUE_COMMIT, grid_valueCommitHandler);
-            grid.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, grid_changeEventHandler);

             // Deferred operations (grid selection updates)

@@ -1841,8 +1785,14 @@
             deferredGridOperations.length = 0;

             // Data grid editor
+
             editor = createEditor();
             editor.initialize();
+
+            // IDataGridElements: grid, columnHeaderBar
+
+            if (columnHeaderBar)
+                columnHeaderBar.dataGrid = this;
         }

         if (instance == alternatingRowColorsBackground)
@@ -1868,21 +1818,15 @@

         if (instance == columnHeaderBar)
         {
-            columnHeaderBar.owner = this;
-            columnHeaderBar.columnSeparator = headerColumnSeparator;
+            if (grid)
+                columnHeaderBar.dataGrid = this;

             columnHeaderBar.addEventListener(GridEvent.SEPARATOR_ROLL_OVER, separator_rollOverHandler);
             columnHeaderBar.addEventListener(GridEvent.SEPARATOR_ROLL_OUT, separator_rollOutHandler);
             columnHeaderBar.addEventListener(GridEvent.SEPARATOR_MOUSE_DOWN, separator_mouseDownHandler);
             columnHeaderBar.addEventListener(GridEvent.SEPARATOR_MOUSE_DRAG, separator_mouseDragHandler);
             columnHeaderBar.addEventListener(GridEvent.SEPARATOR_MOUSE_UP, separator_mouseUpHandler);
-        }
-
-        if (columnHeaderBar)
-        {
-            if (instance == headerColumnSeparator)
-                columnHeaderBar.columnSeparator = headerColumnSeparator;
-        }
+        }
     }

     /**
@@ -1901,7 +1845,7 @@
             grid.layout = null;
             gridSelection.grid = null;
             grid.gridSelection = null;
-            grid.gridOwner = null;
+            grid.dataGrid = null;

             // Event Handlers

@@ -1911,7 +1855,6 @@
             grid.removeEventListener(GridEvent.GRID_ROLL_OUT, grid_RollOutHandler);
             grid.removeEventListener(GridCaretEvent.CARET_CHANGE, grid_caretChangeHandler);
             grid.removeEventListener(FlexEvent.VALUE_COMMIT, grid_valueCommitHandler);
-            grid.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, grid_changeEventHandler);

             // Cover Properties

@@ -1935,11 +1878,17 @@
             grid.selectionIndicator = null;

             // Data grid editor
+
             if (editor)
             {
                 editor.uninitialize();
                 editor = null;
             }
+
+            // IDataGridElements: grid, columnHeaderBar
+
+            if (columnHeaderBar)
+                columnHeaderBar.dataGrid = null;
         }

         if (grid)
@@ -1962,21 +1911,12 @@

         if (instance == columnHeaderBar)
         {
-            columnHeaderBar.horizontalScrollPosition = 0;
-            columnHeaderBar.owner = null;
-            columnHeaderBar.columnSeparator = null;
-
+            columnHeaderBar.dataGrid = null;
             columnHeaderBar.removeEventListener(GridEvent.SEPARATOR_ROLL_OVER, separator_rollOverHandler);
             columnHeaderBar.removeEventListener(GridEvent.SEPARATOR_ROLL_OUT, separator_rollOutHandler);
             columnHeaderBar.removeEventListener(GridEvent.SEPARATOR_MOUSE_DOWN, separator_mouseDownHandler);
             columnHeaderBar.removeEventListener(GridEvent.SEPARATOR_MOUSE_DRAG, separator_mouseDragHandler);
             columnHeaderBar.removeEventListener(GridEvent.SEPARATOR_MOUSE_UP, separator_mouseUpHandler);
-        }
-
-        if (columnHeaderBar)
-        {
-            if (instance == headerColumnSeparator)
-                columnHeaderBar.columnSeparator = null;
         }
     }

@@ -2904,12 +2844,12 @@
     /**
      *  Starts an editor session on a selected cell in the data grid.
      *
-     *  A startItemEditorSession event is dispatch before
-     *  an item editor is created. This allows a listener a change to
-     *  dynamically set an item editor for a specified cell.
-     *
-     *  The event can be cancelled which will prevent the editor session
-     *  from being created.
+     *  A startItemEditorSession event is dispatched before
+     *  an item editor is created. This allows a listener dynamically change
+     *  the item editor for a specified cell.
+     *
+     *  The event can also be cancelled with preventDefault(), to prevent the
+     *  editor session from being created.
      *
      *  @param rowIndex The zero-based row index of the cell to edit.
      *  @param columnIndex The zero-based column index of the cell to edit.
@@ -3565,15 +3505,6 @@
             dispatchEvent(event);
     }

-    /**
-     *  @private
-     */
-    protected function grid_changeEventHandler(event:PropertyChangeEvent):void
-    {
-        if (columnHeaderBar && event.property == "horizontalScrollPosition")
-            columnHeaderBar.horizontalScrollPosition = Number(event.newValue);
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Header event handlers


Transferred from the Adobe Open Source Subversion Repository

Revision: 10357
Author:   jimurphy@adobe.com
Date:     2009-09-17T21:13:02.502084Z

Log Message:
-----------
Merged beta2 revisions 10309,10320-10321,10333-10335,10342,10347-10348 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeClassInfo.java</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/TLFText.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/TypeAnalyzer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ApplicationSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -365,9 +365,9 @@

     /**
      *  @private
-     *  Holds the last recorded value of the textFlow generation.  Used to
-     *  determine whether to return immediately from damage event if there
-     *  have been no changes.
+     *  Holds the last recorded value of the textFlow generation for _textFlow.
+     *  Used to determine whether to return immediately from damage event if
+     *  there have been no changes.
      */
     private var lastGeneration:uint = 0;    // 0 means not set

@@ -424,7 +424,10 @@
         	// If 'content' was last set,
         	// we have to first turn that into a TextFlow.
         	if (_content != null)
+            {
 	        	_textFlow = createTextFlowFromContent(_content);
+                lastGeneration = _textFlow.generation;
+            }

             // Once we have a TextFlow, we can export its plain text.
             _text = staticPlainTextExporter.export(
@@ -690,6 +693,8 @@
 				_textFlow = createTextFlowFromContent(_content);
 			else
 				_textFlow = staticPlainTextImporter.importToFlow(_text);
+
+            lastGeneration = _textFlow ? _textFlow.generation : 0;
 		}

 		return _textFlow;
@@ -1066,16 +1071,19 @@
      */
     private function textFlow_damageHandler(event:DamageEvent):void
     {
-        //trace("damageHandler", "damageStart", event.damageStart, "damageLength", event.damageLength);
-
-        // No changes so don't recompose.  The TextFlowFactory
+        // If the target is the current textFlow then check the generation.
+        // If there are no changes, don't recompose.  The TextFlowFactory
         // createTextLines dispatches damage events every time the textFlow
         // is composed, even if there are no changes.
-        if (_textFlow.generation == lastGeneration)
-            return;
-
-        lastGeneration = _textFlow.generation;
-
+        if (TextFlow(event.target) == _textFlow)
+        {
+            if (_textFlow.generation == lastGeneration)
+                return;
+
+            // Update the last know generation for _textFlow.
+            lastGeneration = _textFlow.generation;
+        }
+
         // Invalidate _text and _content.
         _text = null;
         _content = null;


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

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

 package mx.charts.effects
 {


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

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

 package mx.core
 {


Fixed loading child UIElement.

Fixed loading child UIElement.

--- Bin/Data/Scripts/Editor/EditorUIElement.as
+++ Bin/Data/Scripts/Editor/EditorUIElement.as
@@ -93,6 +93,8 @@

 bool CloseUIElement()
 {
+    ui.cursor.shape = CS_BUSY;
+
     suppressUIElementChanges = true;

     for (uint i = 0; i < selectedUIElements.length; ++i)
@@ -111,6 +113,8 @@

 bool CloseAllUIElements()
 {
+    ui.cursor.shape = CS_BUSY;
+
     suppressUIElementChanges = true;

     editorUIElement.RemoveAllChildren();
@@ -137,7 +141,30 @@

 void LoadChildUIElement(const String&in fileName)
 {
-    // TODO
+    if (fileName.empty)
+        return;
+
+    ui.cursor.shape = CS_BUSY;
+
+    if (!fileSystem.FileExists(fileName))
+    {
+        log.Error("No such file: " + fileName);
+        return;
+    }
+
+    File file(fileName, FILE_READ);
+    if (!file.open)
+        return;
+
+    XMLFile@ xmlFile = XMLFile();
+    xmlFile.Load(file);
+
+    suppressUIElementChanges = true;
+
+    if (editUIElement.LoadXML(xmlFile, uiElementDefaultStyle !is null ? uiElementDefaultStyle : uiStyle))
+        UpdateHierarchyItem(editUIElement.children[editUIElement.numChildren - 1]);
+
+    suppressUIElementChanges = false;
 }

 void SaveChildUIElement(const String&in fileName)


Transferred from the Adobe Open Source Subversion Repository

Revision: 1643
Author:   jimurphy@adobe.com
Date:     2008-05-09T18:33:13.556782Z

Log Message:
-----------
Merged 3.0.x revisions [1587,1601,1607] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/lib/batik-LICENSE.txt</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/commons-logging-NOTICE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/commons-logging-LICENSE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/commons-discovery-LICENSE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/xalan-NOTICE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/xalan-LICENSE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/mm-velocity-NOTICE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DragSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/mm-velocity-LICENSE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/commons-collections-LICENSE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/batik-NOTICE.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/xerces-LICENSE.txt</path>

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -4050,11 +4050,20 @@
     }

     /**
-     *  Determines if the item renderer for a data provider item
-     *  is editable.
+     *  Determines whether to allow editing of a dataprovider item on a per-row basis.
+     *  The default implementation of this method only checks the editable property
+     *  of the DataGrid and returns false if editable is false
+     *  or if the dataprovider item is null.
+     *
+     *
This method can be overridden to allow fine-grained control of which dataprovider items
+     *  are editable. For example, if you want to disallow editing of grouping rows or summary rows
+     *  you would override this method with custom logic to this behavior.

      *
-     *  @param data The data provider item.
-     *  @return true if the item is editable.
+     *  @param data The data provider item. The default implementation of this method returns
+     *  false if the data object is null.
+     *
+     *  @return The default behavior is to return true if the DataGrid's editable property is
+     *  true and the data object is not null.
      */
     public function isItemEditable(data:Object):Boolean
     {


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

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

 package mx.utils
 {


android impl

android impl

--- application/src/MainApplication.as
+++ application/src/MainApplication.as
@@ -87,6 +87,8 @@
         {
             CONFIG::desktop
             {
+                this.width = 500;
+                this.height = 500;
                 var visibleBounds:Rectangle = Screen.mainScreen.visibleBounds;
                 this.move(visibleBounds.width / 2 - this.width / 2, visibleBounds.height / 2 - this.height / 2);
                 this.title = "DemoHID";


FEC-130 #time 2h #comment send stats-reportError event on "media not found" error #resolved

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -1,5 +1,6 @@
 package com.kaltura.kdpfl.view.media
 {
+	import com.kaltura.commands.stats.StatsReportError;
 	import com.kaltura.kdpfl.controller.media.LiveStreamCommand;
 	import com.kaltura.kdpfl.model.ConfigProxy;
 	import com.kaltura.kdpfl.model.MediaProxy;
@@ -26,6 +27,7 @@
 	import flash.events.Event;
 	import flash.events.MouseEvent;
 	import flash.events.TimerEvent;
+	import flash.net.URLRequestMethod;
 	import flash.utils.Timer;
 	import flash.utils.setTimeout;

@@ -42,11 +44,12 @@
 	import org.osmf.events.TimeEvent;
 	import org.osmf.media.MediaPlayer;
 	import org.osmf.media.MediaPlayerState;
+	import org.osmf.media.URLResource;
 	import org.osmf.traits.DynamicStreamTrait;
 	import org.osmf.traits.MediaTraitType;
 	import org.osmf.traits.TimeTrait;
 	import org.puremvc.as3.interfaces.INotification;
-	import org.puremvc.as3.patterns.mediator.Mediator;
+	import org.puremvc.as3.patterns.mediator.Mediator;

 	/**
 	 * Mediator for the KMediaPlayer component
@@ -165,6 +168,10 @@
 		public var ignorePlaybackComplete:Boolean;

 		public var dvrWinSize:Number = 0;
+		/**
+		 * osmf sometimes sends duplicate errors, indicates that error wasn't sent for current media yet
+		 */
+		private var _mediaErrorSent:Boolean = false;

 		/**
 		 * Constructor
@@ -312,7 +319,8 @@
 				NotificationType.VIDEO_METADATA_RECEIVED,
 				NotificationType.PLAYER_PLAY_END,
 				NotificationType.MEDIA_ELEMENT_READY,
-				NotificationType.GO_LIVE
+				NotificationType.GO_LIVE,
+				NotificationType.MEDIA_ERROR
 			];
 		}

@@ -372,6 +380,7 @@
 					_doSwitchSent = false;
 					_hasPlayed = false;
 					ignorePlaybackComplete = false;
+					_mediaErrorSent = false;
 					//Fixed weird issue, where the CHANGE_MEDIA would be caught by the mediator
 					// AFTER the new media has already loaded. Caused media never to be loaded.
 					if (designatedEntryId != _mediaProxy.vo.entry.id || _mediaProxy.vo.isFlavorSwitching )
@@ -677,6 +686,35 @@
 						sendNotification(NotificationType.DO_PLAY);
 					}
 					break;
+
+				case NotificationType.MEDIA_ERROR:
+					if (!_mediaErrorSent)
+					{
+						//notify the server - for troubleshooting
+						var data:MediaErrorEvent = note.getBody().errorEvent as MediaErrorEvent;
+						var message:String =
+							"pid: " + _flashvars.partnerId +
+							"| uiconfId: " + _flashvars.uiConfId +
+							"| referrer: " + _flashvars.referrer +
+							"| resourceUrl: " + _mediaProxy.vo.resource["url"] +
+							"| Flavor index : " + player.currentDynamicStreamIndex +
+							"| Error ID: "+ data.error.errorID +
+							"| Error Message: "+ data.error.message +
+							"| Stack Trace: " + data.error.getStackTrace();
+						//if error occured before first play, send also the initial bitrate index
+						if (!_hasPlayed)
+						{
+							message += "| Initial flavor index: " + _mediaProxy.startingIndex;
+						}
+
+						var sendError:StatsReportError = new StatsReportError(NotificationType.MEDIA_ERROR, message);
+						sendError.method = URLRequestMethod.POST;
+
+						(facade.retrieveProxy(ServicesProxy.NAME) as ServicesProxy).vo.kalturaClient.post(sendError);
+						_mediaErrorSent = true;
+					}
+
+					break;
 			}
 		}


CHANGED:modified the ParetoEliteSelection strategy.

--- src/com/suckatmath/machinelearning/genetic/core/GeneticEngine.as
+++ src/com/suckatmath/machinelearning/genetic/core/GeneticEngine.as
@@ -373,7 +373,7 @@
 			population.sort(compareFitness);
 			trace("sorted pop: " + population.join("\n"),"length: ",population.length);
 			//remove bad chromosomes
-			const ELITE_SIZE:int = population.length * 0.1;
+			const ELITE_SIZE:int = population.length * 0.2;//Pareto Elite Selection 2/8
 			population.splice(ELITE_SIZE,population.length - ELITE_SIZE);
 			trace("Elite length and population :",population.length,population);
 			// shuffle chromosomes
@@ -386,7 +386,7 @@
 			{
 				var c1:int = rand();
 				var c2:int = rand();
-
+				trace("c1:",c1,"c2:",c2);
 				// swap two chromosomes
 				var temp:Object = population[c1];
 				population[c1] = population[c2];


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2506
Author:   jimurphy@adobe.com
Date:     2008-07-16T13:25:03.893431Z

Log Message:
-----------
Merged 3.0.x revisions [2417,2458,2504] -> trunk
-I also manually updated modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java to implement flex2.linker.LinkerConfiguration due to a name change in trunk
-removed player 9 stuff

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.project" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.project</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/DependencyChecker.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/IResourceManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.actionScriptProperties" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/air-config.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/mac/Install Flash Player 10 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.settings/org.eclipse.core.resources.prefs" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.settings/org.eclipse.core.resources.prefs</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.flexLibProperties" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.flexLibProperties</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/lnx/install_flash_player_9_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/LibrariesNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DependencyNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/win/Install Flash Player 9 Plugin.exe</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/mac/Install Flash Player 9 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/MarshalMouseEvent.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/resources/LocaleSorter.as" copyfrom-rev="2504" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/LocaleSorter.as</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/win/Install Flash Player 9 ActiveX.exe</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework" copyfrom-rev="2504" action="A">/flex/sdk/trunk/development/eclipse/flex/airframework</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollThumb.as</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DefNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="A">/flex/sdk/trunk/in/player/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/LibraryNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/ScriptNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/src/java/macromedia/asc/util/ContextStatics.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/nodes/DepNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/3.0.x/development/eclipse/flex/airframework/.settings" copyfrom-rev="2504" action="R">/flex/sdk/trunk/development/eclipse/flex/airframework/.settings</path>
<path kind="file" action="D">/flex/sdk/trunk/in/player/10/lnx/Flash Player.app.zip</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/libs/player/9</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -1273,6 +1273,8 @@
 	private var idToPlaceholder:Object;

 	private var eventProxy:EventProxy;
+	private var weakReferenceProxies:Dictionary = new Dictionary(true);
+	private var strongReferenceProxies:Dictionary = new Dictionary(false);

 	//--------------------------------------------------------------------------
 	//
@@ -1317,6 +1319,26 @@

 			return;
 		}
+
+		if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN)
+		{
+			// also listen to stage if allowed
+			try
+			{
+				if (stage)
+				{
+					var newListener:StageEventProxy = new StageEventProxy(listener);
+					stage.addEventListener(type, newListener.stageListener, false, priority, useWeakReference);
+					if (useWeakReference)
+						weakReferenceProxies[listener] = newListener;
+					else
+						strongReferenceProxies[listener] = newListener;
+				}
+			}
+			catch (error:SecurityError)
+			{
+			}
+		}

 		if (hasSandboxBridges())
 		{
@@ -1392,6 +1414,29 @@
 			}

 			return;
+		}
+
+		if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN)
+		{
+			// also listen to stage if allowed
+			try
+			{
+				if (stage)
+				{
+					var newListener:StageEventProxy = weakReferenceProxies[listener];
+					if (!newListener)
+					{
+						newListener = strongReferenceProxies[listener];
+						if (newListener)
+							delete strongReferenceProxies[listener];
+					}
+					if (newListener)
+						stage.removeEventListener(type, newListener.stageListener, false);
+				}
+			}
+			catch (error:SecurityError)
+			{
+			}
 		}

 		if (hasSandboxBridges())
@@ -2766,7 +2811,7 @@

 		// every SM has to have this listener in case it is the SM for some child AD that contains a manager
 		// and the parent ADs don't have that manager.
-		loaderInfo.sharedEvents.addEventListener(MarshalEvent.INIT_MANAGER, initManagerHandler, false, 0, true);
+		getSandboxRoot().addEventListener(MarshalEvent.INIT_MANAGER, initManagerHandler, false, 0, true);
 		// once managers get initialized, they bounce things off the sandbox root
 		if (getSandboxRoot() == this)
 		{
@@ -2950,12 +2995,14 @@

 		// If the localeChain wasn't specified in the FlashVars of the SWF's
 		// HTML wrapper, or in the query parameters of the SWF URL,
-		// then set it to the list of compiled locales.
+		// then initialize it to the list of compiled locales,
+        // sorted according to the system's preferred locales as reported by
+        // Capabilities.languages or Capabilities.language.
 		// For example, if the applications was compiled with, say,
-		// -locale=en_US,ja_JP, then set the localeChain to
-		// [ "en_US", "ja_JP" ].
+		// -locale=en_US,ja_JP and Capabilities.languages reports [ "ja-JP" ],
+        // set the localeChain to [ "ja_JP" "en_US" ].
 		if (!resourceManager.localeChain)
-			resourceManager.localeChain = compiledLocales;
+			resourceManager.initializeLocaleChain(compiledLocales);
 	}

 	private function extraFrameHandler(event:Event = null):void
@@ -4075,6 +4122,12 @@
 	 */
 	private function systemManagerHandler(event:Event):void
 	{
+		if (event["name"] == "sameSandbox")
+		{
+			event["value"] = currentSandboxEvent == event["value"];
+			return;
+		}
+
 		// if we are broadcasting messages, ignore the messages
 		// we send to ourselves.
 		if (event is MarshalEvent)
@@ -4102,9 +4155,6 @@
 			break;
 		case "toolTipChildren.removeChild":
 			toolTipChildren.removeChild(event["value"]);
-			break;
-		case "sameSandbox":
-			event["value"] = currentSandboxEvent == event["value"];
 			break;
 		case "screen":
 			event["value"] = screen;
@@ -4670,7 +4720,7 @@
 	public function dispatchEventToSandboxes(event:Event, skip:IEventDispatcher = null, trackClones:Boolean = false):void
 	{
 		var clone:Event;
-		trace(">>dispatchEventToSandboxes", this, event.type);
+		// trace(">>dispatchEventToSandboxes", this, event.type);
 		clone = event.clone();
 		if (trackClones)
 			currentSandboxEvent = clone;
@@ -4685,7 +4735,7 @@
 		{
 			if (children[i] != skip)
 			{
-				trace("send to child", i, event.type);
+				// trace("send to child", i, event.type);
 				clone = event.clone();
 				if (trackClones)
 					currentSandboxEvent = clone;
@@ -4694,16 +4744,16 @@
 		}
 		currentSandboxEvent = null;

-		trace("<<dispatchEventToSandboxes", this, event.type);
-	}
-
-	/**
-	 * request the parent to add and event listener.
+		// trace("<<dispatchEventToSandboxes", this, event.type);
+	}
+
+	/**
+	 * request the parent to add an event listener.
 	 */
 	private function addEventListenerToSandboxes(type:String, listener:Function, useCapture:Boolean = false,
 				priority:int=0, useWeakReference:Boolean=false, skip:IEventDispatcher = null):void
 	{
-		trace(">>addEventListenerToSandboxes", this, type);
+		// trace(">>addEventListenerToSandboxes", this, type);

 		var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.ADD,
 													type,
@@ -4725,7 +4775,7 @@
 		}

 		dispatchEventToSandboxes(request, skip);
-		trace("<<addEventListenerToSandboxes", this, type);
+		// trace("<<addEventListenerToSandboxes", this, type);
 	}

 	/**
@@ -4733,7 +4783,7 @@
 	 */
 	private function removeEventListenerFromSandboxes(type:String, listener:Function, useCapture:Boolean = false):void
 	{
-		trace(">>removeEventListenerToSandboxes", this, type);
+		// trace(">>removeEventListenerToSandboxes", this, type);
 		var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.REMOVE,
 																				type,
 																				useCapture);
@@ -4748,12 +4798,12 @@
 		}

 		dispatchEventToSandboxes(request);
-		trace("<<removeEventListenerToSandboxes", this, type);
+		// trace("<<removeEventListenerToSandboxes", this, type);
 	}

 	private function sandboxMouseListener(event:Event):void
 	{
-		trace("sandboxMouseListener", this);
+		// trace("sandboxMouseListener", this);
 		if (event is MarshalMouseEvent)
 			return;

@@ -4780,17 +4830,18 @@
 			if (!eventProxy)
 				eventProxy = new EventProxy(this);

-			trace(">>eventListenerRequestHandler", this, eventObj.userType);
+			// trace(">>eventListenerRequestHandler", this, eventObj.userType);

 			var actualType:String = EventUtil.marshalMouseEventMap[eventObj.userType];
 			if (actualType)
 			{
 				addEventListenerToSandboxes(eventObj.userType, sandboxMouseListener,
 							eventObj.useCapture, eventObj.priority, eventObj.useWeakReference, event.target as IEventDispatcher);
-				super.addEventListener(actualType, eventProxy.marshalListener,
+				if (getSandboxRoot() == this)
+					super.addEventListener(actualType, eventProxy.marshalListener,
 							eventObj.useCapture, eventObj.priority, eventObj.useWeakReference);
 			}
-			trace("<<eventListenerRequestHandler", this, eventObj.userType);
+			// trace("<<eventListenerRequestHandler", this, eventObj.userType);
 		}
 	}
 }
@@ -4860,10 +4911,33 @@
 			var me:MouseEvent = event as MouseEvent;;
 			var mme:MarshalMouseEvent = new MarshalMouseEvent(EventUtil.mouseEventMap[event.type],
 				false, false, me.ctrlKey, me.altKey, me.shiftKey, me.buttonDown);
-			trace(">>marshalListener", systemManager, mme.type);
+			// trace(">>marshalListener", systemManager, mme.type);
 			systemManager.dispatchEventToSandboxes(mme, null, true);
-			trace("<<marshalListener", systemManager);
-		}
+			// trace("<<marshalListener", systemManager);
+		}
+	}
+
+}
+
+import flash.display.Stage;
+import flash.events.MouseEvent;
+
+/**
+ * An object that filters stage
+ */
+class StageEventProxy
+{
+	private var listener:Function;
+
+	public function StageEventProxy(listener:Function)
+	{
+		this.listener = listener;
+	}
+
+	public function stageListener(event:MouseEvent):void
+	{
+		if (event.target is Stage)
+			listener(event);
 	}

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 10766
Author:   gruehle@adobe.com
Date:     2009-09-30T22:55:55.205927Z

Log Message:
-----------
Re-commit compiler errors for other theme's styles feature. If Style metadata has a "themes" attribute, the style is only valid if that theme is applied.

The Spark theme is applied by default. The halo theme can be specified as a compiler argument or by selecting the "MX Only" component set in Builder.

All other themes need to be applied using theme+= instead of theme=. If you use theme= you will get warnings about styles used in CSS selectors, and errors if you use any theme-specific style as an attribute on an MXML tag.

By default, styles that aren't valid for the current theme are errors. These can be changed to warnings with the report-invalid-styles-as-warnings compiler option.

QE notes: Expect test breakage
Doc notes: The new policy for themes needs to be documented.
Bugs: none yet, but I'm sure there will be some...
Reviewer: Ryan
Tests run: checkintests, cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/DefaultsConfigurator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ApplicationBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/themes/Spark/spark.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.css</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/DeclarationHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/Type.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/TypeTable.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/SparkSkinsClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FXGCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SkinnableDataContainerSkin.mxml</path>

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
@@ -168,7 +168,6 @@
 //  Styles
 //--------------------------------------

-include "../../styles/metadata/FocusStyles.as"
 include "../../styles/metadata/PaddingStyles.as"

 /**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/effects/UnconstrainItemAction.as
+++ frameworks/projects/mx/src/mx/effects/UnconstrainItemAction.as
@@ -50,6 +50,11 @@
  *
  *  @see mx.effects.effectClasses.UnconstrainItemActionInstance
  *  @see mx.effects.DefaultTileListEffect
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class UnconstrainItemAction extends Effect
 {
@@ -65,6 +70,11 @@
      *  Constructor.
      *
      *  @param target The Object to animate with this effect.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function UnconstrainItemAction(target:Object = null)
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2185
Author:   jimurphy@adobe.com
Date:     2008-06-23T20:04:23.150071Z

Log Message:
-----------
Merged 3.0.x revisions [2108,2111,2113,2142,2145,2147,2149-2150,2171,2178,2183] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/templates/html-templates/express-installation-with-history/history/historyFrame.html</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/swfutils/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/BindingUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/debugger/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/build/java/build.xml</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/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/antTasks/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/templates/html-templates/client-side-detection-with-history/history/historyFrame.html</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/Binding.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/types/SOAPArrayType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/templates/html-templates/no-player-detection-with-history/history/historyFrame.html</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/soap/types/SOAPArrayType.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/types/SOAPArrayType.as
@@ -262,7 +262,7 @@
             value = dataXML.elements();
         }

-        if (!TypeIterator.isIterable(value))
+        if (!TypeIterator.isIterable(value) && value != "")
             value = [value];

         var iter:TypeIterator = new TypeIterator(value);