Transferred from the Adobe Open Source Subversion Repository

Revision: 3504
Author:   egreenfi@adobe.com
Date:     2008-10-07T06:44:07.966309Z

Log Message:
-----------
New flag to allow a component to maintain a centered perspective transform, plus other minor transform cleanup.

setting the layout matrix or matrix3D now resets transform X/Y/Z to 0.

setting the component's x/y/z or calling move or setActualSize no longer blows away non-standard transforms (i.e., shear).

UIComponents can now maintain a centered perspective transform.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/Animate3DInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/effectClasses/Rotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Animate3D.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/effects/Rotate3D.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/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
+++ frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as
@@ -220,7 +220,7 @@
      */
 	public function get transformY():Number
 	{
-		return layout.transformX;
+		return layout.transformY;
 	}

     /**
@@ -389,6 +389,7 @@
 		invalidate();
 	}

+
     /**
      * @private
      */
@@ -417,8 +418,7 @@
 	{
 		return layout.matrix3D;
 	}
-
-
+
 	/**
 	 * @private
 	 * returns true if the computed transform has 3D values.


replaced return statement with exception

--- WeaveUI/src/weave/ui/SubMenu.as
+++ WeaveUI/src/weave/ui/SubMenu.as
@@ -53,7 +53,7 @@
 		public function SubMenu(uiParent:UIComponent, openMenuEventTypes:Array = null, closeMenuEventTypes:Array = null)
 		{
 			if(uiParent == null)
-				return;
+				throw new Error("uiParent cannot be null");

 			_uiParent = uiParent;


Added automatic extension when saving material as

--- Bin/Data/Scripts/Editor/EditorMaterial.as
+++ Bin/Data/Scripts/Editor/EditorMaterial.as
@@ -444,6 +444,12 @@
     }

     String fullName = eventData["FileName"].GetString();
+
+    // Add default extension for saving if not specified
+    String filter = eventData["Filter"].GetString();
+    if (GetExtension(fullName).empty && filter != "*.*")
+        fullName = fullName + filter.Substring(1);
+
     File saveFile(fullName, FILE_WRITE);
     if (editMaterial.Save(saveFile))
     {


conform to coding standards, removing this. and using _s_ prefix for static members

--- exporter/src/main/as/flump/SwfTexture.as
+++ exporter/src/main/as/flump/SwfTexture.as
@@ -50,18 +50,18 @@
     }

     public function SwfTexture (symbol :String, disp :DisplayObject, scale :Number, quality :String) {
-        this._symbol = symbol;
-        this._quality = quality;
+        _symbol = symbol;
+        _quality = quality;

         // wrap object twice for convenience
         var wrapper:Sprite = new Sprite();
         wrapper.addChild(disp);
-        this._disp = new Sprite();
-        this._disp.addChild(wrapper);
+        _disp = new Sprite();
+        _disp.addChild(wrapper);

         // set the scale and size info
-        this._treatAsFiltered = this.hasPotentiallySizeAlteringFilters(disp);
-        this.setScale(scale);
+        _treatAsFiltered = hasPotentiallySizeAlteringFilters(disp);
+        setScale(scale);
     }

     // scale can be changed after creation, if desired
@@ -74,66 +74,66 @@
         // if not filtered:
         //    set the scale in the wrapper
         //    render directly at target size with vector renderer
-        if (this._treatAsFiltered) {
+        if (_treatAsFiltered) {
             // cache the scale to use later
-            this._scale = value;
-            // only need to calculate size once, since this._disp is not changing
-            if (this._visualBounds == null) {
+            _scale = value;
+            // only need to calculate size once, since _disp is not changing
+            if (_visualBounds == null) {
                 recalculateSizeInfo();
             }
         } else {
-            // embed the scale in this._disp
-            var wrapper:DisplayObject = this._disp.getChildAt(0);
+            // embed the scale in _disp
+            var wrapper:DisplayObject = _disp.getChildAt(0);
             wrapper.scaleX = wrapper.scaleY = value;
-            this._scale = 1;
-            // recalculate size since this._disp has changed
+            _scale = 1;
+            // recalculate size since _disp has changed
             recalculateSizeInfo();
         }
     }

     public function toBitmapData (borderPadding :int = 0) :BitmapData {
         // render with vector renderer
-        var bmd :BitmapData = new BitmapData(Math.ceil(this._w), Math.ceil(this._h), true, 0x00);
+        var bmd :BitmapData = new BitmapData(Math.ceil(_w), Math.ceil(_h), true, 0x00);
         var m :Matrix = new Matrix();
-        m.translate(this._origin.x, this._origin.y);
-        bmd.drawWithQuality(this._disp, m, null, null, null, true, this._quality);
+        m.translate(_origin.x, _origin.y);
+        bmd.drawWithQuality(_disp, m, null, null, null, true, _quality);

         // scale bitmap to target size if necessary (only used if _disp contains filters)
-        if (this._scale != 1.0) {
-            bmd = Util.renderToBitmapData(bmd, this.w, this.h, this._quality, this._scale);
+        if (_scale != 1.0) {
+            bmd = Util.renderToBitmapData(bmd, w, h, _quality, _scale);
         }

         // add padding if necessary
         return (borderPadding > 0 ? Util.padBitmapBorder(bmd, borderPadding) : bmd);
     }

-    public function toString () :String { return "a " + this.a + " w " + this.w + " h " + this.h; }
+    public function toString () :String { return "a " + a + " w " + w + " h " + h; }

     private function recalculateSizeInfo() :void {
         // get normal bounds
-        this._strictBounds = this._disp.getChildAt(0).getBounds(this._disp);
-        this._visualBounds = this._strictBounds;
+        _strictBounds = _disp.getChildAt(0).getBounds(_disp);
+        _visualBounds = _strictBounds;

         // possibly increase the visual bounds (due to filter action)
-        if (this._treatAsFiltered) {
+        if (_treatAsFiltered) {
             // render to bmd
-            var topLeft:Point = new Point(_filteredBmd.width / 2 - this._strictBounds.width / 2 - this._strictBounds.x, _filteredBmd.height / 2 - this._strictBounds.height / 2 - this._strictBounds.y);
+            var topLeft:Point = new Point(_s_filteredBmd.width / 2 - _strictBounds.width / 2 - _strictBounds.x, _s_filteredBmd.height / 2 - _strictBounds.height / 2 - _strictBounds.y);
             var m :Matrix = new Matrix(1,0,0,1, topLeft.x, topLeft.y);
-            _filteredBmd.drawWithQuality(this._disp, m, null, null, null, true, this._quality);
+            _s_filteredBmd.drawWithQuality(_disp, m, null, null, null, true, _quality);

             // calculate visual bounds
-            this._visualBounds = _filteredBmd.getColorBoundsRect(0xff000000, 0x00000000, false);
-            _filteredBmd.fillRect(this._visualBounds, 0x0);
+            _visualBounds = _s_filteredBmd.getColorBoundsRect(0xff000000, 0x00000000, false);
+            _s_filteredBmd.fillRect(_visualBounds, 0x0);

             // adjust registration point
-            this._visualBounds.x = -(topLeft.x - this._visualBounds.x);
-            this._visualBounds.y = -(topLeft.y - this._visualBounds.y);
+            _visualBounds.x = -(topLeft.x - _visualBounds.x);
+            _visualBounds.y = -(topLeft.y - _visualBounds.y);
         }

         // calculate derivative info
-        this._origin = new Point(-this._visualBounds.x, -this._visualBounds.y);
-        this._w = this._visualBounds.width;
-        this._h = this._visualBounds.height;
+        _origin = new Point(-_visualBounds.x, -_visualBounds.y);
+        _w = _visualBounds.width;
+        _h = _visualBounds.height;
     }

     private function hasPotentiallySizeAlteringFilters(dObj:DisplayObject) :Boolean {
@@ -169,7 +169,7 @@
     private var _quality :String;
     private var _treatAsFiltered:Boolean;

-    static private var _filteredBmd:BitmapData = new BitmapData(2048, 2048, true, 0x0);
-    { _filteredBmd.lock(); }
+    static private var _s_filteredBmd:BitmapData = new BitmapData(2048, 2048, true, 0x0);
+    { _s_filteredBmd.lock(); }
 }
 }


SwfTexture - renders to target size directly from vector renderer (Issue #32), unless dObj contains filters.  If dObj contains filters, uses full visual bounds to avoid cropping of filter pixels, and scales to target size from bitmapdata of scale 1 vector render.

--- exporter/src/main/as/flump/SwfTexture.as
+++ exporter/src/main/as/flump/SwfTexture.as
@@ -6,11 +6,15 @@
 import flash.display.Bitmap;
 import flash.display.BitmapData;
 import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
 import flash.display.MovieClip;
 import flash.display.Sprite;
 import flash.display.StageQuality;
+import flash.filters.ColorMatrixFilter;
+import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;
+import flump.xfl.XflMovie;

 import flump.executor.load.LoadedSwf;
 import flump.mold.MovieMold;
@@ -19,11 +23,11 @@

 public class SwfTexture
 {
-    public var symbol :String;
-    public var origin :Point;
-    public var w :int, h :int, a :int;
-    public var scale :Number;
-    public var quality :String;
+    public function get symbol():String {   return _symbol;     }
+    public function get origin():Point  {   return new Point(_origin.x*_scale, _origin.y*_scale);     }
+    public function get w():int {   return Math.ceil(_w*_scale);  }
+    public function get h():int {   return Math.ceil(_h*_scale);  }
+    public function get a():int {   return w*h;  }

     public static function fromFlipbook (lib :XflLibrary, movie :MovieMold, frame :int,
         quality :String = StageQuality.BEST, scale :Number = 1) :SwfTexture {
@@ -46,46 +50,126 @@
     }

     public function SwfTexture (symbol :String, disp :DisplayObject, scale :Number, quality :String) {
-        this.symbol = symbol;
-        this.scale = scale;
-        this.quality = quality;
-        _disp = disp;
+        this._symbol = symbol;
+        this._quality = quality;

-        origin = getOrigin(_disp, scale);
+        // wrap object twice for convenience
+        var wrapper:Sprite = new Sprite();
+        wrapper.addChild(disp);
+        this._disp = new Sprite();
+        this._disp.addChild(wrapper);

-        const size :Point = getSize(_disp, scale);
-        w = size.x;
-        h = size.y;
-        a = w * h;
+        // set the scale and size info
+        this._treatAsFiltered = this.hasPotentiallySizeAlteringFilters(disp);
+        this.setScale(scale);
+    }
+
+    // scale can be changed after creation, if desired
+    public function setScale(value:Number):void
+    {
+        // To compensate for the fact that filters don't "scale", do the following
+        // if filtered:
+        //    render at scale 1
+        //    then scale bitmapData to target size
+        // if not filtered:
+        //    set the scale in the wrapper
+        //    render directly at target size with vector renderer
+        if (this._treatAsFiltered) {
+            // cache the scale to use later
+            this._scale = value;
+            // only need to calculate size once, since this._disp is not changing
+            if (this._visualBounds == null) {
+                recalculateSizeInfo();
+            }
+        } else {
+            // embed the scale in this._disp
+            var wrapper:DisplayObject = this._disp.getChildAt(0);
+            wrapper.scaleX = wrapper.scaleY = value;
+            this._scale = 1;
+            // recalculate size since this._disp has changed
+            recalculateSizeInfo();
+        }
     }

     public function toBitmapData (borderPadding :int = 0) :BitmapData {
-        const bmd :BitmapData = Util.renderToBitmapData(_disp, w, h, quality, scale);
+        // render with vector renderer
+        var bmd :BitmapData = new BitmapData(Math.ceil(this._w), Math.ceil(this._h), true, 0x00);
+        var m :Matrix = new Matrix();
+        m.translate(this._origin.x, this._origin.y);
+        bmd.drawWithQuality(this._disp, m, null, null, null, true, this._quality);
+
+        // scale bitmap to target size if necessary (only used if _disp contains filters)
+        if (this._scale != 1.0) {
+            bmd = Util.renderToBitmapData(bmd, this.w, this.h, this._quality, this._scale);
+        }
+
+        // add padding if necessary
         return (borderPadding > 0 ? Util.padBitmapBorder(bmd, borderPadding) : bmd);
     }

-    public function toString () :String { return "a " + a + " w " + w + " h " + h; }
+    public function toString () :String { return "a " + this.a + " w " + this.w + " h " + this.h; }

-    protected static function getSize (disp :DisplayObject, scale :Number) :Point {
-        const bounds :Rectangle = getBounds(disp, scale);
-        return new Point(Math.ceil(bounds.width), Math.ceil(bounds.height));
+    private function recalculateSizeInfo() :void {
+        // get normal bounds
+        this._strictBounds = this._disp.getChildAt(0).getBounds(this._disp);
+        this._visualBounds = this._strictBounds;
+
+        // possibly increase the visual bounds (due to filter action)
+        if (this._treatAsFiltered) {
+            // render to bmd
+            var topLeft:Point = new Point(_filteredBmd.width / 2 - this._strictBounds.width / 2 - this._strictBounds.x, _filteredBmd.height / 2 - this._strictBounds.height / 2 - this._strictBounds.y);
+            var m :Matrix = new Matrix(1,0,0,1, topLeft.x, topLeft.y);
+            _filteredBmd.drawWithQuality(this._disp, m, null, null, null, true, this._quality);
+
+            // calculate visual bounds
+            this._visualBounds = _filteredBmd.getColorBoundsRect(0xff000000, 0x00000000, false);
+            _filteredBmd.fillRect(this._visualBounds, 0x0);
+
+            // adjust registration point
+            this._visualBounds.x = -(topLeft.x - this._visualBounds.x);
+            this._visualBounds.y = -(topLeft.y - this._visualBounds.y);
+        }
+
+        // calculate derivative info
+        this._origin = new Point(-this._visualBounds.x, -this._visualBounds.y);
+        this._w = this._visualBounds.width;
+        this._h = this._visualBounds.height;
     }
-
-    protected static function getOrigin (disp :DisplayObject, scale :Number) :Point {
-        const bounds :Rectangle = getBounds(disp, scale);
-        return new Point(-bounds.x, -bounds.y);
+
+    private function hasPotentiallySizeAlteringFilters(dObj:DisplayObject) :Boolean {
+        // check dObj's filter list
+        var filters:Array = dObj.filters;
+        for (var ff:int = 0, nf:int = filters.length; ff < nf; ++ff) {
+            // all standard filters except ColorMatrixFilter can change the visual bounds
+            if (!(filters[ff] is ColorMatrixFilter)) {
+                return true;
+            }
+        }
+        // recursively check children
+        var dObjContainer:flash.display.DisplayObjectContainer = dObj as flash.display.DisplayObjectContainer;
+        if (dObjContainer) {
+            for (var cc:int = 0, nc:int = dObjContainer.numChildren; cc < nc; ++cc) {
+                var child:DisplayObject = dObjContainer.getChildAt(cc);
+                if (hasPotentiallySizeAlteringFilters(child)) {
+                    return true;
+                }
+            }
+        }
+        // all clear
+        return false;
     }
-
-    protected static function getBounds (disp :DisplayObject, scale :Number) :Rectangle {
-        const oldScale :Number = disp.scaleX;
-        disp.scaleX = disp.scaleY = scale;
-        const holder :Sprite = new Sprite();
-        holder.addChild(disp);
-        const bounds :Rectangle = disp.getBounds(holder);
-        disp.scaleX = disp.scaleY = oldScale;
-        return bounds;
-    }
-
-    protected var _disp :DisplayObject;
+
+    private var _symbol :String;
+    private var _disp :DisplayObjectContainer;
+    private var _w :int, _h :int;
+    private var _origin :Point;
+    private var _strictBounds :Rectangle;
+    private var _visualBounds :Rectangle;
+    private var _scale :Number;
+    private var _quality :String;
+    private var _treatAsFiltered:Boolean;
+
+    static private var _filteredBmd:BitmapData = new BitmapData(2048, 2048, true, 0x0);
+    { _filteredBmd.lock(); }
 }
 }


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

--- frameworks/projects/spark/src/spark/effects/Move.as
+++ frameworks/projects/spark/src/spark/effects/Move.as
@@ -0,0 +1,161 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+import flash.geom.Vector3D;
+
+import mx.effects.IEffectInstance;
+
+import spark.effects.effectClasses.AnimateTransformInstance;
+
+/**
+ * This class is a utility wrapper around the AnimateTransform effect, exposing the
+ * properties that make sense for someone wishing to merely move a target object
+ * in the x and y directions. An important difference between this TransformMove
+ * effect and the previous Move effect is that the x and y property specifications
+ * for TransformMove specify not absolute values of the x/y point on the target
+ * object, but rather the change in x/y that should occur to the center around
+ * which the overall transform is occuring. So if, for example, the
+ * autoCenterTransform property is set, then the from/to/by values
+ * in this effect will define how much to move the center of the target, not the
+ * (x,y) of the target.
+ *
+ *
Like all AnimateTransform-based effects, this effect will only work on subclasses
+ * of UIComponent and GraphicElement, as these effects depend on specific
+ * transform functions in those classes. Also, all of these effects run one single
+ * effect instance on any given target at a time, which means that they will
+ * share the transform center set by any of the contributing effects.

+ */
+public class AnimateTransformMove extends AnimateTransform
+{
+    include "../../mx/core/Version.as";
+
+    public function AnimateTransformMove(target:Object=null)
+    {
+        super(target);
+        instanceClass = AnimateTransformInstance;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  yBy
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Number of pixels by which to modify the y of the component.
+     *  Values may be negative.
+     */
+    public var yBy:Number;
+
+    //----------------------------------
+    //  yFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Initial y, in pixels.
+     *  If omitted, Flex uses either the value in the start state,
+     *  if the effect is playing in a state transition, or the current
+     *  value in the target.
+     */
+    public var yFrom:Number;
+
+    //----------------------------------
+    //  yTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Final y, in pixels.
+     *  If omitted, Flex uses either the value in the end state,
+     *  if the effect is playing in a state transition, or the current
+     *  value in the target.
+     */
+    public var yTo:Number;
+
+    //----------------------------------
+    //  xBy
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Number of pixels by which to modify the x of the component.
+     *  Values may be negative.
+     */
+    public var xBy:Number;
+
+    //----------------------------------
+    //  xFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Initial x, in pixels.
+     *  If omitted, Flex uses either the value in the starting state,
+     *  if the effect is playing in a state transition, or the current
+     *  value in the target.
+     */
+    public var xFrom:Number;
+
+    //----------------------------------
+    //  xTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  Final x, in pixels.
+     *  If omitted, Flex uses either the value in the starting state,
+     *  if the effect is playing in a state transition, or the current
+     *  value in the target.
+     */
+    public var xTo:Number;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    // TODO: Can we remove this override? It exists only to create animationProperties,
+    // which we should be able to do somewhere else
+    /**
+     * @private
+     */
+    override public function createInstance(target:Object = null):IEffectInstance
+    {
+        animationProperties = [];
+        return super.createInstance(target);
+    }
+
+    /**
+     * @private
+     */
+    override protected function initInstance(instance:IEffectInstance):void
+    {
+        addMotionPath("translationX", xFrom, xTo, xBy);
+        addMotionPath("translationY", yFrom, yTo, yBy);
+        super.initInstance(instance);
+    }
+}
+}


