Transferred from the Adobe Open Source Subversion Repository

Revision: 10633
Author:   dloverin@adobe.com
Date:     2009-09-28T13:24:30.559033Z

Log Message:
-----------
Use styleManager instance instead of StyleManager singleton (framework and compiler generated code)

Modified compiler generated style code for the FlexInit class. The style related changes are only available with the -keep option. AST generation is coming later.

Only the framework project is changed here. The other projects are will be changed soon.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex and Paul
Tests run: checkintests, all Mustella tests(no new failures)
Is noteworthy for integration: no.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonBarButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.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/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserMonthArrowSkin.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/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</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/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.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/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</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/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TitleBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperDownSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TabSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/textClasses/TextRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/CheckBoxIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperUpSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/RadioButtonIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ComboBoxArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/MenuBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressBarSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderTrackSkin.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/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DataGridHeaderBackgroundSkin.as</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/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SetStyleActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -51,7 +51,6 @@
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.ISimpleStyleClient;
 import mx.styles.IStyleClient;
-import mx.styles.StyleManager;
 import mx.styles.StyleProtoChain;

 use namespace mx_internal;
@@ -3571,7 +3570,7 @@

         // Check to see if this is one of the style properties that is known
         // to affect page layout.
-        if (allStyles || StyleManager.isSizeInvalidatingStyle(styleProp))
+        if (allStyles || styleManager.isSizeInvalidatingStyle(styleProp))
         {
             // Some styles, such as horizontalAlign and verticalAlign,
             // affect the layout of this object's children without changing the
@@ -3608,7 +3607,7 @@
         // Check to see if this is one of the style properties that is known.
         // to affect page layout.
         if (allStyles ||
-            StyleManager.isSizeInvalidatingStyle(styleProp))
+            styleManager.isSizeInvalidatingStyle(styleProp))
         {
             invalidateViewMetricsAndPadding();
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/SeriesAutomationImpl.as
+++ frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/SeriesAutomationImpl.as
@@ -0,0 +1,190 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.automation.delegates.charts
+{
+	import flash.events.Event;
+	import flash.events.MouseEvent;
+	import flash.display.DisplayObject;
+	import flash.geom.Point;
+
+	import mx.automation.Automation;
+	import mx.automation.AutomationIDPart;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.automation.IAutomationTabularData;
+	import mx.automation.delegates.core.UIComponentAutomationImpl;
+	import mx.charts.chartClasses.Series;
+	import mx.charts.events.ChartItemEvent;
+	import mx.core.EventPriority;
+	import mx.charts.ChartItem;
+	import mx.automation.tabularData.ChartSeriesTabularData;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines the methods and properties required to perform instrumentation for the
+	 *  Series base class.
+	 *
+	 *  @see mx.charts.chartClasses.Series
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class SeriesAutomationImpl extends UIComponentAutomationImpl
+	{
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(Series, SeriesAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 *  @param obj Series object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function SeriesAutomationImpl(obj:Series)
+		{
+			super(obj);
+
+			series = obj;
+		}
+
+		/**
+		 *  @private
+		 */
+		private var series:Series;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationName():String
+		{
+			return (series.displayName || super.automationName);
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		protected function getChartItemLocation(item:ChartItem):Point
+		{
+			return null;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function replayAutomatableEvent(event:Event):Boolean
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			var ev:MouseEvent;
+
+			if (event is ChartItemEvent)
+			{
+				var chartEvent:ChartItemEvent = event as ChartItemEvent;
+				if (!chartEvent.hitData)
+					return false;
+				var p:Point = getChartItemLocation(chartEvent.hitData.chartItem);
+				if (!p)
+					return false;
+				if (event.type == ChartItemEvent.ITEM_CLICK)
+				{
+					// the following call fails in FocusManager. Hence we use a work-around.
+					// return help.replayClick(chartEvent.hitData.chartItem.itemRenderer as DisplayObject);
+					ev = new MouseEvent(MouseEvent.CLICK);
+					ev.localX = p.x;
+					ev.localY = p.y;
+					return help.replayClick(series.owner, ev);
+				}
+				else if (event.type == ChartItemEvent.ITEM_ROLL_OVER || event.type == ChartItemEvent.ITEM_ROLL_OUT)
+				{
+					// the following call fails in FocusManager. Hence we use a work-around.
+					// return help.replayClick(chartEvent.hitData.chartItem.itemRenderer as DisplayObject);
+					ev = new MouseEvent(MouseEvent.MOUSE_MOVE);
+					ev.localX = p.x;
+					ev.localY = p.y;
+					return help.replayMouseEvent(series.owner, ev);
+				}
+				else if (event.type == ChartItemEvent.ITEM_DOUBLE_CLICK)
+				{
+					// the following call fails in FocusManager. Hence we use a work-around.
+					// return help.replayClick(chartEvent.hitData.chartItem.itemRenderer as DisplayObject);
+					ev = new MouseEvent(MouseEvent.DOUBLE_CLICK);
+					ev.localX = p.x;
+					ev.localY = p.y;
+					return help.replayMouseEvent(series, ev);
+				}
+			}
+
+			return super.replayAutomatableEvent(event);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function get automationTabularData():Object
+		{
+			return new ChartSeriesTabularData(series);
+		}
+
+	}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 15643
Author:   chaase@adobe.com
Date:     2010-04-21T22:58:05.114793Z

Log Message:
-----------
Fix for shader-transition effects. Previously, if the local bounds of an object shifted position between states (this can happen with a Group, for example, if its children exceeded its bounds in different ways in the states. In the bug's example, a VScrollBar caused the group to go negative in y, an HScrollBar caused it to go negative in x), then the from/to bitmaps would be mis-matched and you'd get a jumping artifact at the beginning of the effect.

The fix was to get both the bitmap snapshot *and* the bounds of the object captured from BitmapUtil.getSnapshot(). Then use those bounds to constrain the bitmapFrom object to the bitmapTo bounds.

QE notes: There are 25 Mustella failures from this change. Some are due to a change in the return value from getAffectedProperties (I changed "bitmap" to "bitmapInfo"). Some are due to a fix to avoid clipping the results of the shader to the size of bitmapFrom (it now uses the max of the two bitmaps). So Mustella needs some fixing and some bitmap updating.
Doc notes: Added parameter to BitmapUtil.getSnapshot() and added a @param doc tag to go along with it.
Bugs: sdk-25035
Reviewer: Jason
Tests run: checkintests, Mustella spark/effects/AnimateShaderTransition|CrossFade|Wipe
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
@@ -13,6 +13,8 @@
 import flash.display.BitmapData;
 import flash.display.Shader;
 import flash.filters.ShaderFilter;
+import flash.geom.Point;
+import flash.geom.Rectangle;
 import flash.utils.ByteArray;

 import mx.core.IUIComponent;
@@ -221,22 +223,30 @@
         disposeFrom = (bitmapFrom == null);
         disposeTo = (bitmapTo == null);

+        // If we got the bitmaps from the state information in a transition, they
+        // are stored along with the visual bounds of the object in an Object
+        var boundsFrom:Rectangle;
+        var boundsTo:Rectangle;
+        var bmHolder:Object;
+
         // TODO (chaase): Should take the 'from' snapshot on the
         // fly, in case the object has changed since the overall
         // effect (composite, etc) started much earlier and the
         // object has changed since propertyChanges was initialized
-        if (!bitmapFrom)
-            if (propertyChanges &&
-                propertyChanges.start["bitmap"] !== undefined)
-            {
-                bitmapFrom = propertyChanges.start["bitmap"];
-            }
-        if (!bitmapTo)
-            if (propertyChanges &&
-                propertyChanges.end["bitmap"] !== undefined)
-            {
-                bitmapTo = propertyChanges.end["bitmap"];
-            }
+        if (!bitmapFrom && propertyChanges &&
+            propertyChanges.start["bitmapInfo"] !== undefined)
+        {
+            bmHolder = propertyChanges.start["bitmapInfo"];
+            bitmapFrom = bmHolder["bitmap"];
+            boundsFrom = bmHolder["bounds"];
+        }
+        if (!bitmapTo && propertyChanges &&
+            propertyChanges.end["bitmapInfo"] !== undefined)
+        {
+            bmHolder = propertyChanges.end["bitmapInfo"];
+            bitmapTo = bmHolder["bitmap"];
+            boundsTo = bmHolder["bounds"];
+        }
         if (!bitmapFrom)
             if (propertyChanges &&
                 (propertyChanges.start["visible"] == false ||
@@ -287,6 +297,21 @@
             shader = new Shader(shaderByteCode);
             if (shader.data)
             {
+                if (boundsFrom && boundsTo &&
+                    (boundsFrom.x != boundsTo.x || boundsFrom.y != boundsTo.y))
+                {
+                    var newX:Number = (boundsTo.x - boundsFrom.x);
+                    var newY:Number = (boundsTo.y - boundsFrom.y);
+                    var newW:Number = boundsFrom.width - newX;
+                    var newH:Number = boundsFrom.height - newY;
+                    var newBitmapFrom:BitmapData = new BitmapData(newW, newH, true, 0);
+                    newBitmapFrom.copyPixels(bitmapFrom,
+                        new Rectangle(newX, newY, newW, newH),
+                        new Point(0, 0));
+                    if (disposeFrom)
+                        bitmapFrom.dispose();
+                    bitmapFrom = newBitmapFrom;
+                }
                 shader.data.from.input = bitmapFrom;
                 shader.data.to.input = bitmapTo;

@@ -296,9 +321,9 @@

                 // auto-set width/height if exposed in shader
                 if ("width" in shader.data)
-                    shader.data.width.value = [bitmapFrom.width];
+                    shader.data.width.value = [Math.max(bitmapFrom.width, bitmapTo.width)];
                 if ("height" in shader.data)
-                    shader.data.height.value = [bitmapFrom.height];
+                    shader.data.height.value = [Math.max(bitmapFrom.height,bitmapTo.height)];
                 if (shaderProperties)
                 {
                     for (var prop:String in shaderProperties)


Transferred from the Adobe Open Source Subversion Repository

Revision: 9145
Author:   chaase@adobe.com
Date:     2009-08-06T18:54:04.988137Z

Log Message:
-----------
Fixed leak in AnimateTransitionShader effect. We now dispose any BitmapData objects that we create on the fly as part of setting up and playing the effect.

QE notes: None
Doc notes: None
Bugs: SDK-20273
Reviewer: Corey
Tests run: checkintests, Mustella (spark/effects/[AnimateShaderTransition|Wipe|CrossFade])
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
@@ -91,6 +91,17 @@

         return _resourceManager;
     }
+
+    /**
+     * @private
+     * We need to dispose any BitmapData objects that we create in the
+     * process of playing this effect. If the caller passes in the objects,
+     * we'll let them handle disposal. These variables track whether we create
+     * the bitmapFrom/bitmapTo objects, and therefore whether we need to
+     * dispose of them when we're finished.
+     */
+    private var disposeFrom:Boolean;
+    private var disposeTo:Boolean;

     //--------------------------------------------------------------------------
     //
@@ -185,6 +196,10 @@
      */
     override public function play():void
     {
+        // Only dispose bitmaps that are not provided by the caller
+        disposeFrom = (bitmapFrom == null);
+        disposeTo = (bitmapTo == null);
+
         // FIXME (chaase): Should take the 'from' snapshot on the
         // fly, in case the object has changed since the overall
         // effect (composite, etc) started much earlier and the
@@ -259,10 +274,14 @@
             }
             shaderFilter = new ShaderFilter(shader);
         }
-
+
         super.play();
     }

+    /**
+     * @private
+     * Return a BitmapData for the target object
+     */
     private function getSnapshot(target:Object):BitmapData
     {
         if (target is GraphicElement)
@@ -298,15 +317,39 @@
         // we can replace them when we're done, and then use only our
         // shader filter during the animation.
         oldFilters  = target.filters;
-    }
-    /**
-     * @private
-     */
-    override public function animationEnd(animation:Animation):void
+    }
+
+    /**
+     * @private
+     * Called when animation ends. Restores original filters and disposes of
+     * any BitmapData objects we created.
+     */
+    private function cleanup():void
     {
         target.filters = oldFilters;
         oldFilters = null;
+        if (disposeFrom)
+            bitmapFrom.dispose();
+        if (disposeTo)
+            bitmapTo.dispose();
+    }
+
+    /**
+     * @private
+     */
+    override public function animationEnd(animation:Animation):void
+    {
+        cleanup();
         super.animationEnd(animation);
+    }
+
+    /**
+     * @private
+     */
+    override public function animationStop(animation:Animation):void
+    {
+        cleanup();
+        super.animationStop(animation);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

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

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

 package mx.controls
 {


Rock generation problems fixed

Rock generation problems fixed

Rock generation problems fixed

--- src/ageofai/map/model/MapModel.as
+++ src/ageofai/map/model/MapModel.as
@@ -3,286 +3,350 @@
  */
 package ageofai.map.model
 {
-    import ageofai.home.vo.HomeVO;
-    import ageofai.map.constant.CMap;
-    import ageofai.map.model.GeneralAStarMap;
-    import ageofai.map.astar.AStar;
-    import ageofai.map.constant.CMapNodeType;
-    import ageofai.map.event.MapCreatedEvent;
-    import ageofai.map.geom.IntPoint;
-    import ageofai.map.vo.MapDataVO;
-    import ageofai.unit.base.BaseUnitView;
-    import ageofai.villager.view.VillagerView;
-
-    import common.mvc.model.base.BaseModel;
-
-    public class MapModel extends BaseModel implements IMapModel
-    {
-
-        private var _astarMap:GeneralAStarMap;
-        private var _map:Vector.<Vector.<MapNode>>;
-        private var _units:Vector.<Vector.<BaseUnitView>>;
-        private var _homes:Vector.<HomeVO>;
-        private var _fruits:Vector.<IntPoint>;
-        private var _trees:Vector.<IntPoint>;
-
-        public function get map():Vector.<Vector.<MapNode>>
-        {
-            return this._map;
-        }
-
-        public function get homes():Vector.<HomeVO>
-        {
-            return this._homes;
-        }
-
-        public function get fruits():Vector.<IntPoint>
-        {
-            return this._fruits;
-        }
-
-        public function get trees():Vector.<IntPoint>
-        {
-            return this._trees;
-        }
-
-        public function createMap(rowCount:int, columnCount:int ):void
-        {
-            this._map = new Vector.<Vector.<MapNode>>(rowCount, true);
-            for (var i:int = 0; i < rowCount; i++)
-            {
-                this._map[i] = new Vector.<MapNode>(columnCount, true);
-                for (var j:int = 0; j < columnCount; j++ )
-                {
-                    this._map[i][j] = this.getMapNode();
-                }
-            }
-
-            // Get homes
-            this._homes = this.getHomes(columnCount, rowCount);
-
-            for each (var home:HomeVO in this._homes)
-            {
-                for (i = home.pos.y; i < home.pos.y + 1; i++ )
-                {
-                    for (j = home.pos.x; j < home.pos.x + 1; j++ )
+	import ageofai.home.vo.HomeVO;
+	import ageofai.map.astar.AStar;
+	import ageofai.map.constant.CMap;
+	import ageofai.map.constant.CMapNodeType;
+	import ageofai.map.event.MapCreatedEvent;
+	import ageofai.map.geom.IntPoint;
+	import ageofai.map.vo.MapDataVO;
+	import ageofai.unit.base.BaseUnitView;
+	import ageofai.villager.view.VillagerView;
+
+	import common.mvc.model.base.BaseModel;
+
+	public class MapModel extends BaseModel implements IMapModel
+	{
+
+		private var _astarMap:GeneralAStarMap;
+		private var _map:Vector.<Vector.<MapNode>>;
+		private var _units:Vector.<Vector.<BaseUnitView>>;
+		private var _homes:Vector.<HomeVO>;
+		private var _fruits:Vector.<IntPoint>;
+		private var _trees:Vector.<IntPoint>;
+
+		public function get map():Vector.<Vector.<MapNode>>
+		{
+			return this._map;
+		}
+
+		public function get homes():Vector.<HomeVO>
+		{
+			return this._homes;
+		}
+
+		public function get fruits():Vector.<IntPoint>
+		{
+			return this._fruits;
+		}
+
+		public function get trees():Vector.<IntPoint>
+		{
+			return this._trees;
+		}
+
+		public function createMap( rowCount:int, columnCount:int ):void
+		{
+			this._map = new Vector.<Vector.<MapNode>>( rowCount, true );
+			for( var i:int = 0; i < rowCount; i++ )
+			{
+				this._map[ i ] = new Vector.<MapNode>( columnCount, true );
+				for( var j:int = 0; j < columnCount; j++ )
+				{
+					this._map[ i ][ j ] = this.getMapNode();
+				}
+			}
+
+			// Get homes
+			this._homes = this.getHomes( columnCount, rowCount );
+
+			for each ( var home:HomeVO in this._homes )
+			{
+				for( i = home.pos.y; i < home.pos.y + 1; i++ )
+				{
+					for( j = home.pos.x; j < home.pos.x + 1; j++ )
+					{
+						this._map[ i ][ j ].objectType = CMapNodeType.OBJECT_HOME;
+					}
+				}
+			}
+
+			// Fruits
+			 this._fruits = this.getFruits(columnCount, rowCount);
+
+			 for each (var fruit:IntPoint in this._fruits)
+			 {
+			 this._map[fruit.y][fruit.x].objectType = CMapNodeType.OBJECT_FRUIT;
+			 }
+
+			 // Trees
+			 this._trees = this.getTrees(columnCount, rowCount);
+
+			 for each (var tree:IntPoint in this._trees)
+			 {
+			 this._map[ tree.y ][ tree.x ].objectType = CMapNodeType.OBJECT_TREE;
+			 }
+
+			this.eventDispatcher.dispatchEvent( new MapCreatedEvent( MapCreatedEvent.MAP_CREATED, this.getMapData() ) );
+		}
+
+		private function getHomes( columnCount:int, rowCount:int ):Vector.<HomeVO>
+		{
+			var homes:Vector.<HomeVO> = new Vector.<HomeVO>( CMap.HOME_COUNT, true );
+			var minDistanceX:int = columnCount / CMap.HOME_COUNT;
+			var minDistanceY:int = rowCount / CMap.HOME_COUNT;
+			var offsetX:int, offsetY:int;
+			do
+			{
+				offsetX = offsetY = 0;
+				for( var i:int = 0; i < CMap.HOME_COUNT - 1; i++ )
+				{
+					var home:HomeVO = new HomeVO();
+					home.pos = getRandomPoint( offsetX, offsetX += minDistanceX, offsetY, offsetY += minDistanceY );
+					homes[ i ] = home;
+				}
+				home = new HomeVO();
+				home.pos = getRandomPoint( offsetX, columnCount, offsetY, rowCount );
+				homes[ i ] = home;
+
+				var isHomeInWalkableArea:Boolean = true;
+				for( i = 0; i < CMap.HOME_COUNT; i++ )
+				{
+					if( this.isUnWalkablePointNextToIt( homes[ i ].pos ) )
+					{
+						isHomeInWalkableArea = false;
+						break;
+					}
+				}
+
+				if( !isHomeInWalkableArea )
+				{
+					continue;
+				}
+
+				// Make sure they are valid
+				_astarMap = new GeneralAStarMap( _map );
+				for( i = 0; i < CMap.HOME_COUNT; i++ )
+				{
+					if( this.isUnWalkablePointNextToIt( homes[ i ].pos ) )
+					{
+						break;
+					}
+
+					for( var j:int = 0; j < CMap.HOME_COUNT; j++ )
+					{
+                        if( i == j )
+                        {
+                            continue;
+                        }
+						var aStar:AStar = new AStar( _astarMap, homes[ i ].pos, homes[ j ].pos );
+						var solution:Vector.<IntPoint> = aStar.solve();
+
+                        if( solution )
+                        {
+                            break;
+                        }
+					}
+                    if( !solution )
                     {
-                        this._map[i][j].objectType = CMapNodeType.OBJECT_HOME;
+                        break;
                     }
-                }
-            }
-
-            // Fruits
-            this._fruits = this.getFruits(columnCount, rowCount);
-
-            for each (var fruit:IntPoint in this._fruits)
-            {
-                this._map[fruit.y][fruit.x].objectType = CMapNodeType.OBJECT_FRUIT;
-            }
-
-            // Trees
-            this._trees = this.getTrees(columnCount, rowCount);
-
-            for each (var tree:IntPoint in this._trees)
-            {
-                this._map[tree.y][tree.x].objectType = CMapNodeType.OBJECT_TREE;
-            }
-
-            this.eventDispatcher.dispatchEvent(new MapCreatedEvent(MapCreatedEvent.MAP_CREATED, this.getMapData()));
-        }
-
-        private function getHomes(columnCount:int, rowCount:int):Vector.<HomeVO>
-        {
-            var homes:Vector.<HomeVO> = new Vector.<HomeVO>(CMap.HOME_COUNT, true);
-            var minDistanceX:int = columnCount / CMap.HOME_COUNT;
-            var minDistanceY:int = rowCount / CMap.HOME_COUNT;
-            var offsetX:int, offsetY:int;
-            do
-            {
-                offsetX = offsetY = 0;
-                for (var i:int = 0; i < CMap.HOME_COUNT - 1; i++)
-                {
-                    var home:HomeVO = new HomeVO();
-                    home.pos = getRandomPoint(offsetX, offsetX += minDistanceX, offsetY, offsetY += minDistanceY);
-                    homes[i] = home;
-                }
-                home = new HomeVO();
-                home.pos = getRandomPoint(offsetX, columnCount, offsetY, rowCount);
-                homes[i] = home;
-
-                // Make sure they are valid
-                _astarMap = new GeneralAStarMap(_map);
-                for (i = 0; i < CMap.HOME_COUNT; i++)
-                {
-                    for (var j:int = 0; j < CMap.HOME_COUNT; j++)
-                    {
-                        if (i == j) continue;
-                        var aStar:AStar = new AStar(_astarMap, homes[i].pos, homes[j].pos);
-                        var solution:Vector.<IntPoint> = aStar.solve();
-
-                        if (solution) break;
-                    }
-                    if (!solution) break;
-                }
-            } while (!solution);
-
-            return homes;
-        }
-
-        private function getFruits(columnCount:int, rowCount:int):Vector.<IntPoint>
-        {
-            var fruits:Vector.<IntPoint> = new Vector.<IntPoint>();
-            for (var i:int = 0; i < CMap.HOME_COUNT; i++)
-            {
-                var nearFruitsNo:int = Math.round(Math.random() * 4) + 2;
-
-                for (var j:int = 0; j < nearFruitsNo; j++)
-                {
-                    do {
-                        var fruitX:int = Math.round(Math.random() * 8) + (this._homes[i].pos.x - 3);
-                        var fruitY:int = Math.round(Math.random() * 8) + (this._homes[i].pos.y - 3);
-                    } while (fruitX < 0 || fruitX >= columnCount || fruitY < 0 || fruitY >= rowCount
-                        || (fruitX >= this._homes[i].pos.x && fruitX <= this._homes[i].pos.x + 2 && fruitY >= this._homes[i].pos.y && fruitY <= this._homes[i].pos.y + 2)
-                        || !this._map[fruitY][fruitX].walkable)
-
-                    fruits[fruits.length] = new IntPoint(fruitX, fruitY);
-                }
-            }
-
-            var farFruitsNo:int = Math.round(Math.random() * 2) + 8;
-            for (i = 0; i < farFruitsNo; i++)
-            {
-                do {
-                    var fruitPos:IntPoint = getRandomPoint(0, columnCount, 0, rowCount);
-                } while (!this._map[fruitPos.y][fruitPos.x].walkable || distanceLessThan(8, fruitPos))
-
-                fruits[fruits.length] = fruitPos;
-            }
-
-            return fruits;
-        }
-
-        private function getTrees(columnCount:int, rowCount:int):Vector.<IntPoint>
-        {
-            var trees:Vector.<IntPoint> = new Vector.<IntPoint>();
-            for (var i:int = 0; i < CMap.HOME_COUNT; i++)
-            {
-                var nearTreesNo:int = Math.round(Math.random() * 3) + 2;
-
-                for (var j:int = 0; j < nearTreesNo; j++)
-                {
-                    do {
-                        var treeX:int = Math.round(Math.random() * 8) + (this._homes[i].pos.x - 3);
-                        var treeY:int = Math.round(Math.random() * 8) + (this._homes[i].pos.y - 3);
-                    } while (treeX < 0 || treeX >= columnCount || treeY < 0 || treeY >= rowCount
-                        || (treeX >= this._homes[i].pos.x && treeX <= this._homes[i].pos.x + 2 && treeY >= this._homes[i].pos.y && treeY <= this._homes[i].pos.y + 2)
-                        || !this._map[treeY][treeX].walkable)
-
-                    trees[trees.length] = new IntPoint(treeX, treeY);
-                }
-            }
-
-            var farTreesNo:int = Math.round(Math.random() * 2) + 14;
-            for (i = 0; i < farTreesNo; i++)
-            {
-                do {
-                    var treePos:IntPoint = getRandomPoint(0, columnCount, 0, rowCount);
-                } while (!this._map[treePos.y][treePos.x].walkable || distanceLessThan(8, treePos))
-
-                trees[trees.length] = treePos;
-            }
-
-            return trees;
-        }
-
-        private function isHomeInTheNear( col:uint, row:uint ):Boolean
-        {
-            var offsets:Array = [
-                [ -1, -1 ], [ 0, -1 ], [ 1, -1 ], [ 2, -1 ],
-                [ -1, 0 ], [ 2, 0 ],
-                [ -1, 1 ], [ 2, 1 ],
-                [ -1, 2 ], [ 0, 2 ], [ 1, 2 ], [ 2, 2 ],
-            ];
-
-            for ( var i:int = 0; i < offsets.length; i++ )
-            {
-                //if ( _this.¡ )
-            }
-
-            return false;
-        }
-
-        /* INTERFACE ageofai.map.model.IMapModel */
-
-        public function getMapData():MapDataVO
-        {
-            var mapData:MapDataVO = new MapDataVO();
-            mapData.fruits = this._fruits;
-            mapData.homes = this._homes;
-            mapData.map = this._map;
-            mapData.trees = this._trees;
-
-            return mapData;
-        }
-
-        public function addUnit( villager:VillagerView ):void
-        {
-            if ( !this._units )
-            {
-                this._units = new <Vector.<BaseUnitView>>[];
-            }
-
-            this._units.push( villager );
-
-            this.eventDispatcher.dispatchEvent(new MapCreatedEvent(MapCreatedEvent.MAP_CREATED, this.getMapData()));
-        }
-
-
-        public function getPath(startPos:IntPoint, endPos:IntPoint):Vector.<IntPoint>
-        {
-            var aStar:AStar = new AStar(this._astarMap, startPos, endPos);
-            return aStar.solve();
-        }
-
-        private function getMapNode():MapNode
-        {
-            var rnd:Number = Math.random() * 100;
-            var type:int;
-
-            if (rnd <= 50)
-            {
-                type = CMapNodeType.GRASS;
-            }
-            else if (rnd <= 95)
-            {
-                type = CMapNodeType.DARK_GRASS;
-            }
-            else
-            {
-                type = CMapNodeType.WATER;
-            }
-
-            return new MapNode(type);
-        }
-
-        private function getRandomPoint(offsetX:int, limitX:int, offsetY:int, limitY:int):IntPoint
-        {
-            var x:int = Math.random() * (limitX - offsetX) + offsetX;
-            var y:int = Math.random() * (limitY - offsetY) + offsetY;
-
-            return new IntPoint(x, y);
-        }
-
-        private function distanceLessThan(units:int, pos:IntPoint):Boolean
-        {
-            for (var i:int = 0, count:int = this._homes.length; i < count; i++)
-            {
-                if (Math.abs(pos.x - this._homes[i].pos.x) + Math.abs(pos.y - this._homes[i].pos.y) < units)
-                {
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
+				}
+			}while( !solution );
+
+			return homes;
+		}
+
+		private function isUnWalkablePointNextToIt( pos:IntPoint ):Boolean
+		{
+			var offsets:Array = [
+				[ -1, -1 ], [ 0, -1 ], [ 1, -1 ], [ 2, -1 ],
+				[ -1, 0 ], [ 0, 0 ],[ 1, 0 ],[ 2, 0 ],
+				[ -1, 1 ], [ 0, 1 ],[ 1, 1 ],[ 2, 1 ],
+				[ -1, 2 ], [ 0, 2 ], [ 1, 2 ], [ 2, 2 ],
+			];
+
+			for( var i:int = 0; i < offsets.length; i++ )
+			{
+				var colIndex:int = pos.y + offsets[ i ][ 0 ];
+				var rowIndex:int = pos.x + offsets[ i ][ 1 ];
+
+				if( colIndex >= 0 && rowIndex >= 0 && colIndex < this._map.length && rowIndex < this._map[ 0 ].length && this.isUnWalkablePoint( new IntPoint( colIndex, rowIndex ) ) )
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		private function isUnWalkablePoint( pos:IntPoint ):Boolean
+		{
+			return !this._map[ pos.x ][ pos.y ].walkable;
+		}
+
+		private function getFruits( columnCount:int, rowCount:int ):Vector.<IntPoint>
+		{
+			var fruits:Vector.<IntPoint> = new Vector.<IntPoint>();
+			for( var i:int = 0; i < CMap.HOME_COUNT; i++ )
+			{
+				var nearFruitsNo:int = Math.round( Math.random() * 4 ) + 2;
+
+				for( var j:int = 0; j < nearFruitsNo; j++ )
+				{
+					do{
+						var fruitX:int = Math.round( Math.random() * 8 ) + (this._homes[ i ].pos.x - 3);
+						var fruitY:int = Math.round( Math.random() * 8 ) + (this._homes[ i ].pos.y - 3);
+					}while( fruitX < 0 || fruitX >= columnCount || fruitY < 0 || fruitY >= rowCount
+					|| (fruitX >= this._homes[ i ].pos.x && fruitX <= this._homes[ i ].pos.x + 2 && fruitY >= this._homes[ i ].pos.y && fruitY <= this._homes[ i ].pos.y + 2)
+					|| !this._map[ fruitY ][ fruitX ].walkable
+					|| this.isHomeInTheNear( fruitY, fruitX ) )
+
+					fruits[ fruits.length ] = new IntPoint( fruitX, fruitY );
+				}
+			}
+
+			var farFruitsNo:int = Math.round( Math.random() * 2 ) + 8;
+			for( i = 0; i < farFruitsNo; i++ )
+			{
+				do{
+					var fruitPos:IntPoint = getRandomPoint( 0, columnCount, 0, rowCount );
+				}while( !this._map[ fruitPos.y ][ fruitPos.x ].walkable || distanceLessThan( 8, fruitPos ) )
+
+				fruits[ fruits.length ] = fruitPos;
+			}
+
+			return fruits;
+		}
+
+		private function getTrees( columnCount:int, rowCount:int ):Vector.<IntPoint>
+		{
+			var trees:Vector.<IntPoint> = new Vector.<IntPoint>();
+			for( var i:int = 0; i < CMap.HOME_COUNT; i++ )
+			{
+				var nearTreesNo:int = Math.round( Math.random() * 3 ) + 2;
+
+				for( var j:int = 0; j < nearTreesNo; j++ )
+				{
+					do{
+						var treeX:int = Math.round( Math.random() * 8 ) + (this._homes[ i ].pos.x - 3);
+						var treeY:int = Math.round( Math.random() * 8 ) + (this._homes[ i ].pos.y - 3);
+					}while( treeX < 0 || treeX >= columnCount || treeY < 0 || treeY >= rowCount
+					|| (treeX >= this._homes[ i ].pos.x && treeX <= this._homes[ i ].pos.x + 2 && treeY >= this._homes[ i ].pos.y && treeY <= this._homes[ i ].pos.y + 2)
+					|| !this._map[ treeY ][ treeX ].walkable
+					|| this.isHomeInTheNear( treeY, treeX ) )
+
+					trees[ trees.length ] = new IntPoint( treeX, treeY );
+				}
+			}
+
+			var farTreesNo:int = Math.round( Math.random() * 2 ) + 14;
+			for( i = 0; i < farTreesNo; i++ )
+			{
+				do{
+					var treePos:IntPoint = getRandomPoint( 0, columnCount, 0, rowCount );
+				}while( !this._map[ treePos.y ][ treePos.x ].walkable || distanceLessThan( 8, treePos ) )
+
+				trees[ trees.length ] = treePos;
+			}
+
+			return trees;
+		}
+
+		private function isHomeInTheNear( col:uint, row:uint ):Boolean
+		{
+			var offsets:Array = [
+				[ -1, -1 ], [ 0, -1 ], [ 1, -1 ],
+				[ -1, 0 ], [ 0, 0 ], [ 1, 0 ],
+				[ -1, 1 ], [ 0, 1 ], [ 1, 1 ]
+			];
+
+			for( var i:int = 0; i < offsets.length; i++ )
+			{
+				var colIndex:int = col + offsets[ i ][ 0 ];
+				var rowIndex:int = row + offsets[ i ][ 1 ];
+
+				if( this._map.length < rowIndex && rowIndex > 0
+						&& this.map[ 0 ].length <= colIndex && colIndex > 0
+						&& this._map[ colIndex ][ rowIndex ].objectType == CMapNodeType.OBJECT_HOME )
+				{
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		/* INTERFACE ageofai.map.model.IMapModel */
+
+		public function getMapData():MapDataVO
+		{
+			var mapData:MapDataVO = new MapDataVO();
+			mapData.fruits = this._fruits;
+			mapData.homes = this._homes;
+			mapData.map = this._map;
+			mapData.trees = this._trees;
+
+			return mapData;
+		}
+
+		public function addUnit( villager:VillagerView ):void
+		{
+			if( !this._units )
+			{
+				this._units = new <Vector.<BaseUnitView>>[];
+			}
+
+			this._units.push( villager );
+
+			this.eventDispatcher.dispatchEvent( new MapCreatedEvent( MapCreatedEvent.MAP_CREATED, this.getMapData() ) );
+		}
+
+		public function getPath( startPos:IntPoint, endPos:IntPoint ):Vector.<IntPoint>
+		{
+			var aStar:AStar = new AStar( this._astarMap, startPos, endPos );
+			return aStar.solve();
+		}
+
+		private function getMapNode():MapNode
+		{
+			var rnd:Number = Math.random() * 100;
+			var type:int;
+
+			if( rnd <= 50 )
+			{
+				type = CMapNodeType.GRASS;
+			}
+			else if( rnd <= 95 )
+			{
+				type = CMapNodeType.DARK_GRASS;
+			}
+			else
+			{
+				type = CMapNodeType.WATER;
+			}
+
+			return new MapNode( type );
+		}
+
+		private function getRandomPoint( offsetX:int, limitX:int, offsetY:int, limitY:int ):IntPoint
+		{
+			var x:int = Math.random() * (limitX - offsetX) + offsetX;
+			var y:int = Math.random() * (limitY - offsetY) + offsetY;
+
+			return new IntPoint( x, y );
+		}
+
+		private function distanceLessThan( units:int, pos:IntPoint ):Boolean
+		{
+			for( var i:int = 0, count:int = this._homes.length; i < count; i++ )
+			{
+				if( Math.abs( pos.x - this._homes[ i ].pos.x ) + Math.abs( pos.y - this._homes[ i ].pos.y ) < units )
+				{
+					return true;
+				}
+			}
+			return false;
+		}
+	}
 }


qnd: fix names

qnd: fix names

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@87235 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- plugins/akamaiMediaAnalyticsPlugin/src/com/kaltura/kdpfl/plugin/akamaiMediaAnalyticsMediator.as
+++ plugins/akamaiMediaAnalyticsPlugin/src/com/kaltura/kdpfl/plugin/akamaiMediaAnalyticsMediator.as
@@ -45,12 +45,10 @@
 					var configProxy:ConfigProxy = facade.retrieveProxy(ConfigProxy.NAME) as ConfigProxy;
 					var entry:KalturaBaseEntry = _mediaProxy.vo.entry;

-					AnalyticsPluginLoader.setData("title", entry.id);
-
+					AnalyticsPluginLoader.setData("title", entry.name);
+					AnalyticsPluginLoader.setData("entryId", entry.id);
 					AnalyticsPluginLoader.setData("category", entry.categories);
-
-					//since we don't have a partnerID field, we will send it as "subCategory"
-					AnalyticsPluginLoader.setData("subCategory", configProxy.vo.flashvars.partnerId);
+					AnalyticsPluginLoader.setData("partnerId", configProxy.vo.flashvars.partnerId);

 					//find content type
 					if (entry is KalturaMediaEntry)
@@ -83,7 +81,7 @@

 				case NotificationType.SWITCHING_CHANGE_COMPLETE:
-					AnalyticsPluginLoader.setData("show", getFlavorIdByIndex(notification.getBody().newIndex));
+					AnalyticsPluginLoader.setData("flavorId", getFlavorIdByIndex(notification.getBody().newIndex));
 					break;

 				case NotificationType.MEDIA_ELEMENT_READY:
@@ -98,9 +96,8 @@
 						flavorId = getFlavorIdByIndex(_mediaProxy.startingIndex);
 					}

-					//since we don't have "flavor" field, we will send it as "show"
 					if (flavorId)
-						AnalyticsPluginLoader.setData("show", flavorId);
+						AnalyticsPluginLoader.setData("flavorId", flavorId);

 					break;
 			}


Added Screen.capture() to fetch an Image copy of the current screen buffer.

--- net/flashpunk/Screen.as
+++ net/flashpunk/Screen.as
@@ -7,6 +7,7 @@
 	import flash.geom.Matrix;
 	import flash.geom.Point;
 	import flash.geom.Transform;
+	import net.flashpunk.graphics.Image;

 	/**
 	 * Container for the main screen buffer. Can be used to transform the screen.
@@ -162,7 +163,7 @@
 		public function get angle():Number { return _angle * FP.DEG; }
 		public function set angle(value:Number):void
 		{
-			if (_angle == value) return;
+			if (_angle == value * FP.RAD) return;
 			_angle = value * FP.RAD;
 			update();
 		}
@@ -192,6 +193,15 @@
 		 * Y position of the mouse on the screen.
 		 */
 		public function get mouseY():int { return (FP.stage.mouseY - _y) / (_scaleY * _scale); }
+
+		/**
+		 * Captures the current screen as an Image object.
+		 * @return	A new Image object.
+		 */
+		public function capture():Image
+		{
+			return new Image(_bitmap[_current].bitmapData.clone());
+		}

 		// Screen infromation.
 		/** @private */ private var _sprite:Sprite = new Sprite;


Transferred from the Adobe Open Source Subversion Repository

Revision: 22448
Author:   build@adobe.com
Date:     2011-09-08T19:26:12.465737Z

Log Message:
-----------
Version update to 4.6.0

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/flex-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark_dmv/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mx/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/build.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/airframework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/advancedgrids/src/mx/core/Version.as</path>

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

--- frameworks/projects/automation_air/src/mx/core/Version.as
+++ frameworks/projects/automation_air/src/mx/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.5.2.0";
+mx_internal static const VERSION:String = "4.6.0.0";


Transferred from the Adobe Open Source Subversion Repository

Revision: 137
Author:   mhorn@adobe.com
Date:     2008-01-09T18:46:03.683834Z

Log Message:
-----------
ASDoc bug fix FLEXDOCS-333

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

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

--- frameworks/projects/framework/src/mx/core/IUIComponent.as
+++ frameworks/projects/framework/src/mx/core/IUIComponent.as
@@ -67,7 +67,10 @@
     //----------------------------------

     /**
-     *  Whether the component can accept user interaction.
+     *  Whether the component can accept user interaction. After setting the enabled
+     *  property to false, some components still respond to mouse interactions such
+     *  as mouseOver. As a result, to fully disable UIComponents,
+     *  you should also set the value of the mouseEnabled property to false.
      *  If you set the enabled property to false
      *  for a container, Flex dims the color of the container and of all
      *  of its children, and blocks user input to the container


Transferred from the Adobe Open Source Subversion Repository

Revision: 2462
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:13:06.620116Z

Log Message:
-----------
gumbo push to trunk

Modified Paths:
--------------
214 paths were modified

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

--- frameworks/projects/mx/src/mx/skins/halo/ActivatorSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/ActivatorSkin.as
@@ -287,9 +287,9 @@
 	/**
 	 *  We don't use 'is' to prevent dependency issues
 	 */
-	static private var acbs:Object = {};
-
-	static private function isApplicationControlBar(parent:Object):Boolean
+	private static var acbs:Object = {};
+
+	private static function isApplicationControlBar(parent:Object):Boolean
 	{
 		var s:String = getQualifiedClassName(parent);
 		if (acbs[s] == 1)


Transferred from the Adobe Open Source Subversion Repository

Revision: 12529
Author:   cframpto@adobe.com
Date:     2009-12-04T13:41:09.259946Z

Log Message:
-----------
Fix broken build.  TLF build 565 changed GlobalSettings.getResourceStringFunction to GlobalSettings.resourceStringFunction getter.

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextFlowUtil.as</path>

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

--- frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextFlowUtil.as
@@ -112,7 +112,7 @@
 		 *  TLF itself has English-only messages,
 		 *  but higher layers like Flex can provide localized versions.
 		 */
-		GlobalSettings.getResourceStringFunction = TextUtil.getResourceString;
+		GlobalSettings.resourceStringFunction = TextUtil.getResourceString;

         var format:TextLayoutFormat;
         var config:Configuration;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10633
Author:   dloverin@adobe.com
Date:     2009-09-28T13:24:30.559033Z

Log Message:
-----------
Use styleManager instance instead of StyleManager singleton (framework and compiler generated code)

Modified compiler generated style code for the FlexInit class. The style related changes are only available with the -keep option. AST generation is coming later.

Only the framework project is changed here. The other projects are will be changed soon.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex and Paul
Tests run: checkintests, all Mustella tests(no new failures)
Is noteworthy for integration: no.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonBarButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.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/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserMonthArrowSkin.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/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</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/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.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/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</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/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TitleBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperDownSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TabSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/textClasses/TextRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/CheckBoxIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperUpSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/RadioButtonIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ComboBoxArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/MenuBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressBarSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderTrackSkin.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/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DataGridHeaderBackgroundSkin.as</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/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SetStyleActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>

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

--- frameworks/projects/mx/src/mx/skins/halo/RadioButtonIcon.as
+++ frameworks/projects/mx/src/mx/skins/halo/RadioButtonIcon.as
@@ -143,7 +143,7 @@
 		var borderColor:uint = getStyle("borderColor");
 		var fillAlphas:Array = getStyle("fillAlphas");
 		var fillColors:Array = getStyle("fillColors");
-		StyleManager.getColorNames(fillColors);
+        styleManager.getColorNames(fillColors);
 		var highlightAlphas:Array = getStyle("highlightAlphas");
 		var themeColor:uint = getStyle("themeColor");


Transferred from the Adobe Open Source Subversion Repository

Revision: 4627
Author:   hmuller@adobe.com
Date:     2009-01-22T23:31:47.985757Z

Log Message:
-----------
Removed straggler mx_internal prefix from mx_internal::getRendererForItemAt() in DataGroup.

Sorry.

QE Notes: This should fix some failing mustella tests
Doc Notes: None
Bugs:
Reviewer:

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -420,7 +420,7 @@
         var len:int = numLayoutElements;
         for (var i:int = 0; i < len; i++)
         {
-            var myItemRenderer:IVisualElement = mx_internal::getRendererForItemAt(i);
+            var myItemRenderer:IVisualElement = getRendererForItemAt(i);
             var layer:Number = myItemRenderer.layer;

             if (layer != 0)


Transferred from the Adobe Open Source Subversion Repository

Revision: 5002
Author:   dsubrama@adobe.com
Date:     2009-02-19T00:33:42.642130Z

Log Message:
-----------
Fix up the lookup in DataGroup when finding the appropriate index in the dataProvider given a particular renderer. With this fix, we now correctly support FxLists's displaying and interacting correctly with duplicate items in the dataProvider, a la:

<FxList id="l">
    <ArrayCollection>
        <String>Flex</String>
        <String>Flex</String>
        <String>Flex</String>
    </ArrayCollection>
</FxList>

The lookup now goes through the itemToRenderer data structure which holds the on-screen renderers.

Reviewer: Ryan
Tests: Checkin, yes. Mustella tests: DataGroup, FxDataContainer, FxList, FxButtonBar pass.
QA: Yes, lets get tests for this added to FxList testsuite
Doc: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -793,8 +793,8 @@
     {
         if ((dataProvider == null) || (element == null))
             return -1;
-        var item:Object = (element is IDataRenderer) ? IDataRenderer(element).data : element;
-        return dataProvider.getItemIndex(item);
+
+        return indexToRenderer.indexOf(element);
     }


Fixed bug where disposed ProxyColumn was being modified.

--- WeaveData/src/weave/data/DataSources/WeaveDataSource.as
+++ WeaveData/src/weave/data/DataSources/WeaveDataSource.as
@@ -27,19 +27,18 @@
 	import mx.utils.ObjectUtil;

 	import weave.api.WeaveAPI;
-	import weave.api.disposeObjects;
-	import weave.api.newLinkableChild;
-	import weave.api.objectWasDisposed;
-	import weave.api.reportError;
 	import weave.api.data.ColumnMetadata;
 	import weave.api.data.DataTypes;
 	import weave.api.data.IAttributeColumn;
 	import weave.api.data.IColumnReference;
 	import weave.api.data.IDataRowSource;
 	import weave.api.data.IQualifiedKey;
+	import weave.api.disposeObjects;
+	import weave.api.newLinkableChild;
+	import weave.api.objectWasDisposed;
+	import weave.api.reportError;
 	import weave.api.services.IWeaveGeometryTileService;
 	import weave.core.LinkableString;
-	import weave.data.QKeyManager;
 	import weave.data.AttributeColumns.GeometryColumn;
 	import weave.data.AttributeColumns.NumberColumn;
 	import weave.data.AttributeColumns.ProxyColumn;
@@ -47,6 +46,7 @@
 	import weave.data.AttributeColumns.StreamedGeometryColumn;
 	import weave.data.AttributeColumns.StringColumn;
 	import weave.data.ColumnReferences.HierarchyColumnReference;
+	import weave.data.QKeyManager;
 	import weave.primitives.GeneralizedGeometry;
 	import weave.services.WeaveDataServlet;
 	import weave.services.addAsyncResponder;
@@ -456,10 +456,8 @@
 			WeaveAPI.SessionManager.assignBusyTask(query, proxyColumn);
 		}

-		private function handleGetAttributeColumnFault(event:FaultEvent, token:Object = null):void
-		{
-			var request:ColumnRequestToken = token as ColumnRequestToken;
-
+		private function handleGetAttributeColumnFault(event:FaultEvent, request:ColumnRequestToken):void
+		{
 			if (request.proxyColumn.wasDisposed)
 				return;

@@ -471,9 +469,11 @@
 //		{
 //			DebugUtils.callLater(5000, handleGetAttributeColumn2, arguments);
 //		}
-		private function handleGetAttributeColumn(event:ResultEvent, token:Object = null):void
-		{
-			var request:ColumnRequestToken = token as ColumnRequestToken;
+		private function handleGetAttributeColumn(event:ResultEvent, request:ColumnRequestToken):void
+		{
+			if (request.proxyColumn.wasDisposed)
+				return;
+
 			var pathInHierarchy:XML = request.pathInHierarchy;
 			var proxyColumn:ProxyColumn = request.proxyColumn;
 			var hierarchyNode:XML = HierarchyUtils.getLeafNodeFromPath(pathInHierarchy);
@@ -483,9 +483,6 @@
 			else
 				proxyColumn.setMetadata(hierarchyNode);

-			if (proxyColumn.wasDisposed)
-				return;
-
 			try
 			{
 				if (!event.result)


Fix asdoc generation broken

Fix asdoc generation broken

--- library/src/flexlib/styles/StyleDeclarationHelper.as
+++ library/src/flexlib/styles/StyleDeclarationHelper.as
@@ -24,7 +24,7 @@
 		 * Gets the style selector for the specified class name.
 		 *
 		 * Starting in Flex 4, component selectors passed to StyleManager.getStyleDeclaration and StyleManager.setStyleDeclaration
-		 * must be fully qualified class names. In versions of Flex < 4, the class name itself was used.
+		 * must be fully qualified class names. In versions of Flex < 4, the class name itself was used.
 		 *
 		 * @see http://flexdevtips.blogspot.com/2009/03/setting-default-styles-for-custom.html
 		 *


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

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

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

 package mx.controls.olapDataGridClasses
 {


qnd: add "showAdvancedShare" event

qnd: add "showAdvancedShare" event

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@86970 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- plugins/googleAnalyticsPlugin/src/com/kaltura/kdpfl/plugin/googleAnalytics/GAStatisticsMediator.as
+++ plugins/googleAnalyticsPlugin/src/com/kaltura/kdpfl/plugin/googleAnalytics/GAStatisticsMediator.as
@@ -49,6 +49,7 @@
 			"kdpReady",
 			"doDownload",
 			"doGigya",
+			"showAdvancedShare",
 			"adEnd",
 			"adStart",
 			"doSeek",
@@ -283,6 +284,7 @@
 					value	= 1;
 					break;
 				case "doGigya":
+				case "showAdvancedShare":
 					value	= 1;
 					break;
 				case "doSeek":


- change: Forms get the pseudo class ':error' if their validation fails. This allows to e.g. show error messages on validation failure

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

--- src/reprise/controls/html/Form.as
+++ src/reprise/controls/html/Form.as
@@ -179,20 +179,20 @@

 			if (!m_validationCommand.isExecuting())
 			{
-				m_validationCommand.didSucceed()
-					? dispatchSubmitEvent()
-					: dispatchEvent(new FormEvent(FormEvent.VALIDATION_FAILURE));
+				validation_complete(
+					new CommandEvent(Event.COMPLETE, m_validationCommand.didSucceed()));
 			}
 		}

 		protected function validation_complete(e:CommandEvent):void
 		{
-			log('validation complete, success ' + e.success);
 			if (!e.success)
 			{
+				addCSSPseudoClass('error');
 				dispatchEvent(new FormEvent(FormEvent.VALIDATION_FAILURE));
 				return;
 			}
+			removeCSSPseudoClass('error');
 			dispatchEvent(new FormEvent(FormEvent.SUBMIT));
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4111
Author:   chaase@adobe.com
Date:     2008-11-14T16:39:46.711628Z

Log Message:
-----------
Makes auto-reversal of transitions work more completely and correctly, fixing some API issues and other related animation/effect issues along the way. Seeking behavior in effects is improved (although still far from perfect, especially for non-playing effects), and dynamic behavior of effects (picking up values dynamically from the environment) is improved.

QE Notes: better seek() behavior, can just call it on non-playing effects and it will automatically play/pause the effect if necessary
Doc Notes: None
Bugs: sdk-17294, sdk-16595, sdk-18104, sdk-18105, sdk-18106, sdk-18107
Reviewer: Jason
tests: checkintests, Mustella: tests/Effects, tests/gumbo/effects tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/Transition.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/mx/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EffectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Parallel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.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/Sequence.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/mx/effects/AddAction.as</path>

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

--- frameworks/projects/framework/src/mx/effects/CompositeEffect.as
+++ frameworks/projects/framework/src/mx/effects/CompositeEffect.as
@@ -137,8 +137,36 @@
     /**
      *  An Array containing the child effects of this CompositeEffect.
      */
-    public var children:Array = [];
-
+    private var _children:Array = [];
+
+    public function get children():Array
+    {
+        return _children;
+    }
+    public function set children(value:Array):void
+    {
+        var i:int;
+        if (_children)
+            // Remove this effect as the parent of the old child effects
+            for (i = 0; i < _children.length; ++i)
+                Effect(_children[i]).mx_internal::parentCompositeEffect = null;
+        _children = value;
+        if (_children)
+            for (i = 0; i < _children.length; ++i)
+                Effect(_children[i]).mx_internal::parentCompositeEffect = this;
+    }
+
+    /**
+     * Returns the duration of this effect as defined by the duration of
+     * all child effects. This takes into account the startDelay and repetition
+     * info for all child effects, along with their durations, and returns the
+     * appropriate result.
+     */
+    public function get compositeDuration():Number
+    {
+        return duration;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods
@@ -384,6 +412,9 @@
     //
     //--------------------------------------------------------------------------

+    // TODO (chaase): Shouldn't there be a removeChild() method
+    // since there's an addChild() method?
+
     /**
      *  Adds a new child effect to this composite effect.
      *  A Sequence effect plays each child effect one at a time,
@@ -401,6 +432,7 @@
         // Null out the list of affected properties,
         // so that it gets recalculated to include the new child.
         _affectedProperties = null;
+        Effect(childEffect).mx_internal::parentCompositeEffect = this;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

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

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

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

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:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
+++ frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as
@@ -41,6 +41,12 @@
  *  However, there is currently no internal restriction preventing the
  *  acquisition of this XML data by other means, such as network, local file
  *  system, or shared object at runtime.</p>
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion BlazeDS 4
+ *  @productversion LCDS 3
  */
 public class ServerConfig
 {
@@ -145,6 +151,12 @@
     /**
      *  The XML configuration; this value must contain the relevant portions of
      *  the <services> tag from the services-config.xml file.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public static function get xml():XML
     {
@@ -193,6 +205,12 @@
      *  @param   destinationB:String second destination to compare channels with
      *  @throw   ArgumentError if the channel definitions of the specified
      *           destinations aren't identical.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public static function checkChannelConsistency(destinationA:String,
                                                    destinationB:String):void
@@ -214,6 +232,12 @@
      *  @return The Channel instance.
      *
      *  @throws mx.messaging.errors.InvalidChannelError If no Channel has the specified id.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public static function getChannel(id:String,
                                       clustered:Boolean = false):Channel
@@ -259,6 +283,12 @@
      *  @throws mx.messaging.errors.InvalidDestinationError If the specified destination
      *                                  does not have channels and the application
      *                                  did not define default channels.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public static function getChannelSet(destinationId:String):ChannelSet
     {
@@ -274,6 +304,12 @@
      *  @return XMLList containing the <property> tag information.
      *
      *  @throws mx.messaging.errors.InvalidDestinationError If the specified destination is not found.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     public static function getProperties(destinationId:String):XMLList
     {
@@ -302,6 +338,12 @@
     /**
      *  This method returns true iff the channelset specified has channels with
      *  ids or uris that match those found in the destination specified.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     mx_internal static function channelSetMatchesDestinationConfig(channelSet:ChannelSet,
                                                                    destination:String):Boolean
@@ -472,6 +514,12 @@
                         oldChannels.appendChild(newChannel);
                     }
                 }
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 9
+                *  @playerversion AIR 1.1
+                *  @productversion BlazeDS 4
+                *  @productversion LCDS 3
                 */
             }
         }
@@ -493,6 +541,12 @@
      *
      *  @throws mx.messaging.errors.InvalidChannelError If no configuration data for the specified
      *                             id exists.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     private static function createChannel(channelId:String):Channel
     {
@@ -534,6 +588,12 @@

        /**
         * Converts the ConfigMap of properties into XML
+        *
+        *  @langversion 3.0
+        *  @playerversion Flash 9
+        *  @playerversion AIR 1.1
+        *  @productversion BlazeDS 4
+        *  @productversion LCDS 3
         */
     private static function convertToXML(config:ConfigMap, configXML:XML):void
     {
@@ -609,6 +669,12 @@
     /**
      *  Returns the destination XML data specific to the destination and message
      *  type specified. Returns null if the destination is not found.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     private static function getDestinationConfig(destinationId:String):XML
     {
@@ -633,6 +699,12 @@
      *  @param destinatonId The id of the target destination.
      *
      *  @return The ChannelSet.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
      */
     private static function internalGetChannelSet(
                                         destinationConfig:XML,


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

--- frameworks/projects/spark/src/spark/effects/AnimateTransform.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransform.as
@@ -1,15 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// AdobePatentID="B998"
+

 package spark.effects
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3998
Author:   hmuller@adobe.com
Date:     2008-11-03T21:26:02.073063Z

Log Message:
-----------
Fixed 17723, 17870

Removed unused from VerticalLayout, HorizontalLayout: explicitRowHeight,
explicitColumnWidth properties, setRowHeight, setColumnWidth methods.

QE Notes: checkin and mustella tests pass
Doc Notes: None
Bugs: sdk-17723 sdk-17870
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -172,32 +172,28 @@
     }

     //----------------------------------
-    //  explicitColumnWidth
-    //----------------------------------
-
-    /**
-     *  The column width requested by explicitly setting
-     *  columnWidth.
-     */
-    protected var explicitColumnWidth:Number;
-
-    //----------------------------------
     //  columnWidth
     //----------------------------------

-    private var _columnWidth:Number = 20;
+    private var _columnWidth:Number;

     [Inspectable(category="General")]

     /**
      *  Specifies the width of the columns if variableColumnWidth
      *  is false.
-     *
-     *  @default 20
+     *
+     *  If this property isn't explicitly set, then the measured width
+     *  of the first item is returned.
      */
     public function get columnWidth():Number
     {
-        return _columnWidth;
+        if (!isNaN(_columnWidth))
+            return _columnWidth;
+        else if (!target || (target.numLayoutItems <= 0))
+            return 0;
+        else
+            return target.getLayoutItemAt(0).preferredSize.x;
     }

     /**
@@ -205,32 +201,12 @@
      */
     public function set columnWidth(value:Number):void
     {
-        explicitColumnWidth = value;
-
-        if (_columnWidth != value)
-        {
-            setColumnWidth(value);
- 		   	var layoutTarget:GroupBase = target;
-        	if (layoutTarget != null)
-        	{
-            	layoutTarget.invalidateSize();
-	            layoutTarget.invalidateDisplayList();
-        	}
-        }
-    }
-
-    /**
-     *  Sets the columnWidth property without causing invalidation or
-     *  setting of explicitColumnWidth which
-     *  permanently locks in the width of the columns.
-     *
-     *  @param value The column width, in pixels.
-     */
-    protected function setColumnWidth(value:Number):void
-    {
+        if (_columnWidth == value)
+            return;
+
         _columnWidth = value;
-    }
-
+        invalidateTargetSizeAndDisplayList();
+    }

     //----------------------------------
     //  variableColumnWidth
@@ -762,21 +738,11 @@
     private function fixedColumnWidthMeasure(layoutTarget:GroupBase):void
     {
         var cols:uint = layoutTarget.numLayoutItems;
-
-		var columnWidth:Number = this.columnWidth;
-        if (isNaN(explicitColumnWidth))
-        {
-            if (cols == 0)
-            	columnWidth = 0;
-            else
-      			columnWidth = layoutTarget.getLayoutItemAt(0).preferredSize.x;
-        	setColumnWidth(columnWidth);
-        }
-
-        var reqColumns:int = requestedColumnCount;
-        var visibleCols:uint = (reqColumns == -1) ? cols : reqColumns;
-        var contentWidth:Number = (cols * columnWidth) + ((cols > 1) ? (gap * (cols - 1)) : 0);
-        var visibleWidth:Number = (visibleCols * columnWidth) + ((visibleCols > 1) ? (gap * (visibleCols - 1)) : 0);
+        var visibleCols:uint = (requestedColumnCount == -1) ? cols : requestedColumnCount;
+
+        var cw:Number = columnWidth; // can be expensive to compute
+        var contentWidth:Number = (cols * cw) + ((cols > 1) ? (gap * (cols - 1)) : 0);
+        var visibleWidth:Number = (visibleCols * cw) + ((visibleCols > 1) ? (gap * (visibleCols - 1)) : 0);

         var rowHeight:Number = layoutTarget.explicitHeight;
         var minRowHeight:Number = rowHeight;
@@ -862,6 +828,10 @@
         var maxY:Number = 0;
         var firstColInView:int = -1;
         var lastColInView:int = -1;
+
+        // columnWidth can be expensive to compute
+        var cw:Number = (variableColumnWidth) ? 0 : columnWidth;
+

         for (var index:int = 0; index < count; index++)
         {
@@ -874,7 +844,7 @@
             layoutItem.setActualPosition(x, y);
             var dy:Number = layoutItem.actualSize.y;
             if (!variableColumnWidth)
-                layoutItem.setActualSize(columnWidth, dy);
+                layoutItem.setActualSize(cw, dy);

             // Update maxX,Y, first,lastVisibleIndex, and x
             var dx:Number = layoutItem.actualSize.x;