Transferred from the Adobe Open Source Subversion Repository

Revision: 5220
Author:   chaase@adobe.com
Date:     2009-03-10T15:55:06.496289Z

Log Message:
-----------
New Transform effects to handle correctly doing Move, Rotate, and Scale operations simultaneously. Also, added keyframe capabilities to new effects system (necessary for the transform effects, shouldn't affect operation of other effects). Fixed various issues with effects/transition infrastructure as necessary. Added transform utility functions to UIComponent, AdvancedLayoutFeatures, and GraphicElement.

QE Notes: This will break existing new effects tests due to changes in core Animation and AnimationEvent classes, QE is disabling them for now and will add them back in as changes are made.
Doc Notes: None
Bugs:
Reviewer: Ely (transform utilities) and Jason (the rest)
tests: checkintests, Mustella tests/Effects, tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/KeyFrame.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/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.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/mx/effects/FxAnimate3D.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/effectClasses</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale3D.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/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/effectClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/AnimationEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate3D.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/AnimationProperty.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove3D.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
@@ -0,0 +1,415 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.effectClasses
+{
+import flash.geom.Vector3D;
+
+import mx.core.mx_internal;
+import mx.effects.Animation;
+import mx.effects.AnimationProperty;
+import mx.effects.Effect;
+import mx.effects.FxAnimate;
+import mx.effects.effectClasses.FxAnimateInstance;
+import mx.effects.interpolation.IEaser;
+import mx.effects.interpolation.Linear;
+
+import spark.effects.KeyFrame;
+import spark.effects.MotionPath;
+
+use namespace mx_internal;
+
+/**
+ * The instance of the AnimateTransform effect
+ */
+public class AnimateTransformInstance extends FxAnimateInstance
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Constructor
+     */
+    public function AnimateTransformInstance(target:Object)
+    {
+        super(target);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Flag to indicate that this single instance of the transform-related
+     * effects has already started and should not be started again. If there
+     * are several transform effects running in the same effect tree, as children
+     * of a CompositeEffect, then they all run as part of a single instance which
+     * is started when the first transform effect is played. The remainder
+     * of the transform-related effects should not be separately started, since
+     * their animation data is already handled through the single instance.
+     */
+    private var started:Boolean = false;
+
+    /**
+     * @private
+     *
+     * The time that the single transform effect instance will start, relative
+     * to the top-most Effect in the effect containment hierarchy. This time
+     * is used to compare against the start time of new effects adding their
+     * MotionPath data to this single instance to make sure that all keyframes
+     * are positioned correctly relative to each other.
+     */
+    private var instanceStartTime:Number = 0;
+
+    /**
+     * Default transform center used in the transform calculations when
+     * transformCenter is null.
+     */
+    private static var defaultTransformCenter:Vector3D = new Vector3D();
+
+    /**
+     * Utility map used in applyValues()
+     */
+    private var currentValues:Object = {rotationX:NaN, rotationY:NaN, rotation:NaN,
+                                        scaleX:NaN, scaleY:NaN, scaleZ:NaN,
+                                        _rotationX:NaN, _rotationY:NaN, _rotationZ:NaN,
+                                        _scaleX:NaN, _scaleY:NaN, _scaleZ:NaN };
+
+    /**
+     * Utility structures used in applyValues()
+     */
+    private static var scale:Vector3D = new Vector3D();
+    private static var rotation:Vector3D = new Vector3D();
+    private static var position:Vector3D = new Vector3D();
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Flag to indicate that this single instance of the transform-related effects
+     * has already been initialized. This flag is used by AnimateTransform to
+     * prevent duplicate initialization of the instance when there are multiple
+     * transform effects feeding into this single instance.
+     */
+    public var initialized:Boolean = false;
+
+    /**
+     * The center around which the transformations in this effect
+     * occur. In particular, rotations will rotate around this point,
+     * translations will move this point, and scales will scale centered
+     * around this point. If the point is not supplied, then the center
+     * of the target object is assumed.
+     */
+    public var transformCenter:Vector3D;
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * @private
+     *
+     * This function is overriden to prevent starting the single instance more
+     * than once. It will be called whenever any of the transform effects are
+     * played, but it should only actually start the instance the first time.
+     */
+    override public function startEffect():void
+    {
+        if (!started)
+        {
+            started = true;
+            super.startEffect();
+        }
+    }
+
+    // TODO (chaase): This function appears in multiple places. Maybe
+    // put it in some util class instead?
+    /**
+     * @private
+     *
+     * Utility function to determine whether a given value is 'valid',
+     * which means it's either a Number and it's not NaN, or it's not
+     * a Number and it's not null
+     */
+    private function isValidValue(value:Object):Boolean
+    {
+        return ((value is Number && !isNaN(Number(value))) ||
+            (!(value is Number) && value !== null));
+    }
+
+    /**
+     * @private
+     *
+     * Insert a new keyframe into an existing keyframe array. Keyframes are sorted by
+     * time, so the new keyframe must be inserted in the proper place according to its
+     * time value and the startDelay time passed in
+     */
+    private function insertKeyframe(keyframes:Array, newKF:KeyFrame, startDelay:Number = 0):void
+    {
+        newKF.time += startDelay;
+        for (var i:int = 0; i < keyframes.length; i++)
+        {
+            if (keyframes[i].time >= newKF.time)
+            {
+                if (keyframes[i].time > newKF.time)
+                {
+                    keyframes.splice(i, 0, newKF);
+                    return;
+                }
+                else
+                {
+                    // don't have duplicate keyframes; combine them instead
+                    // by using any valid values in newKF
+                    if (newKF.easer)
+                        keyframes[i].easer = newKF.easer;
+                    if (isValidValue(newKF.value))
+                        keyframes[i].value = newKF.value;
+                    if (isValidValue(newKF.valueBy))
+                        keyframes[i].valueBy = newKF.valueBy;
+                    return;
+                }
+            }
+        }
+        // new keyframe must happen after last existing keyframe time
+        keyframes.push(newKF);
+    }
+
+    /**
+     * Adds the given MotionPath to the set of MotionPaths in this instance, with
+     * the start time relative to the outermost parent effect.
+     * If there is already a MotionPath object for this effect instance that
+     * is acting on the same property as the new MotionPath, then the keyframes
+     * of the new MotionPath are simply added to the existing MotionPath.
+     */
+    public function addMotionPath(newMotionPath:MotionPath, newEffectStartTime:Number = 0):void
+    {
+        if (animationProperties)
+        {
+            var i:int;
+            var j:int;
+            var prop:MotionPath;
+            var n:int = animationProperties.length;
+            if (newEffectStartTime < instanceStartTime)
+            {
+                var deltaStartTime:Number = instanceStartTime - newEffectStartTime;
+                for (i = 0; i < n; i++)
+                {
+                    prop = MotionPath(animationProperties[i]);
+                    for (j = 0; j < prop.keyframes.length; j++)
+                        prop.keyframes[j].time += deltaStartTime;
+                }
+                instanceStartTime = newEffectStartTime;
+            }
+            for (i = 0; i < n; i++)
+            {
+                prop = MotionPath(animationProperties[i]);
+                if (prop.property == newMotionPath.property)
+                {
+                    // add mp's keyframes here
+                    for (j = 0; j < newMotionPath.keyframes.length; j++)
+                    {
+                        insertKeyframe(prop.keyframes, newMotionPath.keyframes[j],
+                            (newEffectStartTime - instanceStartTime));
+                    }
+                    return;
+                }
+            }
+        }
+        else
+        {
+            animationProperties = [];
+            // TODO (chaase): too early to reset instanceStartTime - might use
+            // it below
+            instanceStartTime = newEffectStartTime;
+        }
+        // MotionPath on mp.property does not exist yet; add it
+        if (newEffectStartTime > instanceStartTime)
+        {
+            for (j = 0; j < newMotionPath.keyframes.length; j++)
+                newMotionPath.keyframes[j].time +=
+                    (newEffectStartTime - instanceStartTime);
+        }
+        animationProperties.push(newMotionPath);
+    }
+
+    // TODO (chaase): This probably belongs at the AnimateTransform level,
+    // and make sure that it only kicks in when AnimateTransform is used
+    // explicitly; Someone performing a Move may not also want to
+    // automatically animate the rotation properties.
+    /**
+     * @private
+     *
+     * The main reason for this override is to handle automatically animating
+     * properties which may not have been explicitly called out as keyframes
+     * on the effect.
+     */
+    override public function play():void
+    {
+        var autoProps:Object = new Object();
+        var transformProps:Array = effect.getAffectedProperties();
+
+        if (propertyChanges)
+        {
+            for (var s:String in propertyChanges.end)
+                if (transformProps.indexOf(s) >= 0)
+                    autoProps[s] = s;
+        }
+        if (animationProperties)
+        {
+            var i:int;
+            var j:int;
+            var adjustXY:Boolean = transformCenter &&
+                (transformCenter.x != 0 || transformCenter.y != 0);
+            for (i = 0; i < animationProperties.length; ++i)
+            {
+                // don't auto-animate properties already explicitly animated
+                var animProp:MotionPath = animationProperties[i];
+                delete autoProps[animProp.property];
+                // also, adjust for tx/ty with non-default transform center
+                if (adjustXY &&
+                    (animProp.property == "translationX" ||
+                     animProp.property == "translationY"))
+                {
+                    for (j = 0; j < animProp.keyframes.length; ++j)
+                    {
+                        var kf:KeyFrame = animProp.keyframes[j];
+                        if (animProp.property == "translationX")
+                            kf.value += transformCenter.x;
+                        else
+                            kf.value += transformCenter.y;
+                    }
+                }
+            }
+        }
+        for (s in autoProps)
+        {
+            var mp:MotionPath = new MotionPath(s);
+            mp.keyframes = [new KeyFrame(0, null), new KeyFrame(duration, null)];
+            mp.mx_internal::scaleKeyframes(duration);
+            if (!animationProperties)
+                animationProperties = [];
+            animationProperties.push(mp);
+        }
+        super.play();
+    }
+
+    /**
+     * @private
+     *
+     * The superclass version of getCurrentValue() will only get values that
+     * actually exist on the target (as properties or styles). But we need to
+     * be able to get the translationXYZ values, which are fake values that
+     * we derive from the transform-related properties of the target.
+     * So we override this function to calculate and return the translation
+     * values appropriately.
+     */
+    override protected function getCurrentValue(property:String):*
+    {
+        // TODO (chaase): we're recalculating the transform for every
+        // component of the translation. We should store/retrieve the
+        // translation property as a structure instead of separate values
+        if (property == "translationX" || property == "translationY" ||
+            property == "translationZ")
+        {
+            var position:Vector3D = new Vector3D();
+            var postLayoutPosition:Vector3D = new Vector3D();
+            var xformCenter:Vector3D = (transformCenter) ?
+                transformCenter :
+                defaultTransformCenter;
+            target.transformPointToParent(xformCenter,
+                position, postLayoutPosition);
+            if (property == "translationX")
+                return position.x;
+            if (property == "translationY")
+                return position.y;
+            if (property == "translationZ")
+                return position.z;
+        }
+        else
+        {
+            return super.getCurrentValue(property);
+        }
+    }
+
+    /**
+     * @private
+     *
+     * We need to override this function because we need to apply all
+     * transform-related properties together, not one-by-one, which would be
+     * the case if we let the superclass handle this or just overrode
+     * setValue().
+     */
+    override protected function applyValues(anim:Animation):void
+    {
+        var tmpScale:Vector3D;
+        var tmpPosition:Vector3D;
+        var tmpRotation:Vector3D;
+
+        // We override this function because we want to apply all values
+        // simultaneously to perform our composite transform operation
+        for (var i:int = 0; i < animationProperties.length; ++i)
+        {
+            var holder:MotionPath = MotionPath(animationProperties[i]);
+            currentValues[holder.property] = anim.currentValue[i];
+        }
+        if (!isNaN(currentValues.scaleX) ||
+            !isNaN(currentValues.scaleY) ||
+            !isNaN(currentValues.scaleZ))
+        {
+            scale.x = !isNaN(currentValues.scaleX) ?
+                currentValues.scaleX : target["scaleX"];
+            scale.y = !isNaN(currentValues.scaleY) ?
+                currentValues.scaleY : target["scaleY"];
+            scale.z = !isNaN(currentValues.scaleY) ?
+                currentValues.scaleZ : target["scaleZ"];
+            tmpScale = scale;
+        }
+
+        if (!isNaN(currentValues.rotationX) ||
+            !isNaN(currentValues.rotationY) ||
+            !isNaN(currentValues.rotationZ))
+        {
+            rotation.x = !isNaN(currentValues.rotationX) ?
+                currentValues.rotationX : getCurrentValue("rotationX");
+            rotation.y = !isNaN(currentValues.rotationY) ?
+                currentValues.rotationY : getCurrentValue("rotationY");
+            rotation.z = !isNaN(currentValues.rotationZ) ?
+                currentValues.rotationZ : getCurrentValue("rotationZ");
+            tmpRotation = rotation;
+        }
+
+        position.x = !isNaN(currentValues.translationX) ?
+            currentValues.translationX :
+            getCurrentValue("translationX");
+        position.y = !isNaN(currentValues.translationY) ?
+            currentValues.translationY :
+            getCurrentValue("translationY");
+        position.z = !isNaN(currentValues.translationZ) ?
+            currentValues.translationZ :
+            getCurrentValue("translationZ");
+        tmpPosition = position;
+
+        target.transformAround(transformCenter, tmpScale, tmpRotation,
+            tmpPosition);
+    }
+
+}
+}


Ogg のデコードが最後まで行われていなかったのを修正

Ogg のデコードが最後まで行われていなかったのを修正

--- project/SoundConductor/src/jp/hiiragi/managers/soundConductor/RegisteredOggSoundData.as
+++ project/SoundConductor/src/jp/hiiragi/managers/soundConductor/RegisteredOggSoundData.as
@@ -320,7 +320,7 @@

 			soundByteArray.writeBytes(_tempBuffer);

-			if (position < length)
+			if (_tempBuffer.length > 0)
 			{
 				dispatchEvent(new OggDecodeEvent(OggDecodeEvent.PROGRESS, position, length));
 			}


removed break, added trace

removed break, added trace

--- WeaveCore/src/weave/utils/DebugTimer.as
+++ WeaveCore/src/weave/utils/DebugTimer.as
@@ -88,7 +88,7 @@
 			trace(lines.join('\n'));

 			if (elapsedTime > 1000)
-				break; // put breakpoint here
+				trace(); // put breakpoint here

 			return elapsedTime;
 		}


