Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -1512,7 +1512,7 @@
         var containerHeight:Number = targetHeight;

-        // TODO: in the middle or bottom case, we end up calculating percentHeight
+        // FIXME (egeorgie): in the middle or bottom case, we end up calculating percentHeight
         // twice.  Once here for the contentHeight and once in distributeWidth
         // to size that particular element.
         if (verticalAlign == VerticalAlign.CONTENT_JUSTIFY ||


Transferred from the Adobe Open Source Subversion Repository

Revision: 2464
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:50:33.449468Z

Log Message:
-----------
add flex 4 to trunk

Modified Paths:
--------------
134 paths were modified

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -0,0 +1,263 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flex.layout
+{
+
+import flex.core.Group;
+import flex.intf.ILayout;
+import flex.intf.ILayoutItem;
+
+import mx.containers.utilityClasses.Flex;
+
+/**
+ *  Documentation is not currently available.
+ */
+public class HorizontalLayout implements ILayout
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+	 *  @private
+	 */
+	private static const GAP:int = 6;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    private static function hasPercentWidth( layoutItem:ILayoutItem ):Boolean
+    {
+    	return !isNaN( layoutItem.percentSize.x );
+    }
+
+    private static function hasPercentHeight( layoutItem:ILayoutItem ):Boolean
+    {
+        return !isNaN( layoutItem.percentSize.y );
+    }
+
+    private static function calculatePercentHeight( layoutItem:ILayoutItem, height:Number ):Number
+    {
+    	var percentHeight:Number = LayoutItemHelper.pinBetween( layoutItem.percentSize.y * height,
+    	                                                       layoutItem.minSize.y,
+    	                                                       layoutItem.maxSize.y );
+    	return percentHeight < height ? percentHeight : height;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function HorizontalLayout():void
+    {
+		super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    private var _target:Group;
+
+    public function get target():Group
+    {
+        return _target;
+    }
+
+    public function set target(value:Group):void
+    {
+        _target = value;
+    }
+
+    public function measure():void
+    {
+    	var layoutTarget:Group = target;
+        if (!layoutTarget)
+            return;
+
+        var minWidth:Number = 0;
+        var minHeight:Number = 0;
+        var preferredWidth:Number = 0;
+        var preferredHeight:Number = 0;
+
+        var count:uint = layoutTarget.numLayoutItems;
+        var totalCount:uint = count; // How many items will be laid out
+        for (var i:int = 0; i < count; i++)
+        {
+            var layoutItem:ILayoutItem = LayoutItemFactory.getLayoutItemFor(layoutTarget.getLayoutItemAt(i));
+            if (!layoutItem || !layoutItem.includeInLayout)
+            {
+            	totalCount--;
+                continue;
+            }
+
+            preferredHeight = Math.max(preferredHeight, layoutItem.preferredSize.y);
+            preferredWidth += layoutItem.preferredSize.x;
+
+            var itemMinWidth:Number = hasPercentWidth(layoutItem) ? layoutItem.minSize.x : layoutItem.preferredSize.x;
+            var itemMinHeight:Number = hasPercentHeight(layoutItem) ? layoutItem.minSize.y : layoutItem.preferredSize.y;
+            minHeight = Math.max(minHeight, itemMinHeight);
+            minWidth += itemMinWidth;
+        }
+
+        if (totalCount > 1)
+        {
+            var gapSpace:Number = GAP * (totalCount - 1);
+            minWidth += gapSpace;
+            preferredWidth += gapSpace;
+        }
+
+        layoutTarget.measuredWidth = preferredWidth;
+        layoutTarget.measuredHeight = preferredHeight;
+
+        layoutTarget.measuredMinWidth = minWidth;
+        layoutTarget.measuredMinHeight = minHeight;
+    }
+
+    public function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+    	var layoutTarget:Group = target;
+        if (!layoutTarget)
+            return;
+
+        // TODO EGeorgie: use vector
+        var layoutItemArray:Array = new Array();
+        var count:uint = layoutTarget.numLayoutItems;
+        var totalCount:uint = count; // How many items will be laid out
+        for (var i:int = 0; i < count; i++)
+        {
+            var layoutItem:ILayoutItem = LayoutItemFactory.getLayoutItemFor(layoutTarget.getLayoutItemAt(i));
+            if (!layoutItem || !layoutItem.includeInLayout)
+            {
+            	totalCount--;
+                continue;
+            }
+            layoutItemArray.push(layoutItem);
+        }
+
+        var totalWidthToDistribute:Number = unscaledWidth;
+        if (totalCount > 1)
+            totalWidthToDistribute -= (totalCount - 1) * GAP;
+
+        distributeWidth(layoutItemArray, totalWidthToDistribute, unscaledHeight);
+
+        // TODO EGeorgie: verticalAlign
+        var vAlign:Number = 0;
+
+        // Finally, position the objects
+        var x:Number = 0;
+        for each (var lo:ILayoutItem in layoutItemArray)
+        {
+            var y:Number = (unscaledHeight - lo.actualSize.y) * vAlign;
+
+            lo.setActualPosition(x, y);
+            x += lo.actualSize.x;
+            x += GAP;
+        }
+    }
+
+    /**
+     *  This function sets the width of each child
+     *  so that the widths add up to width.
+     *  Each child is set to its preferred width
+     *  if its percentWidth is zero.
+     *  If its percentWidth is a positive number,
+     *  the child grows (or shrinks) to consume its
+     *  share of extra space.
+     *
+     *  The return value is any extra space that's left over
+     *  after growing all children to their maxWidth.
+     */
+    public function distributeWidth(layoutItemArray:Array,
+                                     width:Number,
+                                     height:Number):Number
+    {
+        var spaceToDistribute:Number = width;
+        var totalPercentWidth:Number = 0;
+        var childInfoArray:Array = [];
+        var childInfo:HLayoutItemFlexChildInfo;
+        var newHeight:Number;
+
+        // If the child is flexible, store information about it in the
+        // childInfoArray. For non-flexible children, just set the child's
+        // width and height immediately.
+        for each (var layoutItem:ILayoutItem in layoutItemArray)
+        {
+            if (hasPercentWidth(layoutItem))
+            {
+                totalPercentWidth += layoutItem.percentSize.x;
+
+                childInfo = new HLayoutItemFlexChildInfo();
+                childInfo.layoutItem = layoutItem;
+                childInfo.percent    = layoutItem.percentSize.x * 100;
+                childInfo.min        = layoutItem.minSize.x;
+                childInfo.max        = layoutItem.maxSize.x;
+
+                childInfoArray.push(childInfo);
+            }
+            else
+            {
+                newHeight = NaN;
+                if (hasPercentHeight(layoutItem))
+                   newHeight = calculatePercentHeight(layoutItem, height);
+
+                layoutItem.setActualSize(NaN, newHeight);
+                spaceToDistribute -= layoutItem.actualSize.x;
+            }
+        }
+
+        // Distribute the extra space among the flexible children
+        if (totalPercentWidth)
+        {
+            totalPercentWidth *= 100;
+            spaceToDistribute = Flex.flexChildrenProportionally(width,
+                                                                spaceToDistribute,
+                                                                totalPercentWidth,
+                                                                childInfoArray);
+            for each (childInfo in childInfoArray)
+            {
+            	newHeight = NaN;
+            	if (hasPercentHeight(childInfo.layoutItem))
+            	   newHeight = calculatePercentHeight(childInfo.layoutItem, height);
+
+                childInfo.layoutItem.setActualSize(childInfo.size, newHeight);
+            }
+        }
+        return spaceToDistribute;
+    }
+
+}
+}
+
+[ExcludeClass]
+
+import flex.intf.ILayoutItem;
+import mx.containers.utilityClasses.FlexChildInfo;
+
+class HLayoutItemFlexChildInfo extends FlexChildInfo
+{
+    public var layoutItem:ILayoutItem;
+}


[locale] Extends ResourceManager API

[locale] Extends ResourceManager API

--- skein-locale/src/skein/locale/ResourceManager.as
+++ skein-locale/src/skein/locale/ResourceManager.as
@@ -15,6 +15,8 @@

 import skein.utils.StringUtil;

+[Event(name="change", type="flash.events.Event")]
+
 public class ResourceManager extends EventDispatcher
 {
     private static var _instance:ResourceManager;
@@ -33,6 +35,8 @@
     }

     private var bundleMap:Object = {};
+
+    private var availableLocales:Array = [];

     [Bindable(event="change")]
     public function getString(bundle:String, key:String, params:Array=null):String
@@ -68,12 +72,45 @@

     //--------------------------------------------------------------------------
     //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    private var _defaultLocale:String;
+
+    public function get defaultLocale():String
+    {
+        return _defaultLocale;
+    }
+
+    public function set defaultLocale(value:String):void
+    {
+        if (value == _defaultLocale) return;
+
+        _defaultLocale = value;
+
+        if (locales == null)
+        {
+            locales = [_defaultLocale];
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
     //  Methods
     //
     //--------------------------------------------------------------------------

+    public function getLocale():String
+    {
+        return locales && locales.length > 0 ? locales[0] : null;
+    }
+
     public function setLocale(locale:String):void
     {
+        if (locale == null)
+            locale = _defaultLocale;
+
         setLocales([locale]);
     }

@@ -88,6 +125,12 @@
         locales = chain;

         dispatchEvent(new Event(Event.CHANGE));
+    }
+
+    [Bindable(event="change")]
+    public function getAvailableLocales():Array
+    {
+        return availableLocales;
     }

     public function addSource(source:Source):void
@@ -119,7 +162,12 @@
             {
                 var b:Bundle = bundles[i];

-                bundleMap[b.locale] ||= {};
+                if (!bundleMap.hasOwnProperty(b.locale))
+                {
+                    bundleMap[b.locale] = {};
+
+                    availableLocales.push(b.locale);
+                }

                 bundleMap[b.locale][b.name] = b;
             }


fix VertexStream::concat() to recompute min/max values

--- src/aerys/minko/render/geometry/stream/VertexStream.as
+++ src/aerys/minko/render/geometry/stream/VertexStream.as
@@ -623,6 +623,7 @@
 			for  (i = 1; i < numStreams; ++i)
 				data.writeBytes(extractSubStream(streams[i], usage, format)._data);
 			data.position = 0;
+            stream.updateMinMax(true);

 			return stream;
 		}


fix broken reference to AnimationController.goto()

--- src/aerys/minko/scene/controller/SkeletonController.as
+++ src/aerys/minko/scene/controller/SkeletonController.as
@@ -23,12 +23,12 @@
 			return _animations;
 		}

