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

--- frameworks/projects/framework/src/mx/core/SimpleApplication.as
+++ frameworks/projects/framework/src/mx/core/SimpleApplication.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Revert "Increment and counterpart don't work with FlexJS '_get()' and '_set()'"

This reverts commit af2dc0d8f6712c0003264cea966ef8afd159878c.

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -1752,7 +1752,7 @@
     {
         // Adjust the partition indexes before the
         // "added" event is dispatched.
-        noTopMostIndex = noTopMostIndex + 1;
+        noTopMostIndex++;

         var oldParent:DisplayObjectContainer = child.parent;
         if (oldParent)
@@ -1790,7 +1790,7 @@
     {
         // Adjust the partition indexes
         // before the "removed" event is dispatched.
-        noTopMostIndex = noTopMostIndex - 1;
+        noTopMostIndex--;

         return rawChildren_removeChild(child);
     }
@@ -1802,7 +1802,7 @@
     {
         // Adjust the partition indexes
         // before the "removed" event is dispatched.
-        noTopMostIndex = noTopMostIndex - 1;
+        noTopMostIndex--;

         return rawChildren_removeChildAt(applicationIndex + index);
     }
@@ -2658,7 +2658,7 @@
         mouseCatcher.name = "mouseCatcher";
         // Must use addChildAt because a creationComplete handler can create a
         // dialog and insert it at 0.
-        noTopMostIndex = noTopMostIndex + 1;
+        noTopMostIndex++;
         super.addChildAt(mouseCatcher, 0);
         resizeMouseCatcher();
         if (!topLevel)
@@ -2668,7 +2668,7 @@
         }

         // Add the application as child 1.
-        noTopMostIndex = noTopMostIndex + 1;
+        noTopMostIndex++;
         super.addChildAt(DisplayObject(app), 1);

         CONFIG::performanceInstrumentation


Transferred from the Adobe Open Source Subversion Repository

Revision: 8031
Author:   egeorgie@adobe.com
Date:     2009-06-20T01:10:03.288554Z

Log Message:
-----------
Scrub the TODOs in the framework, convert to FIXMEs in the new convention and assigning an owner.

Doc Notes: N/A
Bugs: N/A
Reviewer: Deepa
tests: build, checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.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/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.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/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.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/collections/ModifiedCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ErrorSkin.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/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.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/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/LineSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.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/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>

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

--- frameworks/projects/framework/src/mx/managers/SystemManager.as
+++ frameworks/projects/framework/src/mx/managers/SystemManager.as
@@ -744,7 +744,7 @@
                 _fontList[p] = o[p];
             }

-            // FIXME: font rules across SWF boundaries have not been finalized!
+            // FIXME (aharui): font rules across SWF boundaries have not been finalized!

 			// Top level systemManager may not be defined if SWF is loaded
 			// as a background image in download progress bar.


Compilation error (invalid import)

Compilation error (invalid import)


change random used for generating aes to TLS from ARC4

--- KeyGenerator.as
+++ KeyGenerator.as
@@ -2,6 +2,7 @@
 	import com.hurlant.crypto.prng.Random;
 	import com.hurlant.crypto.rsa.RSAKey;
 	import com.hurlant.util.Hex;
+	import com.hurlant.crypto.prng.TLSPRF;

 	import flash.external.ExternalInterface;
 	import flash.utils.ByteArray;
@@ -19,8 +20,8 @@
 			ExternalInterface.call("setvalue", "qinv", rsa.coeff.toString());
 			var data:ByteArray, prehashedkey:ByteArray, hashedkey:ByteArray;

-			var r:Random = new Random;
-			var rankey:ByteArray = new ByteArray
+			var r:Random = new Random(TLSPRF);
+			var rankey:ByteArray = new ByteArray;
 			r.nextBytes(rankey, 32);
 			ExternalInterface.call("setvalue", "rk", Hex.fromArray(rankey));
 		}


fix MeshVisiblityController to make sure it adds its data provider to the mesh bindings when its added to the scene

--- src/aerys/minko/scene/controller/mesh/MeshVisibilityController.as
+++ src/aerys/minko/scene/controller/mesh/MeshVisibilityController.as
@@ -44,7 +44,6 @@

         private var _frustumCulling     : uint;
         private var _insideFrustum      : Boolean;
-//        private var _data.computedVisibility : Boolean;

 		public function get frustumCulling() : uint
 		{
@@ -129,17 +128,10 @@

             meshLocalToWorldChangedHandler(mesh, mesh.getLocalToWorldTransform());
 			mesh.localToWorldTransformChanged.add(meshLocalToWorldChangedHandler);
-            mesh.visibilityChanged.add(visiblityChangedHandler);
-            mesh.parent.computedVisibilityChanged.add(visiblityChangedHandler);
-            mesh.removed.add(meshRemovedHandler);
-		}
-
-        private function meshRemovedHandler(mesh : Mesh, ancestor : Group) : void
-        {
-            if (!mesh.parent)
-                ancestor.computedVisibilityChanged.remove(visiblityChangedHandler);
-        }
-
+            mesh.computedVisibilityChanged.add(computedVisiblityChangedHandler);
+            mesh.bindings.addProvider(_data);
+		}
+
 		private function removedHandler(mesh : Mesh, ancestor : Group) : void
 		{
 			var scene : Scene = ancestor.scene;
@@ -150,19 +142,14 @@
 			scene.bindings.removeCallback('worldToScreen', worldToScreenChangedHandler);

 			mesh.localToWorldTransformChanged.remove(meshLocalToWorldChangedHandler);
-            mesh.visibilityChanged.remove(visiblityChangedHandler);
-            mesh.removed.remove(meshRemovedHandler);
-			if (mesh.parent)
-				mesh.parent.computedVisibilityChanged.remove(visiblityChangedHandler);
-		}
-
-        private function visiblityChangedHandler(node : ISceneNode, visibility : Boolean) : void
+            mesh.computedVisibilityChanged.remove(computedVisiblityChangedHandler);
+            mesh.bindings.removeProvider(_data);
+		}
+
+        private function computedVisiblityChangedHandler(node               : ISceneNode,
+                                                         computedVisibility : Boolean) : void
         {
-			var computedVisibility : Boolean = _mesh.visible && _mesh.parent.computedVisibility
-				&& (_frustumCulling == FrustumCulling.DISABLED || _insideFrustum);
-
-			_data.computedVisibility = computedVisibility;
-            _mesh.computedVisibilityChanged.execute(_mesh, computedVisibility);
+            _data.computedVisibility = computedVisibility;
         }

 		private function worldToScreenChangedHandler(bindings	    : DataBindings,
@@ -244,7 +231,7 @@

 		override public function clone() : AbstractController
 		{
-			return new MeshVisibilityController();;
+			return new MeshVisibilityController();
 		}
 	}
 }


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

--- frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/MXAdvancedDataGridItemRenderer.as
+++ frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/MXAdvancedDataGridItemRenderer.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.advancedDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 9033
Author:   jszeto@adobe.com
Date:     2009-08-04T00:16:21.093735Z

Log Message:
-----------
MouseWheel behavior in TrackBase and Spinner

http://bugs.adobe.com/jira/browse/SDK-20154 - awkward mouse wheel behavior on Gumbo Sliders

When Slider is in focus, it listens for the mouseWheel event on the systemManager in the capture phase. Added the same support to Spinner (and thus NumericStepper). I decided against moving the functionality into Range because range is an abstract class that has no user interaction code in it. Thus it didn’t seem correct to put mouse handling code into it.

I updated some of the Halo classes to use the preventDefault/isDefaultPrevented functions instead of using stopPropagation in their mouseWheel handlers.

QE notes: Add test cases for Spinner and NumericStepper
Doc notes: Mention mouse wheel support in Spinner and NumericStepper
Bugs: SDK-20157
Reviewer: Hans
Tests run: Spinner, NumericStepper, Slider
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.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/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -432,11 +432,13 @@
     }
     /**
      *  @private
+     *  If the component is in focus, then it should respond to mouseWheel events. We listen to these
+     *  events on systemManager in the capture phase because this behavior should have the highest priority.
      */
     override protected function focusInHandler(event:FocusEvent):void
     {
         super.focusInHandler(event);
-        systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler);
+        systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler, true);
     }

     /**
@@ -445,7 +447,7 @@
     override protected function focusOutHandler(event:FocusEvent):void
     {
         super.focusOutHandler(event);
-        systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler);
+        systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler, 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@1286062 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/skins/IHighlightBitmapCaptureClient.as
+++ frameworks/projects/spark/src/spark/skins/IHighlightBitmapCaptureClient.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Updated FRESteamWorksTest.as

Updated FRESteamWorksTest.as

--- test/src/FRESteamWorksTest.as
+++ test/src/FRESteamWorksTest.as
@@ -443,16 +443,16 @@
 			authTicket = new ByteArray();
 			authHandle = Steamworks.getAuthSessionTicket(authTicket)
 			log("getAuthSessionTicket(ticket) == " + authHandle);
-			logTicket(authTicket);
-		}
-
-		private function logTicket(ticket:ByteArray):void {
+			logTicket(authTicket, "authTicket");
+		}
+
+		private function logTicket(ticket:ByteArray, ticketName:String = "Ticket"):void {
 			var s:String = "";
 			for (var i:int = 0; i < ticket.length; ++i) {
 				var n:String = ticket[i].toString(16);
 				s += (n.length < 2 ? "0" : "") + n;
 			}
-			log("Ticket: " + ticket.bytesAvailable + "//" + ticket.length + "\n" + s);
+			log(ticketName + ": " + ticket.bytesAvailable + "//" + ticket.length + "\n" + s);
 		}

 		private function requestEncryptedAppTicket(e:Event = null):void {
@@ -460,15 +460,6 @@
 			log("Try to request encrypted app ticket");
 			var result:Boolean = Steamworks.requestEncryptedAppTicket();
 			log("Request encrypted app ticket result: " + result);
-		}
-
-		private function logEncryptedAppTicket(ticket:ByteArray):void {
-			var s:String = "";
-			for (var i:int = 0; i < ticket.length; ++i) {
-				var n:String = ticket[i].toString(16);
-				s += (n.length < 2 ? "0" : "") + n;
-			}
-			log("Encrypted app ticket: " + ticket.bytesAvailable + "//" + ticket.length + "\n" + s);
 		}

 		private function activateOverlay(e:Event = null):void {
@@ -1001,7 +992,7 @@
 					}
 					var encryptedAppTicket:ByteArray = new ByteArray();
 					Steamworks.getEncryptedAppTicket(encryptedAppTicket);
-					logEncryptedAppTicket(encryptedAppTicket);
+					logTicket(encryptedAppTicket, "encryptedAppTicket");
 					break;
 				case SteamConstants.RESPONSE_OnValidateAuthTicketResponse:
 					log("RESPONSE_OnValidateAuthTicketResponse: " + e.response);


Added deNull().

Added deNull().

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5392 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/StringUtil.as
+++ src/as/com/threerings/util/StringUtil.as
@@ -54,6 +54,14 @@
     }

     /**
+     * Return the specified String, or "" if it is null.
+     */
+    public static function deNull (str :String) :String
+    {
+        return (str == null) ? "" : str;
+    }
+
+    /**
      * Does the specified string end with the specified substring.
      */
     public static function endsWith (str :String, substr :String) :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@1290565 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPResult.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPResult.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.olap
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11476
Author:   aharui@adobe.com
Date:     2009-11-05T20:39:26.552363Z

Log Message:
-----------
Viewstack wasn't dispatching events when selectedIndex changed if it started out empty and had a child added later.  It will now dispatch VALUE_COMMIT.  ISelectableList was modified to reflect that VALUE_COMMIT and/or CHANGE can be sent when selectedIndex changes.  ButtonBarBase now listens to both events.

QE Notes: Six ButtonBar bitmaps need regeneration as they will now have the first button selected
Doc Notes: ISelectableList added a new event
Bugs: SDK-23528
Reviewer: Ryan
API Change: Yes
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/ButtonBar, mustella/containers/ViewStack.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISelectableList.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/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>

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