Fix for null error in as3SortOn

Fix for null error in as3SortOn

--- WeaveJS/src/weavejs/util/StandardLib.as
+++ WeaveJS/src/weavejs/util/StandardLib.as
@@ -653,7 +653,7 @@
 					customConvert = function(item:*):String
 					{
 						if (item === undefined || item === null) return "";
-						return item[fieldName].toString();
+						return String(item[fieldName]);
 					}
 				}
 				else if (option & AS3_CASEINSENSITIVE)
@@ -661,7 +661,7 @@
 					customConvert = function(item:*):String
 					{
 						if (item === undefined || item === null) return "";
-						return item[fieldName].toString().toLocaleLowerCase();
+						return String(item[fieldName]).toLocaleLowerCase();
 					}
 				}


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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/charts/src/mx/charts/LegendItem.as
+++ frameworks/projects/charts/src/mx/charts/LegendItem.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.charts
 {


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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17114
Author:   matamel@adobe.com
Date:     2010-07-29T08:15:41.870649Z

Log Message:
-----------
Revert the fix to  SDK-16648; it broke backwards compatibility in MXML.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
+++ frameworks/projects/rpc/src/mx/messaging/ChannelSet.as
@@ -56,7 +56,7 @@
  *  @productversion BlazeDS 4
  *  @productversion LCDS 3
  */
-[Event(name="connect", type="mx.messaging.events.ChannelEvent")]
+[Event(name="channelConnect", type="mx.messaging.events.ChannelEvent")]

 /**
  *  Dispatched after a Channel in the ChannelSet has disconnected from its
@@ -70,7 +70,7 @@
  *  @productversion BlazeDS 4
  *  @productversion LCDS 3
  */
-[Event(name="disconnect", type="mx.messaging.events.ChannelEvent")]
+[Event(name="channelDisconnect", type="mx.messaging.events.ChannelEvent")]

 /**
  *  Dispatched after a Channel in the ChannelSet has faulted.
@@ -83,7 +83,7 @@
  *  @productversion BlazeDS 4
  *  @productversion LCDS 3
  */
-[Event(name="fault", type="mx.messaging.events.ChannelFaultEvent")]
+[Event(name="channelFault", type="mx.messaging.events.ChannelFaultEvent")]

 /**
  * The result event is dispatched when a login or logout call successfully returns.


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

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

 package mx.rpc.wsdl
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 13099
Author:   egeorgie@adobe.com
Date:     2009-12-18T02:58:52.185083Z

Log Message:
-----------
Minor updates to the drag and drop protected APIs.

- LayoutBase calculateDragScrollDelta now takes only two parameters, the timeInterval parameter was removed while the timeElapsed interval was renamed to elapsedTime and its type was changed from int to Number.
- The drag and drop data format descriptors were renamed from "orderedItems" and "orderedItemsCaretIndex" to "itemsByIndex" and "caretIndex" respectively.
- Fixed a default value for the VerticalLayout requestedMinRowCount property to be -1 (was 0).

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Jason
Tests run: checkintests, mustella tests/gumbo/components/ListDragDrop
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.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/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -1402,10 +1402,10 @@
      */
     public function addDragData(dragSource:DragSource):void
     {
-        dragSource.addHandler(copySelectedItemsForDragDrop, "orderedItems");
+        dragSource.addHandler(copySelectedItemsForDragDrop, "itemsByIndex");

         // Calculate the index of the focus item within the vector
-        // of ordered items returned for the "orderedItems" format.
+        // of ordered items returned for the "itemsByIndex" format.
         var caretIndex:int = 0;
         var draggedIndices:Vector.<int> = selectedIndices;
         var count:int = draggedIndices.length;
@@ -1414,7 +1414,7 @@
             if (mouseDownIndex > draggedIndices[i])
                 caretIndex++;
         }
-        dragSource.addData(caretIndex, "orderedItemsCaretIndex");
+        dragSource.addData(caretIndex, "caretIndex");
     }

     /**
@@ -1631,7 +1631,7 @@
     private function calculateDropLocation(event:DragEvent):DropLocation
     {
         // Verify data format
-        if (!enabled || !event.dragSource.hasFormat("orderedItems"))
+        if (!enabled || !event.dragSource.hasFormat("itemsByIndex"))
             return null;

         // Calculate the drop location
@@ -1898,11 +1898,11 @@
         DragManager.showFeedback(event.ctrlKey ? DragManager.COPY : DragManager.MOVE);

         var dragSource:DragSource = event.dragSource;
-        var items:Vector.<Object> = dragSource.dataForFormat("orderedItems") as Vector.<Object>;
+        var items:Vector.<Object> = dragSource.dataForFormat("itemsByIndex") as Vector.<Object>;

         var caretIndex:int = -1;
-        if (dragSource.hasFormat("orderedItemsCaretIndex"))
-            caretIndex = event.dragSource.dataForFormat("orderedItemsCaretIndex") as int;
+        if (dragSource.hasFormat("caretIndex"))
+            caretIndex = event.dragSource.dataForFormat("caretIndex") as int;

         // Clear the selection first to avoid extra work while adding and removing items.
         // We will set a new selection further below in the method.


* 使用 [Transient] 排出 JSON 序列化时不需要的字段

* 使用 [Transient] 排出 JSON 序列化时不需要的字段

--- age/src/age/AGEConfig.as
+++ age/src/age/AGEConfig.as
@@ -9,6 +9,11 @@
 	 */
 	public class AGEConfig
 	{
+		/**
+		 * constructor
+		 * @param raw
+		 *
+		 */
 		public function AGEConfig(raw:Object = null)
 		{
 			fromJSON(raw);
@@ -17,6 +22,7 @@
 		/**
 		 * isDebugMode 变化时广播
 		 */
+		[Transient]
 		public var onIsDebugModeChange:Signal = new Signal();

 		private var _isDebugMode:Boolean;
@@ -40,6 +46,7 @@
 		/**
 		 * isMute 变化时广播
 		 */
+		[Transient]
 		public var onIsMuteChange:Signal = new Signal();

 		private var _isMute:Boolean;
@@ -63,6 +70,7 @@
 		/**
 		 * sfxVolumn 变化时广播
 		 */
+		[Transient]
 		public var onSFXVolumnChange:Signal = new Signal();

 		private var _sfxVolumn:Number;
@@ -86,6 +94,7 @@
 		/**
 		 * bgmVolumn 变化时广播
 		 */
+		[Transient]
 		public var onBGMVolumnChange:Signal = new Signal();

 		private var _bgmVolumn:Number;
@@ -106,6 +115,11 @@
 			onBGMVolumnChange.dispatch();
 		}

+		/**
+		 * 从 JSON 反序列化
+		 * @param raw
+		 *
+		 */
 		public function fromJSON(raw:Object):void
 		{
 			if (!raw)
@@ -116,10 +130,5 @@
 			restore(raw, this, "sfxVolumn");
 			restore(raw, this, "bgmVolumn");
 		}
-
-		public function toJSON(k:*):*
-		{
-			return { isMute: isMute, sfxVolumn: sfxVolumn, bgmVolumn: bgmVolumn };
-		}
 	}
 }