-		public function goto(time : Object) : SkeletonController
+		public function seek(time : Object) : SkeletonController
 		{
 			var numAnimations	: uint	= _animations.length;

 			for (var animId : uint = 0; animId < numAnimations; ++animId)
-				(_animations[animId] as AnimationController).goto(time);
+				(_animations[animId] as AnimationController).seek(time);

 			return this;
 		}


betwixt needs to read the framerate out of each movie

--- exporter/src/main/as/flump/export/XMLFormat.as
+++ exporter/src/main/as/flump/export/XMLFormat.as
@@ -24,12 +24,13 @@

     override public function publish (out :IDataOutput, lib :XflLibrary, movies :Vector.<MovieMold>,
             packers :Vector.<Packer>, authoredDevice :DeviceType) :void {
-        var xml :XML = <resources frameRate={lib.frameRate} md5={lib.md5}/>;
+        var xml :XML = <resources md5={lib.md5}/>;
         var prefix :String = lib.location + "/";
         for each (var movie :MovieMold in movies) {
             var movieXml :XML = movie.toXML();
             movieXml.@authoredDevice = authoredDevice.name();
             movieXml.@name = prefix + movieXml.@name;
+            movieXml.@frameRate=lib.frameRate;
             for each (var kf :XML in movieXml..kf) {
                 if (XmlUtil.hasAttr(kf, "ref")) {
                     kf.@ref = prefix + kf.@ref;


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

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


Print a message when the player won lights out.

--- Game/Resources/elevatorScene/Scripts/LightsOutScript.as
+++ Game/Resources/elevatorScene/Scripts/LightsOutScript.as
@@ -73,6 +73,7 @@
         if (numPressedButtons == 25) {
             gameWon = true;
             //SendMessage(somewhere);
+            print("Won the game of lights out.\n");
         }
     }


changed internal representation of if/else

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -54,7 +54,6 @@

 		private static const ST_IF:String = 'if';
 		private static const ST_ELSE:String = 'else';
-		private static const ST_IF_ELSE:String = 'if else';

 		private static const ST_FOR:String = 'for';
 		private static const ST_EACH:String = 'each';
@@ -341,10 +340,6 @@
 					default: throw new Error("Too many constructor parameters (maximum 10)");
 				}
 			};
-			constants['iif'] = function(c:*, t:*, f:*):* { return c ? t : f; };
-			// for trace debugging, debug must be set to true
-			if (debug)
-				constants['trace'] = function(...args):void { trace.apply(null, args); };

 			// global symbols
 			for each (var _const:* in [null, true, false, undefined, NaN, Infinity])
@@ -421,7 +416,7 @@
 			operators["&&"] = function(x:*, y:*):* { return x && y; };
 			operators["||"] = function(x:*, y:*):* { return x || y; };
 			// branching
-			operators["?:"] = constants['iif'];
+			operators["?:"] = function(c:*, t:*, f:*):* { return c ? t : f; };
 			// multiple commands - equivalent functionality but must be remembered as different operators
 			operators[','] = function(...args):* { return args[args.length - 1]; };
 			operators[';'] = function(...args):* { return args[args.length - 1]; };
@@ -1430,7 +1425,7 @@
 				if (stmt == ST_IF)
 				{
 					params.splice(2, 1); // works whether or not else is present
-					tokens[startIndex] = compileFunctionCall(new CompiledConstant(ST_IF_ELSE, operators['?:']), params);
+					tokens[startIndex] = compileFunctionCall(new CompiledConstant(ST_IF, operators['?:']), params);
 				}
 				else
 				{
@@ -1583,7 +1578,7 @@
 					return StringUtil.substitute("({0} ? {1} : {2})", params);
 			}

-			if (name == ST_IF_ELSE)
+			if (name == ST_IF)
 			{
 				if (params.length == 2)
 					return [ST_IF, params[0], params[1]].join(' ');
@@ -1834,8 +1829,8 @@
 				//trace("get variable", name, "=", vars[name]);
 				return vars[name];
 			};
-
-			compiler.debug = true;
+
+			compiler.debug = true;
 			for each (var eq:String in eqs)
 			{
 				trace("expression: "+eq);


Added code for a start ack

Added code for a start ack

git-svn-id: 9278a788294a4258aac04586390fc35fb4a5f335@9675 a9308255-753e-0410-a2e9-80b3fbc4fff6

--- FlexUnit4CIListener/src/org/flexunit/listeners/CIListener.as
+++ FlexUnit4CIListener/src/org/flexunit/listeners/CIListener.as
@@ -62,6 +62,7 @@

 		private static const END_OF_TEST_ACK : String ="<endOfTestRunAck/>";
 		private static const END_OF_TEST_RUN : String = "<endOfTestRun/>";
+		private static const START_OF_TEST_RUN_ACK : String = "<startOfTestRunAck/>";

 		private var socket:XMLSocket;

@@ -109,7 +110,12 @@
 		{
 			return _ready;
 		}
-
+
+		private function setStatusReady():void {
+			_ready = true;
+			dispatchEvent( new Event( AsyncListenerWatcher.LISTENER_READY ) );
+		}
+
 		private function getTestCount( description:IDescription ):int
 		{
 			return description.testCount;
@@ -243,8 +249,11 @@

 		private function handleConnect(event:Event):void
 		{
-			_ready = true;
-			dispatchEvent( new Event( AsyncListenerWatcher.LISTENER_READY ) );
+			//This is a good start, but we are no longer considering this a valid
+			//time to begin sending results
+			//We are going to wait until we get some data first
+			//_ready = true;
+			//dispatchEvent( new Event( AsyncListenerWatcher.LISTENER_READY ) );
 		}

 		private function errorHandler(event:Event):void
@@ -262,10 +271,12 @@
 		private function dataHandler( event : DataEvent ) : void
 		{
 			var data : String = event.data;
-
-			// If we received an acknowledgement finish-up.
-			if ( data == END_OF_TEST_ACK )
-			{
+
+			// If we received an acknowledgement on startup, the java server is read and we can start sending.
+			if ( data == START_OF_TEST_RUN_ACK ) {
+				setStatusReady();
+			} else if ( data == END_OF_TEST_ACK ) {
+				// If we received an acknowledgement finish-up.
 				exit();
 			}
 		}


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

--- frameworks/projects/framework/src/mx/utils/ColorUtil.as
+++ frameworks/projects/framework/src/mx/utils/ColorUtil.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-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.utils
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11468
Author:   smgilson@adobe.com
Date:     2009-11-05T16:54:31.738281Z

Log Message:
-----------
Part 1 of ASDoc localization bug fixes

QE notes: -
Doc notes: -
Bugs: - FLEXDOCS-934, FLEXDOCS-909, FLEXDOCS-908, FLEXDOCS-906, FLEXDOCS-882, FLEXDOCS-883, FLEXDOCS-881
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Pause.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quartic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeLeft.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quintic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quadratic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Cubic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeDown.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/HSBColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ArrayUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/TweenEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeRight.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/DefaultListEffect.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeUp.as</path>

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

--- frameworks/projects/mx/src/mx/effects/easing/Quartic.as
+++ frameworks/projects/mx/src/mx/effects/easing/Quartic.as
@@ -13,7 +13,7 @@
 {

 /**
- *  The new effects provided as of Flex 4 use classes which implement the
+ *  The Spark effects provided as of Flex 4 use classes which implement the
  *  IEaser interface instead of the easing functions in classes like Quartic for
  *  the earlier Flex 3 effects. To achieve the same functionality of Quartic,
  *  create a Power instance with an exponent of 4 and set the
@@ -35,24 +35,24 @@
  */
 public class Quartic
 {
-	include "../../core/Version.as";
+    include "../../core/Version.as";

-	//--------------------------------------------------------------------------
-	//
-	//  Class methods
-	//
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------

     /**
      *  The easeIn() method starts motion from a zero velocity,
      *  and then accelerates motion as it executes.
      *
      *  @param t Specifies time.
-	 *
+     *
      *  @param b Specifies the initial position of a component.
-	 *
+     *
      *  @param c Specifies the total change in position of the component.
-	 *
+     *
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
@@ -62,22 +62,22 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public static function easeIn(t:Number, b:Number,
-								  c:Number, d:Number):Number
-	{
-		return c * (t /= d) * t * t * t + b;
-	}
+    public static function easeIn(t:Number, b:Number,
+                                  c:Number, d:Number):Number
+    {
+        return c * (t /= d) * t * t * t + b;
+    }

     /**
      *  The easeOut() method starts motion fast,
      *  and then decelerates motion to a zero velocity.
      *
      *  @param t Specifies time.
-	 *
+     *
      *  @param b Specifies the initial position of a component.
-	 *
+     *
      *  @param c Specifies the total change in position of the component.
-	 *
+     *
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
@@ -87,24 +87,24 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public static function easeOut(t:Number, b:Number,
-								   c:Number, d:Number):Number
-	{
-		return -c * ((t = t / d - 1) * t * t * t - 1) + b;
-	}
+    public static function easeOut(t:Number, b:Number,
+                                   c:Number, d:Number):Number
+    {
+        return -c * ((t = t / d - 1) * t * t * t - 1) + b;
+    }

     /**
      *  The easeInOut() method combines the motion
      *  of the easeIn() and easeOut() methods
-	 *  to start the motion from a zero velocity, accelerate motion,
-	 *  then decelerate to a zero velocity.
+     *  to start the motion from a zero velocity, accelerate motion,
+     *  then decelerate to a zero velocity.
      *
      *  @param t Specifies time.
-	 *
+     *
      *  @param b Specifies the initial position of a component.
-	 *
+     *
      *  @param c Specifies the total change in position of the component.
-	 *
+     *
      *  @param d Specifies the duration of the effect, in milliseconds.
      *
      *  @return Number corresponding to the position of the component.
@@ -114,14 +114,14 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public static function easeInOut(t:Number, b:Number,
-									 c:Number, d:Number):Number
-	{
-		if ((t /= d / 2) < 1)
-			return c / 2 * t * t * t * t + b;
+    public static function easeInOut(t:Number, b:Number,
+                                     c:Number, d:Number):Number
+    {
+        if ((t /= d / 2) < 1)
+            return c / 2 * t * t * t * t + b;

-		return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
-	}
+        return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/printing/PrintDataGrid.as
+++ frameworks/projects/mx/src/mx/printing/PrintDataGrid.as
@@ -233,6 +233,11 @@
  *  @includeExample examples/PrintDataGridExample.mxml
  *
  *  @see FlexPrintJob
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class PrintDataGrid extends DataGrid
 {
@@ -252,6 +257,11 @@
      *  interaction.
      *  The default height is 100% of the container height, or the height
      *  required to display all the dataProvider rows, whichever is smaller.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function PrintDataGrid()
     {
@@ -359,6 +369,11 @@
      *  viewable rows and no partial rows. If sizeToPage property
      *  is true, the value of this property equals
      *  the height property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get currentPageHeight():Number
     {
@@ -379,6 +394,11 @@
      *  The height of PrintDataGrid as set by the user.
      *  If the sizeToPage property is false,
      *  the value of this property equals the height property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get originalHeight():Number
     {
@@ -392,6 +412,11 @@
     /**
      *  If true, the PrintDataGrid readjusts its height to display
      *  only completely viewable rows.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public var sizeToPage:Boolean = true;

@@ -405,6 +430,11 @@
      *
      *  @return A Boolean value of true if a set of rows is
      *  available else false</false>.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get validNextPage():Boolean
     {
@@ -500,6 +530,11 @@
      *  Puts the next set of data rows in view;
      *  that is, it sets the PrintDataGrid verticalScrollPosition
      *  property to equal verticalScrollPosition + (number of scrollable rows).
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function nextPage():void
     {


Format our timestamp like the timestamp in our Java logs.

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

--- src/as/com/threerings/util/Log.as
+++ src/as/com/threerings/util/Log.as
@@ -133,8 +133,7 @@

     protected function doLog (level :String, messages :Array) :void
     {
-        // TODO: better Date formatting?
-        messages.unshift(new Date().toLocaleTimeString(), level, _spec);
+        messages.unshift(getTimeStamp(), level, _spec);
         trace.apply(null, messages);

         // possibly also dispatch to any other log targets.
@@ -146,6 +145,21 @@
         }
     }

+    protected function getTimeStamp () :String
+    {
+        var d :Date = new Date();
+        // return d.toLocaleTimeString();
+
+        // format it like the date format in our java logs
+        return d.fullYear + "/" +
+            StringUtil.prepad(String(d.month + 1), 2, "0") + "/" +
+            StringUtil.prepad(String(d.date), 2, "0") + " " +
+            StringUtil.prepad(String(d.hours), 2, "0") + ":" +
+            StringUtil.prepad(String(d.minutes), 2, "0") + ":" +
+            StringUtil.prepad(String(d.seconds), 2, "0") + ":" +
+            StringUtil.prepad(String(d.milliseconds), 3, "0");
+    }
+
     /** Our log specification. */
     protected var _spec :String;


StageUtils.callLater feature now respects UIComponentGlobals.callLaterSuspendCount feature.

--- WeaveCore/src/weave/core/StageUtils.as
+++ WeaveCore/src/weave/core/StageUtils.as
@@ -30,10 +30,15 @@
 	import flash.utils.getTimer;

 	import mx.core.Application;
+	import mx.core.UIComponent;
+	import mx.core.UIComponentGlobals;
+	import mx.core.mx_internal;

 	import weave.api.WeaveAPI;
 	import weave.api.core.ICallbackCollection;
 	import weave.api.reportError;
+
+	use namespace mx_internal;

 	/**
 	 * This is an all-static class that allows you to add callbacks that will be called when an event occurs on the stage.
@@ -160,10 +165,10 @@
 			var i:int;

 			// first run the functions that cannot be delayed more than one frame.
-			if (_callLaterSingleFrameDelayArray.length > 0)
+			if (_callNextFrameArray.length > 0)
 			{
-				calls = _callLaterSingleFrameDelayArray;
-				_callLaterSingleFrameDelayArray = [];
+				calls = _callNextFrameArray;
+				_callNextFrameArray = [];
 				for (i = 0; i < calls.length; i++)
 				{
 					// args: (relevantContext:Object, method:Function, parameters:Array = null, allowMultipleFrameDelay:Boolean = true)
@@ -174,8 +179,8 @@
 						(args[1] as Function).apply(null, args[2]);
 				}
 			}
-
-			if (_callLaterArray.length > 0)
+
+			if (_callLaterArray.length > 0 && UIComponentGlobals.callLaterSuspendCount <= 0)
 			{
 				//trace("handle ENTER_FRAME, " + _callLaterArray.length + " callLater functions, " + currentFrameElapsedTime + " ms elapsed this frame");
 				// Make a copy of the function calls and clear the static array before executing any functions.
@@ -220,7 +225,7 @@
 			if (allowMultipleFrameDelay)
 				_callLaterArray.push(arguments);
 			else
-				_callLaterSingleFrameDelayArray.push(arguments);
+				_callNextFrameArray.push(arguments);

 			if (CallbackCollection.debug)
 				_stackTraceMap[arguments] = new Error("Stack trace").getStackTrace();
@@ -232,7 +237,7 @@
 		 * This is an array of functions with parameters that will be executed the next time handleEnterFrame() is called.
 		 * This array gets populated by callLater().
 		 */
-		private static var _callLaterSingleFrameDelayArray:Array = [];
+		private static var _callNextFrameArray:Array = [];

 		/**
 		 * This is an array of functions with parameters that will be executed the next time handleEnterFrame() is called.
@@ -334,6 +339,10 @@
 			}
 		}

+		/**
+		 * This is a list of eventType Strings that can be passed to addEventCallback().
+		 * @return An Array of Strings.
+		 */
 		public static function getSupportedEventTypes():Array
 		{
 			return _eventTypes.concat();


bug fix - color column was returning a color instead of NaN when min==max

--- WeaveData/src/weave/data/AttributeColumns/ColorColumn.as
+++ WeaveData/src/weave/data/AttributeColumns/ColorColumn.as
@@ -98,7 +98,7 @@
 				var value:Number = internalDynamicColumn.getValueFromKey(key, Number);
 				var norm:Number;
 				if (dataMin == dataMax)
-					norm = 0;
+					norm = isFinite(value) ? 0 : NaN;
 				else
 					norm = (value - dataMin) / (dataMax - dataMin);
 				color = ramp.getColorFromNorm(norm);


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

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

 package mx.rpc.http.mxml
 {


No reading outside of current UV

No reading outside of current UV

Shader can be used on a SubTexture, so we need to manually constrain
all texture reads to the UV region used.

--- extension/src/starling/shaders/FastGaussianBlurShader.as
+++ extension/src/starling/shaders/FastGaussianBlurShader.as
@@ -29,14 +29,13 @@
     private var _strength:Number                = Number.NaN;
     private var _firstPassStrength:Number       = DEFAULT_FIRST_PASS_STRENGTH;
     private var _strengthIncreaseRatio:Number   = DEFAULT_STRENGTH_INCREASE_PER_PASS_RATIO;
-    private var _pixelWidth:Number              = Number.NaN;
-    private var _pixelHeight:Number             = Number.NaN;
     private var _paramsDirty:Boolean            = true;
     private var _strengthsDirty:Boolean         = true;

     private var _strengths:Vector.<Number>      = new <Number>[];
     private var _offsets:Vector.<Number>        = new <Number>[0, 0, 0, 0];
     private var _uv:Vector.<Number>             = new <Number>[0, 1, 0, 1];
+    private var _pixelSize:Vector.<Number>      = new <Number>[Number.NaN, Number.NaN, Number.NaN, Number.NaN];

     public function get type():String { return _type; }
     public function set type(value:String):void {
@@ -86,21 +85,23 @@
         _paramsDirty = true;
     }

-    public function get pixelWidth():Number { return _pixelWidth; }
+    public function get pixelWidth():Number { return _pixelSize[0]; }
     public function set pixelWidth(value:Number):void {
-        if(value == _pixelWidth)
-            return;
-
-        _pixelWidth = value;
-        _paramsDirty = true;
-    }
-
-    public function get pixelHeight():Number { return _pixelHeight; }
+        if(value == _pixelSize[0])
+            return;
+
+        _pixelSize[0] = value;
+        _pixelSize[2] = value / 2;
+        _paramsDirty = true;
+    }
+
+    public function get pixelHeight():Number { return _pixelSize[1]; }
     public function set pixelHeight(value:Number):void {
-        if(value == _pixelHeight)
-            return;
-
-        _pixelHeight = value;
+        if(value == _pixelSize[1])
+            return;
+
+        _pixelSize[1] = value;
+        _pixelSize[3] = value / 2;
         _paramsDirty = true;
     }

@@ -131,8 +132,10 @@
             updateParameters();

         context.setProgramConstantsFromVector(Context3DProgramType.VERTEX,   4, _offsets);
+
         context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 0, _weights);
         context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 1, _uv);
+        context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 2, _pixelSize);
     }

     public function deactivate(context:Context3D):void {
@@ -153,54 +156,56 @@
     }

     override protected function _fragmentShader():void {
-        var uvCenter:IRegister      = VARYING[0];
-        var uvMinusTwo:IRegister    = VARYING[1];
-        var uvMinusOne:IRegister    = VARYING[2];
-        var uvPlusOne:IRegister     = VARYING[3];
-        var uvPlusTwo:IRegister     = VARYING[4];
-        var uv:IRegister            = TEMP[7];
-        var weightCenter:IComponent = CONST[0].x;
-        var weightOne:IComponent    = CONST[0].y;
-        var weightTwo:IComponent    = CONST[0].z;
-        var minU:IComponent         = CONST[1].x;
-        var maxU:IComponent         = CONST[1].y;
-        var minV:IComponent         = CONST[1].z;
-        var maxV:IComponent         = CONST[1].w;
-        var colorCenter:IRegister   = TEMP[0];
-        var colorMinusTwo:IRegister = TEMP[1];
-        var colorMinusOne:IRegister = TEMP[2];
-        var colorPlusOne:IRegister  = TEMP[3];
-        var colorPlusTwo:IRegister  = TEMP[4];
-        var outputColor:IRegister   = TEMP[5];
-        var textureFlags:Array      = [TextureFlag.TYPE_2D, TextureFlag.MODE_CLAMP, TextureFlag.FILTER_LINEAR, TextureFlag.MIP_NO];
+        var uvCenter:IRegister          = VARYING[0];
+        var uvMinusTwo:IRegister        = VARYING[1];
+        var uvMinusOne:IRegister        = VARYING[2];
+        var uvPlusOne:IRegister         = VARYING[3];
+        var uvPlusTwo:IRegister         = VARYING[4];
+        var uv:IRegister                = TEMP[7];
+        var weightCenter:IComponent     = CONST[0].x;
+        var weightOne:IComponent        = CONST[0].y;
+        var weightTwo:IComponent        = CONST[0].z;
+        var minU:IComponent             = CONST[1].x;
+        var maxU:IComponent             = CONST[1].y;
+        var minV:IComponent             = CONST[1].z;
+        var maxV:IComponent             = CONST[1].w;
+        var halfPixelWidth:IComponent   = CONST[2].z;
+        var halfPixelHeight:IComponent  = CONST[2].w;
+        var colorCenter:IRegister       = TEMP[0];
+        var colorMinusTwo:IRegister     = TEMP[1];
+        var colorMinusOne:IRegister     = TEMP[2];
+        var colorPlusOne:IRegister      = TEMP[3];
+        var colorPlusTwo:IRegister      = TEMP[4];
+        var outputColor:IRegister       = TEMP[5];
+        var textureFlags:Array          = [TextureFlag.TYPE_2D, TextureFlag.MODE_CLAMP, TextureFlag.FILTER_LINEAR, TextureFlag.MIP_NO];

         sampleTexture(colorCenter, uvCenter, SAMPLER[0], textureFlags);
         multiply(outputColor, colorCenter, weightCenter);

         move(uv, uvMinusTwo);
-        Utils.clamp(uv.x, uv.x, minU, maxU);
-        Utils.clamp(uv.y, uv.y, minV, maxV);
+        ShaderUtil.clamp(uv.x, minU, maxU, halfPixelWidth, TEMP[6]);
+        ShaderUtil.clamp(uv.y, minV, maxV, halfPixelHeight, TEMP[6]);
         sampleTexture(colorMinusTwo, uv, SAMPLER[0], textureFlags);
         multiply(colorMinusTwo, colorMinusTwo, weightTwo);
         add(outputColor, outputColor, colorMinusTwo);

         move(uv, uvMinusOne);
-        Utils.clamp(uv.x, uv.x, minU, maxU);
-        Utils.clamp(uv.y, uv.y, minV, maxV);
+        ShaderUtil.clamp(uv.x, minU, maxU, halfPixelWidth, TEMP[6]);
+        ShaderUtil.clamp(uv.y, minV, maxV, halfPixelHeight, TEMP[6]);
         sampleTexture(colorMinusOne, uv, SAMPLER[0], textureFlags);
         multiply(colorMinusOne, colorMinusOne, weightOne);
         add(outputColor, outputColor, colorMinusOne);

         move(uv, uvPlusOne);
-        Utils.clamp(uv.x, uv.x, minU, maxU);
-        Utils.clamp(uv.y, uv.y, minV, maxV);
+        ShaderUtil.clamp(uv.x, minU, maxU, halfPixelWidth, TEMP[6]);
+        ShaderUtil.clamp(uv.y, minV, maxV, halfPixelHeight, TEMP[6]);
         sampleTexture(colorPlusOne, uv, SAMPLER[0], textureFlags);
         multiply(colorPlusOne, colorPlusOne, weightOne);
         add(outputColor, outputColor, colorPlusOne);

         move(uv, uvPlusTwo);
-        Utils.clamp(uv.x, uv.x, minU, maxU);
-        Utils.clamp(uv.y, uv.y, minV, maxV);
+        ShaderUtil.clamp(uv.x, minU, maxU, halfPixelWidth, TEMP[6]);
+        ShaderUtil.clamp(uv.y, minV, maxV, halfPixelHeight, TEMP[6]);
         sampleTexture(colorPlusTwo, uv, SAMPLER[0], textureFlags);
         multiply(colorPlusTwo, colorPlusTwo, weightTwo);
         add(outputColor, outputColor, colorPlusTwo);
@@ -222,13 +227,13 @@
         var i:int, count:int = 4;

         if(type == HORIZONTAL) {
-            multiplier = _pixelWidth * str;
+            multiplier = pixelWidth * str;

             for(i = 0; i < count; i++)
                 _offsets[i] = _horizontalOffsets[i] * multiplier;
         }
         else {
-            multiplier = _pixelHeight * str;
+            multiplier = pixelHeight * str;

             for(i = 0; i < count; i++)
                 _offsets[i] = _verticalOffsets[i] * multiplier;


Rename variable.

Rename variable.

--- asn_visualization/asn_visualization.as
+++ asn_visualization/asn_visualization.as
@@ -132,7 +132,7 @@

         private static var _toggle_rect_background:RectSprite;

-        private static var _country_info_text_border_line:LineSprite=null;
+        private static var _info_text_border_line:LineSprite=null;

         public function visualize(data:Data):void
@@ -810,20 +810,20 @@
                 _country_info_box.y=vis.y + vis.height - _country_info_box.height + 5;
             }

-            if (!_country_info_text_border_line)
+            if (!_info_text_border_line)
             {
                 //TODO it would be better to create this sprite earlier and then move it.
                 //Unfortunately moving the Sprite doesn't seem to work
                 // Since the Sprite's location must be relative to other sprites, we have to wait
                 // until everything else is in place
-                _country_info_text_border_line=new LineSprite();
-
-                _country_info_text_border_line.x1=_detail.x - 10;
-                _country_info_text_border_line.x2=_detail.x - 10;
-                _country_info_text_border_line.y1=_detail.y - 2;
-                _country_info_text_border_line.y2=_country_info_box.y - 20;
-
-                addChild(_country_info_text_border_line);
+                _info_text_border_line=new LineSprite();
+
+                _info_text_border_line.x1=_detail.x - 10;
+                _info_text_border_line.x2=_detail.x - 10;
+                _info_text_border_line.y1=_detail.y - 2;
+                _info_text_border_line.y2=_country_info_box.y - 20;
+
+                addChild(_info_text_border_line);
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12864
Author:   mhorn@adobe.com
Date:     2009-12-11T21:35:24.243046Z

Log Message:
-----------
asdoc minor fixes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/SpriteAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/MovieClipAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/BitmapAsset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/BitmapAsset.as
+++ frameworks/projects/framework/src/mx/core/BitmapAsset.as
@@ -41,12 +41,12 @@
  *  by writing

  *
  *

- *  <mx:Style>
- *      Application
- *      {
+ *  <fx:Style>
+ *      @namespace mx "library://ns.adobe.com/flex/mx"
+ *      mx|Application {
  *          backgroundImage: Embed(source="Logo.gif")
  *      }
- *  <mx:Style/>

+ *  <fx:Style/>

  *
  *
without having to understand that the MXML compiler has created
  *  a subclass of BitmapAsset for you.


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -3149,6 +3149,7 @@
         {
             removeChild(_focusPane);

+			_focusPane.mask = null;
             _focusPane = null;
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4735
Author:   pfarland@adobe.com
Date:     2009-01-29T18:53:55.042174Z

Log Message:
-----------
Fixing id selectors for non-visual components. This required a special modification to the compiler to include id properties in generated code if a component was guaranteed to have an id property. A new mx.core.IID interface was introduced to opt in to the id property to be included. This change also required TextGraphicElement based components to implement IAdvancedStyleClient instead of just IStyleClient (though note that pseudo-selectors have no meaning for these components as they do not possess states).

QE: Yes
Doc: It's reasonably advanced, but we may want to document mx.core.IID for the case where a custom component exists that needs to be styled but is not based on UIComponent or GraphicElement.
Checkintests: Pass
Reviewers: Glenn, Paul R
Bugs:
SDK-18651 - Advanced CSS not setting styles on FXG elements correctly when styling using IDs

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IID.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</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/framework/src/FrameworkClasses.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/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -874,7 +874,7 @@
  */
 public class UIComponent extends FlexSprite
     implements IAutomationObject, IChildList, IConstraintClient,
-    IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule,
+    IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IID,
     IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier,
     IRepeaterClient, IStateClient, IAdvancedStyleClient, IToolTipManagerClient,
     IUIComponent, IValidatorListener, IVisualElement, ILayoutElement


Transferred from the Adobe Open Source Subversion Repository

Revision: 10961
Author:   chaase@adobe.com
Date:     2009-10-09T21:55:11.382317Z

Log Message:
-----------
Fix for occasional RTE in transform effects. The problem was that an object whose parent container was 3D transformed which then underwent a 2D transform effect might try to access the 2D matrix of the display object. In some situations, that 2D matrix is null, because the 3D matrix on the display object is the one currently being used.
The fix is to allocate AdvancedLayoutFeatures and let that class handle this matrix abstraction for us.

QE notes: None
Doc notes: No
Bugs: sdk-23546
Reviewer: Evtim
Tests run: checkintests, mustella spark/effects
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -12123,7 +12123,7 @@
                 xformPt.x = transformCenter.x;
                 xformPt.y = transformCenter.y;
                 var xformedPt:Point =
-                    super.transform.matrix.transformPoint(xformPt);
+                    transform.matrix.transformPoint(xformPt);
             }
             if (rotation != null && !isNaN(rotation.z))
                 this.rotation = rotation.z;
@@ -12147,7 +12147,7 @@
                 xformPt.x = transformCenter.x;
                 xformPt.y = transformCenter.y;
                 var postXFormPoint:Point =
-                    super.transform.matrix.transformPoint(xformPt);
+                    transform.matrix.transformPoint(xformPt);
                 if (translation != null)
                 {
                     x += translation.x - postXFormPoint.x;
@@ -12193,8 +12193,8 @@
                 xformPt.x = 0;
                 xformPt.y = 0;
             }
-            var tmp:Point = (super.transform.matrix != null) ?
-                super.transform.matrix.transformPoint(xformPt) :
+            var tmp:Point = (transform.matrix != null) ?
+                transform.matrix.transformPoint(xformPt) :
                 xformPt;
             if (position != null)
             {
@@ -12547,8 +12547,21 @@
      */
     public function getLayoutMatrix():Matrix
     {
-        if (_layoutFeatures != null)
-        {
+        if (_layoutFeatures != null || super.transform.matrix == null)
+        {
+            // TODO: this is a workaround for a situation in which the
+            // object is in 2D, but used to be in 3D and the player has not
+            // yet cleaned up the matrices. So the matrix property is null, but
+            // the matrix3D property is non-null. layoutFeatures can deal with
+            // that situation, so we allocate it here and let it handle it for
+            // us. The downside is that we have now allocated layoutFeatures
+            // forever and will continue to use it for future situations that
+            // might not have required it. Eventually, we should recognize
+            // situations when we can de-allocate layoutFeatures and back off
+            // to letting the player handle transforms for us.
+            if (_layoutFeatures == null)
+                initAdvancedLayoutFeatures();
+
             // esg: _layoutFeatures keeps a single internal copy of the layoutMatrix.
             // since this is an internal class, we don't need to worry about developers
             // accidentally messing with this matrix, _unless_ we hand it out. Instead,


Transferred from the Adobe Open Source Subversion Repository

Revision: 13701
Author:   hmuller@adobe.com
Date:     2010-01-21T23:36:58.333455Z

Log Message:
-----------
Defend against systemManager=null in UIComponent/invalidateLayoutDirection()

QE notes: This should fix the build.
Doc notes:
Bugs:
Reviewer: Evtim
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -7575,7 +7575,7 @@
         // set the _layoutFeatures.mirror flag.  Similarly, if mirroring isn't
         // required, then clear the _layoutFeatures.mirror flag.

-        const mirror:Boolean = (systemManager.document == this)
+        const mirror:Boolean = (systemManager && (systemManager.document == this))
             ? (thisLayoutDirection != "ltr")  // we're the Application, parent is null
             : (parentElt && (parentElt.layoutDirection != thisLayoutDirection));


PickingShader does not extend BasicShader anymore

--- src/aerys/minko/render/material/picking/PickingShader.as
+++ src/aerys/minko/render/material/picking/PickingShader.as
@@ -1,13 +1,28 @@
 package aerys.minko.render.material.picking
 {
-	import aerys.minko.render.material.basic.BasicShader;
+	import aerys.minko.render.RenderTarget;
 	import aerys.minko.render.shader.SFloat;
+	import aerys.minko.render.shader.Shader;
 	import aerys.minko.render.shader.ShaderSettings;
+	import aerys.minko.render.shader.part.DiffuseShaderPart;
+	import aerys.minko.render.shader.part.animation.VertexAnimationShaderPart;

 	import flash.geom.Rectangle;

-	public final class PickingShader extends BasicShader
+	public final class PickingShader extends Shader
 	{
+		private var _vertexAnimation 	: VertexAnimationShaderPart;
+		private var _diffuse			: DiffuseShaderPart;
+
+		public function PickingShader(target	: RenderTarget	= null,
+									  priority	: Number		= 0.)
+		{
+			super(null, 0.);
+
+			_vertexAnimation = new VertexAnimationShaderPart(this);
+			_diffuse = new DiffuseShaderPart(this);
+		}
+
 		override protected function initializeSettings(settings : ShaderSettings) : void
 		{
 			super.initializeSettings(settings);
@@ -20,13 +35,16 @@
 		override protected function getVertexPosition() : SFloat
 		{
 			return multiply4x4(
-				worldToView(localToWorld(vertexAnimation.getAnimatedVertexPosition())),
+				worldToView(localToWorld(_vertexAnimation.getAnimatedVertexPosition())),
 				sceneBindings.getParameter('pickingProjection', 16)
 			);
 		}

 		override protected function getPixelColor() : SFloat
 		{
+			// only to kill transparent pixels according to diffuse's alpha
+			_diffuse.getDiffuseColor(true);
+
 			return float4(meshBindings.getParameter('pickingId', 3), 1);
 		}
 	}


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 13693
Author:   hmuller@adobe.com
Date:     2010-01-21T20:25:54.403160Z

Log Message:
-----------
Initial version of the mirroring layout code.  Only Spark is supported.  API revisions for this feature are very likely to follow.

QE notes:
Doc notes:
Bugs:
Reviewer: Evtim
Tests run: All Mustella tests pass
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.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/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.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/framework/src/mx/core/ILayoutDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</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/spark/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -39,6 +39,7 @@
 import mx.core.IFlexModule;
 import mx.core.IFlexModuleFactory;
 import mx.core.IInvalidating;
+import mx.core.ILayoutDirection;
 import mx.core.ILayoutElement;
 import mx.core.IStateClient;
 import mx.core.IUIComponent;
@@ -3085,7 +3086,58 @@
     {
         rotation = value;
     }
-
+
+	//----------------------------------
+	//  layoutDirection
+	//----------------------------------
+
+	private var _layoutDirection:String = "inherit";
+
+	public function get layoutDirection():String
+	{
+        if (_layoutDirection != "inherit")
+            return _layoutDirection;
+
+        const parentElt:ILayoutDirection = parent as ILayoutDirection;
+        return (parentElt) ? parentElt.layoutDirection : "ltr";
+	}
+
+	/**
+	 *  @copy mx.core.IVisualElement#layoutDirection
+	 */
+	public function set layoutDirection(value:String):void
+	{
+		if (_layoutDirection == value)
+			return;
+
+		_layoutDirection = value;
+        invalidateLayoutDirection();
+    }
+
+    /**
+     * @copy mx.core.ILayoutDirection#invalidateLayoutDirection()
+     */
+    public function invalidateLayoutDirection():void
+    {
+        const parentElt:ILayoutDirection = parent as ILayoutDirection;
+        if (!parentElt)
+            return;
+
+        // If this element's layoutDirection doesn't match its parent's, then
+        // set the _layoutFeatures.mirror flag.  Similarly, if mirroring isn't
+        // required, then clear the _layoutFeatures.mirror flag.
+
+        const mirror:Boolean = (_layoutDirection != "inherit") && (_layoutDirection != parentElt.layoutDirection);
+        if ((_layoutFeatures) ? (mirror != _layoutFeatures.mirror) : mirror)
+        {
+            if (_layoutFeatures == null)
+                initAdvancedLayoutFeatures();
+            _layoutFeatures.mirror = mirror;
+            invalidateTransform();
+            invalidateParentSizeAndDisplayList();
+        }
+    }
+
     /**
      *  Defines a set of adjustments that can be applied to the component's transform in a way that is
      *  invisible to the component's parent's layout. For example, if you want a layout to adjust
@@ -3595,6 +3647,7 @@
         features.layoutX = x;
         features.layoutY = y;
         features.layoutZ = z;
+		features.layoutWidth = _width;  // for the mirror transform

         // Initialize the internal variable last,
         // since the transform getters depend on it.


Transferred from the Adobe Open Source Subversion Repository

Revision: 19635
Author:   aharui@adobe.com
Date:     2011-01-07T00:25:18.039632Z

Log Message:
-----------
revert the layout changes from svn 18635.  Management feels that there isn't enough time to thoroughly test the changes.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Application.as</path>
<path kind="file" action="M">/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/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/IContainerInvalidating.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ILayoutManagerContainerClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/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/projects/framework/src/mx/styles/IStyleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.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/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Container.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -829,68 +829,6 @@
         {
             removeEventListener(Event.ENTER_FRAME, autoUpdateCurrentStateEnterFrameHandler);
         }
-    }
-
-    //----------------------------------
-    //  estimatedHeight
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the estimatedHeight property.
-     */
-    private var _estimatedHeight:Number;
-
-    /**
-     *  The height a component is likely to be given at layout time.  It is
-     *  determined by examining the parent's estimatedHeight, and the
-     *  component's percentHeight, explicitHeight, top and bottom constraints.
-     *  It is NaN if there isn't enough information to compute the height.
-     *  The component can use this information in calculating its
-     *  measuredWidth if the measuredWidth is dependent on the layout
-     *  height.
-     *
-     *  @default NaN
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    public function get estimatedHeight():Number
-    {
-        return _estimatedHeight;
-    }
-
-    //----------------------------------
-    //  estimatedWidth
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the estimatedWidth property.
-     */
-    private var _estimatedWidth:Number;
-
-    /**
-     *  The width a component is likely to be given at layout time.  It is
-     *  determined by examining the parent's estimatedWidth, and the
-     *  component's percentWidth, explicitWidth, left and right constraints.
-     *  It is NaN if there isn't enough information to compute the width.
-     *  The component can use this information in calculating its
-     *  measuredHeight if the measuredHeight is dependent on the layout
-     *  width.
-     *
-     *  @default NaN
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    public function get estimatedWidth():Number
-    {
-        return _estimatedWidth;
     }

     //----------------------------------
@@ -4599,22 +4537,6 @@
     //--------------------------------------------------------------------------

     /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-	public function setEstimatedSize(estimatedWidth:Number = NaN,
-                                     estimatedHeight:Number = NaN,
-								     invalidateSize:Boolean = true):void
-    {
-        _estimatedWidth = estimatedWidth;
-        _estimatedHeight = estimatedHeight;
-    }
-
-    /**
      *  Validate the measuredWidth and measuredHeight properties to match the
      *  current size of the content.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 17971
Author:   clucier@adobe.com
Date:     2010-09-30T21:46:54.450016Z

Log Message:
-----------
For popups added twice via PopupManager, dragging is no longer disabled.
Making label/icon top/bottom padding consistent with label.

QE notes: None
Doc notes: None
Bugs: SDK-27852, SDK-27900
Reviewer: Alex, Glenn
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/SparkButtonSkin.as</path>

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

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -324,10 +324,7 @@
             if (!dispatchEvent(request))
                 smp = request.value as ISystemManager;
         }
-
-        if (window is IUIComponent)
-            IUIComponent(window).isPopUp = true;
-
+
         if (!childList || childList == PopUpManagerChildList.PARENT)
             topMost = smp.popUpChildren.contains(parent);
         else
@@ -336,6 +333,9 @@
         children = topMost ? smp.popUpChildren : smp;
         children.addChild(DisplayObject(window));

+        if (window is IUIComponent)
+            IUIComponent(window).isPopUp = true;
+
         window.visible = false;

         const o:PopUpData = createPopUpData();