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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPCustomAggregator.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPCustomAggregator.as
@@ -0,0 +1,160 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.olap
+{
+
+/**
+ *  The IOLAPCustomAggregator interface defines the interface
+ *  implemented by custom aggregator classes.
+ *  An instance of a class that implements this interface can be passed to an OLAPMeasure
+ *  object to define the aggregation type of the measure.
+ *
+ *
You use the methods of this interface in two groups. The first group consists of the
+ *  computeBegin(), computeLoop(), and computeEnd() methods.
+ *  Use these methods to compute an aggregation of the values of a measure.

+ *
+ *
The second group consists of the
+ *  computeObjectBegin(), computeObjectLoop(),
+ *  and computeObjectEnd() methods.
+ *  Use these methods to compute an aggregation of aggregated values.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public interface IOLAPCustomAggregator
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Flex calls this method to start the computation of an aggregation value.
+     *
+     *  @param dataField The name of the OLAPMeasure.dataField property
+     *  for the measure to be aggregated.
+     *
+     *  @return An Object initialized for the aggregation.
+     *  Use this Object to hold any information necessary to perform the aggregation.
+     *  You pass this Object to subsequent calls to the computeLoop()
+     *  and computeEnd() methods.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function computeBegin(dataField:String):Object;
+
+    /**
+     *  Flex calls this method when a new value needs to be added to the aggregation.
+     *
+     *  @param data The Object returned by the call to the computeBegin() method,
+     *  or calculated by a previous call to the computeLoop() method.
+     *  Use this Object to hold information necessary to perform the aggregation.
+     *  This method modifies this Object; it does not return a value.
+     *
+     *  @param dataField The name of the OLAPMeasure.dataField property
+     *  for the measure to be aggregated.
+     *
+     *  @param value The object representing the rows data that is being analyzed.
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function computeLoop(data:Object, dataField:String, value:Object):void;
+
+    /**
+     *  Flex calls this method to end the computation of the aggregation value.
+     *
+     *
+     *  @param data The Object returned by the call to the computeLoop() method.
+     *  Use this Object to hold information necessary to perform the aggregation.
+     *
+     *  @param dataField The name of the OLAPMeasure.dataField property
+     *  for the measure to be aggregated.
+     *
+     *  @return The aggregated value.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function computeEnd(data:Object, dataField:String):Number;
+
+    /**
+     *  Flex calls this method to start aggregation of aggregated values.
+     *  Calculating the average value of a group of averages is an example of
+     *  an aggregation of aggregated values.
+     *
+     *  @param value The Object returned by the call to the computeEnd() method
+     *  for a previous aggregation.
+     *  Use this Object to hold the information necessary to perform the aggregation.
+     *
+     *  @return An Object initialized for the aggregation.
+     *  Use this Object to hold any information necessary to perform the aggregation.
+     *  You pass this Object to subsequent calls to the computeObjectLoop()
+     *  and computeObjectEnd() methods.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function computeObjectBegin(value:Object):Object;
+
+    /**
+     *  Flex calls this method when a new aggregated value needs to be added to the aggregation.
+     *
+     *  @param value The Object returned by a call the computeObjectBegin() method,
+     *  or calculated by a previous call to the computeObjectLoop() method.
+     *  This method modifies this Object; it does not return a value.
+     *
+     *  @param newValue The Object returned by the call to the computeEnd() method
+     *  for a previous aggregation.
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function computeObjectLoop(value:Object, newValue:Object):void;
+
+    /**
+     *  Flex calls this method to end the computation.
+     *
+     *  @param value The Object returned by a call to the computeObjectLoop() method
+     *  that is used to store the aggregation results.
+     *  This method modifies this Object; it does not return a value.
+     *
+     *  @param dataField The name of the OLAPMeasure.dataField property
+     *  for the measure to be aggregated.
+     *
+     *  @return The aggregated value.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function computeObjectEnd(value:Object, dataField:String):Number;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/framework/src/mx/validators/CreditCardValidator.as
+++ frameworks/projects/framework/src/mx/validators/CreditCardValidator.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.validators
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5288
Author:   rfrishbe@adobe.com
Date:     2009-03-13T01:44:49.712909Z

Log Message:
-----------
A bunch of small bug fixes.

- DataGroup bug around a visualelement being moved to another datagroup (SDK-19680)

- Added removeAllElements method to IVisualElementContainer (SDK-19424)

- Fix up ASDoc/RTE messages for Group/DataGroup/FxContainer when calling addChild(), removeChild(), etc... (SDK-19582)

- Added an mx_internal method, specifically for automation, so mouse event listeners can get added to a Container without adding a mouseshield and changing the behavior of the component (SDK-18864)

- When both skinClass and skinFactory are set, the skin doesn't get reloaded properly when skinFactory changes when it's a non-ClassFactory (SDK-19450)

- autoLayout and typicalItem properties weren't getting proxied properly on FxDataContainer (SDK-19799)

- Tabbing through two focusable items, when one of those items is partially "offscreen", starts the tab loop with the second item instead of the first (SDK-17283)

- Add Icon file for FxVideoDisplay and VideoElement.

- Also fixed up some ASDoc versioning info for stuff that was added in the Flex 4 timeframe but was actually added to the framework project and not the flex4 project.

- Also renaming Group.setMxmlContent -> Group.setMXMLContent to follow proper naming conventions.

QE Notes: I'll update the bug files and let you know which ones we need to add tests for
Doc Notes: -
Bugs: SDK-19680, SDK-19424, SDK-19582, SDK-18864, SDK-19450, SDK-19799, SDK-17283
Reviewer: Jason reviewed most of the changes, Alex reviewed the FocusManager change
tests: checkintests, mustella Group, DataGroup, FxComponent

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/bundles/en_US/components.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElementContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVideoDisplay.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVideoDisplay.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/VideoElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/VideoElement.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -1827,8 +1827,14 @@
    			return;

         showFocusIndicator = true;
-		focusChanged = false;
-        if (event.keyCode == Keyboard.TAB && !event.isDefaultPrevented())
+        focusChanged = false;
+
+        // see if we got here from a tab.  We also need to check for
+        // keyCode == 0 because in IE sometimes the first time you tab
+        // in to the flash player, you get keyCode == 0 instead of TAB.
+        // Flash Player bug #2295688.
+        if ((event.keyCode == Keyboard.TAB || (browserMode && event.keyCode == 0))
+                && !event.isDefaultPrevented())
         {
             if (browserFocusComponent)
             {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -0,0 +1,287 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package flex.graphics
+{
+import flash.display.Bitmap;
+import flash.display.BitmapData;
+import flash.display.BlendMode;
+import flash.display.DisplayObject;
+import flash.display.Graphics;
+import flash.display.Shape;
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import flash.geom.Matrix;
+import flash.geom.Rectangle;
+import flash.geom.Transform;
+import flash.utils.getDefinitionByName;
+
+import mx.core.mx_internal;
+import mx.events.PropertyChangeEvent;
+import mx.graphics.BitmapFill;
+
+
+import flex.filters.BaseFilter;
+import flex.filters.IBitmapFilter;
+import flex.graphics.graphicsClasses.GraphicElement;
+
+/**
+ *  The BitmapGraphic class is a graphic element that draws a bitmap.
+ */
+public class BitmapGraphic extends GraphicElement implements IAssignableDisplayObjectElement
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function BitmapGraphic()
+	{
+		super();
+
+		_fill = new BitmapFill();
+	}
+
+	private var _fill:BitmapFill;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  alwaysNeedsDisplayObject
+	//----------------------------------
+
+	private var _alwaysNeedsDisplayObject:Boolean = false;
+
+	/*
+	 *  Set this to true to force the Graphic Element to create an underlying Shape
+	 */
+	mx_internal function set alwaysNeedsDisplayObject(value:Boolean):void
+	{
+		if (value != _alwaysNeedsDisplayObject)
+		{
+			_alwaysNeedsDisplayObject = value;
+			notifyElementTransformChanged();
+		}
+	}
+
+	mx_internal function get alwaysNeedsDisplayObject():Boolean
+	{
+		return _alwaysNeedsDisplayObject;
+	}
+
+	//----------------------------------
+	//  repeat
+	//----------------------------------
+
+	protected var _repeat:Boolean = true;
+
+	[Bindable("propertyChange")]
+	[Inspectable(category="General")]
+
+	/**
+	 *  Whether the bitmap is repeated to fill the area. Set to true to cause
+	 *  the fill to tile outward to the edges of the filled region.
+	 *  Set to false to end the fill at the edge of the region.
+	 *
+	 *  @default true
+	 */
+	public function get repeat():Boolean
+	{
+		return _repeat;
+	}
+
+	public function set repeat(value:Boolean):void
+	{
+		var oldValue:Boolean = _repeat;
+
+		if (value != oldValue)
+		{
+			_repeat = value;
+			//dispatchPropertyChangeEvent("repeat", oldValue, value);
+		}
+	}
+
+	//----------------------------------
+	//  source
+	//----------------------------------
+
+	[Bindable("propertyChange")]
+	[Inspectable(category="General")]
+
+	/**
+	 *  The source used for the bitmap fill. The fill can render from various graphical
+	 *  sources, including the following:
+	 *

+	 *
A Bitmap or BitmapData instance.

+	 *
A class representing a subclass of DisplayObject. The BitmapFill instantiates
+	 *       the class and creates a bitmap rendering of it.

+	 *
An instance of a DisplayObject. The BitmapFill copies it into a Bitmap for filling.

+	 *
The name of a subclass of DisplayObject. The BitmapFill loads the class, instantiates it,
+	 *       and creates a bitmap rendering of it.

+	 *

+	 */
+	public function get source():Object
+	{
+		return _fill.source;
+	}
+
+	public function set source(value:Object):void
+	{
+		var oldValue:Object = _fill.source;
+
+		if (value != oldValue)
+		{
+			var bitmapData:BitmapData;
+			var tmpSprite:DisplayObject;
+
+			// This code stolen from BitmapFill. The only change is to make the BitmapData transparent.
+			if (value is Class)
+			{
+				var cls:Class = Class(value);
+				tmpSprite = new cls();
+			}
+			else if (value is BitmapData)
+			{
+				bitmapData = value as BitmapData;
+			}
+			else if (value is Bitmap)
+			{
+				bitmapData = value.bitmapData;
+			}
+			else if (value is DisplayObject)
+			{
+				tmpSprite = value as DisplayObject;
+			}
+			else if (value is String)
+			{
+				var tmpClass:Class = Class(getDefinitionByName(String(value)));
+				tmpSprite = new tmpClass();
+			}
+			else
+			{
+				return;
+			}
+
+			if (!bitmapData && tmpSprite)
+			{
+				bitmapData = new BitmapData(tmpSprite.width, tmpSprite.height, true, 0);
+				bitmapData.draw(tmpSprite, new Matrix());
+			}
+
+			_fill.source = bitmapData;
+			dispatchPropertyChangeEvent("source", oldValue, value);
+			notifyElementChanged();
+		}
+	}
+
+	//----------------------------------
+	//  height
+	//----------------------------------
+
+	private var heightSet:Boolean;
+
+	/**
+	 *  The height of the bitmap.  This property is optional. If not set, the
+	 *  entire bitmap is displayed. If this is set to a value that is smaller
+	 *  than the height of the bitmap, the bitmap is clipped. If this is set
+	 *  to a value that is larger than the height of the bitmap, and the repeat property
+	 *  is set, the bitmap image will be repeated.
+	 *
+	 *  @default NaN
+	 */
+	override public function set height(value:Number):void
+	{
+		super.height = value;
+		heightSet = !isNaN(value);
+	}
+
+	//----------------------------------
+	//  width
+	//----------------------------------
+
+	private var widthSet:Boolean;
+
+	/**
+	 *  The width of the bitmap.  This property is optional. If not set, the
+	 *  entire bitmap is displayed. If this is set to a value that is smaller
+	 *  than the width of the bitmap, the bitmap is clipped. If this is set
+	 *  to a value that is larger than the width of the bitmap, and the repeat property
+	 *  is set, the bitmap image will be repeated.
+	 *
+	 *  @default NaN
+	*/
+	override public function set width(value:Number):void
+	{
+		super.width = value;
+		widthSet = !isNaN(value);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  IGraphicElement Implementation
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  bounds
+	//----------------------------------
+
+    override public function get bounds():Rectangle
+	{
+		return new Rectangle(0, 0,
+			widthSet ? width : (source ? source.width : 0),
+			heightSet ? height : (source ? source.height : 0));
+	}
+
+	/**
+	 *  @inheritDoc
+	 */
+	override public function draw(g:Graphics):void
+	{
+		g.lineStyle(0,0,0);
+		_fill.offsetX = 0;
+		_fill.offsetY = 0;
+		_fill.repeat = repeat;
+		_fill.begin(g, new Rectangle(drawWidth, drawHeight));
+		g.drawRect(0, 0, drawWidth, drawHeight);
+		_fill.end(g);
+
+		applyDisplayObjectProperties();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  IAssignableDisplayObject Implementation
+	//
+	//--------------------------------------------------------------------------
+
+	public function createDisplayObject():DisplayObject
+	{
+		return new Shape();
+	}
+
+	public function needsDisplayObject():Boolean
+	{
+		return true;
+	}
+}
+
+}


FLEX-33728 fixed so compiles and all supported version of flash and chache first answer

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -39,7 +39,6 @@
 import flash.net.URLRequest;
 import flash.system.ApplicationDomain;
 import flash.system.Capabilities;
-import flash.system.ImageDecodingPolicy;
 import flash.system.LoaderContext;
 import flash.utils.ByteArray;

@@ -223,6 +222,33 @@
     private var sourceInvalid:Boolean;
     private var loadFailed:Boolean;
 	private var dpiScale:Number = 1;
+	private var _cachedImageDecodePolicy:Boolean;
+	private var _haveCachedImageDecodePolicy:Boolean;
+
+
+	/**
+	 *  Specifies that the image being loaded will be decoded when needed.
+	 *
+	 *  @see flash.system.ImageDecodingPolicy
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4.11
+	 */
+	public static const ON_DEMAND:String = "onDemand";
+
+	/**
+	 *  Specifies that the image being loaded will be decoded on load.
+	 *
+	 *  @see flash.system.ImageDecodingPolicy
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4.11
+	 */
+	public static const ON_LOAD:String = "onLoad";

     //----------------------------------
     //  bitmapData
@@ -508,9 +534,11 @@
     }

 	/**
-	 *  The image decoding policy, set to ImageDecodingPolicy.ON_DEMAND
-	 *  or ImageDecodingPolicy.ON_LOAD.
-	 *  The default is ImageDecodingPolicy.ON_DEMAND.
+	 *  The image decoding policy, set to ON_DEMAND or ON_LOAD.
+	 *  The default is ON_DEMAND.
+	 *
+	 *  ImageDecodingPolicy also defined ON_DEMAND and ON_LOAD but these
+	 *  are only available under AIR 2.6 and above.
 	 *
 	 *  Setting to asynchronously decode and load the bitmap images for
 	 *  large image may improve your application’s perceived performance.
@@ -519,7 +547,7 @@
 	 *  @playerversion AIR 2.6
 	 *  @productversion Flex 4.11
 	 */