--- frameworks/projects/framework/src/mx/core/ISelectableList.as
+++ frameworks/projects/framework/src/mx/core/ISelectableList.as
@@ -26,6 +26,18 @@
 [Event(name="change")]

 /**
+ *  Dispatched when the selectedIndex property changes.
+ *
+ *  @eventType mx.events.FlexEvent.VALUE_COMMIT
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Event(name="valueCommit")]
+
+/**
  *  The ISelectableList interface indicates that the
  *  implementor is an IList element that supports a selectedIndex
  *  property.


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

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

 package mx.managers
 {


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

--- frameworks/projects/framework/src/mx/preloaders/Preloader.as
+++ frameworks/projects/framework/src/mx/preloaders/Preloader.as
@@ -0,0 +1,455 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.preloaders
+{
+
+import flash.display.DisplayObject;
+import flash.display.Loader;
+import flash.display.LoaderInfo;
+import flash.display.MovieClip;
+import flash.display.Sprite;
+import flash.events.ErrorEvent;
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+import flash.events.IOErrorEvent;
+import flash.events.ProgressEvent;
+import flash.events.SecurityErrorEvent;
+import flash.events.TimerEvent;
+import flash.net.URLLoader;
+import flash.net.URLLoaderDataFormat;
+import flash.net.URLRequest;
+import flash.utils.Timer;
+
+import mx.core.mx_internal;
+import mx.core.ResourceModuleRSLItem;
+import mx.core.RSLItem;
+import mx.core.RSLListLoader;
+import mx.events.FlexEvent;
+import mx.events.RSLEvent;
+
+/**
+ *  The Preloader class is used by the SystemManager to monitor
+ *  the download and initialization status of a Flex application.
+ *  It is also responsible for downloading the runtime shared libraries (RSLs).
+ *
+ *
The Preloader class instantiates a download progress bar,
+ *  which must implement the IPreloaderDisplay interface, and passes download
+ *  and initialization events to the download progress bar.

+ *
+ *  @see mx.preloaders.DownloadProgressBar
+ *  @see mx.preloaders.Preloader
+ */
+public class Preloader extends Sprite
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *	Constructor
+	 */
+	public function Preloader()
+	{
+		super()
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var displayClass:IPreloaderDisplay = null;
+
+	/**
+	 *  @private
+	 */
+	private var timer:Timer;
+
+	/**
+	 *  @private
+	 */
+	private var showDisplay:Boolean;
+
+	/**
+	 *  @private
+	 */
+	private var rslListLoader:RSLListLoader;
+
+	/**
+	 *  @private
+	 */
+	private var rslDone:Boolean = false;
+
+	/**
+	 *  @private
+	 */
+	private var app:IEventDispatcher = null;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Called by the SystemManager to initialize a Preloader object.
+	 *
+	 *  @param showDisplay Determines if the display class should be displayed.
+	 *
+	 *  @param displayClassName The IPreloaderDisplay class to use
+	 *  for displaying the preloader status.
+	 *
+	 *  @param backgroundColor Background color of the application.
+	 *
+	 *  @param backgroundAlpha Background alpha of the application.
+	 *
+	 *  @param backgroundImage Background image of the application.
+	 *
+	 *  @param backgroundSize Background size of the application.
+	 *
+	 *  @param displayWidth Width of the application.
+	 *
+	 *  @param displayHeight Height of the application.
+	 *
+	 *  @param libs Array of string URLs for the runtime shared libraries.
+	 *
+	 *  @param sizes Array of uint values containing the byte size for each URL
+	 *  in the libs argument
+	 *
+	 *  @param rslList Array of object of type RSLItem and CdRSLItem.
+	 *  This array describes all the RSLs to load.
+	 *  The libs and sizes parameters are ignored and must be set to null.
+	 *
+	 *  @param resourceModuleURLs Array of Strings specifying URLs
+	 *  from which to preload resource modules.
+	 */
+	public function initialize(showDisplay:Boolean,
+							   displayClassName:Class,
+							   backgroundColor:uint,
+							   backgroundAlpha:Number,
+							   backgroundImage:Object,
+							   backgroundSize:String,
+							   displayWidth:Number,
+							   displayHeight:Number,
+							   libs:Array = null,
+							   sizes:Array = null,
+							   rslList:Array = null,
+							   resourceModuleURLs:Array = null):void
+	{
+        if ((libs != null || sizes != null) && rslList != null)
+        {
+            // both args can't be used at the same time
+            throw new Error("RSLs may only be specified by using libs and sizes or rslList, not both.");  // $NON-NLS-1$
+        }
+
+		root.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
+
+		var n:int;
+		var i:int;
+
+		// Store the RSL information.
+		// Keep this code for API backwards compatibility
+		if (libs && libs.length > 0)
+		{
+			if (rslList == null)
+			{
+				rslList = [];
+			}
+
+			n = libs.length;
+			for (i = 0; i < n; i++)
+			{
+			    var node:RSLItem = new RSLItem(libs[i]);
+				rslList.push(node);
+			}
+		}
+
+		// Preloading resource modules is similar enough to loading RSLs
+		// that we can simply create ResourceModuleRSLItems for them
+		// and append these to the rslList.
+		if (resourceModuleURLs && resourceModuleURLs.length > 0)
+		{
+			n = resourceModuleURLs.length;
+			for (i = 0; i < n; i++)
+			{
+				var resourceModuleNode:ResourceModuleRSLItem =
+					new ResourceModuleRSLItem(resourceModuleURLs[i]);
+				rslList.push(resourceModuleNode);
+			}
+		}
+
+        rslListLoader = new RSLListLoader(rslList);
+
+		this.showDisplay = showDisplay;
+
+		// Create the timer (really should be adding event listeners to root.LoaderInfo)
+		timer = new Timer(10);
+		timer.addEventListener(TimerEvent.TIMER, timerHandler);
+		timer.start();
+
+		// Create a new instance of the display class and attach it to the stage
+		if (showDisplay)
+		{
+			displayClass = new displayClassName();
+			// Listen for when the displayClass no longer needs to be on the stage
+			displayClass.addEventListener(Event.COMPLETE,
+										  displayClassCompleteHandler);
+
+			// Add the display class as a child of the Preloader
+			addChild(DisplayObject(displayClass));
+
+			displayClass.backgroundColor = backgroundColor;
+			displayClass.backgroundAlpha = backgroundAlpha;
+			displayClass.backgroundImage = backgroundImage;
+			displayClass.backgroundSize = backgroundSize;
+			displayClass.stageWidth = displayWidth;
+			displayClass.stageHeight = displayHeight;
+			displayClass.initialize();
+			displayClass.preloader = this;
+		}
+
+		// move below showDisplay so error messages can be displayed
+		if (rslListLoader.getItemCount() > 0)
+		{
+			// Start loading the RSLs.
+			rslListLoader.load(mx_internal::rslProgressHandler,
+							   mx_internal::rslCompleteHandler,
+							   mx_internal::rslErrorHandler,
+							   mx_internal::rslErrorHandler,
+							   mx_internal::rslErrorHandler);
+		}
+		else
+		{
+		    rslDone = true;
+		}
+	}
+
+	/**
+	 *  Called by the SystemManager after it has finished instantiating
+	 *  an instance of the application class. Flex calls this method; you
+	 *  do not call it yourself.
+	 *
+	 *  @param app The application object.
+	 */
+	public function registerApplication(app:IEventDispatcher):void
+	{
+		// Listen for events from the application.
+		app.addEventListener("validatePropertiesComplete", appProgressHandler);
+		app.addEventListener("validateSizeComplete", appProgressHandler);
+		app.addEventListener("validateDisplayListComplete", appProgressHandler);
+		app.addEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
+
+        // Cache for later cleanup.
+        this.app = app;
+	}
+
+
+	/**
+	 *  @private
+	 *  Return the number of bytes loaded and total for the SWF and any RSLs.
+	 */
+	private function getByteValues():Object
+	{
+		var li:LoaderInfo = root.loaderInfo;
+		var loaded:int = li.bytesLoaded;
+		var total:int = li.bytesTotal;
+
+		// Look up the rsl bytes and include those
+		var n:int = rslListLoader ? rslListLoader.getItemCount() : 0;
+		for (var i:int = 0; i < n; i++)
+		{
+			loaded += rslListLoader.getItem(i).loaded;
+			total += rslListLoader.getItem(i).total;
+		}
+
+		return { loaded: loaded, total: total };
+	}
+
+	/**
+	 *  @private
+	 */
+	private function dispatchAppEndEvent(event:Object = null):void
+	{
+		// Dispatch the application initialization end event
+		dispatchEvent(new FlexEvent(FlexEvent.INIT_COMPLETE));
+
+		if (!showDisplay)
+			displayClassCompleteHandler(null);
+	}
+
+	/**
+	 *  @private
+	 *  We don't listen for the events directly
+	 *  because we don't know which RSL is sending the event.
+	 *  So we have the RSLNode listen to the events
+	 *  and then pass them along to the Preloader.
+	 */
+	mx_internal function rslProgressHandler(event:ProgressEvent):void
+	{
+	    var index:int = rslListLoader.getIndex();
+	    var item:RSLItem = rslListLoader.getItem(index);
+
+
+		var rslEvent:RSLEvent = new RSLEvent(RSLEvent.RSL_PROGRESS);
+		rslEvent.bytesLoaded = event.bytesLoaded;
+		rslEvent.bytesTotal = event.bytesTotal;
+		rslEvent.rslIndex = index;
+		rslEvent.rslTotal = rslListLoader.getItemCount();
+		rslEvent.url = item.urlRequest;
+		dispatchEvent(rslEvent);
+	}
+
+
+	/**
+	 *  @private
+	 *  Load the next RSL in the list and dispatch an event.
+	 */
+	mx_internal function rslCompleteHandler(event:Event):void
+	{
+	    var index:int = rslListLoader.getIndex();
+	    var item:RSLItem = rslListLoader.getItem(index);
+		var rslEvent:RSLEvent = new RSLEvent(RSLEvent.RSL_COMPLETE);
+		rslEvent.bytesLoaded = item.total;
+		rslEvent.bytesTotal = item.total;
+		rslEvent.rslIndex = index;
+		rslEvent.rslTotal = rslListLoader.getItemCount();
+		rslEvent.url = item.urlRequest;
+		dispatchEvent(rslEvent);
+
+		rslDone = (index + 1 == rslEvent.rslTotal);
+	}
+
+
+	/**
+	 *  @private
+	 */
+	mx_internal function rslErrorHandler(event:ErrorEvent):void
+	{
+		// send an error event
+	    var index:int = rslListLoader.getIndex();
+	    var item:RSLItem = rslListLoader.getItem(index);
+		var rslEvent:RSLEvent = new RSLEvent(RSLEvent.RSL_ERROR);
+		rslEvent.bytesLoaded = 0;
+		rslEvent.bytesTotal = 0;
+		rslEvent.rslIndex = index;
+		rslEvent.rslTotal = rslListLoader.getItemCount();
+		rslEvent.url = item.urlRequest;
+		rslEvent.errorText = decodeURI(event.text);
+		dispatchEvent(rslEvent);
+
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Event handlers
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Listen or poll for progress events and dispatch events
+	 *  describing the current state of the download
+	 */
+	private function timerHandler(event:TimerEvent):void
+	{
+		// loaded swfs may not have root right away
+		if (!root)
+			return;
+
+		var bytes:Object = getByteValues();
+		var loaded:int = bytes.loaded;
+		var total:int = bytes.total;
+
+		// Dispatch a progress event (later we might conditionalize this
+		// so that it isn't sent on a cache load).
+		dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS,
+										false, false, loaded, total));
+
+		// Check if we are finished
+		if (rslDone &&
+			((loaded >= total && total > 0) || (total == 0 && loaded > 0) || (root is MovieClip && (MovieClip(root).totalFrames > 2) && (MovieClip(root).framesLoaded >= 2)) ))
+		{
+			timer.removeEventListener(TimerEvent.TIMER, timerHandler);
+
+			// Stop the timer.
+			timer.reset();
+
+			// Dispatch a complete event.
+			dispatchEvent(new Event(Event.COMPLETE));
+
+			// Dispatch an initProgress event.
+			dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	private function ioErrorHandler(event:IOErrorEvent):void
+	{
+		// Ignore the event
+	}
+
+	/**
+	 *  @private
+	 *	Called when the displayClass has finished animating
+	 *  and no longer needs to be displayed.
+	 */
+	private function displayClassCompleteHandler(event:Event):void
+	{
+	    // Cleanup
+		if (displayClass)
+			displayClass.removeEventListener(Event.COMPLETE, displayClassCompleteHandler);
+
+		if (root)
+		    root.loaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
+
+		if (app)
+		{
+    		app.removeEventListener("validatePropertiesComplete", appProgressHandler);
+    		app.removeEventListener("validateSizeComplete", appProgressHandler);
+    		app.removeEventListener("validateDisplayListComplete", appProgressHandler);
+    		app.removeEventListener(FlexEvent.CREATION_COMPLETE, appCreationCompleteHandler);
+    		app = null;
+    	}
+
+		// Send an event to the SystemManager that we are completely finished
+		dispatchEvent(new FlexEvent(FlexEvent.PRELOADER_DONE));
+	}
+
+	/**
+	 *  @private
+	 */
+	private function appCreationCompleteHandler(event:FlexEvent):void
+	{
+		dispatchAppEndEvent();
+	}
+
+	/**
+	 *  @private
+	 */
+	private function appProgressHandler(event:Event):void
+	{
+		dispatchEvent(new FlexEvent(FlexEvent.INIT_PROGRESS));
+	}
+}
+
+}
+


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

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

 package mx.messaging.config
 {


removing traces

removing traces

--- tests/source/classes/Dummy.as
+++ tests/source/classes/Dummy.as
@@ -7,7 +7,7 @@
 		public function Dummy()
 		{
 			super();
-			trace("Dummy::Dummy()", "DUMMY loaded");
+			//trace("Dummy::Dummy()", "DUMMY loaded");
 		}

 	}