fixed Shader.fork() to avoid compiling shaders if ShaderSettings.enabled == false

--- src/aerys/minko/render/shader/Shader.as
+++ src/aerys/minko/render/shader/Shader.as
@@ -148,7 +148,7 @@

 				var program		: Program3DResource	= null;

-				//if (config.enabled)
+				if (config.enabled)
 				{
 					program = findOrCreateProgram(meshBindings, sceneBindings);
 					signature.mergeWith(program.signature);


Transferred from the Adobe Open Source Subversion Repository

Revision: 16795
Author:   cframpto@adobe.com
Date:     2010-07-02T17:24:22.578707Z

Log Message:
-----------
The following changes apply to Spark DataGrid only.   Code reviews have been deferred until the implementation is closer to completion.

When the grid columns change the selection should be cleared and if requireSelection and at least 1 row and 1 column, either row 0 or cell 0,0 selected.  The columns setter should not rely on either gridDimensions or gridSelection being set yet since it depends on the order they are all initialized when the skin is loaded.

Remove the arg to the constructor for GridSelection.  Yesterday I changed it from Grid to GridContainerBase since the Grid isn't always available yet when GridSelection is created.  However this wasn't correct since you should be able to use GridSelection with a Grid without requiring a DataGrid.  Added a setter/getter for grid.  For now it is public but perhaps it should be mx_internal.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridContainerBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
@@ -64,15 +64,7 @@
     //  Class variables
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  The owner of the grid.  This class might come into being before
-     *  the grid part is loaded.  This is the connection between this class
-     *  and its grid.
-     */
-    private var gridOwner:GridContainerBase;
-
+
     /**
      *  @private
      *  Vector of rowIndexes that map to the dataProvider items.  If
@@ -127,11 +119,9 @@
     /**
      *  @private
      */
-    public function GridSelection(owner:GridContainerBase)
+    public function GridSelection()
     {
         super();
-
-        gridOwner = owner;
     }

     //--------------------------------------------------------------------------
@@ -140,6 +130,36 @@
     //
     //--------------------------------------------------------------------------

+    //----------------------------------
+    //  grid
+    //----------------------------------
+
+    private var _grid:Grid;
+
+    /**
+     *  @private
+     */
+    public function get grid():Grid
+    {
+        return _grid;
+    }
+
+    /**
+     *  This value is created by DataGrid/partAdded() and then set here.
+     *  It is should only be set once.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    public function set grid(value:Grid):void
+    {
+        _grid = value;
+    }
+
     //----------------------------------
     //  preserveSelection
     //----------------------------------
@@ -967,17 +987,7 @@
     //  Methods
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  To connect the selection with its grid.  Can't be in the constructor
-     *  since the selectionMode might be set before the grid part is added.
-     */
-    private function get grid():Grid
-    {
-        return gridOwner.grid;
-    }
-
+
     /**
      *  @private
      */


replace class Version by core.version

replace class Version by core.version

--- tests/GAv4/com/google/analytics/core/BrowserInfoTest.as
+++ tests/GAv4/com/google/analytics/core/BrowserInfoTest.as
@@ -19,13 +19,14 @@

 package com.google.analytics.core
 {
+	import com.google.analytics.utils.Environment;
+	import com.google.analytics.utils.FakeEnvironment;
+	import com.google.analytics.utils.Variables;
+	import com.google.analytics.v4.Configuration;
+
+	import core.version;
+
 	import library.ASTUce.framework.TestCase;
-
-    import com.google.analytics.utils.Environment;
-    import com.google.analytics.utils.FakeEnvironment;
-    import com.google.analytics.utils.Variables;
-    import com.google.analytics.utils.Version;
-    import com.google.analytics.v4.Configuration;

     public class BrowserInfoTest extends TestCase
     {
@@ -47,7 +48,7 @@
         public function setUp():void
         {
             _config = new Configuration();
-            _env0 = new FakeEnvironment("",null,"","","","","","",new Version(9,0,115,0),"en-GB","UTF-8","","","",null,800,600,"24");
+            _env0 = new FakeEnvironment("",null,"","","","","","",new version(9,0,115,0),"en-GB","UTF-8","","","",null,800,600,"24");
             _browserInfo0 = new BrowserInfo( _config, _env0 );
         }


Change 20090302-maxcarlson-F by maxcarlson@Bank.lan on 2009-03-02 06:36:52 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Correct text and inputtext default values with accessibility on

Bugs Fixed: LPP-7594 - IBM Jaws Accessibility support needed for Radioboxes and trees and Issues (partial)

Technical Reviewer: promanik
QA Reviewer: aalappat@laszlosystems.com

Details: LzTextSprite - Return string values from annotateAAimg() to follow setText() contract of expecting only string values.

Tests: accimpl2.lzx from LPP-7594 no longer shows 'undefined' on the button.

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

--- WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
+++ WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
@@ -472,8 +472,8 @@
   * @access private
   */
 LzTextSprite.prototype.annotateAAimg = function (txt) {
-    if (typeof(txt) == "undefined") { return; }
-    if (txt.length == 0) { return };
+    if (typeof(txt) == "undefined") { return ''; }
+    if (txt.length == 0) { return ''};

     var ntxt = "";
     // search for <img ...> strings


Single char segment name fails to parse.

If the m3u8 manifest has only a single character:

#EXTM3U
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-KEY:METHOD=AES-128,URI="keyfile.kbin"
#EXTINF:2,
0
#EXTINF:2,
1

Then it is not parsed and recognized as a segment.

--- src/org/mangui/hls/playlist/Manifest.as
+++ src/org/mangui/hls/playlist/Manifest.as
@@ -143,8 +143,9 @@

             while (i < lines.length) {
                 var line : String = lines[i++];
-                // discard blank line, length could be 0 or 1 if DOS terminated line (CR/LF)
-                if (line.length <= 1) {
+
+                // discard blank line, length could be 0 or if DOS terminated line (CR/LF), only a CR char
+                if (line.length <= 0 || line.indexOf("\r") == 0) {
                     continue;
                 }


preventing crash when the same object is referenced twice.

--- WeaveCore/src/weave/core/LinkableDynamicDisplayObject.as
+++ WeaveCore/src/weave/core/LinkableDynamicDisplayObject.as
@@ -17,7 +17,9 @@
 {
 	import flash.display.DisplayObject;
 	import flash.display.DisplayObjectContainer;
+	import flash.utils.Dictionary;

+	import weave.api.objectWasDisposed;
 	import weave.api.core.IDisposableObject;
 	import weave.api.core.ILinkableDisplayObject;

@@ -35,6 +37,7 @@
 			this.addImmediateCallback(this, firstCallback);
 		}

+		private static const objectToLDDO:Dictionary = new Dictionary(true);
 		private var _parent:DisplayObjectContainer = null;
 		private var _object:DisplayObject = null;

@@ -44,6 +47,14 @@
 			var newObject:DisplayObject = target as DisplayObject;
 			if (oldObject != newObject)
 			{
+				// make sure two instances don't try to take the same target
+				var lddo:LinkableDynamicDisplayObject = objectToLDDO[newObject];
+				if (lddo && !objectWasDisposed(lddo) && lddo != this)
+					newObject = null;
+				else
+					objectToLDDO[newObject] = this;
+				delete objectToLDDO[oldObject];
+
 				_object = newObject;
 				changeParent(oldObject, _parent, null);
 				updateParentLater();


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

--- frameworks/projects/framework/src/mx/styles/metadata/AnchorStyles.as
+++ frameworks/projects/framework/src/mx/styles/metadata/AnchorStyles.as
@@ -1,4 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////

+/**
+ *  The vertical distance in pixels from the top edge of the content area to
+ *  the control's baseline position.
+ *  If this style is set, the baseline of the component is
+ *  anchored to the top edge of its content area; when its container
+ *  is resized, the two edges maintain their separation.
+ *
+ *
This style only has an effect when used on a component in a Canvas container,
+ *  or when used on a component in a Panel or Application container that has the
+ *  layout property set to absolute.

+ *
+ *
The default value is undefined, which means it is not set.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="baseline", type="String", inherit="no")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 8627
Author:   jszeto@adobe.com
Date:     2009-07-16T18:40:07.408921Z

Log Message:
-----------
Adding copyright headers to filter classes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
+++ frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
@@ -1,3 +1,14 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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.filters
 {


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

--- frameworks/projects/advancedgrids/src/mx/collections/IGroupingCollection2.as
+++ frameworks/projects/advancedgrids/src/mx/collections/IGroupingCollection2.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Fix for Issue #85.

Fix for Issue #85.

--- src/flexlib/containers/WindowShade.as
+++ src/flexlib/containers/WindowShade.as
@@ -214,6 +214,9 @@
             _headerButton.addEventListener(MouseEvent.CLICK, headerButton_clickHandler);

             rawChildren.addChild(_headerButton);
+
+            // Fix for Issue #85
+            _headerButton.tabEnabled = false;
         }

         protected function applyHeaderButtonStyles(button:Button):void {


fixed new location error

fixed new location error

--- flexEditor/src/org/arisgames/editor/services/AppServices.as
+++ flexEditor/src/org/arisgames/editor/services/AppServices.as
@@ -112,12 +112,12 @@
         if (isNaN(item.itemId) || item.itemId == 0)
         {
             trace("This item doesn't have an itemId, so call create Item.");
-            r = AppDAO.getInstance().getItemServer().createItem(gid, item.name, item.description, item.iconMediaId, item.mediaId, item.dropable, item.destroyable);
+            r = AppDAO.getInstance().getItemServer().createItem(gid, item.name, item.description, item.iconMediaId, item.mediaId, item.dropable, item.destroyable, 1);
         }
         else
         {
             trace("This item has an itemId (" + item.itemId + "), so call update Item.");
-            r = AppDAO.getInstance().getItemServer().updateItem(gid, item.itemId, item.name, item.description, item.iconMediaId, item.mediaId, item.dropable, item.destroyable);
+            r = AppDAO.getInstance().getItemServer().updateItem(gid, item.itemId, item.name, item.description, item.iconMediaId, item.mediaId, item.dropable, item.destroyable, 1);
         }
         r.addResponder(resp);
     }
@@ -160,7 +160,7 @@
         if (isNaN(loc.locationId))
         {
             trace("This Location doesn't have an Id, so call create Location.");
-            l = AppDAO.getInstance().getLocationServer().createLocation(gid, loc.name, loc.iconMediaId, loc.latitude, loc.longitude, loc.error, loc.type, loc.typeId, loc.quantity, loc.hidden, loc.forceView);
+            l = AppDAO.getInstance().getLocationServer().createLocation(gid, loc.name, loc.iconMediaId, loc.latitude, loc.longitude, loc.error, loc.type, loc.typeId, loc.quantity, loc.hidden, loc.forceView,0);
         }
         else
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6266
Author:   egeorgie@adobe.com
Date:     2009-04-24T23:09:01.304621Z

Log Message:
-----------
Layout PARB changes

Major (most probably will require updates):
- LayoutBase.getScrollPositionDelta() -> getScrollPositionDeltaToElement()
- HorizontalLayout, VerticalLayout method inView() -> fractionOfElementInView()
- LayoutElementFactory is deleted, interface ILayoutElement is implemented by UIComponent, GraphicElement, VisualSprite, no need for casting in those cases, cast to ILayoutElement in case of type Object.
- TileLayout.elementHorizontalAlign -> horizontalAlign
- TileLayout.elementVerticalAlign -> verticalAlign
- TileJustifyRows -> RowAlign
- TileJustifyColumsn > ColumnAlign
- TileLayout.justifyRows -> rowAlign
- TileLayout.justifyColumns -> columnAling
- TileJustifyRows.NONE, "none" -> TOP, "top"
- TileJustifyRows.GAP_SIZE, "gapSize" -> JUSTIFY_USING_GAP, "justifyUsingGap"
- TileJustifyRows.ROW_SIZE, "rowSize" -> JUSTIFY_USING_HEIGHT, "justifyUsingHeight"
- TileJustifyColumns.NONE, "none" -> LEFT, "left"
- TileJustifyColumns.GAP_SIZE, "gapSize" -> JUSTIFY_USING_GAP, "justifyUsingGap"
- TileJustifyColumns.COLUMN_SIZE, "columnSize" -> JUSTIFY_USING_WIDTH, "justifyUsingWidth"
- TileLayout.set rowCount -> set requestedRowCount
- add TileLayout.get requestedRowCount
- TileLayout.set columnCount -> set requestedColumnCount
- add TileLayout.get requestedColumnCount

Minor (may require updates, but not that probable):
- get baselinePosition() is moved from IVisualElement to ILayoutElement.
- setLayoutBoundsSize() does not have default NaN values for width & height (but still logic is the same).
- name of ILayoutInterface methods' parameter "postTransform" is renamed to "postLayoutTransform".
- name of ILayoutInterface methods' parameter "triggerLayout" is renamed to "invalidateLayout".
- LayoutBase methods invalidateTargetSizeAndDisplayList() and invalidateTargetSize() are removed.
- LayoutBase method getTargetScrollRect() is renamed to getScrollRect().

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans, Ryan
tests: checkintests, mustella (gumbo/layout, gumbo/group, gumbo/dataGroup)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/RowAlign.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileJustifyRows.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Animate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/ColumnAlign.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutElementFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileJustifyColumns.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/TextBaseClass.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/Block.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>

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

--- frameworks/projects/framework/src/mx/core/ILayoutElement.as
+++ frameworks/projects/framework/src/mx/core/ILayoutElement.as
@@ -224,6 +224,24 @@
     function set baseline(value:Object):void;

     /**
+     *  The y-coordinate of the baseline
+     *  of the first line of text of the component.
+     *
+     *
This property is used to implement
+     *  the baseline constraint style.
+     *  It is also used to align the label of a FormItem
+     *  with the controls in the FormItem.

+     *
+     *
Each component should override this property.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function get baselinePosition():Number;
+
+    /**
      *  Number that specifies the width of a component as a percentage
      *  of its parent's size. Allowed values are 0-100.
      *  Setting the width or explicitWidth properties
@@ -298,7 +316,7 @@
      *  usually based on the default element size and any explicit overrides.
      *  For UIComponent this is the same as getExplicitOrMeasuredWidth().
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box width.  Bounding box is in element's parent
      *  coordinate space and is calculated from  the element's perferred size and
      *  layout transform matrix.
@@ -312,14 +330,14 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getPreferredBoundsWidth(postTransform:Boolean=true):Number;
+    function getPreferredBoundsWidth(postLayoutTransform:Boolean = true):Number;

     /**
      *  @return Returns the element's preferred height.  Preferred height is
      *  usually based on the default element size and any explicit overrides.
      *  For UIComponent this is the same as getExplicitOrMeasuredHeight().
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box height.  Bounding box is in element's parent
      *  coordinate space and is calculated from  the element's perferred size and
      *  layout transform matrix.
@@ -333,12 +351,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getPreferredBoundsHeight(postTransform:Boolean=true):Number;
+    function getPreferredBoundsHeight(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the element's minimum width.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box width. Bounding box is in element's parent
      *  coordinate space and is calculated from the element's minimum size and
      *  layout transform matrix.
@@ -352,12 +370,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getMinBoundsWidth(postTransform:Boolean=true):Number;
+    function getMinBoundsWidth(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the element's minimum height.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box height. Bounding box is in element's parent
      *  coordinate space and is calculated from the element's minimum size and
      *  layout transform matrix.
@@ -371,12 +389,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getMinBoundsHeight(postTransform:Boolean=true):Number;
+    function getMinBoundsHeight(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the element's maximum width.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box width. Bounding box is in element's parent
      *  coordinate space and is calculated from the element's maximum size and
      *  layout transform matrix.
@@ -390,12 +408,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getMaxBoundsWidth(postTransform:Boolean=true):Number;
+    function getMaxBoundsWidth(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the element's maximum height.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box height. Bounding box is in element's parent
      *  coordinate space and is calculated from the element's maximum size and
      *  layout transform matrix.
@@ -409,7 +427,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getMaxBoundsHeight(postTransform:Boolean=true):Number;
+    function getMaxBoundsHeight(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the x coordinate of the element's bounds at the specified element size.
@@ -419,7 +437,7 @@
      *
      *  @param width The element's bounds width, or NaN to use the preferred width.
      *  @param height The element's bounds height, or NaN to use the preferred height.
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  x coordinate of the element's bounding box top-left corner.
      *  Bounding box is in element's parent coordinate space and is calculated
      *  from the specified bounds size, layout position and layout transform matrix.
@@ -434,7 +452,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getBoundsXAtSize(width:Number, height:Number, postTransform:Boolean = true):Number;
+    function getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the y coordinate of the element's bounds at the specified element size.
@@ -444,7 +462,7 @@
      *
      *  @param width The element's bounds width, or NaN to use the preferred width.
      *  @param height The element's bounds height, or NaN to use the preferred height.
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  y coordinate of the element's bounding box top-left corner.
      *  Bounding box is in element's parent coordinate space and is calculated
      *  from the specified bounds size, layout position and layout transform matrix.
@@ -459,13 +477,13 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getBoundsYAtSize(width:Number, height:Number, postTransform:Boolean = true):Number;
+    function getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the element's layout width. This is the size that the element uses
      *  to draw on screen.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box width. Bounding box is in element's parent
      *  coordinate space and is calculated from the element's layout size and
      *  layout transform matrix.
@@ -479,13 +497,13 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getLayoutBoundsWidth(postTransform:Boolean=true):Number;
+    function getLayoutBoundsWidth(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the element's layout height. This is the size that the element uses
      *  to draw on screen.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  the element's bounding box width. Bounding box is in element's parent
      *  coordinate space and is calculated from the element's layout size and
      *  layout transform matrix.
@@ -499,12 +517,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getLayoutBoundsHeight(postTransform:Boolean=true):Number;
+    function getLayoutBoundsHeight(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the x coordinate that the element uses to draw on screen.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  x coordinate of the element's bounding box top-left corner.
      *  Bounding box is in element's parent coordinate space and is calculated
      *  from the element's layout size, layout position and layout transform matrix.
@@ -518,12 +536,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getLayoutBoundsX(postTransform:Boolean=true):Number;
+    function getLayoutBoundsX(postLayoutTransform:Boolean = true):Number;

     /**
      *  Returns the y coordinate that the element uses to draw on screen.
      *
-     *  @param postTransform When postTransform is true the method returns
+     *  @param postLayoutTransform When postLayoutTransform is true the method returns
      *  y coordinate of the element's bounding box top-left corner.
      *  Bounding box is in element's parent coordinate space and is calculated
      *  from the element's layout size, layout position and layout transform matrix.
@@ -537,12 +555,12 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function getLayoutBoundsY(postTransform:Boolean=true):Number;
+    function getLayoutBoundsY(postLayoutTransform:Boolean = true):Number;

     /**
      *  Sets the coordinates that the element uses to draw on screen.
      *
-     *  @param postTransform When postTransform is true, the element is positioned
+     *  @param postLayoutTransform When postLayoutTransform is true, the element is positioned
      *  in such a way that the top-left corner of its bounding box is (x, y).
      *  Bounding box is in element's parent coordinate space and is calculated
      *  from the element's layout size, layout position and layout transform matrix.
@@ -559,7 +577,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function setLayoutBoundsPosition(x:Number, y:Number, postTransform:Boolean=true):void;
+    function setLayoutBoundsPosition(x:Number, y:Number, postLayoutTransform:Boolean = true):void;

     /**
      *  Sets the layout size to the specified dimensions.  This is the size that
@@ -582,7 +600,7 @@
      *
      *  @param height The target height.
      *
-     *  @param postTransform When postTransform is true, the specified dimensions
+     *  @param postLayoutTransform When postLayoutTransform is true, the specified dimensions
      *  are those of the element's bounding box.
      *  Bounding box is in element's parent coordinate space and is calculated
      *  from the element's layout size, layout position and layout transform matrix.
@@ -596,9 +614,9 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function setLayoutBoundsSize(width:Number = Number.NaN,
-                           height:Number = Number.NaN,
-                           postTransform:Boolean=true):void;
+    function setLayoutBoundsSize(width:Number,
+                                 height:Number,
+                                 postLayoutTransform:Boolean = true):void;

     /**
      *  Returns the transform matrix that is used to calculate the component's
@@ -648,11 +666,11 @@
      *  Layouts that calculate the transform matrix explicitly typically call
      *  this method and work with sizes in child coordinates.
      *  Layouts calling this method pass false
-     *  to triggerLayout so that a subsequent layout pass is not
+     *  to invalidateLayout so that a subsequent layout pass is not
      *  triggered.

      *
      *
Developers that call this method directly typically pass true
-     *  to triggerLayout so that the parent container is notified that
+     *  to invalidateLayout so that the parent container is notified that
      *  it needs to re-layout the children.

      *
      *  @see #getLayoutMatrix
@@ -666,7 +684,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function setLayoutMatrix(m:Matrix, triggerLayout:Boolean):void;
+    function setLayoutMatrix(m:Matrix, invalidateLayout:Boolean):void;

     /**
      *  Returns the layout transform Matrix3D for this element.
@@ -717,11 +735,11 @@
      *  Layouts that calculate the transform matrix explicitly typically call
      *  this method and work with sizes in child coordinates.
      *  Layouts calling this method pass false
-     *  to triggerLayout so that a subsequent layout pass is not
+     *  to invalidateLayout so that a subsequent layout pass is not
      *  triggered.

      *
      *
Developers that call this method directly typically pass true
-     *  to triggerLayout so that the parent container is notified that
+     *  to invalidateLayout so that the parent container is notified that
      *  it needs to re-layout the children.

      *
      *  @see #getLayoutMatrix
@@ -735,7 +753,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    function setLayoutMatrix3D(m:Matrix3D, triggerLayout:Boolean):void;
+    function setLayoutMatrix3D(m:Matrix3D, invalidateLayout:Boolean):void;
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 9416
Author:   aharui@adobe.com
Date:     2009-08-20T02:15:38.365755Z

Log Message:
-----------
Revert 9399.  The prototypes broke mustella states tests.  Will try again later.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowedApplicationSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NavigatorChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/IDeferredContentOwner.as" copyfrom-rev="9398" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatorContent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ApplicationSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/ButtonBar.as
+++ frameworks/projects/spark/src/spark/components/ButtonBar.as
@@ -27,12 +27,10 @@
 import mx.collections.IList;
 import mx.core.EventPriority;
 import mx.core.IFactory;
-import mx.core.INavigatable;
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
-import mx.events.FlexEvent;
 import mx.managers.IFocusManagerComponent;

 use namespace mx_internal;  //ListBase and List share selection properties that are mx_internal
@@ -211,30 +209,13 @@
     override public function set dataProvider(value:IList):void
     {
         if (dataProvider)
-        {
             dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, resetCollectionChangeHandler);
-            if (dataProvider is INavigatable)
-                dataProvider.removeEventListener(FlexEvent.NAVIGATION_CHANGE, navigationChangeHandler);
-        }

         // not really a default handler, we just want it to run after the datagroup
         if (value)
-        {
             value.addEventListener(CollectionEvent.COLLECTION_CHANGE, resetCollectionChangeHandler, false, EventPriority.DEFAULT_HANDLER);
-            if (value is INavigatable)
-                value.addEventListener(FlexEvent.NAVIGATION_CHANGE, navigationChangeHandler);
-        }

         super.dataProvider = value;
-    }
-
-    /**
-     *  @private
-     */
-    private function navigationChangeHandler(event:Event):void
-    {
-        if (INavigatable(dataProvider).selectedIndex != selectedIndex)
-            selectedIndex = INavigatable(dataProvider).selectedIndex;
     }

     /**
@@ -304,8 +285,6 @@
             setCurrentCaretIndex(index);
             renderer.selected = selected;
         }
-        if (dataProvider is INavigatable && selected)
-            INavigatable(dataProvider).selectedIndex = index;
     }

     /**


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

--- frameworks/projects/spark/src/spark/effects/AnimateColor.as
+++ frameworks/projects/spark/src/spark/effects/AnimateColor.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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
 {
 import spark.effects.supportClasses.AnimateColorInstance;


KeyboardManager keyDown and keyUp execution on any key pressed

--- src/aerys/minko/type/KeyboardManager.as
+++ src/aerys/minko/type/KeyboardManager.as
@@ -13,11 +13,7 @@
 		private var _upSignals		: Array		= [];
 		private var _keyDown		: Signal	= new Signal('KeyboardManager.keyDown');
 		private var _keyUp			: Signal	= new Signal('KeyboardManager.keyDown');
-
-		public function KeyboardManager()
-		{
-		}
-
+
 		public function bind(dispatcher : IEventDispatcher) : void
 		{
 			dispatcher.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
@@ -55,6 +51,8 @@

 			if (signal != null)
 				signal.execute(this, keyCode);
+
+			_keyDown.execute(this, keyCode);
 		}

 		private function keyUpHandler(event : KeyboardEvent) : void
@@ -66,6 +64,8 @@

 			if (signal != null)
 				signal.execute(this, keyCode);
+
+			_keyUp.execute(this, keyCode);
 		}

 		public function keyIsDown(keyCode : uint) : Boolean


fix

fix

fix

--- src/ageofai/home/view/HomeMediator.as
+++ src/ageofai/home/view/HomeMediator.as
@@ -24,7 +24,7 @@
 		private function villageViewCreatedHandler( e:HomeViewEvent ):void
 		{
             var homeEvent:HomeEvent = new HomeEvent( HomeEvent.VILLAGER_VIEW_CREATED );
-            homeEvent.villagerView = new VillagerView( );
+            homeEvent.villagerView = e.villagerView;
             this.dispatch( homeEvent );
 		}
 		private function villagerCredatedEventHandler( e:HomeEvent ):void


embedding fonts now works in Labels but is too blury

git-svn-id: 02605e11d3a461bc7e12f3f3880edf4b0c8dcfd0@4078 3e7533ad-8678-4d30-8e38-00a379d3f0d0

--- src/laml/display/Label.as
+++ src/laml/display/Label.as
@@ -1,7 +1,5 @@
 package laml.display{
 	import flash.display.BlendMode;
-	import flash.text.AntiAliasType;
-	import flash.text.GridFitType;
 	import flash.text.TextField;
 	import flash.text.TextFieldType;
 	import flash.text.TextFormat;
@@ -17,34 +15,34 @@
 			super.initialize();
 			model.validate_textFormat = validateTextFormat;
 			model.validate_selectable = validateSelectable;
+			model.validate_embedFonts = validateEmbedFonts;
 			text = "";
 		}

 		override protected function createChildren():void {
 			super.createChildren();
-			createTextView();
-			createTextFormat();
+			textView = createTextView();
+			textFormat = createTextFormat();
 		}

-		protected function createTextView():void {
+		protected function createTextView():TextField {
 			var tf:TextField = new TextField();
-			tf.antiAliasType = AntiAliasType.ADVANCED;
-			tf.gridFitType = GridFitType.PIXEL;
 			tf.type = TextFieldType.DYNAMIC;
 			tf.wordWrap = true;
-			tf.sharpness = 200;
 			tf.selectable = false;
 			tf.mouseEnabled = false;
 			tf.blendMode = BlendMode.LAYER;
-			textView = tf;
+
+			return tf;
 		}

-		protected function createTextFormat():void {
+		protected function createTextFormat():TextFormat {
 			var tf:TextFormat = getTextFormat();
 			if(!tf.align) {
-				tf.align = TextFormatAlign.CENTER;
+//				tf.align = TextFormatAlign.CENTER;
 			}
-			textFormat = tf;
+
+			return tf;
 		}

 		override protected function updateDisplayList(w:Number, h:Number):void {
@@ -90,6 +88,18 @@
 			textView.mouseEnabled = newValue;
 		}

+		public function set embedFonts(embedFonts:Boolean):void {
+			model.embedFonts = embedFonts;
+		}
+
+		public function get embedFonts():Boolean {
+			return model.embedFonts;
+		}
+
+		protected function validateEmbedFonts(newValue:*, oldValue:*):void {
+			textView.embedFonts = newValue;
+		}
+
 		public function set textView(textField:TextField):void {
 			if(_textView && view.contains(_textView)) {
 				view.removeChild(_textView);


TSDemuxer: progressively free buffer chunks after parsing to save up some memory fix demuxing stopping when a TS packet is overlapping between more than 2 chunks

--- src/org/mangui/hls/demux/TSDemuxer.as
+++ src/org/mangui/hls/demux/TSDemuxer.as
@@ -48,6 +48,7 @@
         private var _tags : Vector.<FLVTag>;
         /* Vector of buffer */
         private var _dataVector : Vector.<ByteArray>;
+        private var _dataOffset : uint;
         /* callback functions for audio selection, and parsing progress/complete */
         private var _callback_audioselect : Function;
         private var _callback_progress : Function;
@@ -70,15 +71,16 @@
         /* last AVCC byte Array */
         private var _avcc : ByteArray;
         private var _timer : Timer;
+        private var _totalBytes : uint;

         public static function probe(data : ByteArray) : Boolean {
             var pos : uint = data.position;
-            var len : uint = Math.min(data.bytesAvailable, 188 * 2);
+            var len : uint = Math.min(data.bytesAvailable, PACKETSIZE * 2);
             for (var i : int = 0; i < len; i++) {
                 if (data.readByte() == SYNCBYTE) {
                     // ensure that at least two consecutive TS start offset are found
-                    if (data.bytesAvailable > 188) {
-                        data.position = pos + i + 188;
+                    if (data.bytesAvailable > PACKETSIZE) {
+                        data.position = pos + i + PACKETSIZE;
                         if (data.readByte() == SYNCBYTE) {
                             data.position = pos + i;
                             return true;
@@ -118,10 +120,13 @@
                 _dataVector = new Vector.<ByteArray>();
                 _data_complete = false;
                 _read_position = 0;
+                _totalBytes = 0;
+                _dataOffset = 0;
                 _avcc = null;
                 _timer.addEventListener(TimerEvent.TIMER, _parseTimer);
             }
             _dataVector.push(data);
+            _totalBytes += data.length;
             _timer.start();
         }

@@ -155,31 +160,39 @@
         }

         private function getNextTSBuffer(start : int) : ByteArray {
-            // find element matching with start offset
-            for(var i : int = 0, offset : int = 0; i < _dataVector.length; i++) {
-                var buffer : ByteArray = _dataVector[i], bufferLength : int = buffer.length;
-                if(start >= offset && start <= offset + bufferLength) {
-                    buffer.position = start - offset;
-                    if(buffer.bytesAvailable >= 188) {
-                        return buffer;
-                    } else {
-                        // TS packet overlapping between 2 buffers
-                        if((i+1) < _dataVector.length) {
+            if(start + 188 <= _totalBytes) {
+                // find element matching with start offset
+                for(var i : int = 0, offset : int = _dataOffset; i < _dataVector.length; i++) {
+                    var buffer : ByteArray = _dataVector[i], bufferLength : int = buffer.length;
+                    if(start >= offset && start < offset + bufferLength) {
+                        buffer.position = start - offset;
+                        if(buffer.bytesAvailable >= PACKETSIZE) {
+                            if(_pmtParsed && i) {
+                                _dataVector.splice(0,i);
+                                _dataOffset = offset;
+                            }
+                            return buffer;
+                        } else {
+                            // TS packet overlapping between several buffers
                             var ba : ByteArray = new ByteArray();
                             ba.writeBytes(buffer, buffer.position);
-                            buffer = _dataVector[i+1];
-                            buffer.position = 0;
-                            if(buffer.bytesAvailable + ba.length >=188) {
-                                ba.writeBytes(buffer,0,188-ba.position);
+                            while(++i < _dataVector.length && ba.length < PACKETSIZE) {
+                                buffer = _dataVector[i];
+                                buffer.position = 0;
+                                ba.writeBytes(buffer,0,Math.min(PACKETSIZE-ba.position,buffer.length));
+                            }
+                            if(ba.length == PACKETSIZE) {
                                 ba.position = 0;
                                 return ba;
                             }
-                        }
-                        // if TS overlapping but next buffer not available or next buffer not full enough, return null
-                        return null;
-                    }
-                }
-                offset += bufferLength;
+                            // we should never reach this point
+                            // if TS overlapping but next buffer not available or next buffer not full enough, return null
+                            //Log.error("TS overlapping but next buffer not full enough:" + _read_position + "/" + _totalBytes + "/" + ba.length);
+                            return null;
+                        }
+                    }
+                    offset += bufferLength;
+                }
             }
             return null;
         }
@@ -192,8 +205,8 @@
             // dont spend more than 20ms demuxing TS packets to avoid loosing frames
             while(data  != null && ((getTimer() - start_time) < 20)) {
                 _parseTSPacket(data);
-                _read_position+=188;
-                if(data.bytesAvailable < 188) {
+                _read_position+=PACKETSIZE;
+                if(data.bytesAvailable < PACKETSIZE) {
                     data = getNextTSBuffer(_read_position);
                 }
             }
@@ -201,8 +214,8 @@
                 _callback_progress(_tags);
                 _tags = new Vector.<FLVTag>();
             }
-            // finish reading TS fragment
-            if (_data_complete && getNextTSBuffer(_read_position) == null) {
+            // check if we have finished with reading this TS fragment
+            if (_data_complete && _read_position == _totalBytes) {
                 // free ByteArray
                 _dataVector = null;
                 // first check if TS parsing was successful
@@ -569,9 +582,9 @@
         /** Parse TS packet. **/
         private function _parseTSPacket(data : ByteArray) : void {
             // Each packet is 188 bytes.
-            var todo : uint = TSDemuxer.PACKETSIZE;
+            var todo : uint = PACKETSIZE;
             // Sync byte.
-            if (data.readByte() != TSDemuxer.SYNCBYTE) {
+            if (data.readByte() != SYNCBYTE) {
                 var pos_start : uint = data.position - 1;
                 if (probe(data) == true) {
                     var pos_end : uint = data.position;


Fixed Carousel XML String support

Fixed Carousel XML String support

--- src/laml/display/Carousel.as
+++ src/laml/display/Carousel.as
@@ -1,6 +1,4 @@
 package laml.display {
-	import episodic.events.EpisodicEvent;
-
 	import flash.events.MouseEvent;
 	import flash.text.TextFormat;

@@ -50,8 +48,6 @@
 		}

 		public function set itemRenderer(itemRenderer:*):void {
-			trace(">> set itemRenderer :: " + itemRenderer);
-
 			if(itemRenderer is String) {
 				model.itemRendererString = itemRenderer;
 			}
@@ -102,22 +98,19 @@
 				itemView.data = data;
 			}
 			else if(model.itemRendererString) {
-				var itemXml:XML = new XML(itemRenderer);
+				var itemXml:XML = new XML(model.itemRendererString);
 				itemView = parser.parseLayoutable(itemXml, data);
 			}
 			else {
 				trace(">> WARNING itemRenderer set with unknown type");
 			}

-			itemView.addEventListener(EpisodicEvent.CHANGE, changeHandler, false, 0, true);
+			itemView.addEventListener(PayloadEvent.CHANGED, itemChangedHandler, false, 0, true);
 			contentContainer.addChild(itemView);
 		}

-		protected function changeHandler(event:EpisodicEvent):void {
-			event.stopPropagation();
-			var episodicEvent:EpisodicEvent = new EpisodicEvent(EpisodicEvent.CHANGE);
-			episodicEvent.payload = event.payload;
-			dispatchEvent(episodicEvent);
+		protected function itemChangedHandler(event:PayloadEvent):void {
+			dispatchEvent(event);
 		}

 		override protected function createChildren():void {


Bug 672484: comment out erroneous JSON acceptance test case (r=fklockii, sr pending=dschaffe).

--- test/acceptance/ecma3/JSON/Invalid.as
+++ test/acceptance/ecma3/JSON/Invalid.as
@@ -130,6 +130,9 @@
 }
 AddTestCase("Invalid JSON unicode '\\u0033' (missing end quote)","SyntaxError: Error #1132",exception12);
 */
+
+// Bugzilla 672484: The string literal "\u000FF " *is* valid JSON input.
+/*
 exception13='no exception';
 try {
     JSON.parse('"\\u000FF "');
@@ -137,6 +140,7 @@
     exception13=removeExceptionDetail(e.toString());
 }
 AddTestCase("Invalid JSON unicode '\\u000F'","SyntaxError: Error #1132",exception13);
+*/

 exception13='no exception';
 try {