Transferred from the Adobe Open Source Subversion Repository

Revision: 21447
Author:   egeorgie@adobe.com
Date:     2011-06-24T03:25:47.685127Z

Log Message:
-----------
Adding SplashScreenImage, SplashScreenImageSource.

Developers can now specify the name of a SplashScreenImage class as the value for the Application's splashScreenImage property. Cool stuff!

QE notes: feature ready for testing
Doc notes: ready for documentation
Bugs:
Reviewer: Chiedo
Tests run: full cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
+++ frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
@@ -81,25 +81,28 @@
      *  @private
      *  The splash image
      */
-    private var splashImage:DisplayObject;      // The splash image
-    private var splashImageWidth:Number;        // original pre-transform width
-    private var splashImageHeight:Number;       // original pre-transform height
-    private var SplashImageClass:Class = null;  // The class of the generated splash image
+    private var splashImage:DisplayObject;              // The splash image
+    private var splashImageWidth:Number;                // original pre-transform width
+    private var splashImageHeight:Number;               // original pre-transform height
+    private var SplashImageClass:Class;                 // The class of the generated splash image
+    private var dynamicSourceAttempted:Boolean = false; // Have we tried to create the dynamicSource instance?
+    private var dynamicSource:SplashScreenImage;        // Instance of the SplashScreenImage sub-class if one is passed in
+                                                        // as the value of Application's splashScreenImage property.

     /**
      *  @private
      *  The resize mode for the splash image
      */
-    private var info:Object = null;             // The systemManager's info object
-    private var scaleMode:String = "none";      // One of "none", "stretch", "letterbox" and "zoom".
+    private var info:Object = null;                     // The systemManager's info object
+    private var scaleMode:String = "none";              // One of "none", "stretch", "letterbox" and "zoom".

     /**
      *  @private
      *  Minimum time for the image to be visible
      */
-    private var minimumDisplayTime:Number = 1000;   // in ms
-    private var checkWaitTime:Boolean = false;      // obey minimumDisplayTime only valid if splashImage is valid
-    private var displayTimeStart:int = -1;          // the start time of the image being displayed
+    private var minimumDisplayTime:Number = 1000;       // in ms
+    private var checkWaitTime:Boolean = false;          // obey minimumDisplayTime only valid if splashImage is valid
+    private var displayTimeStart:int = -1;              // the start time of the image being displayed

     //--------------------------------------------------------------------------
     //