Fixed whitespace problems

Fixed whitespace problems

--- asunit-4.0/explore/bridges/CustomEventRunner.as
+++ asunit-4.0/explore/bridges/CustomEventRunner.as
@@ -13,7 +13,7 @@

         private var test:Class;

-		public function run(test:Class, result:IResult, testMethod:String=null, visualContext:DisplayObjectContainer=null):void {
+        public function run(test:Class, result:IResult, testMethod:String=null, visualContext:DisplayObjectContainer=null):void {
             this.test = test;
             // Dispatch a custom message type over the custom bridge:
             customBridge.dispatchEvent(new Event(CustomEventBridge.CUSTOM_METHOD_STARTED));


Follow new style, look for a function named COMMAND first.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4348 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/util/Controller.as
+++ src/as/com/threerings/util/Controller.as
@@ -42,34 +42,46 @@
     public function handleAction (cmd :String, arg :Object) :Boolean
     {
         // fall back to a method named the cmd
+        var fn :Function = null;
         try {
-            var fn :Function = (this["handle" + cmd] as Function);
-            if (fn != null) {
+            fn = (this[cmd] as Function);
+        } catch (e :Error) {
+            // suppress
+            //Log.testing("Caught error finding '" + cmd + "()' [" + this + "]");
+        }
+        if (fn == null) {
+            // try the old style with "handle" prepended
+            try {
+                fn = (this["handle" + cmd] as Function);
+            } catch (e :Error) {
+                // suppress
+                //Log.testing("Caught error finding 'handle" + cmd + "()' [" +
+                //    this + "]");
+            }
+        }
+        if (fn != null) {
+            try {
                 try {
-                    try {
-                        // try calling it with the arg
-                        fn(arg);
-                    } catch (ae :ArgumentError) {
-                        if (arg == null) {
-                            // try calling it without the arg
-                            fn();
-                        } else {
-                            throw ae;
-                        }
+                    // try calling it with the arg
+                    fn(arg);
+                } catch (ae :ArgumentError) {
+                    if (arg == null) {
+                        // try calling it without the arg
+                        fn();
+                    } else {
+                        throw ae;
                     }
+                }

-                } catch (e :Error) {
-                    var log :Log = Log.getLog(this);
-                    log.warning("Error handling controller " +
-                        "command [error=" + e + ", cmd=" + cmd +
-                        ", arg=" + arg + "].");
-                    log.logStackTrace(e);
-                }
-                // we "handled" the event, even if it threw an error
-                return true;
+            } catch (e :Error) {
+                var log :Log = Log.getLog(this);
+                log.warning("Error handling controller " +
+                    "command [error=" + e + ", cmd=" + cmd +
+                    ", arg=" + arg + "].");
+                log.logStackTrace(e);
             }
-        } catch (e :Error) {
-            // suppress, and fall through
+            // we "handled" the event, even if it threw an error
+            return true;
         }

         return false; // not handled


Fixed a bug where an item without an order argument was never provided the adjusted argument and always defaulted to 0

--- FlexUnit4/src/org/flexunit/runners/model/ParameterizedMethod.as
+++ FlexUnit4/src/org/flexunit/runners/model/ParameterizedMethod.as
@@ -87,11 +87,16 @@
 						}
 					}
 				} else {
+					orderArg.@value = orderValueDec;
 					annotation.arguments.push( new MetaDataArgument( orderArg ) );
 				}
-
 			}