Update the gcClasses script to handle multiple definitions, out-of-tree definitions, and to filter trivial destructors and non-destructors (r=lhansen)

--- utils/gcClasses.as
+++ utils/gcClasses.as
@@ -40,9 +40,14 @@
 // Input is a bunch of file names and/or names of files from which to read file names.
 //
 // Output is a tree of classes derived from a root class (default GCFinalizedObject),
-// with an annotation about whether it has an explicit destructor or not (line
-// prefixed with "*").  Each class is printed with the file and line on which the
-// definition starts.
+// with per-class annotations:
+//
+//   - a "D" if the class has an explicit Destructor
+//   - a "E" if the class is Exactly traced
+//
+// Each class is printed with the file and line on which the definition starts.
+//
+// At the end some statistics are printed.
 //
 // Assumes names are globally unique (namespaces don't matter).  Is tricked by macro
 // definitions like in the Error objects, and by the use of the bitwise not operator
@@ -85,23 +90,35 @@
     [ new RegExp("^.*/shell/.*$"),
      new RegExp("^.*/extensions/ST_.*$"),
      new RegExp("^.*/extensions/JavaGlue.*$"),
+     new RegExp("^.*/eval/.*$"),
      new RegExp("^.*/MMgc/GCTests.*$")];

 class LineInfo
 {
-    function LineInfo(_derived, _base, _filename, _lineno) {
+    function LineInfo(_derived, _base, _isExact, _filename, _lineno) {
         derived = _derived;
         base = _base;
+        isExact = _isExact;
         filename = _filename;
         lineno = _lineno;
     }
+
+    public function toString() {
+        return "derived=" + derived + ", base=" + base + ", filename=" + filename + ", lineno=" + lineno + ", defcount=" + defcount;
+    }
+
     var derived;            // name of the class being defined
     var base;               // name of its base class
+    var isExact;            // true iff the class is exactly traced
     var filename;           // file where we found the definition of 'derived'
     var lineno;             // line where we found the definition of 'derived'
     var baseref = null;     // reference to the LineInfo for the base class
     var subrefs = [];       // list of known subclasses
     var destructor = false; // true if we believe this has a destructor
+    var defcount = 0;       // number of definitions
+    var otherlines = [];    // for in-tree lines beyond the first: locations of definition: { filename:x, lineno:n }
+    var exolines = [];      // for out-of-tree lines: locations of definition: { filename:x, lineno:n }
+    var external = false;   // true if there are definitions of the 'derived' name not within the tree
 }

 main(System.argv);
@@ -122,19 +139,31 @@
 function readFiles(argv) {
     var filenames_dict = {};
     var probable_destructors = {};
+    var probable_tracers = {};
     var all_lines = [];
-    var re1 = new RegExp("class\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*:.*(?:public|private|virtual)\\s*([A-Za-z0-9_:]+)");
-    var re2 = new RegExp("class\\s+GC_(?:AS3|CPP)_EXACT(?:[A-Z_]+)?\\(([^,\\)]+)\\s*,\\s*([^,\\)]+)");
-    var red = new RegExp("~\s*([A-Za-z_][A-Za-z0-9_]*)");
+    // Hack, hack, hack
+    var re1 = new RegExp("class\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*:.*(?:public|private|virtual)\\s*(?:MMgc\\s*::\\s*)?([A-Za-z0-9_:]+)");
+    var re2 = new RegExp("class\\s+GC_(?:MANUAL|AS3|CPP)_EXACT(?:[A-Z_]+)?\\(([^,\\)]+)\\s*,\\s*([^,\\)]+)");
+    var red = new RegExp("~\\s*([A-Za-z_][A-Za-z0-9_]*)\\s*\\(");
+    var red2 = new RegExp("virtual\\s*~\\s*([A-Za-z_][A-Za-z0-9_]*)\\s*\\(.*\\)\\s*{\\s*}");
+    var rtrace = new RegExp("([A-Za-z0-9_]+)\\s*::\\s*gcTrace");

     compute(argv,false);
     annotateDestructors();
+    annotateTracers();
     return all_lines;

     function annotateDestructors() {
         for ( var i=0 ; i < all_lines.length ; i++ ) {
             var ln = all_lines[i];
             ln.destructor = probable_destructors.hasOwnProperty(ln.derived);
+        }
+    }
+
+    function annotateTracers() {
+        for ( var i=0 ; i < all_lines.length ; i++ ) {
+            var ln = all_lines[i];
+            ln.isExact = ln.isExact || probable_tracers.hasOwnProperty(ln.derived);
         }
     }

@@ -156,6 +185,7 @@
         var lines = readFile(fn);
         var ignore = false;
         var ignorelevel = 0;
+
         for ( var i=0 ; i < lines.length ; i++ ) {
             var l = lines[i];
             var result;
@@ -178,16 +208,30 @@
                     }
                 }
             }