-	public var imageDecodingPolicy:String = ImageDecodingPolicy.ON_DEMAND;
+	public var imageDecodingPolicy:String = ON_DEMAND;

     //----------------------------------
     //  preliminaryHeight
@@ -1495,6 +1523,21 @@
             dpi = DensityUtil.getRuntimeDPI();
         return values.getSource(dpi);
     }
+
+
+	/**
+	 * @private
+	 * Returns true if current Flash Player/Air supports image decoding policy.
+	 */
+	protected function hasImageDecodingPolicy(loaderContext:LoaderContext):Boolean {
+		// true for one it's true for all
+		if (!_haveCachedImageDecodePolicy) {
+			_cachedImageDecodePolicy =  ("imageDecodingPolicy" in loaderContext);
+			_haveCachedImageDecodePolicy = true;
+		}
+
+		return _cachedImageDecodePolicy;
+	}

     /**
      *  @private
@@ -1531,8 +1574,8 @@
             var loader:Loader = new Loader();
             var loaderContext:LoaderContext = new LoaderContext();

-			if (imageDecodingPolicy in loaderContext)
-				loaderContext.imageDecodingPolicy = imageDecodingPolicy;
+			if (hasImageDecodingPolicy(loaderContext))
+				loaderContext["imageDecodingPolicy"] = imageDecodingPolicy;

             // Attach load-event listeners to our LoaderInfo instance.
             loadingContent = loader.contentLoaderInfo;
@@ -1560,8 +1603,8 @@
         var loader:Loader = new Loader();
         var loaderContext:LoaderContext = new LoaderContext();

-		if (imageDecodingPolicy in loaderContext)
-			loaderContext.imageDecodingPolicy = imageDecodingPolicy;
+		if (hasImageDecodingPolicy(loaderContext))
+			loaderContext["imageDecodingPolicy"] = imageDecodingPolicy;

         loadingContent = loader.contentLoaderInfo;
         attachLoadingListeners();


Улучшения

Улучшения

--- src/main/org/shypl/common/loader/AbstractLoader.as
+++ src/main/org/shypl/common/loader/AbstractLoader.as
@@ -86,7 +86,7 @@
 		protected final function handleLoadingCompleteEvent(event:Event):void {
 			_loading = false;
 			FileLoader.LOGGER.trace("Loaded {}", _url);
-			if (!_canceled) {
+			if (!completed) {
 				produceResult();
 				freeLoading();
 				complete();


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

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

 import mx.core.mx_internal;


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/collections/Sort.as
+++ frameworks/projects/framework/src/mx/collections/Sort.as
@@ -94,6 +94,11 @@
  *
  *  @see mx.collections.ICollectionView
  *  @See SortField
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class Sort extends EventDispatcher
 {
@@ -107,16 +112,31 @@

     /**
      *  When executing a find return the index any matching item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const ANY_INDEX_MODE:String = "any";

     /**
      *  When executing a find return the index for the first matching item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const FIRST_INDEX_MODE:String = "first";

     /**
      *  When executing a find return the index for the last matching item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static const LAST_INDEX_MODE:String = "last";

@@ -130,6 +150,11 @@
      *  Constructor.
      *
      *
Creates a new Sort with no fields set and no custom comparator.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function Sort()
     {
@@ -247,6 +272,11 @@
      *  field by using the SortField class compare property;
      *  This way you can use the default comparison for some fields and a custom
      *  comparison for others.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get compareFunction():Function
     {
@@ -292,6 +322,16 @@
      *
      *  @see SortField

+     *
+
+     *  @langversion 3.0
+
+     *  @playerversion Flash 9
+
+     *  @playerversion AIR 1.1
+
+     *  @productversion Flex 3
+
      */
     public function get fields():Array
     {
@@ -337,6 +377,11 @@
      *  sort field values.
      *
      *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get unique():Boolean
     {
@@ -411,6 +456,11 @@
     *              true and the item is not found, returns
     *                the index of the point in the sorted array where the values
     *              would be inserted.
+    *
+    *  @langversion 3.0
+    *  @playerversion Flash 9
+    *  @playerversion AIR 1.1
+    *  @productversion Flex 3
     */
     public function findItem(items:Array,
                              values:Object,
@@ -619,6 +669,11 @@
      *  property parameter specifies a sort field.
      *  If the sort or any SortField uses a custom comparator,
      * there's no way to know, so return true.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function propertyAffectsSort(property:String):Boolean
     {
@@ -641,6 +696,11 @@
      *
Note: an ICollectionView does not automatically update when the
      * SortFields are modified; call its refresh() method to
      * update the view.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function reverse():void
     {
@@ -664,6 +724,11 @@
      *  underlying data.

      *
      *  @param items Array of items to sort.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function sort(items:Array):void
     {
@@ -843,6 +908,11 @@
      * If the sort does not have any sort fields nor a custom comparator
      * just use an empty SortField object and have it use its default
      * logic.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     private function noFieldsCompare(a:Object, b:Object, fields:Array = null):int
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4240
Author:   clucier@adobe.com
Date:     2008-12-05T18:21:06.244165Z

Log Message:
-----------
When styleName changes the change generally propogates down through all visual children so they can update
their proto chain. Unfortunately the default UIComponent implementation only iterated over DisplayObject
children so other IStyleClient children like TextGraphicElement were being skipped.
Bugs: SDK-18329
QE Notes: None
Doc Notes: None
Reviewers: Glenn, Ryan

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

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -8146,11 +8146,18 @@
             IRawChildrenContainer(this).rawChildren :
             IChildList(this);

+        var elementContainer:Boolean = childList is IVisualElementContainer;
+
         // Recursively call this method on each child.
-        var n:int = childList.numChildren;
+        var n:int = elementContainer ?
+            IVisualElementContainer(childList).numElements :
+            childList.numChildren;
+
         for (var i:int = 0; i < n; i++)
         {
-            var child:DisplayObject = childList.getChildAt(i);
+            var child:Object = elementContainer ?
+                IVisualElementContainer(childList).getElementAt(i) :
+                childList.getChildAt(i);

             if (child is IStyleClient)
             {
@@ -8257,11 +8264,14 @@
                         styleProp:String, recursive:Boolean):void
     {
         cachedTextFormat = null;
-
-        var n:int = numChildren;
+        var elementContainer:Boolean = this is IVisualElementContainer;
+        var n:int = elementContainer ? IVisualElementContainer(this).numElements : numChildren;
         for (var i:int = 0; i < n; i++)
         {
-            var child:ISimpleStyleClient = getChildAt(i) as ISimpleStyleClient;
+            var child:ISimpleStyleClient = elementContainer ?
+                IVisualElementContainer(this).getElementAt(i) as ISimpleStyleClient :
+                getChildAt(i) as ISimpleStyleClient;
+
             if (child)
             {
                 child.styleChanged(styleProp);


Transferred from the Adobe Open Source Subversion Repository

Revision: 12052
Author:   clucier@adobe.com
Date:     2009-11-20T18:38:19.094091Z

Log Message:
-----------
We now issue runtime warnings for incompatible embedded fonts as we detect their use.

QE notes: You might want to create a couple tests around this.
Doc notes: None.
Bugs: SDK-23920.
Reviewer: Alex, Darrell
Tests run: Checkin
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/bundles/en_US/core.properties</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/core/UITextField.as</path>
<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/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.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/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>

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

--- frameworks/projects/framework/src/mx/core/UITextField.as
+++ frameworks/projects/framework/src/mx/core/UITextField.as
@@ -2059,20 +2059,9 @@
                     null :
                     embeddedFontRegistry.getAssociatedModuleFactory(
                         textFormat.font, textFormat.bold, textFormat.italic,
-                        this, moduleFactory);
-
-                // if we found the font, then it is embedded.
-                // Some fonts are not listed in info(), so are not in the above registry.
-                // Call isFontFaceEmbedded() which get the list of embedded fonts from the player.
-                if (fontModuleFactory != null)
-                {
-                    embedFonts = true;
-                }
-                else
-                {
-                    var sm:ISystemManager = creatingSystemManager();
-                    embedFonts = sm != null && sm.isFontFaceEmbedded(textFormat);
-                }
+                        this, moduleFactory, creatingSystemManager(), false);
+
+                embedFonts = (fontModuleFactory != null);
             }
             else
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3430
Author:   gruehle@adobe.com
Date:     2008-09-30T23:43:13.377931Z

Log Message:
-----------
This is a collection of minor component changes, done for consistency.

* Data is always "pushed" into skin parts. We were doing this in some places like ItemsComponent.contentGroup, but not in other places. Affected components are TextInput, TextArea, NumericStepper, and Button.

* Button (and every subclass) has an optional "labelField" SkinPart. The Button "label" property is pushed into this part if it is defined.

* Added skin states to the following components:
  TrackBase (includes H/VScrollBar and H/VSlider): States "normal" and "disabled".
  Spinner (includes NumericStepper): States "normal" and "disabled".
  ContainerBase (includes ItemsComponent, Selector, and List): States "normal" and "disabled".

  The appearance of "disabled" states is controlled by the skin. The behavior of "disabled" states is still controlled by the component (ie ScrollBar disables the thumb, track and arrow when it is disabled).

* Added new ContainerBase class, which is the base class for ItemsComponent and DataComponent. The base class manages the skin states and puts up a mouse shield when disabled.

* Thumb positioning code in slider and scrollbar always rounds to the nearest pixel boundary. Sub-pixel positioning makes the thumbs look blurry.

* TextView measurement is rounded to integer values. It was commonly returning non-integer values which was causing subsequent components in relative layouts to be positioned on sub-pixel boundaries.

Bugs: SDK-16933 Make Label be an optional part of Button and related components
QE: The pixel alignment changes may result in bitmap comparison failures. The bitmaps should be regenerated with the pixel alignment. There should be no functional changes to any of the components.
Reviewer: Chet, Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DataComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ApplicationSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ItemsComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SelectorSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ComplexPanelSkin.mxml</path>

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


Removed popUpIn().
Added popUpAtMouse(), which is like our show() (which shows at the mouse)
only also allows specifying popLeftwards and popUpwards.
Also, in our show(), just fit the damn menu onto the stage. Always.
Why have a special method for doing what should be the common case?
I suppose the old code was trying to fit the menu into the roomview bounds,
which might've been nice if it actually worked.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@452 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flex/CommandMenu.as
+++ src/as/com/threerings/flex/CommandMenu.as
@@ -25,6 +25,7 @@
 import flash.display.DisplayObjectContainer;
 import flash.events.IEventDispatcher;

+import flash.geom.Point;
 import flash.geom.Rectangle;

 import mx.controls.Menu;
@@ -48,6 +49,8 @@
 import flexlib.controls.ScrollableArrowMenu;

 import com.threerings.util.CommandEvent;
+
+import com.threerings.flex.PopUpUtil;

 import com.threerings.flex.menuClasses.CommandMenuItemRenderer;
 import com.threerings.flex.menuClasses.CommandListData;
@@ -124,39 +127,6 @@
     }

     /**
-     * Shows the menu at the current mouse coordinates, popping upwards or leftwards as necessary
-     * to fit the menu into the supplied bounds.
-     */
-    public function popUpIn (bounds :Rectangle) :void
-    {
-        var mx :int = DisplayObject(Application.application).mouseX;
-        var my :int = DisplayObject(Application.application).mouseY;
-
-        // show it at zero zero so that it is layed out and measured
-        show(0, 0);
-        _fitting = bounds;
-
-        // then determine if we need to point it leftwards or upwards
-        if (mx + getExplicitOrMeasuredWidth() > bounds.right) {
-            mx -= getExplicitOrMeasuredWidth();
-        }
-        if (mx < bounds.left) {
-            mx = Math.max(bounds.right - getExplicitOrMeasuredWidth(), bounds.left);
-        }
-        // if we've poped out of the boundaries, just snap it to the lower right corner
-        if (my + getExplicitOrMeasuredHeight() > bounds.bottom) {
-            my -= getExplicitOrMeasuredHeight();
-        }
-        if (my < bounds.top) {
-            my = Math.max(bounds.bottom - getExplicitOrMeasuredHeight(), bounds.top);
-        }
-
-        // finally move it to the correct position
-        x = mx;
-        y = my;
-    }
-
-    /**
      * Shows the menu at the specified mouse coordinates.
      */
     public function popUpAt (mx :int, my :int, popUpwards :Boolean = false,
@@ -169,8 +139,20 @@
     }

     /**
+     * Shows the menu at the current mouse location.
+     */
+    public function popUpAtMouse (popUpwards :Boolean = false, popLeftwards :Boolean = false) :void
+    {
+        _upping = popUpwards;
+        _lefting = popLeftwards;
+        _fitting = null;
+        show(); // our show, with no args, pops at the mouse
+    }
+
+    /**
      * Just like our superclass's show(), except that when invoked with no args, causes the menu to
      * show at the current mouse location instead of the top-left corner of the application.
+     * Also, we ensure that the resulting menu is in-bounds.
      */
     override public function show (xShow :Object = null, yShow :Object = null) :void
     {
@@ -190,6 +172,8 @@
         if (_upping) {
             y = y - getExplicitOrMeasuredHeight();
         }
+
+        PopUpUtil.fit(this);
     }

     /**


Implemented positionRect and supporting functions.

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

--- src/as/com/threerings/util/DisplayUtil.as
+++ src/as/com/threerings/util/DisplayUtil.as
@@ -5,6 +5,26 @@

 public class DisplayUtil
 {
+    /**
+     * Returns the most reasonable position for the specified rectangle to
+     * be placed at so as to maximize its containment by the specified
+     * bounding rectangle while still placing it as near its original
+     * coordinates as possible.
+     *
+     * @param rect the rectangle to be positioned.
+     * @param bounds the containing rectangle.
+     */
+    public static function fitRectInRect (
+            rect :Rectangle , bounds :Rectangle) :Point
+    {
+        // Guarantee that the right and bottom edges will be contained
+        // and do our best for the top and left edges.
+        var br :Point = bounds.bottomRight;
+        return new Point(
+            Math.min(br.x - rect.width, Math.max(rect.x, bounds.x)),
+            Math.min(br.y - rect.height, Math.max(rect.y, bounds.y)));
+    }
+
     /**
      * Position the specified rectangle within the bounds, avoiding
      * any of the Rectangles in the avoid array, which may be destructively
@@ -18,8 +38,86 @@
             r :Rectangle, bounds :Rectangle, avoid :Array) :Boolean
     {
         var origPos :Point = r.topLeft;
+        var pointSorter :Function = createPointSorter(origPos);
+        var possibles :Array = new Array();
+        // start things off with the passed-in point (adjusted to
+        // be inside the bounds, if needed)
+        possibles.push(fitRectInRect(r, bounds));

-        return true;
+        // keep track of area that doesn't generate new possibles
+        var dead :Array = new Array();
+
+        while (possibles.length > 0) {
+            try {
+                var p :Point = (possibles.shift() as Point);
+                r.x = p.x;
+                r.y = p.y;
+
+                // make sure the rectangle is in the view
+                if (!bounds.containsRect(r)) {
+                    continue;
+                }
+
+                // and not over a dead area
+                for each (var deadRect :Rectangle in dead) {
+                    if (deadRect.intersects(r)) {
+                        throw true; // continue outer loop
+                    }
+                }
+
+                // see if it hits any rects we're trying to avoid
+                for (var ii :int = 0; ii < avoid.length; ii++) {
+                    var avoidRect :Rectangle = (avoid[ii] as Rectangle);
+                    if (avoidRect.intersects(r)) {
+                        // remove it from the avoid list
+                        avoid.splice(ii, 1);
+                        // but add it to the dead list
+                        dead.push(avoidRect);
+
+                        // add 4 new possible points, each pushed in
+                        // one direction
+                        possibles.push(
+                            new Point(avoidRect.x - r.width, r.y),
+                            new Point(r.x, avoidRect.y - r.height),
+                            new Point(avoidRect.x + avoidRect.width, r.y),
+                            new Point(r.x, avoidRect.y + avoidRect.height));
+
+                        // re-sort the list
+                        possibles.sort(pointSorter);
+                        throw true; // continue outer loop
+                    }
+                }
+
+                // hey! if we got here, then it worked!
+                return true;
+
+            } catch (continueWhile :Boolean) {
+                // simply catch the boolean and use it to continue inner loops
+            }
+        }
+
+        // we never found a match, move the rectangle back
+        r.x = origPos.x;
+        r.y = origPos.y;
+        return false;
+    }
+
+    /**
+     * Create a sort Function that can be used to compare Points in an
+     * Array according to their distance from the specified Point.
+     *
+     * Note: The function will always sort according to distance from the
+     * passed-in point, even if that point's coordinates change after
+     * the function is created.
+     */
+    public static function createPointSorter (origin :Point) :Function
+    {
+        return function (p1 :Point, p2 :Point) :Number {
+            var dist1 :Number = Point.distance(origin, p1);
+            var dist2 :Number = Point.distance(origin, p2);
+
+            return (dist1 > dist2) ? 1 : ((dist1 < dist2) ? -1 : 0); // signum
+        };
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 10606
Author:   egeorgie@adobe.com
Date:     2009-09-25T23:01:50.455888Z

Log Message:
-----------
White space cleanup.

Doc notes: None
Bugs: None
Reviewer: Evtim
Tests run: build
Is noteworthy for integration: Nope

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/Block.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.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/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/DescribeTypeCache.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/sparkTest/src/testWheel.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/SparkSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/utils/DescribeTypeCache.as
+++ frameworks/projects/framework/src/mx/utils/DescribeTypeCache.as
@@ -93,7 +93,7 @@
             cacheKey = className = getQualifiedClassName(o);

         //Need separate entries for describeType(Foo) and describeType(myFoo)
-        if(o is Class)
+        if (o is Class)
             cacheKey += "$";

         if (cacheKey in typeCache)


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

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

 package spark.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17882
Author:   egeorgie@adobe.com
Date:     2010-09-27T18:53:27.336327Z

Log Message:
-----------
Add requestedMaxRowCount, requresteMaxColumnCount properties to HGroup/HorizontalLayout, VGroup/VerticalLayout

QE notes: Ready for testing
Doc notes: None.
Bugs: SDK-25364, SDK-20588
Reviewer: None.
Tests run: mustella cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -514,18 +514,18 @@
         _paddingBottom = value;
         invalidateTargetSizeAndDisplayList();
     }
-
-    //----------------------------------
-    //  requestedMinColumnCount
-    //----------------------------------
-
-    private var _requestedMinColumnCount:int = -1;
+
+    //----------------------------------
+    //  requestedMaxColumnCount
+    //----------------------------------
+
+    private var _requestedMaxColumnCount:int = -1;

     [Inspectable(category="General", minValue="-1")]

     /**
      *  The measured width of this layout is large enough to display
-     *  at least requestedMinColumnCount layout elements.
+     *  at most requestedMaxColumnCount layout elements.
      *
      *
If requestedColumnCount is set, then
      *  this property has no effect.

@@ -534,12 +534,60 @@
      *  then this property has no effect.

      *
      *  @default -1
+     *  @see #requestedColumnCount
+     *  @see #requestedMinColumnCount
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
+    public function get requestedMaxColumnCount():int
+    {
+        return _requestedMaxColumnCount;
+    }
+
+    /**
+     *  @private
+     */
+    public function set requestedMaxColumnCount(value:int):void
+    {
+        if (_requestedMaxColumnCount == value)
+            return;
+
+        _requestedMaxColumnCount = value;
+
+        if (target)
+            target.invalidateSize();
+    }
+
+    //----------------------------------
+    //  requestedMinColumnCount
+    //----------------------------------
+
+    private var _requestedMinColumnCount:int = -1;
+
+    [Inspectable(category="General", minValue="-1")]
+
+    /**
+     *  The measured width of this layout is large enough to display
+     *  at least requestedMinColumnCount layout elements.
+     *
+     *
If requestedColumnCount is set, then
+     *  this property has no effect.

+     *
+     *
If the actual size of the container using this layout has been explicitly set,
+     *  then this property has no effect.

+     *
+     *  @default -1
+     *  @see #requestedColumnCount
+     *  @see #requestedMaxColumnCount
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public function get requestedMinColumnCount():int
     {
         return _requestedMinColumnCount;
@@ -577,6 +625,8 @@
      *  then this property has no effect.

      *
      *  @default -1
+     *  @see #requestedMinColumnCount
+     *  @see #requestedMaxColumnCount
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1354,6 +1404,26 @@

     /**
      *  @private
+     *  @return columns to measure based on elements in layout and any requested/min/max rowCount settings.
+     */
+    private function getColumsToMeasure(numElementsInLayout:int):int
+    {
+        var columnsToMeasure:int;
+        if (requestedColumnCount != -1)
+            columnsToMeasure = requestedColumnCount;
+        else
+        {
+            columnsToMeasure = numElementsInLayout;
+            if (requestedMaxColumnCount != -1)
+                columnsToMeasure = Math.min(requestedMaxColumnCount, columnsToMeasure);
+            if (requestedMinColumnCount != -1)
+                columnsToMeasure = Math.max(requestedMinColumnCount, columnsToMeasure);
+        }
+        return columnsToMeasure;
+    }
+
+    /**
+     *  @private
      *
      *  Compute exact values for measuredWidth,Height and  measuredMinWidth,Height.
      *
@@ -1414,8 +1484,8 @@
         }

         // Calculate the total number of columns to measure
-        var columnsToMeasure:int = (requestedColumnCount != -1) ? requestedColumnCount :
-                                                                  Math.max(requestedMinColumnCount, numElementsInLayout);
+        var columnsToMeasure:int = getColumsToMeasure(numElementsInLayout);
+
         // Do we need to measure more columns?
         if (columnsMeasured < columnsToMeasure)
         {
@@ -1536,8 +1606,7 @@
     private function measureVirtual(layoutTarget:GroupBase):void
     {
         var eltCount:int = layoutTarget.numElements;
-        var measuredEltCount:int = (requestedColumnCount != -1) ? requestedColumnCount :
-                                                                  Math.max(requestedMinColumnCount, eltCount);
+        var measuredEltCount:int = getColumsToMeasure(eltCount);

         var hPadding:Number = paddingLeft + paddingRight;
         var vPadding:Number = paddingTop + paddingBottom;


Transferred from the Adobe Open Source Subversion Repository

Revision: 4958
Author:   rfrishbe@adobe.com
Date:     2009-02-13T23:07:46.243121Z

Log Message:
-----------
Change the initialization sequence of FxComponent and Group.  Basically now children (including the skin) should get created at createChildren() time and follow the correct lifecycle pattern.  Unfortunately, this change got mingled in with all my PARB changes, so I'm submitting a bunch of PARB changes for Group, DataGroup, FxContainer, and FxDataContainer, outlined below:

1.     New event classes/names for Group/FxContainer and DataGroup ("elementAdd" and "elementRemove" event of type ElementExistenceEvent for Group/FxContainer and "rendererAdd" and "rendererRemove" event of type RendererExistenceEvent for DataGroup). It was just one event class of ItemExistenceChangedEvent before.
2.     LayoutBase.clipContent->clipAndEnableScrolling (same with IViewport.clipContent and GroupBase.clipContent)
3.     GroupBase.getLayoutELementAt()->getElementAt()
4.     GroupBase.numLayoutElements -> numElements.
5.     LayoutBase.virtualLayout -> useVirtualLayout
6.     ScrollUnit constants are now changed to be uints instead of typed as ScrollUnit.  This means the signature for getHorizontalScrollPositionDelta(unit:ScrollUnit):Number has changed to getHorizontalScrollPositionDelta(scrollUnit:uint):Number (and ditto for getVerticalScrollPositionDelta())
7.  DataGroup.getRendererForItemAt() -> getElementAt()
8.  DataGroup.getItemIndexForRenderer() -> getElementIndex()

Other changes:
 - Change IVisualElement interface so that it's smaller now.  It also extends ILayoutElement now.  The properties removed from IVisualElement are: rotation, rotationX, rotationY, rotationZ, transformX, transformY, offsets, x, y, z, scaleX, scaleY, scaleZ, explicitWidth, explicitMinWidth, explicitMaxWidth, explicitHeight, explicitMinHeight, explicitMaxHeight)
-  Fix in DataGroup so we don’t remove/add elements if we’re gonna do it later anyways.  I also need to do some other work in here around cleaning up of renderers.
- AddItems fix around handling IVisualElementContainers more effeciently
- get mxmlContent now returns a copy of the Array rather than the one we're using internally
- Had to update mustella since there was special case logic for dealing with getLayoutElementAt().  I added this logic for getElementAt(), which replaces that method.

QE Notes: Thanks for changing all the tests and working on the cyclone
Doc Notes: Made some ASDoc changes to some core classes to move the comments into the interfaces.  I did update the comments a bit as well.
Bugs: SDK-18115, SDK-19004
Reviewer: Jason, Glenn, Hans for initialization sequence change and Hans for all PARB changes
tests: checkintests, all mustella tests

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as" copyfrom-rev="4812" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.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/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -19,7 +19,6 @@

 import mx.components.baseClasses.GroupBase;
 import mx.core.ILayoutElement;
-import mx.core.ScrollUnit;

 import mx.containers.utilityClasses.Flex;
 import mx.events.PropertyChangeEvent;
@@ -439,10 +438,10 @@
         if (!g)
             return 0.0;

-        if ((index < 0) || (index >= g.numLayoutElements))
+        if ((index < 0) || (index >= g.numElements))
             return 0.0;

-        if (!clipContent)
+        if (!clipAndEnableScrolling)
             return 1.0;

         var r0:int = firstIndexInView;
@@ -459,14 +458,14 @@
         // get the layout element's X and Width
         var eltX:Number;
         var eltWidth:Number;
-        if (virtualLayout)
+        if (useVirtualLayout)
         {
             eltX = llv.start(index);
             eltWidth = llv.getMajorSize(index);
         }
         else
         {
-            var elt:ILayoutElement = g.getLayoutElementAt(index);
+            var elt:ILayoutElement = g.getElementAt(index);
             if (!elt || !elt.includeInLayout)
                 return 0.0;
             eltX = elt.getLayoutBoundsX();
@@ -504,7 +503,7 @@
     private static function findIndexAt(x:Number, gap:int, g:GroupBase, i0:int, i1:int):int
     {
         var index:int = (i0 + i1) / 2;
-        var element:ILayoutElement = g.getLayoutElementAt(index);
+        var element:ILayoutElement = g.getElementAt(index);
         var elementX:Number = element.getLayoutBoundsX();
         // TBD: deal with null element, includeInLayout false.
         if ((x >= elementX) && (x < elementX + element.getLayoutBoundsWidth() + gap))
@@ -527,10 +526,10 @@
     */
     private static function findLayoutElementIndex(g:GroupBase, i:int, dir:int):int
     {
-        var n:int = g.numLayoutElements;
+        var n:int = g.numElements;
         while((i >= 0) && (i < n))
         {
-           var element:ILayoutElement = g.getLayoutElementAt(i);
+           var element:ILayoutElement = g.getElementAt(i);
            if (element && element.includeInLayout)
            {
                return i;
@@ -554,7 +553,7 @@
         if (!g)
             return;

-        var n:int = g.numLayoutElements - 1;
+        var n:int = g.numElements - 1;
         if (n < 0)
         {
             setIndexInView(-1, -1);
@@ -585,7 +584,7 @@

         var i0:int;
         var i1:int;
-        if (virtualLayout)
+        if (useVirtualLayout)
         {
             i0 = llv.indexOf(x0);
             i1 = llv.indexOf(x1);
@@ -602,7 +601,7 @@
             var index0:int = findLayoutElementIndex(g, 0, +1);
             if (index0 != -1)
             {
-                var element0:ILayoutElement = g.getLayoutElementAt(index0);
+                var element0:ILayoutElement = g.getElementAt(index0);
                 var element0X:Number = element0.getLayoutBoundsX();
                 var element0Width:Number = element0.getLayoutBoundsWidth();
                 if ((element0X < x1) && ((element0X + element0Width) > x0))
@@ -616,7 +615,7 @@
             var index1:int = findLayoutElementIndex(g, n, -1);
             if (index1 != -1)
             {
-                var element1:ILayoutElement = g.getLayoutElementAt(index1);
+                var element1:ILayoutElement = g.getElementAt(index1);
                 var element1X:Number = element1.getLayoutBoundsX();
                 var element1Width:Number = element1.getLayoutBoundsWidth();
                 if ((element1X < x1) && ((element1X + element1Width) > x0))
@@ -624,7 +623,7 @@
             }
         }

-        if (virtualLayout)
+        if (useVirtualLayout)
             g.invalidateDisplayList();

         setIndexInView(i0, i1);
@@ -638,10 +637,10 @@
      */
     private function layoutElementBounds(g:GroupBase, i:int):Rectangle
     {
-        if (virtualLayout)
+        if (useVirtualLayout)
             return llv.getBounds(i);
         {
-            var element:ILayoutElement = g.getLayoutElementAt(i);
+            var element:ILayoutElement = g.getElementAt(i);
             if (element && element.includeInLayout)
             {
                 return new Rectangle(element.getLayoutBoundsX(),
@@ -666,7 +665,7 @@
      */
     private function findLayoutElementBounds(g:GroupBase, i:int, dir:int, r:Rectangle):Rectangle
     {
-        var n:int = g.numLayoutElements;
+        var n:int = g.numElements;

         if (inView(i) >= 1)
             i = Math.max(0, Math.min(n - 1, i + dir));
@@ -716,7 +715,7 @@
      */
     private function measureReal(layoutTarget:GroupBase):void
     {
-        var layoutEltCount:int = layoutTarget.numLayoutElements;
+        var layoutEltCount:int = layoutTarget.numElements;
         var reqEltCount:int = requestedColumnCount; // -1 means "all elements"
         var eltCount:uint = Math.max(reqEltCount, layoutEltCount);
         var eltInLayoutCount:uint = 0; // elts that have been measured
@@ -735,9 +734,9 @@
             if ((reqEltCount != -1) && (eltInLayoutCount >= reqEltCount))
                 break;

-            if (i < layoutEltCount) // target.numLayoutElements
-                var elt:ILayoutElement = layoutTarget.getLayoutElementAt(i);
-            else // target.numLayoutElements < requestedElementCount, so "pad"
+            if (i < layoutEltCount) // target.numElements
+                var elt:ILayoutElement = layoutTarget.getElementAt(i);
+            else // target.numElements < requestedElementCount, so "pad"
                 elt = typicalLayoutElement;
             if (!elt || !elt.includeInLayout)
                 continue;
@@ -770,7 +769,7 @@
     /**
      *  @private
      *  Syncs the LinearLayoutVector llv with typicalLayoutElement and
-     *  the target's numLayoutElements.  Calling this function accounts
+     *  the target's numElements.  Calling this function accounts
      *  for the possibility that the typicalLayoutElement has changed, or
      *  something that its preferred size depends on has changed.
      */
@@ -785,7 +784,7 @@
             llv.defaultMajorSize = typicalWidth;
         }
         if (layoutTarget)
-            llv.length = layoutTarget.numLayoutElements;
+            llv.length = layoutTarget.numElements;
         llv.gap = gap;
      }

@@ -804,7 +803,7 @@
      */
     private function measureVirtual(layoutTarget:GroupBase):void
     {
-        var eltCount:uint = layoutTarget.numLayoutElements;
+        var eltCount:uint = layoutTarget.numElements;
         var measuredEltCount:int = (requestedColumnCount != -1) ? requestedColumnCount : eltCount;

         updateLLV(layoutTarget);
@@ -864,14 +863,14 @@
         if (!layoutTarget)
             return;

-        if (layoutTarget.numLayoutElements == 0)
+        if (layoutTarget.numElements == 0)
         {
             layoutTarget.measuredWidth = 0;
             layoutTarget.measuredHeight = 0;
             layoutTarget.measuredMinWidth = 0;
             layoutTarget.measuredMinHeight = 0;
         }
-        else if (virtualLayout)
+        else if (useVirtualLayout)
             measureVirtual(layoutTarget);
         else
             measureReal(layoutTarget);
@@ -956,7 +955,7 @@
     private function updateDisplayListVirtual():void
     {
         var layoutTarget:GroupBase = target;
-        var eltCount:int = layoutTarget.numLayoutElements;
+        var eltCount:int = layoutTarget.numElements;
         var targetHeight:Number = layoutTarget.height;
         var minVisibleX:Number = layoutTarget.horizontalScrollPosition;
         var maxVisibleX:Number = minVisibleX + layoutTarget.width;
@@ -977,7 +976,7 @@
         // current contentHeight; cache computed widths/heights in llv.
         for (; (x < maxVisibleX) && (index < eltCount); index++)
         {
-            var elt:ILayoutElement = layoutTarget.getLayoutElementAt(index);
+            var elt:ILayoutElement = layoutTarget.getElementAt(index);
             var w:Number = (isNaN(fixedColumnWidth)) ? elt.getPreferredBoundsWidth() : fixedColumnWidth;
             var h:Number = calculateElementHeight(elt, targetHeight, containerHeight);
             var y:Number = calculateElementY(elt, h, containerHeight);
@@ -998,7 +997,7 @@
             {
                 for (index = startIndex; index <= endIndex; index++)
                 {
-                    elt = layoutTarget.getLayoutElementAt(index);
+                    elt = layoutTarget.getElementAt(index);
                     h = calculateElementHeight(elt, targetHeight, containerHeight);
                     y = calculateElementY(elt, h, containerHeight);
                     elt.setLayoutBoundsPosition(elt.getLayoutBoundsX(), y);
@@ -1019,7 +1018,7 @@
         var targetHeight:Number = layoutTarget.height;

         var layoutElement:ILayoutElement;
-        var count:uint = layoutTarget.numLayoutElements;
+        var count:uint = layoutTarget.numElements;

         // If verticalAlign is top, we don't need to figure out the contentHeight.
         // Otherwise the contentHeight is used to position the element and even size
@@ -1034,7 +1033,7 @@
         {
             for (var i:int = 0; i < count; i++)
             {
-                layoutElement = layoutTarget.getLayoutElementAt(i);
+                layoutElement = layoutTarget.getElementAt(i);
                 if (!layoutElement || !layoutElement.includeInLayout)
                     continue;

@@ -1084,7 +1083,7 @@

         for (var index:int = 0; index < count; index++)
         {
-            layoutElement = layoutTarget.getLayoutElementAt(index);
+            layoutElement = layoutTarget.getElementAt(index);
             if (!layoutElement || !layoutElement.includeInLayout)
                 continue;

@@ -1097,7 +1096,7 @@
             var dy:Number = layoutElement.getLayoutBoundsHeight();
             maxX = Math.max(maxX, x + dx);
             maxY = Math.max(maxY, y + dy);
-            if (!clipContent ||
+            if (!clipAndEnableScrolling ||
                 ((x < maxVisibleX) && ((x + dx) > minVisibleX)) ||
                 ((dx <= 0) && ((x == maxVisibleX) || (x == minVisibleX))))
             {
@@ -1141,7 +1140,7 @@

         // columnWidth can be expensive to compute
         var cw:Number = (variableColumnWidth) ? 0 : columnWidth;
-        var count:uint = target.numLayoutElements;
+        var count:uint = target.numElements;
         var totalCount:uint = count; // number of elements to use in gap calculation

         // If the child is flexible, store information about it in the
@@ -1149,7 +1148,7 @@
         // width and height immediately.
         for (var index:int = 0; index < count; index++)
         {
-            layoutElement = target.getLayoutElementAt(index);
+            layoutElement = target.getElementAt(index);
             if (!layoutElement || !layoutElement.includeInLayout)
             {
                 totalCount--;
@@ -1206,13 +1205,13 @@
         if (!layoutTarget)
             return;

-        if (layoutTarget.numLayoutElements == 0)
+        if (layoutTarget.numElements == 0)
         {
             setColumnCount(0);
             setIndexInView(-1, -1);
             layoutTarget.setContentSize(0, 0);
         }
-        else if (virtualLayout)
+        else if (useVirtualLayout)
             updateDisplayListVirtual();
         else
             updateDisplayListReal();


Change to my bridge instead of my relay.

The relay started hibernating today; it seems that this causes it to
drop out of the directory consensus and the Tor client doesn't want to
reconnect to it.

--- swfcat.as
+++ swfcat.as
@@ -12,10 +12,11 @@

     public class swfcat extends Sprite
     {
-        /* David's relay (nickname 3VXRyxz67OeRoqHn) that also serves a
+        /* David's bridge (nickname eRYaZuvY02FpExln) that also serves a
            crossdomain policy. */
         private const DEFAULT_TOR_ADDR:Object = {
-            host: "173.255.221.44",
+            // host: "173.255.221.44", 3VXRyxz67OeRoqHn
+            host: "69.164.193.231",
             port: 9001
         };


Include FACILITATOR_POLL_INTERVAL to 10 s.

--- swfcat.as
+++ swfcat.as
@@ -20,7 +20,7 @@
         };

         // Milliseconds.
-        private const FACILITATOR_POLL_INTERVAL:int = 1000;
+        private const FACILITATOR_POLL_INTERVAL:int = 10000;

         // Socket to facilitator.
         private var s_f:Socket;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17854
Author:   jasonsj@adobe.com
Date:     2010-09-24T22:22:32.184618Z

Log Message:
-----------
Fixed ActionBar measurement when using titleDisplay.

QE notes:
Doc notes:
Bugs:
SDK-27983  Title is drawing outside the Action Bar
Reviewer: rbrambley
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -152,8 +152,8 @@
         {
             // use titleLayout for paddingLeft and paddingRight
             var layoutObject:Object = hostComponent.titleLayout;
-            titleWidth = (layoutObject.paddingLeft) ? Number(layoutObject.paddingLeft) : 0
-                + (layoutObject.paddingRight) ? Number(layoutObject.paddingRight) : 0
+            titleWidth = ((layoutObject.paddingLeft) ? Number(layoutObject.paddingLeft) : 0)
+                + ((layoutObject.paddingRight) ? Number(layoutObject.paddingRight) : 0)
                 + titleDisplay.getPreferredBoundsWidth();

             titleHeight = titleDisplay.getPreferredBoundsHeight();


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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