+			if ( annotation.getArgument( AnnotationArgumentConstants.ORDER ).value == "0" ) {
+				trace( "New Order " + annotation.getArgument( AnnotationArgumentConstants.ORDER ).value );
+			}
+
+
 			return newMethod;
 		}


F Fix minor bug in AllocationVisitor that messed up bindings

--- src/aerys/minko/render/shader/compiler/graph/visitors/AllocationVisitor.as
+++ src/aerys/minko/render/shader/compiler/graph/visitors/AllocationVisitor.as
@@ -237,7 +237,7 @@
 				var alloc		: SimpleAllocation	= _allocations[bindableConstant];
 				var binder		: IBinder			= new ConstantBinder(bindingName, alloc.offset, alloc.maxSize, isVertexShader);

-				if (tree)
+				if (!tree)
 					result.push(binder);
 				else
 				{


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

--- frameworks/projects/advancedgrids/src/mx/collections/SummaryRow.as
+++ frameworks/projects/advancedgrids/src/mx/collections/SummaryRow.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.collections
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3789
Author:   gosmith@adobe.com
Date:     2008-10-21T19:55:26.771480Z

Log Message:
-----------
Integrated Build 192 of what used to be called TCAL (and, before that, Vellum).

The Text Component ActionScript Library (TCAL) has been renamed to the Text Layout Framework. Its classes are now in the package flashx.textLayout rather than in flashx.tcal, and they are packaged into SWCs named textLayout_xxx.swc rather than tcal_xxx.swc. The XML namespace for importable markup is now "http://ns.adobe.com/textLayout/2008" rather than "http://ns.adobe.com/tcal/2008".

QE Notes: Please update package names (and XML namespaces, if necessary) in all test files.
Doc Notes: Please eliminate all references to "Text Component ActionScript Library" or "TCAL" and use "Text Layout Framework" instead.
Bugs: -
Reviewer: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/TextOperationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/libs/textLayout_conversion.swc</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/libs/textLayout_edit.swc</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/libs/tcal_conversion.swc</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/libs/tcal_edit.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/libs/textLayout_core.swc</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/libs/tcal_core.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/fxg-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextFlowComposer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -22,31 +22,31 @@
 import flash.text.engine.TextLine;
 import flash.ui.Keyboard;

-import flashx.tcal.compose.IFlowComposer;
-import flashx.tcal.compose.StandardFlowComposer;
-import flashx.tcal.container.DisplayObjectContainerController;
-import flashx.tcal.container.IContainerController;
-import flashx.tcal.conversion.ITextImporter;
-import flashx.tcal.conversion.TextFilter;
-import flashx.tcal.conversion.ConversionType;
-import flashx.tcal.edit.EditManager;
-import flashx.tcal.edit.ISelectionManager;
-import flashx.tcal.elements.FlowElement;
-import flashx.tcal.elements.ParagraphElement;
-import flashx.tcal.elements.SpanElement;
-import flashx.tcal.elements.TextFlow;
-import flashx.tcal.events.CompositionCompletionEvent;
-import flashx.tcal.events.FlowOperationEvent;
-import flashx.tcal.events.SelectionEvent;
-import flashx.tcal.formats.CharacterFormat;
-import flashx.tcal.formats.ContainerFormat;
-import flashx.tcal.formats.ICharacterFormat;
-import flashx.tcal.formats.IContainerFormat;
-import flashx.tcal.formats.IParagraphFormat;
-import flashx.tcal.formats.ParagraphFormat;
-import flashx.tcal.operations.ApplyFormatOperation;
-import flashx.tcal.operations.FlowOperation;
-import flashx.tcal.operations.SplitParagraphOperation;
+import flashx.textLayout.compose.IFlowComposer;
+import flashx.textLayout.compose.StandardFlowComposer;
+import flashx.textLayout.container.DisplayObjectContainerController;
+import flashx.textLayout.container.IContainerController;
+import flashx.textLayout.conversion.ITextImporter;
+import flashx.textLayout.conversion.TextFilter;
+import flashx.textLayout.conversion.ConversionType;
+import flashx.textLayout.edit.EditManager;
+import flashx.textLayout.edit.ISelectionManager;
+import flashx.textLayout.elements.FlowElement;
+import flashx.textLayout.elements.ParagraphElement;
+import flashx.textLayout.elements.SpanElement;
+import flashx.textLayout.elements.TextFlow;
+import flashx.textLayout.events.CompositionCompletionEvent;
+import flashx.textLayout.events.FlowOperationEvent;
+import flashx.textLayout.events.SelectionEvent;
+import flashx.textLayout.formats.CharacterFormat;
+import flashx.textLayout.formats.ContainerFormat;
+import flashx.textLayout.formats.ICharacterFormat;
+import flashx.textLayout.formats.IContainerFormat;
+import flashx.textLayout.formats.IParagraphFormat;
+import flashx.textLayout.formats.ParagraphFormat;
+import flashx.textLayout.operations.ApplyFormatOperation;
+import flashx.textLayout.operations.FlowOperation;
+import flashx.textLayout.operations.SplitParagraphOperation;

 import mx.core.IViewport;
 import mx.core.UIComponent;
@@ -937,11 +937,11 @@
      */
     private function importStringMarkup(markup:String):TextFlow
     {
-        markup = '<TextFlow xmlns="http://ns.adobe.com/tcal/2008">' +
+        markup = '<TextFlow xmlns="http://ns.adobe.com/textLayout/2008">' +
                  markup +
                  '</TextFlow>';

-        return TextFilter.importToFlow(markup, TextFilter.TCAL_FORMAT);
+        return TextFilter.importToFlow(markup, TextFilter.TEXT_LAYOUT_FORMAT);
     }

 	/**
@@ -949,7 +949,7 @@
      */
     private function importXMLMarkup(markup:XML):TextFlow
     {
-        return TextFilter.importToFlow(markup, TextFilter.TCAL_FORMAT);
+        return TextFilter.importToFlow(markup, TextFilter.TEXT_LAYOUT_FORMAT);
     }

     /**
@@ -1089,7 +1089,7 @@
      */
     public function export():XML
     {
-        return TextFilter.export(textFlow, TextFilter.TCAL_FORMAT,
+        return TextFilter.export(textFlow, TextFilter.TEXT_LAYOUT_FORMAT,
                                  ConversionType.XML_TYPE).children()[0];
     }

@@ -1371,8 +1371,8 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-import flashx.tcal.edit.EditManager;
-import flashx.tcal.operations.FlowOperation;
+import flashx.textLayout.edit.EditManager;
+import flashx.textLayout.operations.FlowOperation;

 class TextViewEditManager extends EditManager
 {


FIX: TestCase.assertEqualsFloat was pointing to Assert.assertEquals.

--- asunit-4.0/src/asunit/framework/TestCase.as
+++ asunit-4.0/src/asunit/framework/TestCase.as
@@ -44,8 +44,7 @@
         }

         protected function addChild(child:DisplayObject):DisplayObject {
-            context.addChild(child);
-            return child;
+            return context.addChild(child);
         }

         protected function removeChild(child:DisplayObject):DisplayObject {
@@ -92,7 +91,7 @@
         }

         protected function assertEqualsFloat(...args:Array):void {
-            Assert.assertEquals.apply(null, args);
+            Assert.assertEqualsFloat.apply(null, args);
         }

         protected function assertEqualsArrays(...args:Array):void {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6122
Author:   chaase@adobe.com
Date:     2009-04-10T14:30:17.762458Z

Log Message:
-----------
Various refactorings/renamings/changes from effects PARB review.

QE Notes: mx/effects and spark/effects currently broken (and disabled) due to these API changes. Matt is fixing.
Doc Notes: None
Bugs:
Reviewer: Hans
tests: checkintests, mustella tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOut.as" copyfrom-rev="5944" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EaseInOut.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/EasingFraction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EffectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.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/Animate.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/RepeatBehavior.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/NumberArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Animate3DInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimationProperty.as" copyfrom-rev="5944" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as</path>
<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/supportClasses/AnimateInstance.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/AnimateShaderTransitionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateFilterInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Rotate3DInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/AnimationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.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/supportClasses/RotateInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/IAnimationTarget.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/MotionPath.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimationProperty.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/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>

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

--- frameworks/projects/spark/src/spark/effects/animation/RepeatBehavior.as
+++ frameworks/projects/spark/src/spark/effects/animation/RepeatBehavior.as
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.effects.animation
+{
+/**
+ * Provides utility constants for use with repeatBehavior
+ * property of Animate and Animation.
+ *
+ * @see spark.effects.Animate#repeatBehavior
+ * @see Animation#repeatBehavior
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public final class RepeatBehavior
+{
+    /**
+     * A utility constant for use with the repeatBehavior
+     * property of the Animate and Animation classes. This value specifies
+     * that a repeating animation should progress in a forward direction on
+     * every iteration.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const LOOP:String = "loop";
+
+    /**
+     * A utility constant for use with the repeatBehavior
+     * property of the Animate and Animation classes. This value specifies
+     * that a repeating animation should reverse direction on
+     * every iteration.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const REVERSE:String = "reverse";
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12436
Author:   smgilson@adobe.com
Date:     2009-12-03T16:08:12.117370Z

Log Message:
-----------
ASDoc localization prep

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/automation/IAutomationObject.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/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -206,7 +206,7 @@
     //----------------------------------

     /**
-     *  An Array that lists the skin parts that will be
+     *  An Array that lists the skin parts
      *  excluded from bitmaps captured and used to
      *  show focus.  This list is only used if
      *  the skin has a null focusSkinExclusions property.
@@ -541,7 +541,7 @@
     }

     /**
-     *  Marks the component so that the new state of the skin will get set
+     *  Marks the component so that the new state of the skin is set
      *  during a later screen update.
      *
      *  @langversion 3.0


abstractresource now dispatches a ResourceEvent.CANCEL when cancelled instead of CommandEvent.CANCEL

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@553 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/external/AbstractResource.as
+++ src/reprise/external/AbstractResource.as
@@ -11,15 +11,17 @@

 package reprise.external
 {
+	import flash.events.Event;
+	import flash.net.URLRequest;
+	import flash.utils.getTimer;
+
+	import mx.events.ResourceEvent;
+
 	import reprise.commands.AbstractAsynchronousCommand;
 	import reprise.commands.TimeCommandExecutor;
 	import reprise.events.CommandEvent;
 	import reprise.events.ResourceEvent;
 	import reprise.utils.Delegate;
-
-	import flash.events.Event;
-	import flash.net.URLRequest;
-	import flash.utils.getTimer;
 	public class AbstractResource extends AbstractAsynchronousCommand
 		implements IResource
 	{
@@ -172,7 +174,7 @@
 			m_isExecuting = false;
 			m_isCancelled = true;
 			doCancel();
-			dispatchEvent(new CommandEvent(Event.CANCEL));
+			dispatchEvent(new ResourceEvent(Event.CANCEL));
 		}


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

--- frameworks/projects/automation/src/mx/automation/delegates/containers/BoxAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/containers/BoxAutomationImpl.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.automation.delegates.containers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19611
Author:   jasonsj@adobe.com
Date:     2011-01-05T22:45:41.935084Z

Log Message:
-----------
Enable TextArea scrolling in the mobile theme. Refactored HScrollBar and VScrollBar skins for use with TextArea.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorButtonBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
@@ -12,14 +12,20 @@
 package spark.skins.mobile
 {

+import flash.display.Graphics;
 import flash.events.Event;
+import flash.events.FocusEvent;
+import flash.system.Capabilities;

 import mx.core.DPIClassification;
-import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;

+import spark.components.Group;
+import spark.components.Scroller;
 import spark.components.TextArea;
+import spark.components.VGroup;
+import spark.components.supportClasses.StyleableTextField;
 import spark.skins.mobile.supportClasses.TextSkinBase;
 import spark.skins.mobile160.assets.TextInput_border;
 import spark.skins.mobile240.assets.TextInput_border;
@@ -27,6 +33,7 @@

 use namespace mx_internal;

+// FIXME (jasonsj): how to support TextArea#heightInLines?
 /**
  *  ActionScript-based skin for TextArea components in mobile applications.
  *
@@ -65,7 +72,7 @@
             {
                 borderClass = spark.skins.mobile320.assets.TextInput_border;
                 layoutCornerEllipseSize = 24;
-                layoutMeasuredWidth = 600;
+                layoutMeasuredWidth = 612;
                 layoutMeasuredHeight = 106;
                 layoutBorderSize = 2;

@@ -85,7 +92,7 @@
             {
                 borderClass = spark.skins.mobile160.assets.TextInput_border;
                 layoutCornerEllipseSize = 12;
-                layoutMeasuredWidth = 300;
+                layoutMeasuredWidth = 306;
                 layoutMeasuredHeight = 53;
                 layoutBorderSize = 1;

@@ -96,6 +103,14 @@

     //--------------------------------------------------------------------------
     //
+    //  Skin parts
+    //
+    //--------------------------------------------------------------------------
+
+    public var scroller:Scroller;
+
+    //--------------------------------------------------------------------------
+    //
     //  Properties
     //
     //--------------------------------------------------------------------------
@@ -111,17 +126,51 @@
     //
     //--------------------------------------------------------------------------

+    private var textDisplayGroup:VGroup;
+
+    private var _isIOS:Boolean;
+
     /**
      *  @private
      */
     override protected function createChildren():void
     {
+        if (!textDisplay)
+        {
+            // wrap StyleableTextField in UIComponent
+            textDisplay = StyleableTextField(createInFontContext(StyleableTextField));
+            textDisplay.styleName = this;
+            textDisplay.multiline = true;
+            textDisplay.editable = true;
+            textDisplay.wordWrap = true;
+            textDisplay.addEventListener(Event.CHANGE, textDisplay_changeHandler);
+            textDisplay.addEventListener(FlexEvent.VALUE_COMMIT, textDisplay_changeHandler);
+
+            // on iOS, resize the TextField and let the native control handle scrolling
+            _isIOS = (Capabilities.version.indexOf("IOS") == 0);
+
+            // wrap StyleableTextComponent in Group for viewport
+            textDisplayGroup = new VGroup();
+            textDisplayGroup.clipAndEnableScrolling = true;
+            textDisplayGroup.addElement(textDisplay);
+
+            // scroll to the caret position
+            textDisplay.addEventListener(Event.CHANGE, caret_changeHandler);
+            textDisplay.addEventListener(FlexEvent.VALUE_COMMIT, caret_changeHandler);
+        }
+
+        if (!scroller)
+        {
+            scroller = new Scroller();
+            scroller.minViewportInset = 0;
+            scroller.measuredSizeIncludesScrollBars = false;
+            addChild(scroller);
+        }
+
+        if (!scroller.viewport)
+            scroller.viewport = textDisplayGroup;
+
         super.createChildren();
-
-        textDisplay.multiline = true;
-        textDisplay.wordWrap = true;
-        textDisplay.addEventListener(Event.CHANGE, textDisplay_changeHandler);
-        textDisplay.addEventListener(FlexEvent.VALUE_COMMIT, textDisplay_changeHandler);
     }

     /**
@@ -148,96 +197,77 @@
         // if we have an estimated width, use it here.  Otherwise, we'll keep it
         // the same width as it was before
         if (!isNaN(estimatedWidth))
-            textDisplay.width = estimatedWidth - paddingTop - paddingBottom;
-
-        measuredHeight = Math.max(layoutMeasuredHeight, getElementPreferredHeight(textDisplay) + paddingTop + paddingBottom);
+            textDisplayGroup.width = estimatedWidth;
+
+        measuredHeight = Math.max(layoutMeasuredHeight, textDisplay.measuredTextSize.y + paddingTop + paddingBottom);
+    }
+
+    /**
+     * @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        drawBackground(unscaledWidth, unscaledHeight);
+
+        // position & size border
+        if (border)
+        {
+            setElementSize(border, unscaledWidth, unscaledHeight);
+            setElementPosition(border, 0, 0);
+        }
+
+        setElementSize(scroller, unscaledWidth, unscaledHeight);
+        setElementPosition(scroller, 0, 0);
+
+        // position & size the text
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingRight:Number = getStyle("paddingRight");
+        var paddingTop:Number = getStyle("paddingTop");
+        var paddingBottom:Number = getStyle("paddingBottom");
+
+        textDisplayGroup.paddingLeft = paddingLeft;
+        textDisplayGroup.paddingRight = paddingRight;
+        textDisplayGroup.paddingTop = paddingTop;
+        textDisplayGroup.paddingBottom = paddingBottom;
+
+        var unscaledTextWidth:Number = unscaledWidth - paddingLeft - paddingRight;
+
+        // set width first to measure height correctly
+        textDisplay.width = unscaledTextWidth;
+
+        var unscaledTextHeight:Number = unscaledHeight - paddingTop - paddingBottom;
+        var textHeight:Number = unscaledTextHeight;
+
+        // TextField height should match it's content or the TextArea bounds
+        // iOS special case to prevent Flex Scroller scrolling
+        if (!_isIOS || !textDisplay.editable)
+            textHeight = Math.max(textDisplay.measuredTextSize.y, textHeight);
+
+        setElementSize(textDisplay, unscaledTextWidth, textHeight);
+
+        // size the Group to the StyleableTextField plus padding
+        setElementSize(textDisplayGroup, unscaledWidth, paddingTop + textHeight + paddingBottom);
+
+        if (promptDisplay)
+        {
+            promptDisplay.commitStyles();
+            setElementSize(promptDisplay, unscaledTextWidth, unscaledTextHeight);
+            setElementPosition(promptDisplay, paddingLeft, paddingTop);
+        }
+    }
+
+    private function caret_changeHandler(event:Event):void
+    {
+        // TODO (jasonsj): caret positioning on iOS
+        // textDisplayGroup.verticalScrollPosition = textDisplay.getCharBoundaries(textDisplay.caretIndex).y;
     }

     /**
      *  @private
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    override public function setEstimatedSize(estimatedWidth:Number = NaN,
-                                              estimatedHeight:Number = NaN,
-                                              invalidateSizeAllowed:Boolean = true):void
-    {
-        var oldcw:Number = this.estimatedWidth;
-        var oldch:Number = this.estimatedHeight;
-
-        super.setEstimatedSize(estimatedWidth, estimatedHeight, invalidateSizeAllowed);
-
-        var sameWidth:Boolean = isNaN(estimatedWidth) && isNaN(oldcw) || estimatedWidth == oldcw;
-        var sameHeight:Boolean = isNaN(estimatedHeight) && isNaN(oldch) || estimatedHeight == oldch;
-        if (!(sameHeight && sameWidth))
-        {
-            if (!isNaN(explicitWidth) &&
-                !isNaN(explicitHeight))
-                return;
-
-            if (invalidateSizeAllowed)
-                invalidateSize();
-        }
-    }
-
-    /**
-     *  @private
-     *  We override the setLayoutBoundsSize to determine whether to perform
-     *  text reflow. This is a convenient place, as the layout passes NaN
-     *  for a dimension not constrained to the parent.
-     */
-    override public function setLayoutBoundsSize(width:Number,
-                                                 height:Number,
-                                                 postLayoutTransform:Boolean = true):void
-    {
-        var newEstimates:Boolean = false;
-        var cw:Number = estimatedWidth;
-        var ch:Number = estimatedHeight;
-        var oldcw:Number = cw;
-        var oldch:Number = ch;
-        // we got lied to, probably the constraints weren't accurate or
-        // couldn't be computed
-        if (!isNaN(width))
-        {
-            if (isNaN(estimatedWidth) || width != estimatedWidth)
-            {
-                cw = width;
-                newEstimates = true;
-            }
-        }
-        // we got lied to, probably the constraints weren't accurate or
-        // couldn't be computed
-        if (!isNaN(height))
-        {
-            if (isNaN(estimatedHeight) || height != estimatedHeight)
-            {
-                ch = height;
-                newEstimates = true;
-            }
-        }
-        if (newEstimates)
-        {
-            setEstimatedSize(cw, ch);
-
-            // re-measure with the new estimated size
-            UIComponentGlobals.layoutManager.validateClient(this, true);
-
-            // set estimated size back to what it was
-            setEstimatedSize(oldcw, oldch, false);
-        }
-
-        super.setLayoutBoundsSize(width, height, postLayoutTransform);
-    }
-
-    /**
-     *  @private
      */
     private function textDisplay_changeHandler(event:Event):void
     {
-        invalidateSize();
+        textDisplayGroup.invalidateSize();
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/controls/Alert.as
+++ frameworks/projects/mx/src/mx/controls/Alert.as
@@ -21,7 +21,6 @@
 import mx.controls.alertClasses.AlertForm;
 import mx.core.EdgeMetrics;
 import mx.core.FlexGlobals;
-import mx.core.FlexVersion;
 import mx.core.IFlexDisplayObject;
 import mx.core.mx_internal;
 import mx.core.UIComponent;
@@ -290,7 +289,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public static var buttonWidth:Number = FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0 ? 60 : 65;
+    public static var buttonWidth:Number = 65;

     //----------------------------------
     //  cancelLabel


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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -3901,15 +3901,20 @@
      */
     override mx_internal function childAdded(child:DisplayObject):void
     {
-        dispatchEvent(new Event("childrenChanged"));
-
-        var event:ChildExistenceChangedEvent =
-            new ChildExistenceChangedEvent(
-            ChildExistenceChangedEvent.CHILD_ADD);
-        event.relatedObject = child;
-        dispatchEvent(event);
-
-        child.dispatchEvent(new FlexEvent(FlexEvent.ADD));
+        if (hasEventListener("childrenChanged"))
+            dispatchEvent(new Event("childrenChanged"));
+
+        if (hasEventListener(ChildExistenceChangedEvent.CHILD_ADD))
+        {
+            var event:ChildExistenceChangedEvent =
+                new ChildExistenceChangedEvent(
+                ChildExistenceChangedEvent.CHILD_ADD);
+            event.relatedObject = child;
+            dispatchEvent(event);
+        }
+
+        if (hasEventListener(FlexEvent.ADD))
+            child.dispatchEvent(new FlexEvent(FlexEvent.ADD));

         super.childAdded(child); // calls createChildren()
     }
@@ -3921,13 +3926,17 @@
     {
         super.removingChild(child);

-        child.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
-
-        var event:ChildExistenceChangedEvent =
-            new ChildExistenceChangedEvent(
-            ChildExistenceChangedEvent.CHILD_REMOVE);
-        event.relatedObject = child;
-        dispatchEvent(event);
+        if (hasEventListener(FlexEvent.REMOVE))
+            child.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
+
+        if (hasEventListener(ChildExistenceChangedEvent.CHILD_REMOVE))
+        {
+            var event:ChildExistenceChangedEvent =
+                new ChildExistenceChangedEvent(
+                ChildExistenceChangedEvent.CHILD_REMOVE);
+            event.relatedObject = child;
+            dispatchEvent(event);
+        }
     }

     /**
@@ -3956,7 +3965,8 @@
                 FlexEvent.UPDATE_COMPLETE, layoutCompleteHandler, false, 0, true);
         }

-        dispatchEvent(new Event("childrenChanged"));
+        if (hasEventListener("childrenChanged"))
+            dispatchEvent(new Event("childrenChanged"));
     }

     [Bindable("childrenChanged")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 3139
Author:   jimurphy@adobe.com
Date:     2008-09-08T15:42:37.788151Z

Log Message:
-----------
Merged 3.0.x revisions [3074,3079-3080,3086,3094,3096,3098,3101-3102,3104,3108,3114,3123,3125-3126] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FocusRequestDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/NetConnectionChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/SecurityUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.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/SystemManager.as</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/events/SandboxMouseEvent.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/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SWFBridgeGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InvalidateRequestData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeProvider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISWFBridgeGroup.as</path>

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -2195,7 +2195,14 @@
     {
         var formerParent:DisplayObjectContainer = child.parent;
         if (formerParent && !(formerParent is Loader))
+	{
+            // Adjust index if necessary when former parent happens
+            // to be the same container.
+            if (formerParent == this)
+                index = (index == numChildren) ? index - 1 : index;
+
             formerParent.removeChild(child);
+	}

         addingChild(child);