+
             if (l.indexOf("class") != -1) {
-                if ((result = l.match(re1)) || (result = l.match(re2))) {
+                var found = 0;
+                // Order matters because we want commented-out "class GC_MANUAL_EXACT( ..." to take precedence
+                // over the actual definition when we build the class tree.
+                if ((result = l.match(re2)) != null)
+                    found = 2;
+                else if ((result = l.match(re1)) != null)
+                    found = 1;
+                if (found) {
                     var derived = result[1];
                     var base = stripNamespaces(result[2]);
-                    all_lines.push(new LineInfo(derived,base,fn,i+1));
+                    all_lines.push(new LineInfo(derived,base,found==2,fn,i+1));
                 }
             }
             else if (!ignore && l.indexOf("~") != -1) {
                 if (result = l.match(red)) {
-                    probable_destructors[result[1]] = true;
+                    if (!l.match(red2)) // filter out trivial destructors
+                        probable_destructors[result[1]] = true;
+                }
+            }
+            else if (!ignore && l.indexOf("gcTrace") != -1) {
+                if (result = l.match(rtrace)) {
+                    probable_tracers[result[1]] = true;
                 }
             }
         }
@@ -216,19 +260,45 @@
     var classes = {};   // Map of classes processed or in queue to their LineInfo

     queue.push(rootclass);
-    classes[rootclass] = new LineInfo(rootclass, "", "(internal)", 0); // synthetic
+    classes[rootclass] = new LineInfo(rootclass, "", false, "(internal)", 0); // synthetic

     while (queue.length > 0) {
         var cls = queue.shift();
         for ( var l=0 ; l < lines.length ; l++ ) {
             var ln = lines[l];
-            if (classes.hasOwnProperty(ln.base) && !classes.hasOwnProperty(ln.derived)) {
-                var basecls = classes[ln.base];
-                ln.baseref = basecls;
-                basecls.subrefs.push(ln);
-                classes[ln.derived] = ln;
-                queue.push(ln.derived);
-            }
+            if (classes.hasOwnProperty(ln.base)) {
+                if (!classes.hasOwnProperty(ln.derived)) {
+                    var basecls = classes[ln.base];
+                    ln.baseref = basecls;
+                    basecls.subrefs.push(ln);
+                    classes[ln.derived] = ln;
+                    ln.defcount = 1;
+                    queue.push(ln.derived);
+                }
+                else {
+                    // Flag it as used, but it's not canonical because
+                    // it's not in the classes table.
+                    ln.defcount = 1;
+                }
+            }
+        }
+    }
+
+    // Compute lines for multiple in-tree definitions, and attributes for not-within-tree definitions
+
+    for ( var l=0 ; l < lines.length ; l++ ) {
+        var ln = lines[l];
+        if (ln.defcount > 0 && classes.hasOwnProperty(ln.derived)) {
+            var c = classes[ln.derived];
+            if (c !== ln) {
+                c.defcount++;
+                c.otherlines.push({filename: ln.filename, lineno: ln.lineno});
+            }
+        }
+        if (ln.defcount == 0 && classes.hasOwnProperty(ln.derived)) {
+            var c = classes[ln.derived];
+            c.external = true;
+            c.exolines.push({filename: ln.filename, lineno: ln.lineno});
         }
     }