@@ -320,14 +323,27 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    mx_internal function getImageClass(dpi:Number, aspectRatio:String):Class
-    {
-        if ("splashScreenImage" in info)
-            return info["splashScreenImage"];
-
-        return null;
-    }
-
+    mx_internal function getImageClass(aspectRatio:String, dpi:Number, resolution:Number):Class
+    {
+        var sourceClass:Class;
+
+        // If we don't have a dynamic source, then get the class from the info object
+        if (!dynamicSource)
+        {
+            sourceClass = info["splashScreenImage"];
+
+            // Is this class a dynamicSource?
+            if (sourceClass && !dynamicSourceAttempted)
+            {
+                dynamicSourceAttempted = true
+                dynamicSource = new sourceClass() as SplashScreenImage;
+            }
+        }
+
+        // If we have a dynamic source, call its method to get the appropriate class
+        return dynamicSource ? dynamicSource.getImageClass(aspectRatio, dpi, resolution) : sourceClass;
+    }
+
     private function prepareSplashScreen():void
     {
         // Grab the application's dpi provider class.  If one doesn't exist,
@@ -338,7 +354,7 @@
         // Capture device dpi and orientation
         var dpi:Number = dpiProvider.runtimeDPI;
         var aspectRatio:String = (stage.stageWidth < stage.stageHeight) ? StageAspectRatio.PORTRAIT : StageAspectRatio.LANDSCAPE;
-        var imageClass:Class = getImageClass(dpi, aspectRatio);
+        var imageClass:Class = getImageClass(aspectRatio, dpi, Math.max(stage.stageWidth, stage.stageHeight));

         // The SplashImageClass will only be set if a splash screen image has
         // already be generated.  If the desired imageClass differs from the


Transferred from the Adobe Open Source Subversion Repository

Revision: 21680
Author:   jszeto@adobe.com
Date:     2011-07-21T21:56:22.533455Z

Log Message:
-----------
Item Snapping, SpinnerList and DateSpinner Initial checkin

Merging in changes from sandbox development branch

SpinnerList and DateSpinner are in usable states, but there is still unimplemented functionality.

QE notes: none
Doc notes: none
Bugs: none
Reviewer: Tom Kraikit, Eric Day, Jason Szeto
Tests run: checkintests, full cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateAndTimeRangeList.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.settings/org.eclipse.core.resources.prefs</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalendarDate.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.settings</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/DateSpinnerTest-app.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/effects/ThrowEffect.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/views</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.flexProperties</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/libs</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.actionScriptProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/bundles/en_US/components.properties</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/TouchScrollHelper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/TabbedViewNavigatorButtonBarFirstButton_down.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/DateSpinnerTest.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/blackberry-tablet.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/src/views/DateSpinnerTestHomeView.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="dir" action="M">/private/flex/sdk/branches/4.y</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/.settings</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/development/eclipse/flex/DateSpinnerTest/.project</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerShadow.fxg</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as
@@ -0,0 +1,167 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 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.skins.mobile
+{
+import mx.core.ClassFactory;
+import mx.core.DPIClassification;
+import mx.core.mx_internal;
+
+import spark.components.DataGroup;
+import spark.components.Scroller;
+import spark.components.SpinnerList;
+import spark.components.SpinnerListItemRenderer;
+import spark.layouts.VerticalSpinnerLayout;
+import spark.skins.mobile.supportClasses.MobileSkin;
+
+use namespace mx_internal;
+
+/**
+ *  ActionScript-based skin for the SpinnerList in mobile applications.
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
+ */
+public class SpinnerListSkin extends MobileSkin
+{
+	public function SpinnerListSkin()
+	{
+		super();
+
+		switch (applicationDPI)
+		{
+			case DPIClassification.DPI_320:
+			{
+				borderThickness = 2;
+				break;
+			}
+			default:
+			{
+				borderThickness = 1;
+			}
+		}
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Skin parts
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Scroller skin part.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion AIR 3
+	 *  @productversion Flex 4.5.2
+	 */
+	public var scroller:Scroller;
+
+	/**
+	 *  DataGroup skin part.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion AIR 3
+	 *  @productversion Flex 4.5.2
+	 */
+	public var dataGroup:DataGroup;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+	/**
+	 *  @copy spark.skins.spark.ApplicationSkin#hostComponent
+	 */
+	public var hostComponent:SpinnerList;
+
+	/**
+	 *  Pixel size of the border
+	 */
+	protected var borderThickness:int;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden Methods
+	//
+	//--------------------------------------------------------------------------
+
+	override protected function commitCurrentState():void
+	{
+		super.commitCurrentState();
+
+		alpha = currentState.indexOf("disabled") == -1 ? 1 : 0.5;
+	}
+
+	override protected function createChildren():void
+	{
+		super.createChildren();
+
+		if (!dataGroup)
+		{
+			// Create data group layout
+			var layout:VerticalSpinnerLayout = new VerticalSpinnerLayout();
+			layout.requestedRowCount = 5;
+
+			// Create data group
+			dataGroup = new DataGroup();
+			dataGroup.id = "dataGroup";
+			dataGroup.layout = layout;
+			dataGroup.itemRenderer = new ClassFactory(spark.components.SpinnerListItemRenderer);
+		}
+		if (!scroller)
+		{
+			// Create scroller
+			scroller = new Scroller();
+			scroller.id = "scroller";
+			scroller.hasFocusableChildren = false;
+			scroller.ensureElementIsVisibleForSoftKeyboard = false;
+
+			// Only support vertical scrolling
+			scroller.setStyle("verticalScrollPolicy","on");
+			scroller.setStyle("horizontalScrollPolicy", "off");
+			scroller.setStyle("skinClass", spark.skins.mobile.SpinnerListScrollerSkin);
+
+			addChild(scroller);
+		}
+
+		// Associate scroller with data group
+		if (!scroller.viewport)
+			scroller.viewport = dataGroup;
+	}
+
+	override protected function measure():void
+	{
+		measuredWidth = scroller.getPreferredBoundsWidth() + borderThickness * 2;
+		measuredHeight = scroller.getPreferredBoundsHeight();
+	}
+
+	override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+	{
+		graphics.clear();
+
+		super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+		graphics.beginFill(0xB3B3B3);
+		graphics.drawRect(0,0, borderThickness, unscaledHeight);
+		graphics.endFill();
+
+		graphics.beginFill(0xFFFFFF);
+		graphics.drawRect(unscaledWidth - borderThickness, 0, borderThickness, unscaledHeight);
+		graphics.endFill();
+
+		// Scroller
+		setElementSize(scroller, unscaledWidth - borderThickness * 2, unscaledHeight);
+		setElementPosition(scroller, borderThickness, 0);
+	}
+}
+}


[core] Remove dependency on skein.binding

--- src/skein/core/PropertySetter.as
+++ src/skein/core/PropertySetter.as
@@ -7,19 +7,18 @@
  */
 package skein.core
 {
-import skein.binding.core.BindingContext;
-import skein.binding.core.PropertyDestination;
-import skein.binding.core.Source;
+import flash.utils.getDefinitionByName;

 public class PropertySetter
 {
     public static function set(site:Object, property:String, value:Object):void
     {
-        if (value is Source)
+        var SourceClass:Class = getDefinitionByName("skein.binding.core::Source") as Class;
+        var BindingContextClass:Class = getDefinitionByName("skein.binding.core::BindingContext") as Class;
+
+        if (SourceClass && BindingContextClass && value is SourceClass)
         {
-            var ctx:BindingContext = new BindingContext();
-
-            ctx.bind(Source(value), new PropertyDestination(site, property));
+            BindingContextClass["bindProperty"](site, property, value);
         }
         else
         {


Test for PropertyUtil.copyArray() method.

--- dolly-framework/src/test/actionscript/dolly/utils/PropertyUtilTests.as
+++ dolly-framework/src/test/actionscript/dolly/utils/PropertyUtilTests.as
@@ -3,6 +3,14 @@

 import mx.collections.ArrayCollection;
 import mx.collections.ArrayList;
+
+import org.flexunit.assertThat;
+import org.flexunit.asserts.assertTrue;
+import org.hamcrest.collection.array;
+import org.hamcrest.collection.arrayWithSize;
+import org.hamcrest.collection.everyItem;
+import org.hamcrest.core.isA;
+import org.hamcrest.object.equalTo;

 use namespace dolly_internal;

@@ -25,5 +33,16 @@
 	public function after():void {
 		sourceObj = targetObj = null;
 	}
+
+	[Test]
+	public function copyingOfArray():void {
+		PropertyUtil.copyArray(targetObj, "array", sourceObj.array);
+
+		assertThat(targetObj.array, arrayWithSize(5));
+		assertThat(targetObj.array, sourceObj.array);
+		assertTrue(targetObj.array != sourceObj.array);
+		assertThat(targetObj.array, everyItem(isA(Number)));
+		assertThat(targetObj.array, array(equalTo(0), equalTo(1), equalTo(2), equalTo(3), equalTo(4)));
+	}
 }
 }


FLEX-35043
CAUSE: The solution implemented for FLEX-34885, which had an problematic consequence: when calling itemUpdated(item) on a collection with only the first parameter provided (which developers usually do to signal that some - unspecified - properties of the item have changed), ListCollectionView.handlePropertyChangeEvents() would treat that as if the object had been just introduced to the collection - as "property" was null -, replacing a null value - since oldValue was null as well. (That is to say, when the "property" value of the PropertyChangeEvent was null, it was taken to mean that the oldValue - which was also null here - was changed into that item, i.e. the object reference changed in the collection, not just one of the object's properties.) As such, it would try to remove that supposedly existing null value from the collection (and sometimes a null does exist, but shouldn't be removed).

In a way this was logical based on the properties supplied to itemUpdated(), but we also know that a frequent use of that function is with only one parameter, to specify that some of the object's properties have changed (but the object itself should still be in the collection). So we should continue to support this use case.

SOLUTION: now ListCollectionView.handlePropertyChangeEvents() only assumes that the entire object has been replaced in the collection if the event's "property" is null AND if either its "oldValue" or "newValue" is non-null. In other words, if the developer entered all these arguments into the function or in the event they're dispatching, and one of them is non-null, it probably means they want to signal that the entire object has changed in the collection.

NOTES:
-renamed "entireObjectChanged" into "objectReplacedWithAnother" to emphasize that it's not the object's internal state that "entirely changed", but that the object itself was replaced in the collection by another object instance.
-some of the unit tests in ListCollectionView_PropertyChangeEvent_Tests are now failing, which is expected.

--- frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -1487,8 +1487,10 @@
                 }
                 else
                 {
+                    var oldOrNewValueSpecified:Boolean = updateInfo.oldValue != null || updateInfo.newValue != null;
+                    var objectReplacedInCollection:Boolean = updateInfo.property == null && oldOrNewValueSpecified;
                     updateEntry = {item: item, move: defaultMove, events: [updateInfo],
-                        entireObjectChanged: updateInfo.property == null, oldItem: updateInfo.property == null ? updateInfo.oldValue : null};
+                        objectReplacedWithAnother: objectReplacedInCollection, oldItem: updateInfo.oldValue};
                     updatedItems.push(updateEntry);
                 }

@@ -1497,7 +1499,7 @@
                 //if the property affects the sort, we'll need to move
                 updateEntry.move = updateEntry.move
                     || filterFunction != null
-                    || updateEntry.entireObjectChanged
+                    || updateEntry.objectReplacedWithAnother
                     || (sort && sort.propertyAffectsSort(String(updateInfo.property)));
             }

@@ -1509,7 +1511,7 @@
                 updateEntry = updatedItems[i];
                 if (updateEntry.move)
                 {
-                    if(updateEntry.entireObjectChanged)
+                    if(updateEntry.objectReplacedWithAnother)
                     {
                         removeItemsFromView([updateEntry.oldItem], -1, true);
                     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 21197
Author:   jasonsj@adobe.com
Date:     2011-05-04T00:28:38.679310Z

Log Message:
-----------
Updated fix for SDK-29959. Hard-coded rightMargin value for TextAreaSkin and updated paddingRight values to compensate for scroll bar thumb position.

QE notes: TextArea leading (space between lines) should now be consistent between TextField and native control. paddingRight should be proportional to DPI.
Doc notes:
Bugs: SDK-29959
Reviewer: gruehle
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as
@@ -187,8 +187,21 @@
             // on iOS, resize the TextField and let the native control handle scrolling
             _isIOS = (Capabilities.version.indexOf("IOS") == 0);

-            if (!_isIOS)
+            if (_isIOS)
+            {
+                // hard-coded rightMargin for iOS native text control
+                // this value is independent of the paddingRight style
+                var rightMargin:Number = 19;
+
+                if (applicationDPI == DPIClassification.DPI_160)
+                    rightMargin = 9.5;
+
+                textDisplay.rightMargin = rightMargin;
+            }
+            else
+            {
                 textDisplay.addEventListener(KeyboardEvent.KEY_DOWN, textDisplay_keyHandler);
+            }

             textDisplay.addEventListener(Event.CHANGE, textDisplay_changeHandler);
             textDisplay.addEventListener(FlexEvent.VALUE_COMMIT, textDisplay_changeHandler);


Transferred from the Adobe Open Source Subversion Repository

Revision: 22215
Author:   jszeto@adobe.com
Date:     2011-08-25T17:58:30.347120Z

Log Message:
-----------
BorderContainer bug fix

SDK-31171 - BorderContainerSkin's minHeight is too big

Rapidly reverting my very recent revert.

QE notes: Jacob has generated baselines
Doc notes: none
Bugs: SDK-31171
Reviewer: Tom K
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/skins/spark/BorderContainerSkin.as

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

--- frameworks/projects/spark/src/spark/skins/spark/BorderContainerSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/BorderContainerSkin.as
@@ -63,8 +63,8 @@
 	{
 	    super();

-        minWidth = 112;
-        minHeight = 112;
+        minWidth = 30;
+        minHeight = 30;

 	    states = [
             new State({name:"normal"}),


added configureResponder() to support HTTPService

--- as3/src/asunit/framework/AsynchronousTestCase.as
+++ as3/src/asunit/framework/AsynchronousTestCase.as
@@ -5,6 +5,10 @@
 	import flash.events.*;
 	import flash.net.URLLoader;
 	import flash.utils.getTimer;
+
+	import mx.rpc.AsyncToken;
+	import mx.rpc.Responder;
+	import mx.rpc.events.FaultEvent;

 	/**
 	 * Extend this class if you have a TestCase that requires the
@@ -56,6 +60,7 @@
 			_securityErrorExpected = false;
 		}

+		// use this method in overriding run() if you are using a URLLoader:
 		protected function configureListeners(loader:URLLoader):void {
 			loader.addEventListener(Event.COMPLETE, completeHandler);
 			loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
@@ -65,6 +70,11 @@
 			loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
 		}

+		// use this method in overriding run() if you are using an HTTPService:
+		protected function configureResponder(token:AsyncToken):void {
+			token.addResponder(new Responder(resultFunc, faultFunc));
+		}
+
 		// in a subclass, you should override this method and call super.run() at the end
 		public override function run():void {
 			if ((this as Object).constructor == AsynchronousTestCase)
@@ -143,6 +153,32 @@
 			dispatchEvent(new Event(Event.COMPLETE));
 		}

+		protected function resultFunc(event:Object):void
+		{
+			completeHandler(event as Event);
+		}
+
+		protected function faultFunc(event:Object):void
+		{
+			var faultEvent:FaultEvent = event as FaultEvent;
+			if (faultEvent == null)
+			{
+				return;
+			}
+			var cause:Object = faultEvent.fault.rootCause;
+			var ioErrorEvent:IOErrorEvent = cause as IOErrorEvent;
+			if (ioErrorEvent)
+			{
+				ioErrorHandler(ioErrorEvent);
+				return;
+			}
+			var securityErrorEvent:SecurityErrorEvent = cause as SecurityErrorEvent;
+			if (securityErrorEvent)
+			{
+				securityErrorHandler(securityErrorEvent);
+			}
+		}
+
 		public function testRemoteDuration():void {
 			if (!remoteDurationIsValid())
 			{


RTMP.as: change playbackState on pause/stop (fix #5)

--- src/RTMP.as
+++ src/RTMP.as
@@ -41,7 +41,7 @@
       mediaContainer = new MediaContainer();
       setupCallbacks();
       setupGetters();
-      ExternalInterface.call('console.log', 'clappr rtmp 0.7-alpha');
+      ExternalInterface.call('console.log', 'clappr rtmp 0.8-alpha');
       _triggerEvent('flashready');
     }

@@ -74,7 +74,6 @@
     }

     private function netStatusHandler(event:NetStatusEvent):void {
-      ExternalInterface.call('console.log', '-> ' + event.info.code);
       if (playbackState == "ENDED") {
         return;
       } else if (event.info.code == "NetStream.Buffer.Full") {
@@ -86,9 +85,8 @@
       }
     }

-    private function playerPlay(url:String):void {
+    private function playerPlay(url:String=null):void {
       if (!mediaElement) {
-        ExternalInterface.call('console.log', 'player play, no mediaelement');
         playbackState = "PLAYING_BUFFERING";
         _triggerEvent('statechanged');
         mediaElement = mediaFactory.createMediaElement(new URLResource(url));
@@ -109,6 +107,7 @@
     private function playerPause():void {
       ExternalInterface.call('console.log', 'player pause');
       mediaPlayer.pause();
+      playbackState = "PAUSED";
     }

     private function playerSeek(seconds:Number):void {
@@ -117,6 +116,7 @@

     private function playerStop():void {
       mediaPlayer.stop();
+      playbackState = "IDLE";
     }

     private function playerVolume(level:Number):void {
@@ -142,7 +142,6 @@

     private function onFinish(event:TimeEvent):void {
       mediaPlayer.stop();
-      ExternalInterface.call('console.log', 'ended');
       playbackState = 'ENDED';
       _triggerEvent('statechanged');
     }


bump version 3.9.7

bump version 3.9.7

--- kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
+++ kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
@@ -32,7 +32,7 @@
 		/**
 		 * The current version of the KDP.
 		 */
-		public var kdpVersion : String = "v3.9.6";
+		public var kdpVersion : String = "v3.9.7";

 		/**


fix coding style

fix coding style

--- src/aerys/minko/type/binding/DataBindings.as
+++ src/aerys/minko/type/binding/DataBindings.as
@@ -183,6 +183,7 @@
 									   callback		: Function) : void
 		{
 			var signal : Signal = _bindingNameToChangedSignal[bindingName];
+
 			if (!signal)
 				throw new ArgumentError('Unkown property \'' + bindingName + '\'.');


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

--- frameworks/projects/airframework/src/mx/events/AIREvent.as
+++ frameworks/projects/airframework/src/mx/events/AIREvent.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 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.events
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11482
Author:   dloverin@adobe.com
Date:     2009-11-05T23:53:32.642612Z

Log Message:
-----------
Fix RTE when UIComponent.getFocus() is called an the application is not on the stage.

projects/framework/src/mx/core/UIComponent.as
    Added null pointer check for sm.stage.

projects/framework/src/mx/controls/SWFLoader.as
    Prevent loading the same swf twice when loadCompatibility is set and then SWFLoader.load() was called.

QE notes: None.
Doc notes: None.
Bugs: SDK-24008
Reviewer: Alex
Tests run: checkintests, components/SWFLoader, MarshallPlan
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/framework/src/mx/controls/SWFLoader.as
+++ frameworks/projects/framework/src/mx/controls/SWFLoader.as
@@ -1499,7 +1499,12 @@
         isContentLoaded = false;
         brokenImage = false;
         useUnloadAndStop = false;
-
+
+        // Prevent double loading an app when properties are set and
+        // then load() is called directly from application code instead
+        // of from commitProperties().
+        contentChanged = false;
+
         if (!_source || _source == "")
             return;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5383
Author:   jimurphy@adobe.com
Date:     2009-03-18T13:08:33.865663Z

Log Message:
-----------
Merge 3.x revisions 5326-5327,5329,5343 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IToggleButton.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/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>

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

--- frameworks/projects/framework/src/mx/core/IToggleButton.as
+++ frameworks/projects/framework/src/mx/core/IToggleButton.as
@@ -17,15 +17,10 @@
  *  component acts as a toggleable button.  It is used primarily as a filter
  *  by the framework's default button logic.  This interface is *only* used
  *  by legacy Halo components.
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 4
  */
 public interface IToggleButton
 {

 }

-}+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19748
Author:   eday@adobe.com
Date:     2011-01-13T21:25:24.228128Z

Log Message:
-----------
Scroller event thinning.  Allows Flex to handle the higher touch event rate from AIR without it resulting in sluggish scrolling.

QE notes:
Doc notes:
Bugs: SDK-28971, SDK-28962
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -2125,8 +2125,10 @@
 import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.MouseEvent;
+import flash.events.TimerEvent;
 import flash.events.TouchEvent;
 import flash.geom.Point;
+import flash.utils.Timer;

 import mx.core.mx_internal;
 import mx.events.SandboxMouseEvent;
@@ -2171,6 +2173,12 @@
      */
     private static const MAX_THROW_VELOCITY_IPS:Number = 10.0;

+    /**
+     *  @private
+     *  Maximum number of times per second we will change the scroll position
+     *  and update the display while dragging.
+     */
+    private static const MAX_DRAG_RATE:Number = 30;

     /**
      *  @private
@@ -2257,6 +2265,26 @@

     /**
      *  @private
+     *  The delta coordinates of the most recent mouse event during a drag gesture
+     */
+    private var mostRecentDragDeltaX:Number;
+    private var mostRecentDragDeltaY:Number;
+
+    /**
+     *  @private
+     *  Timer used to do drag scrolling.
+     */
+    private var dragTimer:Timer = null;
+
+    /**
+     *  @private
+     *  Indicates that the mouse coordinates have changed and the
+     *  next dragTimer invokation needs to do a scroll.
+     */
+    private var dragScrollPending:Boolean = false;
+
+    /**
+     *  @private
      *  The time the scroll started
      */
     private var startTime:Number;
@@ -2332,7 +2360,7 @@
             // reset circular buffer index/length
             mouseEventLength = 0;

-            addMouseEventHistory(mouseEvent);
+            addMouseEventHistory(mouseEvent.stageX, mouseEvent.stageY);
         }
         else if (event is TouchEvent && event.type == TouchEvent.TOUCH_BEGIN)
         {
@@ -2359,11 +2387,11 @@
      *  @return the delta moved between this mouse event and the start
      *          of the scroll gesture.
      */
-    private function addMouseEventHistory(event:MouseEvent):Point
+    private function addMouseEventHistory(stageX:Number, stageY:Number):Point
     {
         // calculate dx, dy
-        var dx:Number = event.stageX - mouseDownedPoint.x;
-        var dy:Number = event.stageY - mouseDownedPoint.y;
+        var dx:Number = stageX - mouseDownedPoint.x;
+        var dy:Number = stageY - mouseDownedPoint.y;

         // either use a Point object already created or use one already created
         // in mouseEventCoordinatesHistory
@@ -2435,7 +2463,8 @@
      */
     private function sbRoot_mouseMoveHandler(event:MouseEvent):void
     {
-        var mouseDownedDifference:Point = addMouseEventHistory(event);
+        var mouseDownedDifference:Point =
+            new Point(event.stageX - mouseDownedPoint.x, event.stageY - mouseDownedPoint.y);

         if (!isScrolling)
         {
@@ -2545,13 +2574,69 @@
             var dx:Number = event.stageX - scrollGestureAnchorPoint.x;
             var dy:Number = event.stageY - scrollGestureAnchorPoint.y;

-            scroller.performDrag(dx, dy);
+            if (!dragTimer)
+            {
+                dragTimer = new Timer(1000/MAX_DRAG_RATE, 0);
+                dragTimer.addEventListener(TimerEvent.TIMER, dragTimerHandler);
+            }
+
+            if (!dragTimer.running)
+            {
+                // The drag timer is not running, so we record the event and scroll
+                // the content immediately.
+                addMouseEventHistory(event.stageX, event.stageY);
+                scroller.performDrag(dx, dy);
+
+                // Call updateAfterEvent() to make sure it looks smooth
+                event.updateAfterEvent();
+
+                // Start the periodic timer that will do subsequent drag
+                // scrolling if necessary.
+                dragTimer.start();
+
+                // No additional mouse events received yet, so no scrolling pending.
+                dragScrollPending = false;
+            }
+            else
+            {
+                // The drag timer is running, so we just save the delta coordinates
+                // and indicate that a scroll is pending.
+                mostRecentDragDeltaX = dx;
+                mostRecentDragDeltaY = dy;
+                dragScrollPending = true;
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  Used to periodically scroll during a drag gesture
+     */
+    private function dragTimerHandler(event:TimerEvent):void
+    {
+        if (dragScrollPending)
+        {
+            // A scroll is pending, so record the mouse deltas and scroll the content.
+            addMouseEventHistory(
+                mostRecentDragDeltaX + scrollGestureAnchorPoint.x,
+                mostRecentDragDeltaY + scrollGestureAnchorPoint.y);
+            scroller.performDrag(mostRecentDragDeltaX, mostRecentDragDeltaY);

             // Call updateAfterEvent() to make sure it looks smooth
             event.updateAfterEvent();
-        }
-    }
-
+
+            // No scroll is pending now.
+            dragScrollPending = false;
+        }
+        else
+        {
+            // The timer elapsed with no mouse events, so we'll
+            // just turn the timer off for now.  It will get turned
+            // back on if another mouse event comes in.
+            dragTimer.stop();
+        }
+    }
+
     /**
      *  @private
      *  Called when the user releases the mouse/touches up
@@ -2564,9 +2649,31 @@
         if (!isScrolling)
             return;

+        if (dragTimer)
+        {
+            if (dragScrollPending)
+            {
+                // A scroll is pending, so record the mouse deltas and scroll
+                // the content.
+                addMouseEventHistory(
+                    mostRecentDragDeltaX + scrollGestureAnchorPoint.x,
+                    mostRecentDragDeltaY + scrollGestureAnchorPoint.y);
+                scroller.performDrag(mostRecentDragDeltaX, mostRecentDragDeltaY);
+
+                // Call updateAfterEvent() to make sure it looks smooth
+                if (event is MouseEvent)
+                    MouseEvent(event).updateAfterEvent();
+            }
+
+            // The drag gesture is over, so we no longer need the timer.
+            dragTimer.stop();
+            dragTimer.removeEventListener(TimerEvent.TIMER, dragTimerHandler);
+            dragTimer = null;
+        }
+
         // This could be a SanboxMouseEvent
         if (event is MouseEvent)
-            addMouseEventHistory(event as MouseEvent);
+            addMouseEventHistory(MouseEvent(event).stageX, MouseEvent(event).stageY);

         // decide about throw


Transferred from the Adobe Open Source Subversion Repository

Revision: 3451
Author:   egreenfi@adobe.com
Date:     2008-10-02T05:10:18.410127Z

Log Message:
-----------
- UIComponents, GraphicElements's matrix used for layout calculations, and set by the parent layouts, is now decoupled from the actual layout used by the flash player for rendering.
- Both UIComponents an d GraphicElements can be handed a TransformOffset object. The transformOffset allows developers to specify adjustments to the transform as defined by the compoennts parent layout.
- 3D properties on components and graphic elements are now supported.  Setting a 3D property or a 3D matrix on a component or element will affect it visually, but the 2D layouts will continue to lay out as though only the 2D portion of their layout is applied.
- transformX,Y,Z now fully supported on components and elements.  For layouts that don't try and set the post transform bounds (i.e., absolute layout without constraints), the layout scale and rotation will be centered on this point.  The offset transform will also be centered around this point.
- layering is now decoupled from item order.  By default, components now render in order based on the value of their 'layer' property.  All components' layers default to 0.  components with the same layer render in the order they appear in their parent group's item list.
- setting transform.matrix on UIComponent is now supported, and is roughly the same as setting the convenience layout properties on the component.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/.flexProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/build.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/ITransformable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/framework/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4/.flexLibProperties</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom</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/flex/graphics/Parser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/framework/.flexLibProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4/.actionScriptProperties</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/geom/Transform.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/flex/geom/Transform.as" copyfrom-rev="3342" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TransformUtil.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/TransformOffset.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/fxg-manifest.xml</path>

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

--- frameworks/projects/spark/src/spark/layouts/BasicLayout.as
+++ frameworks/projects/spark/src/spark/layouts/BasicLayout.as
@@ -255,6 +255,8 @@
                 childX = left;
             else if (!isNaN(right))
                 childX = unscaledWidth - actualSize.x - right;
+            else // since setting actual size might have moved the actual position, we need to reset here
+            	childX = layoutItem.actualPosition.x;

             // Vertical position
             if (!isNaN(vCenter))
@@ -263,6 +265,8 @@
                 childY = top;
             else if (!isNaN(bottom))
                 childY = unscaledHeight - actualSize.y - bottom;
+           	else  // since setting actual size might have moved the actual position, we need to reset here
+           		childY = layoutItem.actualPosition.y;

             // Set position
             layoutItem.setActualPosition(childX, childY);


[Docs] Fixed endian doc comments, following change to BIG_ENDIAN as default for js

--- frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
+++ frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
@@ -133,10 +133,9 @@

     /**
      *  Indicates the byte order for the data.
-     *  The default is the target default which in Javascript is machine dependent.
-     *  It is possible to check the default Endianness of the target platform at runtime with
-     *  org.apache.flex.utils.Endian.defaultEndian
-     *  To ensure portable bytes, set the endian to Endian.BIG_ENDIAN or Endian.LITTLE_ENDIAN as appropriate.
+     *  The default is Endian BIG_ENDIAN.
+     *  It is possible to check the default system Endianness of the target platform at runtime with
+     *  org.apache.flex.utils.Endian.systemEndian.
      *  Setting to values other than Endian.BIG_ENDIAN or Endian.LITTLE_ENDIAN is ignored.
      *
      *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 19841
Author:   bsahlas@adobe.com
Date:     2011-01-20T19:55:31.206431Z

Log Message:
-----------
Add BusyIndicator ASDoc Example app

Modified Paths:
--------------
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/views</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/BusyIndicatorExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/components/examples/views/BusyIndicatorExampleHomeView.mxml</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as
@@ -113,7 +113,9 @@
  *  >
  *  </pre>
  *
- *
+ *  @includeExample examples/BusyIndicatorExample.mxml -noswf
+ *  @includeExample examples/views/BusyIndicatorExampleHomeView.mxml -noswf
+ *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 2.5


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

--- frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-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: 11846
Author:   smgilson@adobe.com
Date:     2009-11-16T17:19:05.812812Z

Log Message:
-----------
Move jpg for the shader ASDoc examples to the assets dir

Update ASDoc on Panel.as and GroupBase.as

QE notes: -
Doc notes: -
Bugs: -
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ColorDodgeShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/HueShaderExample.mxml</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/assets</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/SoftLightShaderExample.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ks5792.jpg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ColorBurnShaderExample.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/assets/ks5792.jpg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/LuminosityMaskShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ExclusionShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/SaturationShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/LuminosityShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ColorShaderExample.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -1178,7 +1178,7 @@
     //----------------------------------

     /**
-     *  @copy spark.core.IViewport#horizontalScrollPositionDelta()
+     *  @copy spark.layouts.supportClasses.LayoutBase#getHorizontalScrollPositionDelta()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1191,7 +1191,7 @@
     }

     /**
-     *  @copy spark.core.IViewport#verticalScrollPositionDelta()
+     *  @copy spark.layouts.supportClasses.LayoutBase#getVerticalScrollPositionDelta()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Calling the completion callback whether or not we had a query returning (0 or more) data rows.

--- driver/src/main/flex/org/postgresql/db/SimpleResultHandler.as
+++ driver/src/main/flex/org/postgresql/db/SimpleResultHandler.as
@@ -67,9 +67,8 @@
 				onQueryResult(_columns, _data);
 				_columns = null;
 				_data = null;
-			} else {
-				onUpdateResult(command, rows);
 			}
+			onUpdateResult(command, rows);
 		}

 		protected function onQueryResult(columns:Array, data:Array):void {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5340
Author:   gosmith@adobe.com
Date:     2009-03-17T01:56:28.362863Z

Log Message:
-----------
Measurement is now consistent with rendering for Halo components using TLF.

If a Halo component is using a UITLFTextField to render its text (because its textFieldClass style is the class mx.core.UITLFTextField), it now measures itself using an offscreen TLFTextField. Previously it was rendering with a UITLFTextField but measuring with a TextField, which was inconsistent.

This required adding a new useTLF:Boolean property to UITextFormat so that the format knows whether it is for a TextField or a TLFTextField.

There is one offscreen TLFTextField per module factory, managed by TextFieldFactory, just like for offscreen TextFields. I've added a new method, createTLFTextField(), to ITextFieldFactory. Its return type is Object rather than TLFTextField to avoid linking in TLFTextField, and therefore much of TLF, into Halo apps unless it is being used by setting textFieldClass.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITextFieldFactory.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/framework/src/mx/core/TextFieldFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/core/TextFieldFactory.as
+++ frameworks/projects/framework/src/mx/core/TextFieldFactory.as
@@ -43,13 +43,6 @@
 	 */
 	private static var instance:ITextFieldFactory;

-	/**
-	 *  @private
-	 *
-	 *  Cache of textFields. Limit of one per module factory.
-	 */
-	private var textFields:Dictionary = new Dictionary(true);
-
 	//--------------------------------------------------------------------------
 	//
 	//  Class methods
@@ -69,17 +62,48 @@

 	//--------------------------------------------------------------------------
 	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Cache of TextFields. Limit of one per module factory.
+	 *  In this Dictionary, each key is a weak reference
+	 *  to an IFlexModuleFactory and each value is a Dictionary
+	 *  with a single entry (a TextField as a weak key).
+	 */
+	private var textFields:Dictionary = new Dictionary(true);
+
+	/**
+	 *  @private
+	 *  Cache of TLFTextFields. Limit of one per module factory.
+	 *  In this Dictionary, each key is a weak reference
+	 *  to an IFlexModuleFactory and each value is a Dictionary
+	 *  with a single entry (a TLFTextField as a weak key).
+	 */
+	private var tlfTextFields:Dictionary = new Dictionary(true);
+
+	//--------------------------------------------------------------------------
+	//
 	//  Methods
 	//
 	//--------------------------------------------------------------------------

 	/**
 	 *  @private
-	 *  Creates a TextField in the context of the specified IFlexModuleFactory.
+	 *  Creates an instance of TextField
+	 *  in the context of the specified IFlexModuleFactory.
 	 *
-	 *  @param moduleFactory The moduleFactory requesting the TextField.
+	 *  @param moduleFactory The IFlexModuleFactory requesting the TextField.
 	 *
-	 *	@return A text field for a given moduleFactory.
+	 *	@return A TLFTextField created in the context
+	 *  of moduleFactory.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function createTextField(moduleFactory:IFlexModuleFactory):TextField
 	{
@@ -112,6 +136,57 @@

 		return textField;
 	}
+
+	/**
+	 *  @private
+	 *  Creates an instance of TLFTextField
+	 *  in the context of the specified module factory.
+	 *
+	 *  @param moduleFactory The IFlexModuleFactory requesting the TextField.
+	 *  May not be null.
+	 *
+	 *	@return A TLFTextField created in the context
+	 *  of moduleFactory.
+	 *  The return value is loosely typed as Object
+	 *  to avoid linking in TLFTextField (and therefore much of TLF).
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 4
+	 */
+	public function createTLFTextField(moduleFactory:IFlexModuleFactory):Object
+	{
+		// Check to see if we already have a text field for this module factory.
+		var tlfTextField:Object = null;
+		var tlfTextFieldDictionary:Dictionary = tlfTextFields[moduleFactory];
+
+		if (tlfTextFieldDictionary)
+		{
+			for (var iter:Object in tlfTextFieldDictionary)
+			{
+				tlfTextField = iter;
+				break;
+			}
+		}
+		if (!tlfTextField)
+		{
+			if (moduleFactory)
+			{
+				tlfTextField = moduleFactory.create(
+					"flashx.textLayout.controls.TLFTextField");
+			}
+
+			// The dictionary could be empty, but not null because entries in the dictionary
+			// could be garbage collected.
+			if (!tlfTextFieldDictionary)
+				tlfTextFieldDictionary = new Dictionary(true);
+			tlfTextFieldDictionary[tlfTextField] = 1;
+			tlfTextFields[moduleFactory] = tlfTextFieldDictionary;
+		}
+
+		return tlfTextField;
+	}
 }

 }


FLEX-33772 Incorrect tab focus behaviour

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -1379,29 +1379,92 @@
                 var o:DisplayObject = DisplayObject(findFocusManagerComponent2(focusableCandidates[i]));
                 if (o is IFocusManagerGroup)
                 {
-                    // look around to see if there's an enabled and visible
-                    // selected member in the tabgroup, otherwise use the first
-                    // one we found.
+
+                    // when landing on an element that is part of group, try to
+                    // advance selection to the selected group element
+                    var j:int;
+                    var obj:DisplayObject;
                     var tg1:IFocusManagerGroup = IFocusManagerGroup(o);
-                    for (var j:int = 0; j < focusableCandidates.length; j++)
+                    var tg2:IFocusManagerGroup;
+
+                    // normalize the "no selected group element" case
+                    // to the "first group element selected" case
+                    // (respecting the tab direction)
+                    var groupElementToFocus:IFocusManagerGroup = null;
+                    for (j = 0; j < focusableCandidates.length; j++)
                     {
-                        var obj:DisplayObject = focusableCandidates[j];
-                        if (obj is IFocusManagerGroup && isEnabledAndVisible(obj))
+                        obj = focusableCandidates[j];
+                        if (obj is IFocusManagerGroup)
                         {
-                            var tg2:IFocusManagerGroup = IFocusManagerGroup(obj);
-                            if (tg2.groupName == tg1.groupName && tg2.selected)
+                            tg2 = IFocusManagerGroup(obj);
+                            if (tg2.groupName == tg1.groupName && isEnabledAndVisible(obj))
                             {
-                                // if objects of same group have different tab index
-                                // skip you aren't selected.
-                                if (InteractiveObject(obj).tabIndex != InteractiveObject(o).tabIndex && !tg1.selected)
-                                    return getIndexOfNextObject(i, shiftKey, bSearchAll, groupName);
-
-                                i = j;
-                                break;
+                                if (tg2.selected)
+                                {
+                                    groupElementToFocus = tg2;
+                                    break;
+                                }
+                                if ((!shiftKey && groupElementToFocus == null) || shiftKey)
+                                    groupElementToFocus = tg2;
                             }
                         }
                     }
-
+
+                    if (tg1 != groupElementToFocus)
+                    {
+                        // cycle the entire focusable candidates array forward or backward,
+                        // wrapping around boundaries, searching for our focus candidate
+                        j = i;
+                        for (var k:int = 0; k < focusableCandidates.length - 1; k++)
+                        {
+
+                            if (!shiftKey)
+                            {
+                                j++;
+                                if (j == focusableCandidates.length)
+                                    j = 0;
+                            }
+                            else
+                            {
+                                j--;
+                                if (j == -1)
+                                    j = focusableCandidates.length - 1;
+                            }
+
+                            obj = focusableCandidates[j];
+                            if (isEnabledAndVisible(obj))
+                            {
+                                if (obj is IFocusManagerGroup)
+                                {
+                                    tg2 = IFocusManagerGroup(obj);
+                                    if (tg2.groupName == tg1.groupName)
+                                    {
+                                        if (tg2 == groupElementToFocus)
+                                        {
+                                            // if objects of same group have different tab index
+                                            // skip you aren't selected.
+                                            if (InteractiveObject(obj).tabIndex != InteractiveObject(o).tabIndex && !tg1.selected)
+                                                return getIndexOfNextObject(i, shiftKey, bSearchAll, groupName);
+                                            i = j;
+                                            break;
+                                        }
+                                    }
+                                    else
+                                    {
+                                        // element is part of another group, stop (no recursive search)
+                                        i = j;
+                                        break;
+                                    }
+                                }
+                                else
+                                {
+                                    // element isn't part of any group, stop
+                                    i = j;
+                                    break;
+                                }
+                            }
+                        }
+                    }
                 }
                 return i;
             }


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

--- frameworks/projects/framework/src/mx/modules/ModuleManager.as
+++ frameworks/projects/framework/src/mx/modules/ModuleManager.as
@@ -24,6 +24,11 @@
  *  Clients can register event handlers and then call the
  *  load() method, which dispatches events when the factory is ready
  *  (or immediately, if it was already loaded).
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ModuleManager
 {
@@ -43,6 +48,11 @@
      *  @param url A URL that represents the location of the module.
      *
      *  @return The IModuleInfo interface associated with a particular URL.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function getModule(url:String):IModuleInfo
     {
@@ -57,6 +67,11 @@
      *
      *  @return Returns the IFlexModuleFactory implementation, or null
      *  if the object type cannot be created from the factory.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function getAssociatedFactory(
                                 object:Object):IFlexModuleFactory
@@ -121,6 +136,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ModuleManagerImpl()
     {
@@ -217,6 +237,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ModuleInfo(url:String)
     {
@@ -796,6 +821,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function FactoryInfo()
     {
@@ -858,6 +888,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ModuleInfoProxy(info:ModuleInfo)
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8486
Author:   smgilson@adobe.com
Date:     2009-07-09T18:42:45.734868Z

Log Message:
-----------
Third checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

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/spark/src/spark/components/Group.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/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.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/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -106,7 +106,7 @@
  *
  *  @mxml
  *
- *
The <Application> tag inherits all of the tag
+ *
The <s:Application> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:

  *
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 18635
Author:   aharui@adobe.com
Date:     2010-11-17T00:18:36.469040Z

Log Message:
-----------
Add estimatedSizes to the layout infrastructure to better deal with text reflow.
Add new events to layout infrastructure to deal with caching of size information

QE notes: New APIs and Interfaces
Doc notes: New APIs and interfaces
Bugs: SDK-27226, SDK-26155, SDK-25483, SDK-23621, SDK-27225, SDK-26993, SDK-25535, SDK-25521
Reviewer: Evtim
Tests run: checkintests mustella full run
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Application.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/IContainerInvalidating.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/FormTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ILayoutManagerContainerClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/IStyleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Container.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -14,12 +14,18 @@
 import flash.events.Event;
 import flash.geom.Point;
 import flash.geom.Rectangle;
+import flash.utils.Dictionary;

 import mx.containers.utilityClasses.Flex;
+import mx.core.FlexVersion;
+import mx.core.IInvalidating;
 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
 import mx.core.mx_internal;
+import mx.core.UIComponentGlobals;
+import mx.events.FlexEvent;
 import mx.events.PropertyChangeEvent;
+import mx.managers.ILayoutManagerClient;

 import spark.components.DataGroup;
 import spark.components.supportClasses.GroupBase;
@@ -125,6 +131,18 @@
      */
     private var llv:LinearLayoutVector;

+    /**
+     *  @private
+     *  total percentages of children.  used to calculate estimatedHeight
+     */
+    private var totalPercentHeight:Number;
+
+    /**
+     *  @private
+     *  actual space that is flexible.  used to calculate estimatedHeight
+     */
+    private var flexibleHeight:Number;
+
     //--------------------------------------------------------------------------
     //
     //  Class methods
@@ -191,6 +209,21 @@
         dragScrollRegionSizeHorizontal = 0;
     }

+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    // used to communicate between the loop and the event handlers
+    private var dontCacheMeasurements:Boolean;
+    private var notFinalTargets:Array;
+
+    // indexes that have reported that a size should not be cached
+    private var notFinalIndexes:Array;
+    // components that have reported that they are not final
+    private var notFinalComponents:Dictionary;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -325,7 +358,14 @@

         var layoutTarget:GroupBase = target;
         if (layoutTarget)
+        {
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+            {
+                layoutTarget.invalidateSize();
+                layoutTarget.invalidateEstimatedSizesOfChildren();
+            }
             layoutTarget.invalidateDisplayList();
+        }
     }

     //----------------------------------
@@ -853,11 +893,71 @@
         dispatchEvent(new Event("indexInViewChanged"));
     }

+    //----------------------------------
+    //  target
+    //----------------------------------
+
+    private var _target:GroupBase;
+
+    /**
+     * @private
+     */
+    override public function set target(value:GroupBase):void
+    {
+        if (_target == value)
+            return;
+
+        if (_target)
+            _target.removeEventListener(FlexEvent.MEASURED_SIZE_PRELIMINARY, measuredSizePreliminaryHandler);
+        _target = value;
+        super.target = value;
+        if (value)
+            value.addEventListener(FlexEvent.MEASURED_SIZE_PRELIMINARY, measuredSizePreliminaryHandler, false, 0, true);
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods
     //
     //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  customize handling of a few cases
+     */
+    override protected function estimateSizeOfElement(layoutElement:ILayoutElement,
+                                                               percentWidth:Number,
+                                                               percentHeight:Number,
+                                                               parentEstimatedWidth:Number,
+                                                               parentEstimatedHeight:Number,
+                                                               estimatedSize:Point):void
+    {
+        super.estimateSizeOfElement(layoutElement,
+                                            percentWidth,
+                                            percentHeight * 100 / totalPercentHeight,
+                                            parentEstimatedWidth,
+                                            flexibleHeight,
+                                            estimatedSize);
+        if (isNaN(estimatedSize.x))
+        {
+            var c:Number = target.estimatedWidth;
+            if (isNaN(c) && !isNaN(target.explicitWidth))
+                c = target.explicitWidth;
+            if (!isNaN(c))
+            {
+                // if horizontalAlign is "justify" or "contentJustify",
+                // restrict the width to restrictedWidth.  Otherwise,
+                // size it normally
+                if (horizontalAlign == HorizontalAlign.JUSTIFY)
+                    estimatedSize.x = c;
+            }
+            else
+            {
+                if (!isNaN(layoutElement.percentWidth) && !isNaN(target.width) && target.width > 0)
+                    estimatedSize.x = calculatePercentWidth(layoutElement, target.width);
+            }
+        }
+    }

     /**
      *  @private
@@ -880,7 +980,65 @@
     override public function clearVirtualLayoutCache():void
     {
         llv = null;
-    }
+    }
+
+    /**
+     * @private
+     * if the estimatedSize changed, toss the cached sizes
+     */
+    override public function estimateSizesOfElements():void
+    {
+        if (llv)
+        {
+            llv.minorSize = 0;
+            llv.minMinorSize = 0;
+        }
+
+        var size:SizesAndLimit = new SizesAndLimit();
+        var spaceToDistribute:Number = !isNaN(target.explicitHeight) ? target.explicitHeight : target.estimatedHeight;
+        spaceToDistribute -= paddingTop + paddingBottom;
+        totalPercentHeight = useVirtualLayout ? 100 : 0;
+		if (!useVirtualLayout)
+		{
+	        var layoutElement:ILayoutElement;
+
+	        // columnWidth can be expensive to compute
+	        var ch:Number = (variableRowHeight) ? NaN : Math.ceil(rowHeight);
+	        var count:int = target.numElements;
+	        var totalCount:int = count; // number of elements to use in gap calculation
+
+	        // If the child is flexible, track total % in case of total %'s
+	        // add up to more than 100.
+	        // For non-flexible children, take its size away from the total amount
+	        // of flexible room
+	        for (var index:int = 0; index < count; index++)
+	        {
+	            layoutElement = target.getElementAt(index);
+	            if (!layoutElement || !layoutElement.includeInLayout)
+	            {
+	                totalCount--;
+	                continue;
+	            }
+
+	            if (!isNaN(layoutElement.percentHeight) && variableRowHeight)
+	            {
+	                totalPercentHeight += layoutElement.percentHeight;
+	            }
+	            else
+	            {
+	                getElementHeight(layoutElement, ch, size);
+	                spaceToDistribute -= Math.ceil(size.preferredSize);
+	            }
+	        }
+
+	        if (totalCount > 1)
+	            spaceToDistribute -= (totalCount-1) * gap;
+
+	        flexibleHeight = spaceToDistribute;
+		}
+
+        super.estimateSizesOfElements();
+    }

     /**
      *  @private
@@ -1366,6 +1524,9 @@
         var typicalElt:ILayoutElement = typicalLayoutElement;
         if (typicalElt)
         {
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+                if (typicalElt is ILayoutManagerClient)
+                    UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(typicalElt), true);
             var typicalWidth:Number = typicalElt.getPreferredBoundsWidth();
             var typicalHeight:Number = typicalElt.getPreferredBoundsHeight();
             llv.defaultMinorSize = typicalWidth;
@@ -1439,6 +1600,7 @@
             // paddingTop is already taken into account as the majorAxisOffset of the llv
             // Measured size according to the cached actual size:
             var measuredHeight:Number = llv.end(measuredEltCount - 1) + paddingBottom;
+            var measuredWidth:Number = llv.minorSize + hPadding;

             // For the live ItemRenderers use the preferred size
             // instead of the cached actual size:
@@ -1453,12 +1615,17 @@
                     {
                         measuredHeight -= llv.getMajorSize(i);
                         measuredHeight += element.getPreferredBoundsHeight();
+                        measuredWidth = Math.max(measuredWidth, element.getPreferredBoundsWidth() + hPadding);
                     }
                 }
             }

             layoutTarget.measuredHeight = measuredHeight;
-
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+                layoutTarget.measuredWidth = measuredWidth;
+            else
+                layoutTarget.measuredWidth = llv.minorSize + hPadding;
+
             if (oldLength != -1)
                 llv.length = oldLength;
         }
@@ -1466,8 +1633,8 @@
         {
             var vgap:Number = (measuredEltCount > 1) ? (measuredEltCount - 1) * gap : 0;
             layoutTarget.measuredHeight = (measuredEltCount * rowHeight) + vgap + vPadding;
-        }
-        layoutTarget.measuredWidth = llv.minorSize + hPadding;
+            layoutTarget.measuredWidth = llv.minorSize + hPadding;
+        }

         layoutTarget.measuredMinWidth = (horizontalAlign == HorizontalAlign.JUSTIFY) ?
                 llv.minMinorSize + hPadding : layoutTarget.measuredWidth;
@@ -1785,24 +1952,86 @@
         var y:Number = llv.start(startIndex);
         var index:int = startIndex;
         var x0:Number = paddingLeft;
+
+		var w:Number;
+		var h:Number;
+		var elt:ILayoutElement;

         // First pass: compute element x,y,width,height based on
         // current contentWidth; cache computed widths/heights in llv.
         for (; (y < maxVisibleY) && (index < eltCount); index++)
         {
-            var elt:ILayoutElement = layoutTarget.getVirtualElementAt(index, eltWidth, eltHeight);
-            var w:Number = calculateElementWidth(elt, targetWidth, containerWidth); // can be NaN
-            var h:Number = fixedRowHeight; // NaN for variable height rows
+            // reset this flag so components like Image can tell us
+            // not to cache measurements
+            dontCacheMeasurements = false;
+            // reset this array so we can find out what components are
+            // not final
+			if (!notFinalTargets)
+				notFinalTargets = [];
+			else
+            	notFinalTargets.length = 0;
+			// request element, but skip validation (especially of the displaylist)
+            elt = layoutTarget.getVirtualElementAt(index, eltWidth, eltHeight, true);
+			// then validate everything but the displaylist so there are valid
+			// default size
+			if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+				if (elt is ILayoutManagerClient)
+					UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(elt), true);
+            w = calculateElementWidth(elt, targetWidth, containerWidth); // can be NaN
+            h = fixedRowHeight; // NaN for variable height rows
             elt.setLayoutBoundsSize(w, h);
-            w = elt.getLayoutBoundsWidth();
+            w = elt.getLayoutBoundsWidth();
             h = elt.getLayoutBoundsHeight();
             var x:Number = x0 + calculateElementX(elt, w, containerWidth);
             elt.setLayoutBoundsPosition(x, y);
-            llv.cacheDimensions(index, elt);
+			// this flag potentially set by an event dispatched in the previous lines of code
+            if (dontCacheMeasurements)
+            {
+                // associate the index with the target
+                // so if the target is recycled to another
+                // index we know the current index
+                for each (var t:* in notFinalTargets)
+				{
+					if (!notFinalComponents)
+						notFinalComponents = new Dictionary(true);
+					notFinalComponents[t] = index;
+
+				}
+				if (!notFinalIndexes)
+					notFinalIndexes = [];
+                // remember that this index didn't want to be cached
+                notFinalIndexes[index] = index;
+            }
+            else
+            {
+                if (notFinalIndexes && notFinalIndexes[index] != null)
+                {
+                    // we were previously told not to cache measurements.
+                    // clear it from the table.  We'll put it back in
+                    // if needed
+                    notFinalIndexes[index] = null;
+                    // scan the components that have dispatched a notFinal
+                    // to see if any are associated with this index
+                    for each(var p:* in notFinalComponents)
+                    {
+                        if (p == index)
+                        {
+                            // still a component that isn't final
+                            // so re-add it
+                            notFinalIndexes[index] = index;
+                            break;
+                        }
+                    }
+                    if (notFinalIndexes[index] == null)
+                        llv.cacheDimensions(index, elt);
+                }
+                else
+                    llv.cacheDimensions(index, elt);
+            }
             y += h + gap;
         }
         var endIndex:int = index - 1;
-
+
         // Second pass: if neccessary, fix up x and width values based
         // on the updated contentWidth
         if (!justifyWidths && (llv.minorSize != contentWidth))
@@ -1813,7 +2042,7 @@
             {
                 for (index = startIndex; index <= endIndex; index++)
                 {
-                    elt = layoutTarget.getVirtualElementAt(index, eltWidth, eltHeight);
+                    elt = layoutTarget.getVirtualElementAt(index, NaN, NaN, true);
                     w = calculateElementWidth(elt, targetWidth, containerWidth);  // can be NaN
                     elt.setLayoutBoundsSize(w, elt.getLayoutBoundsHeight());
                     w = elt.getLayoutBoundsWidth();
@@ -1843,13 +2072,12 @@
             {
                 for (index = startIndex; index <= endIndex; index++)
                 {
-                    elt = layoutTarget.getVirtualElementAt(index, NaN, NaN);
+                    elt = layoutTarget.getVirtualElementAt(index, NaN, NaN, true);
                     elt.setLayoutBoundsPosition(elt.getLayoutBoundsX(), dy + elt.getLayoutBoundsY());
                 }
                 contentHeight += dy;
             }
         }
-
         setRowCount(index - startIndex);
         setIndexInView(startIndex, endIndex);

@@ -2115,7 +2343,40 @@
         g.invalidateSize();
         g.invalidateDisplayList();
     }
-
+
+    /**
+     *  React to indications that measurements are not final
+     *  and should not be cached
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    private function measuredSizePreliminaryHandler(event:FlexEvent):void
+    {
+        event.target.addEventListener(FlexEvent.MEASURED_SIZE_FINAL, measuredSizeFinalHandler, false, 0, true);
+		if (!notFinalTargets)
+			notFinalTargets = [];
+        notFinalTargets.push(event.target);
+        dontCacheMeasurements = true;
+    }
+
+    /**
+     *  React to indications that measurements are final
+     *  and can be cached
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    private function measuredSizeFinalHandler(event:FlexEvent):void
+    {
+		if (notFinalComponents)
+        	delete notFinalComponents[event.target];
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Drop methods


Transferred from the Adobe Open Source Subversion Repository

Revision: 3279
Author:   chaase@adobe.com
Date:     2008-09-20T00:11:18.055533Z

Log Message:
-----------
Fixed SDK-16883, which was causing artifacts with transparent pixels in BitmapGraphic. Also fixed various initializations of Graphics.lineStyle() in the graphics elements classes (lineStyle(0,0,0) is incorrect; should be lineStyle(), which sets the weight to the default NaN).

Reviewed by Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -16,6 +16,7 @@
 import flash.display.BlendMode;
 import flash.display.DisplayObject;
 import flash.display.Graphics;
+import flash.display.Shape;
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.events.EventDispatcher;
@@ -244,13 +245,15 @@
 	{
 	    /* if (!displayObject || !(displayObject is Sprite))
 	        return; */
+
+        if (displayObject is Sprite)
+            Sprite(displayObject).graphics.clear();
+        else if (displayObject is Shape)
+            Shape(displayObject).graphics.clear();
+
 	    var g:Graphics = Sprite(drawnDisplayObject).graphics;

-	    // TODO EGeorgie: clearing the graphics needs to be shared when
-	    // the display objects are shared.
-	    //g.clear();
-
-		g.lineStyle(0,0,0);
+		g.lineStyle();
 		_fill.offsetX = drawX;
 		_fill.offsetY = drawY;
 		_fill.repeat = repeat;


add as3 side

add as3 side

--- actionscript/src/com/freshplanet/ane/AirCapabilities/AirCapabilities.as
+++ actionscript/src/com/freshplanet/ane/AirCapabilities/AirCapabilities.as
@@ -397,6 +397,28 @@
 			_extContext.call("switchToPortrait");
 		}

+		/**
+		 * MacOS only!
+		 */
+		public function forceFullscreen():void
+		{
+			if(Capabilities.os.indexOf("Mac OS") < 0)
+				return;
+
+			_extContext.call("forceFullscreen");
+		}
+
+		/**
+		 * MacOS only!
+		 */
+		public function exitFullscreen():void
+		{
+			if(Capabilities.os.indexOf("Mac OS") < 0)
+				return;
+
+			_extContext.call("exitFullscreen");
+		}
+
 		// --------------------------------------------------------------------------------------//
 		//																						 //
 		// 									 	PRIVATE API										 //