@@ -236,12 +306,42 @@
 }

 function printClasses(classes) {
+    var destructors = 0;
+    var exacts = 0;
+    var classcount = 0;
+
+    print("Legend:");
+    print("  D - at least one of the definitions has an explicit destructor");
+    print("  E - at least one of the definitions is exactly traced");
+    print("  M - multiple definitions in the tree (in different namespaces or nested within classes)");
+    print("  # - continuation line for M with additional locations");
+    print("  X - definitions of the same name exist outside the tree");
+    print("  @ - continuation line for @ with locations");
+    print("");
+
     printCls(classes[rootclass], 0);
+    print("");
+    print("Classes: " + classcount);
+    print("Explicit destructors: " + destructors);
+    print("Exactly traced: " + exacts + " (" + Math.round(exacts/classcount*100) + "%)");

     function printCls(cls, indent) {
         if (!ignoreIt(cls)) {
-            var d = cls.destructor ? " * " : "   ";
+            classcount++;
+            if (cls.destructor) destructors++;
+            if (cls.isExact) exacts++;
+            var d = " " + (cls.destructor ? "D" : " ") + (cls.isExact ? "E" : " ") + (cls.defcount > 1 ? "M" : " ") + (cls.external ? "X" : " ") + "  ";
             print(d + padTo50(spaces(indent) + cls.derived) + " " + cls.filename + ":" + cls.lineno);
+            if (cls.defcount > 1) {
+                var locs = cls.otherlines;
+                for ( var l=0 ; l < locs.length ; l++ )
+                    print("   #    " + padTo50("") + locs[l].filename + ":" + locs[l].lineno);
+            }
+            if (cls.external) {
+                var locs = cls.exolines;
+                for ( var l=0 ; l < locs.length ; l++ )
+                    print("    @   " + padTo50("") + locs[l].filename + ":" + locs[l].lineno);
+            }
         }
         cls.subrefs.sort(function (a,b) { return strcmp(a.derived, b.derived); })
         for ( var i=0 ; i < cls.subrefs.length ; i++ ) {


fixed documentation

fixed documentation

--- WeaveCore/src/weave/core/ChildListCallbackInterface.as
+++ WeaveCore/src/weave/core/ChildListCallbackInterface.as
@@ -51,14 +51,13 @@
 		 * @param name This is the name of the object that was just added or removed from the hash map.
 		 * @param objectAdded This is the object that was just added to the hash map.
 		 * @param objectRemoved This is the object that was just removed from the hash map.
-		 * @param orderChanged This is true if the order of the entries in the hash map changed.
 		 */
 		public function setCallbackVariables(name:String = null, objectAdded:ILinkableObject = null, objectRemoved:ILinkableObject = null):void
 		{
 			_lastNameAdded = objectAdded ? name : null;
 			_lastObjectAdded = objectAdded;
 			_lastNameRemoved = objectRemoved ? name : null;
-			_lastObjectRemoved = objectRemoved;
+			_lastObjectRemoved = objectRemoved;
 		}

 		/**


added call to flash.system.System.pauseForGCIfCollectionImminent().

--- WeaveCore/src/weave/core/StageUtils.as
+++ WeaveCore/src/weave/core/StageUtils.as
@@ -26,6 +26,7 @@
 	import flash.events.TimerEvent;
 	import flash.geom.Point;
 	import flash.utils.Dictionary;
+	import flash.utils.getDefinitionByName;
 	import flash.utils.getTimer;

 	import mx.core.UIComponentGlobals;
@@ -53,6 +54,10 @@
 	{
 		public function StageUtils()
 		{
+			try {
+				this.pauseForGCIfCollectionImminent = getDefinitionByName('flash.system.System')["pauseForGCIfCollectionImminent"];
+			} catch (e:Error) { }
+
 			eventManager.throttledMouseMoveInterval = maxComputationTimePerFrame;
 			addEventCallback(Event.ENTER_FRAME, null, handleCallLater);
 			addEventCallback(Event.RENDER, null, handleCallLater);
@@ -68,6 +73,7 @@
 		public static var debug_callLater:Boolean = false; // set this to true to delay async tasks
 		public var averageFrameTime:int = 0;

+		private var pauseForGCIfCollectionImminent:Function = null;
 		private const frameTimes:Array = [];
 		private const _stackTraceMap:Dictionary = new Dictionary(true); // used by callLater to remember stack traces
 		private const _taskElapsedTime:Dictionary = new Dictionary(true);
@@ -316,6 +322,8 @@
 			_currentTaskStopTime = allStop; // make sure _iterateTask knows when to stop

 			// first run the functions that should be called before anything else.
+			if (pauseForGCIfCollectionImminent != null)
+				pauseForGCIfCollectionImminent();
 			var queue:Array = _priorityCallLaterQueues[WeaveAPI.TASK_PRIORITY_IMMEDIATE] as Array;
 			var countdown:int;
 			for (countdown = queue.length; countdown > 0; countdown--)


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 18685
Author:   chiedozi@adobe.com
Date:     2010-11-17T23:41:28.244847Z

Log Message:
-----------
MobileApplication classes have been renamed to ViewNavigatorApplication.  Specific file changes are:
MobileApplicationBase  -->  ViewNavigatorApplicationBase
MobileApplication --> ViewNavigatorApplication
MobileApplicationSkin -->  ViewNavigatorApplicationSkin
TabbedMobileApplication -->  TabbedViewNavigatorApplication
TabbedMobileApplicationSkin --> TabbedViewNavigatorApplicationSkin

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchVirtualizedASTextField.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchVirtualizedMXMLLabel.mxml</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as" copyfrom-rev="18641" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenuItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/RadioStations/src/RadioStations.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchVirtualizedMXMLTextField.mxml</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/MobileApplicationSkin.as" copyfrom-rev="18641" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/managers/PersistenceManager.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as" copyfrom-rev="18641" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ComponentCatalog.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedMobileApplicationSkin.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as" copyfrom-rev="18641" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchASLabel.mxml</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/tests/performance/mobile/TextTest/src/TextTest.mxml</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedMobileApplicationSkin.as" copyfrom-rev="18641" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchASTextField.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchMXMLLabel.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="dir" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/managers/IPersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchMXMLTextField.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TwitterSearch/src/TwitterSearchVirtualizedASLabel.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TransitionTests/src/TransitionTests.mxml</path>
<path kind="dir" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers" copyfrom-rev="18641" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/managers</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/MobileApplicationSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as
@@ -33,11 +33,11 @@
  *  The ViewNavigatorBase class defines the base class logic and
  *  interface used by view navigators.  This class contains
  *  methods and properties related to view management, as well
- *  as integration points with MobileApplicationBase application
+ *  as integration points with ViewNavigatorApplicationBase application
  *  classes.
  *
  *  @see spark.components.ViewNavigator
- *  @see spark.components.MobileApplication
+ *  @see spark.components.ViewNavigatorApplication
  */
 public class ViewNavigatorBase extends SkinnableContainer
 {
@@ -143,7 +143,7 @@
      *  will run.
      *
      *
This method is only called if the navigator is the main navigator
-     *  of a MobileApplication class
.
+     *  of a ViewNavigatorApplication class
.
      *
      *  @default true
      *
@@ -512,7 +512,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  If the navigator is the main navigator of the MobileApplication or
+     *  If the navigator is the main navigator of the ViewNavigatorApplication or
      *  class, this method is called when the back device key is pressed.
      *
      *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 21300
Author:   jasonsj@adobe.com
Date:     2011-05-26T20:57:28.223503Z

Log Message:
-----------
Add 1 additional unit of leading to the measured text height to account for undocumented TextField behavior.

QE notes: TextArea height changes will affect some mustella tests that have content larger than the default height.
Doc notes:
Bugs:
SDK-30416 Text is larger than default sized TextArea
Reviewer: gruehle
Tests run: checkintests, mustella-mobile cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -311,9 +311,9 @@
             }

             // Multi-line text enables internal scrolling if we use textHeight. Adding
-            // half of the padding (2 pixels) solves that problem.
+            // leading solves that problem.
             if (numLines > 1)
-                _measuredTextSize.y += TEXT_HEIGHT_PADDING / 2;
+                _measuredTextSize.y += getStyle("leading");

             // account for floating point errors to fix accidental clipping
             // or truncation
@@ -1394,7 +1394,7 @@
         var topLevelApp:Application = FlexGlobals.topLevelApplication as Application;

         if (!(topLevelApp && topLevelApp.isSoftKeyboardActive))
-        event.preventDefault();
+            event.preventDefault();
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 20644
Author:   mhorn@adobe.com
Date:     2011-03-07T18:49:20.181589Z

Log Message:
-----------
ASDoc updates

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarFirstTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</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/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TransparentNavigationButtonSkin.as</path>
<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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarLastTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonBarButtonClassFactory.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarFirstTabSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarFirstTabSkin.as
@@ -30,6 +30,14 @@
  */
 public class TabbedViewNavigatorTabBarFirstTabSkin extends TabbedViewNavigatorTabBarTabSkinBase
 {
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     public function TabbedViewNavigatorTabBarFirstTabSkin()
     {
         super();


Fix GATracker import

Fix GATracker import

--- src/com/google/analytics/GATracker.as
+++ src/com/google/analytics/GATracker.as
@@ -23,7 +23,6 @@
     import com.google.analytics.core.Buffer;
     import com.google.analytics.core.EventTracker;
     import com.google.analytics.core.GIFRequest;
-    import com.google.analytics.core.IdleTimer;
     import com.google.analytics.core.ServerOperationMode;
     import com.google.analytics.core.TrackerCache;
     import com.google.analytics.core.TrackerMode;
@@ -43,7 +42,30 @@

     import flash.display.DisplayObject;
     import flash.events.Event;
-    import flash.events.EventDispatcher;
+    import flash.events.EventDispatcher;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

     /* force import for type in the includes */
     EventTracker;


Cleaned up the initialize override hook

Cleaned up the initialize override hook

--- src/org/robotlegs/base/ContextBase.as
+++ src/org/robotlegs/base/ContextBase.as
@@ -50,7 +50,7 @@
 		protected var _reflector:IReflector;

 		/**
-		 * Default Context Implementation
+		 * Abstarct Context Implementation
 		 *
 		 *
Extend this class to create a Framework or Application context

 		 *
@@ -67,6 +67,8 @@
 			_injector = injector;
 			_reflector = reflector;
 			initialize();
+			mapInjections();
+			checkAutoStartup();
 		}

 		// API ////////////////////////////////////////////////////////////////
@@ -123,26 +125,20 @@
 			return _contextView;
 		}

-		// CPI ////////////////////////////////////////////////////////////////
-
-		/**
-		 * Initialize the Framework apparatus
-		 *
-		 *
Override this in your Framework or Application context to alter the default (fallback) apparatus

-		 *
-		 *
NOTE: be sure to call super.initialize() at the end to proceed with the the Injection Mapping and autoStartup check

-		 *
-		 *
You might however decide to completely intercept the startup check should you so wish

+		// HOOKS //////////////////////////////////////////////////////////////
+
+		/**
+		 * Initialize Hook
+		 *
+		 *
Override this hook to reconfigure the default framework aparatus

 		 */
 		protected function initialize():void
 		{
-			mapInjections();
-			checkAutoStartup();
-		}
-
-		/**
-		 * Bind some commonly needed contextual dependencies for convenience
-		 *
+		}
+
+		/**
+		 * Injection Mapping Hook
+		 *
 		 *
Override this in your Framework context to change the default (blank) configuration

 		 *
 		 *
Beware of collisions in your container


Applied the same refactoring to DeluxeSignal: consolidated logic in registerListener().

--- src/org/osflash/signals/DeluxeSignal.as
+++ src/org/osflash/signals/DeluxeSignal.as
@@ -67,22 +67,13 @@
 		//TODO: @throws
 		public function add(listener:Function, priority:int = 0):void
 		{
-			if (onceListeners[listener])
-				throw new IllegalOperationError('You cannot addOnce() then add() the same listener without removing the relationship first.');
-
-			registerListener(listener, priority);
+			registerListener(listener, false, priority);
 		}

 		/** @inheritDoc */
 		public function addOnce(listener:Function, priority:int = 0):void
 		{
-			// If the listener has been added as once, don't do anything.
-			if (onceListeners[listener]) return;
-			if (indexOfListener(listener) >= 0 && !onceListeners[listener])
-				throw new IllegalOperationError('You cannot add() then addOnce() the same listener without removing the relationship first.');
-
-			registerListener(listener, priority);
-			onceListeners[listener] = true;
+			registerListener(listener, true, priority);
 		}

 		/** @inheritDoc */
@@ -188,7 +179,7 @@
 			}
 		}

-		protected function registerListener(listener:Function, priority:int):void
+		protected function registerListener(listener:Function, once:Boolean = false, priority:int = 0):void
 		{
 			// function.length is the number of arguments.
 			if (listener.length < _valueClasses.length)
@@ -202,12 +193,26 @@
 			if (!listenerBoxes.length)
 			{
 				listenerBoxes[0] = listenerBox;
+				if (once) onceListeners[listener] = true;
 				return;
 			}

-			// Don't add the same listener twice.
-			if (indexOfListener(listener) >= 0)
+			var prevListenerIndex:int = indexOfListener(listener);
+			if (prevListenerIndex >= 0)
+			{
+				// If the listener was previously added, definitely don't add it again.
+				// But throw an exception in some cases, as the error messages explain.
+				if (onceListeners[listener] && !once)
+				{
+					throw new IllegalOperationError('You cannot addOnce() then add() the same listener without removing the relationship first.');
+				}
+				else if (!onceListeners[listener] && once)
+				{
+					throw new IllegalOperationError('You cannot add() then addOnce() the same listener without removing the relationship first.');
+				}
+				// Listener was already added, so do nothing.
 				return;
+			}

 			// Assume the listeners are already sorted by priority
 			// and insert in the right spot. For listeners with the same priority,
@@ -225,6 +230,7 @@

 			// If we made it this far, the new listener has lowest priority, so put it last.
 			listenerBoxes[listenerBoxes.length] = listenerBox;
+			if (once) onceListeners[listener] = true;
 		}

 	}


add backtrace function

add backtrace function

--- vivified/core/vivi_initialize.as
+++ vivified/core/vivi_initialize.as
@@ -98,3 +98,16 @@
   b.active = false;
 };
 Commands.delete = Commands.del;
+Commands.where = function () {
+  var frame = Player.frame;
+  if (frame == undefined) {
+    print ("---");
+    return;
+  }
+  while (frame) {
+    print (frame);
+    frame = frame.next;
+  }
+};
+Commands.backtrace = Commands.where;
+Commands.bt = Commands.where;


navigateToURLing when ExternalInterface is not available

--- src/patternpark/net/navigateToWindow.as
+++ src/patternpark/net/navigateToWindow.as
@@ -4,41 +4,36 @@
     import flash.net.URLRequest;

     public function navigateToWindow(url:String, winName:String="", winFeatures:Object=null):void {
-        if(ExternalInterface.available) {
-            winName = (winName == "") ? String(Math.round(9999 * Math.random()) + new Date().getTime()) : winName;
-            winFeatures ||= new Object();
-            var toolbar:Number      = (winFeatures.toolbar == null) ? 1 : winFeatures.toolbar;
-            var scrollbars:Number   = (winFeatures.scrollbars == null) ? 1 : winFeatures.scrollbars;
-            var location:Number     = (winFeatures.location == null) ? 1 : winFeatures.location;
-            var statusbar:Number    = (winFeatures.statusbar == null) ? 0 : winFeatures.statusbar;
-            var menubar:Number      = (winFeatures.menubar == null) ? 0 : winFeatures.menubar;
-            var resizable:Number    = (winFeatures.resizable == null) ? 1 : winFeatures.resizable;
-            var width:Number        = (winFeatures.width == null) ? 800 : winFeatures.width;
-            var height:Number       = (winFeatures.height == null) ? 700 : winFeatures.height;
-            var left:Number         = (winFeatures.left == null) ? 200 : winFeatures.left;
-            var top:Number          = (winFeatures.top == null) ? 100 : winFeatures.top;
-
-            var js:String = (<![CDATA[
-                function(url, winName, toolbar, scrollbars, location, statusbar, menubar, resizable, width, height, left, top) {
-                    var winNew = window.open(url,winName,"toolbar=" + toolbar + ",scrollbars=" + scrollbars + ",location=" + location + ",statusbar=" + statusbar + ",menubar=" + menubar + ",resizable=" + resizable + ",width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
+        winName = (winName == "") ? String(Math.round(9999 * Math.random()) + new Date().getTime()) : winName;
+        winFeatures ||= new Object();
+        var toolbar:Number      = (winFeatures.toolbar == null) ? 1 : winFeatures.toolbar;
+        var scrollbars:Number   = (winFeatures.scrollbars == null) ? 1 : winFeatures.scrollbars;
+        var location:Number     = (winFeatures.location == null) ? 1 : winFeatures.location;
+        var statusbar:Number    = (winFeatures.statusbar == null) ? 0 : winFeatures.statusbar;
+        var menubar:Number      = (winFeatures.menubar == null) ? 0 : winFeatures.menubar;
+        var resizable:Number    = (winFeatures.resizable == null) ? 1 : winFeatures.resizable;
+        var width:Number        = (winFeatures.width == null) ? 800 : winFeatures.width;
+        var height:Number       = (winFeatures.height == null) ? 700 : winFeatures.height;
+        var left:Number         = (winFeatures.left == null) ? 200 : winFeatures.left;
+        var top:Number          = (winFeatures.top == null) ? 100 : winFeatures.top;
+
+        var js:String = (<![CDATA[
+            function(url, winName, toolbar, scrollbars, location, statusbar, menubar, resizable, width, height, left, top) {
+                var winNew = window.open(url,winName,"toolbar=" + toolbar + ",scrollbars=" + scrollbars + ",location=" + location + ",statusbar=" + statusbar + ",menubar=" + menubar + ",resizable=" + resizable + ",width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);

-                    if(!winNew) {
-                        return false;
-                    }
-                    else {
-                        winNew.focus();
-                        return true;
-                    }
+                if(!winNew) {
+                    return false;
                 }
-            ]]>).toString();
+                else {
+                    winNew.focus();
+                    return true;
+                }
+            }
+        ]]>).toString();

-            if(!ExternalInterface.call(js, url, winName, toolbar, scrollbars, location, statusbar, menubar, resizable, width, height, left, top)) {
-                var urlRequest:URLRequest = new URLRequest(url);
-                navigateToURL(urlRequest, "_blank");
-            }
-        }
-        else {
-            throw new Error("[navigateToWindow requires that ExternalInterface is available. The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.]");
+        if(!ExternalInterface.available || !ExternalInterface.call(js, url, winName, toolbar, scrollbars, location, statusbar, menubar, resizable, width, height, left, top)) {
+            var urlRequest:URLRequest = new URLRequest(url);
+            navigateToURL(urlRequest, "_blank");
         }
     }
 }


indent

indent

--- AS-Spray.as
+++ AS-Spray.as
@@ -12,7 +12,7 @@
 		private var size:uint;
 		private var alignment:uint;
 		public function AsSpray():void
-    		{
+		{
 			var block:Vector.<Object> = null;
 			var index:uint = 0;
 			size = 100000;
@@ -37,5 +37,5 @@
 			ExternalInterface.call("check","Vector Spray done");
 			ExternalInterface.addCallback("Corruption",Leak);
 		}
-  	}
+	}
 }


Change 20080206-bargull-0 by bargull@dell--p4--2-53 on 2008-02-06 21:22:48
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: unregister delegates

New Features:

Bugs Fixed: LPP-5408 - "Missing "LzDelegate#unregisterAll(..)" in LzSprite"

Technical Reviewer: ptw (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
added unregister for delegates

Tests:

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@7995 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf/LzSprite.as
+++ WEB-INF/lps/lfc/kernel/swf/LzSprite.as
@@ -981,6 +981,13 @@
     if (this.doQueuedDel) {
         this.doQueuedDel.unregisterAll();
         delete this.doQueuedDel;
+    }
+
+    if (this._moDel) {
+        this._moDel.unregisterAll();
+        delete this._moDel;
+        this._muDel.unregisterAll();
+        delete this._muDel;
     }

     this.__LZFinishDestroyOnIdle();


Added fullscreen events

Added fullscreen events

--- src/Player.as
+++ src/Player.as
@@ -109,9 +109,11 @@
     }

     public function fullscreen(event:MouseEvent):void {
-      if (config.allowFullscreen)
+      if (config.allowFullscreen) {
         this.stage.displayState = (StageDisplayState.NORMAL === stage.displayState) ?
           StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL;
+          (StageDisplayState.NORMAL === stage.displayState) ? this.callAPI("fullscreenExited") : this.callAPI("fullscreenEntered");
+      }
     }

     public function videoResize():void {


refactored some loading method in Loader3D

--- src/aerys/minko/scene/node/Loader3D.as
+++ src/aerys/minko/scene/node/Loader3D.as
@@ -140,85 +140,53 @@

 			return this;
 		}
-
-		public static function loadBytes(bytes : ByteArray) : Loader3D
-		{
-			return new Loader3D().loadBytes(bytes);
-
-/*			for (var extension : String in PARSERS)
-			{
-				var parser : IParser3D = PARSERS[extension];
-
-				bytes.position = 0;
-
-				if (parser.parse(bytes))
-				{
-					var data	: Vector.<IScene>	= parser.data;
-					var length	: int				= data ? data.length : 0;
-
-					for (var i : int = 0; i < length; ++i)
-						loader.addChild(data[i]);
-
-					return loader;
-				}
-			}
-
-			var contentLoader 	: Loader 	= new Loader();
-			var textureGroup 	: IGroup 	= new Group();
-
-			contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e : Event) : void
-			{
-				var info 	: LoaderInfo 	= e.target as LoaderInfo;
-				var texture	: ITexture 		= null;
-
-				if (info.content is MovieClip)
-					textureGroup.addChild(new MovieClipTexture(info.content as MovieClip));
-				else if (info.content is Bitmap)
-					textureGroup.addChild(texture = new BitmapTexture((info.content as Bitmap).bitmapData));
-			});
-			contentLoader.loadBytes(bytes);
-
-			loader.addChild(textureGroup)
-
-			return loader;*/
-		}
-
-		public static function loadAsset(asset : Class) : Loader3D
+
+		public function loadAsset(asset : Class) : Loader3D
 		{
 			var assetObject : Object 	= new asset();

 			if (assetObject is MovieClip)
 			{
-				var mc 		: MovieClip	= assetObject as MovieClip;
-				var loader 	: Loader 	= null;
-
-				if (mc.numChildren == 1 && (loader = mc.getChildAt(0) as Loader))
+				var mc 				: MovieClip	= assetObject as MovieClip;
+				var contentLoader 	: Loader 	= null;
+
+				if (mc.numChildren == 1 && (contentLoader = mc.getChildAt(0) as Loader))
 				{
 					var texture : MovieClipTexture = new MovieClipTexture();

-					loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
-															  function(e : Event) : void
+					contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
+					function(e : Event) : void
 					{
-						texture.source = loader.content as MovieClip;
+						texture.source = contentLoader.content as MovieClip;
 					});
-
-					return new Group(texture);
+
+					addChild(texture);
 				}
 				else
 				{
-					return new Group(new MovieClipTexture(mc));
+					addChild(new MovieClipTexture(mc));
 				}
 			}
 			else if (assetObject is IBitmapDrawable)
 			{
-				return new Group(BitmapTexture.fromDisplayObject(assetObject as Bitmap));
+				addChild(BitmapTexture.fromDisplayObject(assetObject as Bitmap));
 			}
 			else if (assetObject is ByteArray)
 			{
 				return loadBytes(assetObject as ByteArray);
 			}

-			return null;
+			return this;
+		}
+
+		public static function loadBytes(bytes : ByteArray) : Loader3D
+		{
+			return new Loader3D().loadBytes(bytes);
+		}
+
+		public static function loadAsset(asset : Class) : Loader3D
+		{
+			return new Loader3D().loadAsset(asset);
 		}

 		private function urlLoaderCompleteHandler(event : Event) : void


add Matrix4x4 getColumn(), setColumn(), getRow(), setRow() methods

--- src/aerys/minko/type/math/Matrix4x4.as
+++ src/aerys/minko/type/math/Matrix4x4.as
@@ -11,7 +11,7 @@

 	use namespace minko_math;

-	public final class Matrix4x4 implements IWatchable
+	public class Matrix4x4 implements IWatchable
 	{
 		private static const FACTORY			: Factory			= Factory.getFactory(Matrix4x4);
 		private static const RAD2DEG			: Number			= 180. / Math.PI;
@@ -418,6 +418,50 @@
 			if (!_locked)
 				_changed.execute(this);

+			return this;
+		}
+
+		public function getColumn(column : uint, out : Vector4 = null) : Vector4
+		{
+			out ||= new Vector4();
+
+			_matrix.copyColumnTo(column, out._vector);
+
+			if (!out.locked)
+				out.changed.execute(out);
+
+			return out;
+		}
+
+		public function setColumn(column : uint, value : Vector4) : Matrix4x4
+		{
+			_matrix.copyColumnFrom(column, value._vector);
+
+			if (!_locked)
+				_changed.execute(this);
+
+			return this;
+		}
+
+		public function getRow(row : uint, out : Vector4 = null) : Vector4
+		{
+			out ||= new Vector4();
+
+			_matrix.copyColumnTo(row, out._vector);
+
+			if (!out.locked)
+				out.changed.execute(out);
+
+			return out;
+		}
+
+		public function setRow(row : uint, value : Vector4) : Matrix4x4
+		{
+			_matrix.copyRowFrom(row, value._vector);
+
+			if (!_locked)
+				_changed.execute(this);
+
 			return this;
 		}


Added node parenting support to Tundra scene import.

--- Bin/Data/Scripts/Editor/EditorImport.as
+++ Bin/Data/Scripts/Editor/EditorImport.as
@@ -1,6 +1,12 @@
 // Urho3D editor import functions

 bool useLocalIDs = false;
+
+class ParentAssignment
+{
+    uint childID;
+    String parentName;
+}

 void ImportModel(const String&in fileName)
 {
@@ -71,21 +77,23 @@
     }
 }

+
 void ImportTundraScene(const String&in fileName)
 {
     fileSystem.CreateDir(sceneResourcePath + "Materials");
     fileSystem.CreateDir(sceneResourcePath + "Models");
     fileSystem.CreateDir(sceneResourcePath + "Textures");
-
+
     XMLFile source;
     source.Load(File(fileName, FILE_READ));
     String filePath = GetPath(fileName);

     XMLElement sceneElem = source.root;
     XMLElement entityElem = sceneElem.GetChild("entity");
-
+
     Array<String> convertedMaterials;
     Array<String> convertedMeshes;
+    Array<ParentAssignment> parentAssignments;

     // Clear old scene, then create a zone and a directional light first
     CreateScene();
@@ -108,6 +116,7 @@
     {
         String nodeName;
         String meshName;
+        String parentName;
         Vector3 meshPos;
         Vector3 meshRot;
         Vector3 meshScale(1, 1, 1);
@@ -147,6 +156,7 @@
                 pos.z = -pos.z; // Convert to lefthanded
                 rot = GetVector3FromStrings(coords, 3);
                 scale = GetVector3FromStrings(coords, 6);
+                parentName = GetComponentAttribute(compElem, "Parent entity ref");
             }

             compElem = compElem.GetNext("component");
@@ -203,9 +213,27 @@
             model.castShadows = castShadows;
             for (uint i = 0; i < materialNames.length; ++i)
                 model.materials[i] = cache.GetResource("Material", "Materials/" + materialNames[i].Replaced(".material", ".xml"));
+
+            // Store pending parent assignment if necessary
+            if (!parentName.empty)
+            {
+                ParentAssignment assignment;
+                assignment.childID = newNode.id;
+                assignment.parentName = parentName;
+                parentAssignments.Push(assignment);
+            }
         }

         entityElem = entityElem.GetNext("entity");
+    }
+
+    // Process any parent assignments now
+    for (uint i = 0; i < parentAssignments.length; ++i)
+    {
+        Node@ childNode = editorScene.GetNodeByID(parentAssignments[i].childID);
+        Node@ parentNode = editorScene.GetChild(parentAssignments[i].parentName, true);
+        if (childNode !is null && parentNode !is null)
+            childNode.parent = parentNode;
     }

     UpdateSceneWindow();


Fix missing preventDefault() for error events

--- example/ExampleApp.as
+++ example/ExampleApp.as
@@ -157,6 +157,8 @@
             (event.target as TwitterRequest).removeEventListener(TwitterErrorEvent.SERVER_ERROR, onOAuthRequestTokenError);

             this.outputConsole.appendText("Error: " + event.statusCode.toString() + "\n");
+
+            event.preventDefault();
         }

         // When the "access token" button is clicked
@@ -194,6 +196,8 @@
             (event.target as TwitterRequest).removeEventListener(TwitterErrorEvent.SERVER_ERROR, onOAuthAccessTokenError);

             this.outputConsole.appendText("Error: " + event.statusCode.toString() + "\n");
+
+            event.preventDefault();
         }

         // When the tweet button is clicked
@@ -229,6 +233,8 @@
             (event.target as TwitterRequest).removeEventListener(TwitterErrorEvent.SERVER_ERROR, onStatusesUpdateError);

             this.outputConsole.appendText("Error: " + event.statusCode.toString() + "\n");
+
+            event.preventDefault();
         }

     }


Added try/catch

Added try/catch

Change-Id: I5704e3847b36fc68d85c1b5168b38333bc769027

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -622,13 +622,18 @@
 		 */
 		public function isValidSymbolName(expression:String):Boolean
 		{
-			var tokens:Array = getTokens(expression);
-			if (tokens.length != 1 || expression != tokens[0])
-				return false;
-			var str:String = tokens[0];
-			if (operators.hasOwnProperty(str.charAt(0)))
-				return false;
-			return !numberRegex.exec(str);
+			try
+			{
+				var tokens:Array = getTokens(expression);
+				if (tokens.length != 1 || expression != tokens[0])
+					return false;
+				var str:String = tokens[0];
+				if (operators.hasOwnProperty(str.charAt(0)))
+					return false;
+				return !numberRegex.exec(str);
+			}
+			catch (e:Error) { }
+			return false;
 		}

 		/**


Hide the skin while it is being initialized.

--- src/goplayer/SkinPlayerView.as
+++ src/goplayer/SkinPlayerView.as
@@ -39,6 +39,8 @@
       addChild(bufferingIndicator)
       addChild(skin.root)

+      skin.root.visible = false
+
       video.addUpdateListener(this)
     }

@@ -68,6 +70,8 @@
     public function handlePlayerVideoUpdated() : void
     {
       setDimensions(skin.root, video.dimensions)
+
+      skin.root.visible = true

       skin.bufferRatio = player.bufferRatio
       skin.playheadRatio = player.playheadRatio


removeNamespace(), some work on replace(), asst.

--- frameworks/projects/XML/as/src/XML.as
+++ frameworks/projects/XML/as/src/XML.as
@@ -645,6 +645,11 @@

 			return xml;
 		}
+
+		private function deleteChildAt(idx:int):void
+		{
+
+		}

 		/**
 		 * Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object that have the given name parameter.
@@ -962,6 +967,27 @@
 		}

 		private function insertChildAt(child:XML,idx:int):void{
+			/*
+				When the [[Insert]] method of an XML object x is called with property name P and value V, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return
+				2. Let i = ToUint32(P)
+				3. If (ToString(i) is not equal to P), throw a TypeError exception
+				4. If Type(V) is XML and (V is x or an ancestor of x) throw an Error exception
+				5. Let n = 1
+				6. If Type(V) is XMLList, let n = V.[[Length]]
+				7. If n == 0, Return
+				8. For j = x.[[Length]]-1 downto i, rename property ToString(j) of x to ToString(j + n)
+				9. Let x.[[Length]] = x.[[Length]] + n
+				10. If Type(V) is XMLList
+				  a. For j = 0 to V.[[Length-1]]
+				    i. V[j].[[Parent]] = x
+				    ii. x[i + j] = V[j]
+				11. Else
+				  a. Call the [[Replace]] method of x with arguments i and V
+				12. Return
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
+				return;
 			if(!child)
 				return;
 			var parent:XML = child.parent();
@@ -1218,10 +1244,10 @@
 					if(lastChild && lastChild.nodeKind() == "text")
 					{
 						child.setValue(child.text() + lastChild.text());
-						this.removeChildAt(i+1);
+						deleteChildAt(i+1);
 					}
 					if(!child.text())
-						this.removeChildAt(i);
+						deleteChildAt(i);
 				}
 				lastChild = child;
 			}
@@ -1381,6 +1407,7 @@
 				3. Else throw a TypeError exception
 			*/
 			//Do nothing for XML objects?
+			throw new Error("Cannot call delete on XML");
 		}

 		/**
@@ -1393,6 +1420,11 @@
 		public function removeNamespace(ns:*):XML
 		{
 			/*
+				Overview
+				The removeNamespace method removes the given namespace from the in scope namespaces of this object and all its descendents,
+				then returns a copy of this XML object. The removeNamespaces method will not remove a namespace from an object where it is referenced
+				by that object’s QName or the QNames of that object’s attributes.
+				Semantics
 				When the removeNamespace method is called on an XML object x with parameter namespace, the following steps are taken:
 				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
 				2. Let ns be a Namespace object created as if by calling the function Namespace( namespace )
@@ -1409,12 +1441,33 @@
 				  a. If p.[[Class]] = "element", call the removeNamespace method of p with argument ns
 				9. Return x
 			*/
+			var i:int;
 			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind == "attribute")
 				return this;
 			if(!(ns is Namespace))
 				ns = new Namespace(ns);
-
-			return null;
+			if(ns == name().getNamespace(_namespaces))
+				return this;
+			for(i=0;i<_attributes.length;i++)
+			{
+				if(ns == _attributes[i].name().getNamespace(_namespaces))
+					return this;
+			}
+
+			//
+			for(i=_namespaces.length-1;i>=0;i--)
+			{
+				if(_namespaces[i].uri == ns.uri && _namespaces[i].prefix == ns.prefix)
+					_namespaces.splice(i,1);
+				else if(ns.prefix == undefined && _namespaces[i].uri == ns.uri)
+					_namespaces.splice(i,1);
+			}
+			for(i=0;i<_children.length;i++)
+			{
+				if(_children[i].nodeKind() == "element")
+					_children[i].removeNamespace(ns);
+			}
+			return this;
 		}

 		/**
@@ -1425,7 +1478,39 @@
 		 * @return
 		 *
 		 */
-		public function replace(propertyName:Object, value:XML):XML
+		public function replace(propertyName:Object, value:*):XML
+		{
+			/*
+				Semantics
+				When the replace method is called on an XML object x with parameters propertyName and value, the following steps are taken:
+				1. If x.[[Class]] ∈ {"text", "comment", "processing-instruction", "attribute"}, return x
+				2. If Type(value) ∉ {XML, XMLList}, let c = ToString(value)
+				3. Else let c be the result of calling the [[DeepCopy]] method of value
+				4. If ToString(ToUint32(P)) == P
+				  a. Call the [[Replace]] method of x with arguments P and c and return x
+				5. Let n be a QName object created as if by calling the function QName(P)
+				6. Let i = undefined
+				7. For k = x.[[Length]]-1 downto 0
+				  a. If ((n.localName == "*") or ((x[k].[[Class]] == "element") and (x[k].[[Name]].localName==n.localName))) and ((n.uri == null) or ((x[k].[[Class]] == "element") and (n.uri == x[k].[[Name]].uri )))
+				    i. If (i is not undefined), call the [[DeleteByIndex]] method of x with argument ToString(i)
+				    ii. Let i = k
+				8. If i == undefined, return x
+				9. Call the [[Replace]] method of x with arguments ToString(i) and c
+				10. Return x
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return this;
+			if(value === null || value === undefined)
+				return this;
+			if((value is XML) || (value is XMLList))
+				value = value.copy();
+			else
+				value = value.toString();
+
+			return null;
+		}
+
+		private function replaceChild(idx:int,v:*):void
 		{
 			/*
 				When the [[Replace]] method of an XML object x is called with property name P and value V, the following steps are taken:
@@ -1439,7 +1524,7 @@
 				  a. If V.[[Class]] is “element” and (V is x or an ancestor of x) throw an Error exception
 				  b. Let V.[[Parent]] = x
 				  c. If x has a property with name P
-				    i. Let x[P].[[Parent]] = null
+				  i. Let x[P].[[Parent]] = null
 				  d. Let x[P] = V
 				6. Else if Type(V) is XMLList
 				  a. Call the [[DeleteByIndex]] method of x with argument P
@@ -1450,9 +1535,44 @@
 				  c. If x has a property with name P
 				    i. Let x[P].[[Parent]] = null
 				  d. Let the value of property P of x be t
-				8. Return
-			*/
-			return null;
+				8. Return
+			*/
+			if(_nodeKind == "text" || _nodeKind == "comment" || _nodeKind == "processing-instruction" || _nodeKind ==  "attribute")
+				return this;
+			if(idx > _children.length)
+				idx = _children.length;
+			if(v is XML && v.nodeKind() != "attribute")
+			{
+				if(v.nodeKind() == "element" && (v==this || isAncestor(v)) )
+					throw new TypeError("cannot assign parent xml as child");
+				v.setParent(this);
+				if(_children[idx])
+					_children[idx].setParent(null);
+				_children[idx] = v;
+			}
+			else if(v is XMLList)
+			{
+				//6.
+				if(_children[idx])
+					_children[idx].setParent(null);
+
+			}
+			else
+			{
+				//7. attribute?
+			}
+		}
+
+		private function isAncestor(xml:XML):Boolean
+		{
+			var p:XML = parent();
+			while(p)
+			{
+				if(p == xml)
+					return true;
+				p = p.parent();
+			}
+			return false;
 		}

 		public function setAttribute(attr:*,value:String):void
@@ -1716,6 +1836,8 @@

 		public function setParent(parent:XML):void
 		{
+			if(_parentXML)
+				_parentXML.removeChild(this);
 			_parentXML = parent;
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17240
Author:   pdehaan@adobe.com
Date:     2010-08-09T21:25:38.968277Z

Log Message:
-----------
Adding some LangRef examples (hopefully).

QE notes: Confirm in tomorrow's nightly LangRef build.
Doc notes: no.
Bugs:
Reviewer: no.
Tests run: no.
Is noteworthy for integration: not at all.

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/StackedFormSkinExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/FormItemExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/FormExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Form.as</path>

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

--- frameworks/projects/spark/src/spark/components/Form.as
+++ frameworks/projects/spark/src/spark/components/Form.as
@@ -41,6 +41,9 @@
 /**
  *  SkinnableContainer with FormItem children.
  *
+ *  @includeExample examples/FormExample.mxml
+ *  @includeExample examples/StackedFormSkinExample.mxml
+ *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5