Transferred from the Adobe Open Source Subversion Repository

Revision: 11446
Author:   dsubrama@adobe.com
Date:     2009-11-05T00:02:15.984691Z

Log Message:
-----------
Bugfixes, ASDoc entries and PARB changes for FXG 2.0.

1.) PARB-mandated change. The shader classes have moved from spark.primtives.shaders to spark.primitives.supportClasses.shaders
2.) Fix for http://bugs.adobe.com/jira/browse/SDK-23949 - If luminosityClip or luminosityInvert changes dynamically on a Group or GraphicElement, we recalculate the luminosity mask shader filter's mode and reapply the filter.
3.) AsDoc entries for Group.luminosityClip, Group.luminosityInvert, Group.maskType, GraphicElement.luminosityClip, GraphicElement.luminosityInvert, GraphicElement.maskType and MaskType.CLIP (SDK-23843, SDK-23773)

QE notes: None, regress
Doc notes: Can you give the ASDoc entries a once-over?
Bugs: SDK-23949, SDK-23843, SDK-23773
Reviewer: Evtim
Tests run: FXG static and runtime
Is noteworthy for integration: Yes - package changes for the shader classes may affect tools

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="dir" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders" copyfrom-rev="11377" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/ExclusionShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/ExclusionShader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/Saturation.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/Saturation.pbj</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/LuminosityShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/LuminosityShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/ColorShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/ColorShader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/LuminosityMaskFilter.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/LuminosityMaskFilter.pbj</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/MaskType.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/ColorDodgeShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/ColorDodgeShader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/HueShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/HueShader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/SoftLight.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/SoftLight.pbj</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/ColorBurn.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/ColorBurn.pbj</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/LuminosityMaskShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/LuminosityMaskShader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/SaturationShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/SaturationShader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/Exclusion.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/Exclusion.pbj</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/Luminosity.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/Luminosity.pbj</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/Color.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/Color.pbj</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/Hue.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/Hue.pbj</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/ColorDodge.pbj" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/ColorDodge.pbj</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/SoftLightShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/SoftLightShader.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/shaders/ColorBurnShader.as" copyfrom-rev="11445" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders/ColorBurnShader.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -16,7 +16,7 @@
 import flash.display.BlendMode;
 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
-import flash.display.Shape;
+import flash.display.Shape;
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.events.EventDispatcher;
@@ -40,7 +40,7 @@
 import mx.core.UIComponent;
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
-import mx.events.FlexEvent;
+import mx.events.FlexEvent;
 import mx.events.PropertyChangeEvent;
 import mx.filters.BaseFilter;
 import mx.filters.IBitmapFilter;
@@ -54,15 +54,15 @@
 import spark.core.DisplayObjectSharingMode;
 import spark.core.IGraphicElement;
 import spark.core.MaskType;
-import spark.primitives.shaders.ColorBurnShader;
-import spark.primitives.shaders.ColorDodgeShader;
-import spark.primitives.shaders.ColorShader;
-import spark.primitives.shaders.ExclusionShader;
-import spark.primitives.shaders.HueShader;
-import spark.primitives.shaders.LuminosityShader;
-import spark.primitives.shaders.SaturationShader;
-import spark.primitives.shaders.SoftLightShader;
-import spark.primitives.shaders.LuminosityMaskShader;
+import spark.primitives.supportClasses.shaders.ColorBurnShader;
+import spark.primitives.supportClasses.shaders.ColorDodgeShader;
+import spark.primitives.supportClasses.shaders.ColorShader;
+import spark.primitives.supportClasses.shaders.ExclusionShader;
+import spark.primitives.supportClasses.shaders.HueShader;
+import spark.primitives.supportClasses.shaders.LuminosityMaskShader;
+import spark.primitives.supportClasses.shaders.LuminosityShader;
+import spark.primitives.supportClasses.shaders.SaturationShader;
+import spark.primitives.supportClasses.shaders.SoftLightShader;

 use namespace mx_internal;

@@ -1163,7 +1163,8 @@
     /**
      *
The maskType defines how the mask is applied to the GraphicElement.

      *
-     *
The possible values are MaskType.CLIP and MaskType.ALPHA.

+     *
The possible values are MaskType.CLIP, MaskType.ALPHA and
+	 *  MaskType.LUMINOSITY.

      *
      *
Clip Masking

      *
@@ -1187,10 +1188,10 @@
      *
      *
In alpha mode, the opacity of each pixel in the source content is multiplied by the opacity
      *  of the corresponding region of the mask.  i.e., a pixel in the source content with an opacity of
-     * 1 that is masked by a region of opacity of .5 will have a resulting opacity of .5.  A source pixel
-     * with an opacity of .8 masked by a region with opacity of .5 will have a resulting opacity of .4.

+     *  1 that is masked by a region of opacity of .5 will have a resulting opacity of .5.  A source pixel
+     *  with an opacity of .8 masked by a region with opacity of .5 will have a resulting opacity of .4.

      *
-     *
Conceptually, Alpha masking is equivalent to rendering the transformed mask and source content
+     *
Conceptually, alpha masking is equivalent to rendering the transformed mask and source content
      *  into separate RGBA surfaces, and multiplying the alpha channel of the mask content into the alpha
      *  channel of the source content.  All of the mask content is rendered into its surface before
      *  compositing into the source content's surface. As a result, all FXG features, such as strokes,
@@ -1199,6 +1200,27 @@
      *
When in alpha mode, the alpha channel of any bitmap data is composited normally into the mask
      *  alpha channel, and will affect the final rendered content. This holds true for both BitmapGraphics
      *  and bitmap filled shapes and paths.

+	 *
+	 *
Luminosity Masking

+     *
+	 *
A luminosity mask, sometimes called a 'soft mask', works very similarly to an alpha mask
+	 *  except that both the opacity and RGB color value of a pixel in the source content is multiplied
+	 *  by the opacity and RGB color value of the corresponding region in the mask.

+     *
+     *
Conceptually, luminosity masking is equivalent to rendering the transformed mask and source content
+     *  into separate RGBA surfaces, and multiplying the alpha channel and the RGB color value of the mask
+	 *  content into the alpha channel and RGB color value of the source content.  All of the mask content is
+	 *  rendered into its surface before compositing into the source content's surface. As a result, all FXG
+	 *  features, such as strokes, bitmap filters, and fill opacity will affect the final composited
+	 *  content.

+     *
+     *
Luminosity masking is not native to Flash but is common in Adobe Creative Suite tools like Adobe
+	 *  Illustrator and Adobe Photoshop. In order to accomplish the visual effect of a luminosity mask in
+	 *  Flash-rendered content, a graphic element specifying a luminosity mask actually instantiates a shader
+	 *  filter that mimics the visual look of a luminosity mask as rendered in Adobe Creative Suite tools.

+	 *
+	 *
Objects being masked by luminosity masks can set properties to control the RGB color value and
+	 *  clipping of the mask. See the luminosityInvert and luminosityClip attributes.

      *
      *  @default MaskType.CLIP
      *
@@ -1238,12 +1260,21 @@
     /**
      *  @private
      */
-    private var luminosityInvertChanged:Boolean;
+    private var luminositySettingsChanged:Boolean;

     [Inspectable(category="General", enumeration="true,false", defaultValue="false")]

     /**
-     *  Documentation is not currently available.
+     *  A property that controls the calculation of the RGB
+	 *  color value of a graphic element being masked by
+	 *  a luminosity mask. If true, the RGB color value of a
+	 *  pixel in the source content is inverted and multipled
+	 *  by the corresponding region in the mask. If false,
+	 *  the source content's pixel's RGB color value is used
+	 *  directly.
+	 *
+	 *  @default false
+	 *  @see #maskType
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1264,6 +1295,7 @@
             return;

         _luminosityInvert = value;
+		luminositySettingsChanged = true;
     }

 	//----------------------------------
@@ -1276,15 +1308,17 @@
      */
     private var _luminosityClip:Boolean = false;

-    /**
-     *  @private
-     */
-    private var luminosityClipChanged:Boolean;
-
     [Inspectable(category="General", enumeration="true,false", defaultValue="false")]

     /**
-     *  Documentation is not currently available.
+     *  A property that controls whether the luminosity
+	 *  mask clips the masked content. This property can
+	 *  only have an effect if the graphic element has a
+	 *  mask applied to it that is of type
+	 *  MaskType.LUMINOSITY.
+	 *
+	 *  @default false
+	 *  @see #maskType
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -1305,6 +1339,7 @@
             return;

         _luminosityClip = value;
+		luminositySettingsChanged = true;
     }

     //----------------------------------
@@ -3124,7 +3159,8 @@

     /**
      *  @private
-     *  Enables clipping or alpha, depending on the type of mask being applied.
+     *  Enables clipping, alpha or luminosity, depending on the
+	 *  type of mask being applied.
      */
     mx_internal function applyMaskType():void
     {
@@ -3146,32 +3182,43 @@
             }
 			else if (_maskType == MaskType.LUMINOSITY)
 			{
-				// Sets up the mask's mode property based on
+				_mask.cacheAsBitmap = true;
+
+				// Create the shader wrapper class which wraps the pixel bender filter
+				var luminosityMaskShader:LuminosityMaskShader = new LuminosityMaskShader();
+
+				// Sets up the shader's mode property based on
 				// whether the luminosityClip and
 				// luminosityInvert properties are on or off.
-				var mode:int;
-				if (luminosityClip && !luminosityInvert)
-					mode = 0;
-				if (luminosityClip && luminosityInvert)
-					mode = 1;
-				if (!luminosityClip && !luminosityInvert)
-					mode = 2;
-				if (!luminosityClip && luminosityInvert)
-					mode = 3;
+				luminosityMaskShader.mode = calculateLuminositySettings();

-				_mask.cacheAsBitmap = true;
+				// Create the shader filter
+				var shaderFilter:ShaderFilter = new ShaderFilter(luminosityMaskShader);

-				// Create the luminosityMask shader, apply the correct mode to it,
-				// and create the filter
-				var luminosityMaskShader:LuminosityMaskShader = new LuminosityMaskShader();
-				luminosityMaskShader.mode = mode;
-				var maskFilter:ShaderFilter = new ShaderFilter(luminosityMaskShader);
-
-				// Apply the filter to the mask
-				_mask.filters = [maskFilter];
+				// Apply the shader filter to the mask
+				_mask.filters = [shaderFilter];
 			}
         }
     }
+
+	/**
+	 *  @private
+	 *  Calculates the luminosity mask shader's mode property which
+	 *  determines how the shader is drawn.
+	 */
+	private function calculateLuminositySettings():int
+	{
+		var mode:int = -1;
+		if (luminosityClip && !luminosityInvert)
+			mode = 0;
+		if (luminosityClip && luminosityInvert)
+			mode = 1;
+		if (!luminosityClip && !luminosityInvert)
+			mode = 2;
+		if (!luminosityClip && luminosityInvert)
+			mode = 3;
+		return mode;
+	}

     /**
      *  @private
@@ -3562,6 +3609,31 @@
                     drawnDisplayObject.mask = _mask;
                 }
             }
+
+			if (luminositySettingsChanged)
+			{
+				luminositySettingsChanged = false;
+
+				if (_mask && _maskType == MaskType.LUMINOSITY && _mask.filters.length > 0)
+				{
+					// Grab the shader filter and clear out the mask
+					var shaderFilter:ShaderFilter = _mask.filters[0];
+
+					if (shaderFilter && (shaderFilter.shader is LuminosityMaskShader))
+					{
+						// Clear out the mask's filters because we could potentially
+						// have a rendering change by setting the mode dynamically
+						// while the filters have been set.
+						_mask.filters = [];
+
+						// Reset the mode property
+						LuminosityMaskShader(shaderFilter.shader).mode = calculateLuminositySettings();
+
+						// Re-apply the filter to the mask
+						_mask.filters = [shaderFilter];
+					}
+				}
+			}

             if (maskTypeChanged || displayObjectChanged)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 14507
Author:   cframpto@adobe.com
Date:     2010-03-02T15:05:46.215596Z

Log Message:
-----------
Add LayoutDirection constants file.  Have not changed the SDK code to use this yet.

QE notes:
Doc notes: None
Bugs: SDK-25456
Reviewed By: PARB reviewed by Ely and David George, and Gordon, Kevin
Tests run: none since it isn't used yet
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/core/LayoutDirection.as

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

--- frameworks/projects/framework/src/mx/core/LayoutDirection.as
+++ frameworks/projects/framework/src/mx/core/LayoutDirection.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 20010Adobe 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.core
+{
+    /**
+     *  The LayoutDirection class defines the constant values
+     *  for the layoutDirection style of an IStyleClient and the
+     *  layoutDirection property of an IVisualElement.
+     *
+     *  Left-to-right layoutDirection is typically used with Latin-style
+     *  scripts. Right-to-left layoutDirection is used with scripts such as
+     *  Arabic or Hebrew.
+     *
+     *  If an IStyleClient, set the layoutDirection style to undefined to
+     *  inherit the layoutDirection from its ancestor.
+     *
+     *  If an IVisualElement, set the layoutDirection property to null to
+     *  inherit the layoutDirection from its ancestor.
+     *
+     *  @see mx.styles.IStyleClient
+     *  @see mx.core.IVisualElement
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.1
+     */
+    public final class LayoutDirection
+    {
+        include "../../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class constants
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Specifies left-to-right layout direction for a style client or a
+         *  visual element.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 2.0
+         *  @productversion Flex 4.1
+         */
+        public static const LTR:String = "ltr";
+
+        /**
+         *  Specifies right-to-left layout direction for a style client or a
+         *  visual element.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 2.0
+         *  @productversion Flex 4.1
+         */
+        public static const RTL:String = "rtl";
+    }
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/framework/src/mx/styles/IStyleManager.as
+++ frameworks/projects/framework/src/mx/styles/IStyleManager.as
@@ -340,46 +340,6 @@
 	function isParentSizeInvalidatingStyle(styleName:String):Boolean;

     /**
-     *  Adds to the list of styles which may require a recalculation
-     *  of the contraints based on the parent container.
-     *
When one of these styles is set with setStyle(),
-     *  the invalidateEstimatedSizesOfChildren()
-     *  method is called on the component's
-     *  parent container to make the estimated sizes get recalculated
-     *  later.

-     *
-     *  @param styleName The name of the style to register.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    function registerParentEstimatedSizeInvalidatingStyle(styleName:String):void;
-
-    /**
-     *  Tests to see if the style changes the estimated sizes based on a component's parent container.
-     *
-     *
When one of these styles is set with setStyle(),
-     *  the invalidateEstimatedSizesOfChildren()
-     *  method is called on the component's
-     *  parent container to make the estimated sizes get recalculated
-     *  later.

-     *
-     *  @param styleName The name of the style to test.
-     *
-     *  @return Returns true if the specified style is one
-     *  which may affect the measured size of the component's
-     *  parent container.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    function isParentEstimatedSizeInvalidatingStyle(styleName:String):Boolean;
-
-    /**
      *  Adds to the list of styles which may affect the appearance
      *  or layout of the component's parent container.
      *  When one of these styles is set with setStyle(),


Transferred from the Adobe Open Source Subversion Repository

Revision: 5573
Author:   jimurphy@adobe.com
Date:     2009-03-26T15:11:59.159776Z

Log Message:
-----------
-more updated package and class names that were missed in the first pass
-remove the mx folder

qa: probably
doc: this updated more asdoc comments so you may want to make sure that this pass made the correct updates
checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/SetActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/IEaser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/DataGroupExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/PathSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxToggleButtonExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/AnimationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/WipeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SetAction.as</path>

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

--- frameworks/projects/spark/src/spark/effects/easing/IEaser.as
+++ frameworks/projects/spark/src/spark/effects/easing/IEaser.as
@@ -24,7 +24,7 @@
  * only have to deal with the fractional value of time instead of any
  * specific object types.</p>
  *
- * @see mx.effects.Animation
+ * @see spark.effects.animation.Animation
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Updated AsyncSort: bug fixes, faster, cleaner, more documentation.

Change-Id: Ibdee834e151a254411f1cd0ea8da60b0df7a9e9b

--- WeaveData/src/weave/utils/AsyncSort.as
+++ WeaveData/src/weave/utils/AsyncSort.as
@@ -38,7 +38,7 @@
 		{
 		}

-		private static var _immediateSorter:AsyncSort;
+		private static var _immediateSorter:AsyncSort; // used by sortImmediately()

 		/**
 		 * This function will sort an Array (or Vector) immediately.
@@ -64,28 +64,53 @@
 		}

 		/**
+		 * This is a basic compare function similar to the default compare used by Array.sort().
+		 * This function is faster than ObjectUtil.compare(), but does not do deep object compare.
+		 */
+		private static function defaultCompare(a:*, b:*):int
+		{
+			if (a === b)
+				return 0;
+			if (a == null)
+				return 1;
+			if (b == null)
+				return -1;
+			var typeA:String = typeof(a);
+			var typeB:String = typeof(b);
+			if (typeA != typeB)
+				return ObjectUtil.stringCompare(typeA, typeB);
+			if (typeA == 'boolean')
+				return ObjectUtil.numericCompare(Number(a), Number(b));
+			if (typeA == 'number')
+				return ObjectUtil.numericCompare(a as Number, b as Number);
+			if (typeA == 'string')
+				return ObjectUtil.stringCompare(a as String, b as String);
+			if (a is Date && b is Date)
+				return ObjectUtil.dateCompare(a as Date, b as Date);
+			return 0;
+		}
+
+		/**
 		 * This is the sorted Array (or Vector), or null if the sort operation has not completed yet.
 		 */
 		public function get result():*
 		{
-			return size >= length ? array : null;
-		}
-
-		private var compare:Function;
-		private var array:*;
-		private var length:uint;
-		private var size:uint;
-		private var start:uint;
-		private var middle:uint;
-		private var end:uint;
-		private var iLeft:uint;
-		private var iRight:uint;
-		private var iBuffer:uint;
-		private var buffer:*;
-		private var merging:Boolean;
-		private var swapped:Boolean;
-		private var elapsed:int;
-		private var _immediately:Boolean = false;
+			return source ? null : original;
+		}
+
+		private var original:*; // original array
+		private var source:*; // contains sub-arrays currently being merged
+		private var destination:*; // buffer to store merged sub-arrays
+		private var compare:Function; // compares two array items
+		private var length:uint; // length of original array
+		private var subArraySize:uint; // size of sub-array
+		private var middle:uint; // end of left and start of right sub-array
+		private var end:uint; // end of right sub-array
+		private var iLeft:uint; // left sub-array source index
+		private var iRight:uint; // right sub-array source index
+		private var iMerged:uint; // merged destination index
+		private var elapsed:int; // keeps track of elapsed time inside iterate()
+		private var _immediately:Boolean = false; // set in sortImmediately(), checked in beginSort()

 		/**
 		 * This will begin an asynchronous sorting operation on the specified Array (or Vector).
@@ -99,21 +124,20 @@
 		public function beginSort(arrayToSort:*, compareFunction:Function = null):void
 		{
 			// initialize
-			compare = compareFunction || ObjectUtil.compare;
-			array = arrayToSort;
-			length = array.length;
+			compare = compareFunction || defaultCompare;
+			original = arrayToSort;
+			source = original;
+			length = original.length;

 			// make a buffer of the same type and length
-			var Type:Class = (array as Object).constructor;
-			buffer = new Type();
-			buffer.length = length;
-
-			size = 1;
+			var Type:Class = (source as Object).constructor;
+			destination = new Type();
+			destination.length = length;
+
+			subArraySize = 1;
 			middle = 0;
 			end = 0;
-			merging = false;
 			elapsed = 0;
-			swapped = false;

 			if (_immediately)
 			{
@@ -132,65 +156,67 @@

 			while (getTimer() < stopTime)
 			{
-				if (iLeft < middle)
-				{
-					// copy smallest value to buffer
-					if (iRight < end && compare(array[iRight], array[iLeft]) < 0)
-						buffer[iBuffer++] = array[iRight++];
+				if (iLeft < middle) // if there are still more items in the left sub-array
+				{
+					// copy smallest value to merge destination
+					if (iRight < end && compare(source[iRight], source[iLeft]) < 0)
+						destination[iMerged++] = source[iRight++];
 					else
-						buffer[iBuffer++] = array[iLeft++];
-				}
-				else if (iRight < end)
-				{
-					buffer[iBuffer++] = array[iRight++];
-				}
-				else if (end >= length) // done merging all pairs of sub-arrays of current size
-				{
-					// swap sorted and unsorted arrays
-					var sorted:* = buffer;
-					buffer = array;
-					array = sorted;
-					swapped = !swapped; // keep track of whether or not this is the original array
-
-					// start again from beginning of array
-					size *= 2;
-					end = 0;
-
-					if (size >= length)
-					{
-						// we are done sorting.
-						elapsed += getTimer() - time;
-						if (swapped)
-						{
-							// buffer is the original, so copy the sorted values over from sorted array
-							for (var i:int = length - 1; i >= 0; i--)
-								buffer[i] = array[i];
-							array = buffer;
-						}
-						buffer = null;
-						return 1;
-					}
-				}
-				else
-				{
-					// prepare for next merge
-					start = end;
-					middle = Math.min(start + size, length);
-					end = Math.min(middle + size, length);
+						destination[iMerged++] = source[iLeft++];
+				}
+				else if (iRight < end) // if there are still more items in the right sub-array
+				{
+					destination[iMerged++] = source[iRight++];
+				}
+				else if (end < length) // if there are still more pairs of sub-arrays to merge
+				{
+					// begin merging the next pair of sub-arrays
+					var start:uint = end;
+					middle = Math.min(start + subArraySize, length);
+					end = Math.min(middle + subArraySize, length);
 					iLeft = start;
 					iRight = middle;
-					iBuffer = start;
-					merging = true;
+					iMerged = start;
+				}
+				else // done merging all pairs of sub-arrays
+				{
+					// use the merged destination as the next source
+					var merged:* = destination;
+					destination = source;
+					source = merged;
+
+					// start merging sub-arrays of twice the previous size
+					end = 0;
+					subArraySize *= 2;
+
+					// stop if the sub-array includes the entire array
+					if (subArraySize >= length)
+						break;
 				}
 			}

 			elapsed += getTimer() - time;

-			if (length == 0)
-				return 1;
+			// if one sub-array includes the entire array, we're done
+			if (subArraySize >= length)
+			{
+				// source array is completely sorted
+				if (source != original) // if source isn't the original
+				{
+					// copy the sorted values to the original
+					for (var i:int = length - 1; i >= 0; i--)
+						original[i] = source[i];
+				}
+
+				// clean up so the "get result()" function knows we're done
+				source = null;
+				destination = null;
+
+				return 1; // done
+			}

 			//TODO: improve progress calculation
-			return size / length; // not exactly accurate, but returns a number < 1
+			return subArraySize / length; // not exactly accurate, but returns a number < 1
 		}

 		private function done():void
@@ -200,37 +226,60 @@

 		/*************
 		 ** Testing **
-		 *************/
-
-		//test(); // Class('weave.utils.AsyncSort').test()
-		public static function test():void
-		{
-			for each (var n:uint in [50,3000,6000,12000,25000,50000])
+		 *************/
+
+		//test(true); // Class('weave.utils.AsyncSort').test(false)
+		/*
+			Array.sort 50 numbers; 0.002 seconds; 487 comparisons
+			Merge Sort 50 numbers; 0.001 seconds; 208 comparisons
+			Array.sort 3000 numbers; 0.304 seconds; 87367 comparisons
+			Merge Sort 3000 numbers; 0.111 seconds; 25608 comparisons
+			Array.sort 6000 numbers; 0.809 seconds; 226130 comparisons
+			Merge Sort 6000 numbers; 0.275 seconds; 55387 comparisons
+			Array.sort 12000 numbers; 1.969 seconds; 554380 comparisons
+			Merge Sort 12000 numbers; 0.514 seconds; 119555 comparisons
+			Array.sort 25000 numbers; 9.498 seconds; 2635394 comparisons
+			Merge Sort 25000 numbers; 1.234 seconds; 274965 comparisons
+			Array.sort 50000 numbers; 37.285 seconds; 10238787 comparisons
+			Merge Sort 50000 numbers; 2.603 seconds; 585089 comparisons
+		*/
+		public static function test(useDefaultSort:Boolean):void
+		{
+			for each (var n:uint in [0,1,50,3000,6000,12000,25000,50000])
 			{
 				var array:Array = [];
 				for (var i:int = 0; i < n; i++)
-					array.push(uint(Math.random()*100));
+					array.push(Math.random() < .5 ? NaN : uint(Math.random()*100));
 				var array2:Array = array.concat();

 				var start:int = getTimer();
 				_debugCompareCount = 0;
-				array.sort(_debugCompare);
+				if (useDefaultSort)
+					array.sort();
+				else
+					array.sort(_debugCompare);
 				trace('Array.sort', n, 'numbers;', (getTimer() - start) / 1000, 'seconds;',_debugCompareCount,'comparisons');

+				start = getTimer();
 				_debugCompareCount = 0;
-				start = getTimer();
-				sortImmediately(array2, _debugCompare);
+				if (useDefaultSort)
+					sortImmediately(array2);
+				else
+					sortImmediately(array2, _debugCompare);
 				//trace('Merge Sort', n, 'numbers;', _immediateSorter.elapsed / 1000, 'seconds;',_debugCompareCount,'comparisons');
 				trace('Merge Sort', n, 'numbers;', (getTimer() - start) / 1000, 'seconds;',_debugCompareCount,'comparisons');

-				verifySorted(array2);
-			}
-		}
-		private static function verifySorted(array:Array):void
+				if (array2.length == 1 && ObjectUtil.compare(array[0],array2[0]) != 0)
+					throw new Error("sort failed on array length 1");
+
+				verifyNumbersSorted(array2);
+			}
+		}
+		private static function verifyNumbersSorted(array:Array):void
 		{
 			for (var i:int = 1; i < array.length; i++)
 			{
-				if (array[i - 1] > array[i])
+				if (ObjectUtil.numericCompare(array[i - 1], array[i]) > 0)
 				{
 					throw new Error("ASSERTION FAIL " + array[i - 1] + ' > ' + array[i]);
 				}


Stuck upload new in between uploaded and default items in media picker

--- flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
+++ flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
@@ -145,25 +145,23 @@
 		}
 		else {
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_IMAGE + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_AUDIO + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_VIDEO + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
-		}
+		}
+
 		this.printXMLData();

 		var media:Array = obj.result.data as Array;
         trace("Number of Media Objects returned from server = '" + media.length + "'");

-		for (var k:Number = 0; k <= 1; k++)
+		//Puts media items in xml readable format
+		for (var k:Number = 0; k <= 1; k++) //Iterates over list twice; once for uploaded items, again for default
 		{
 			for (var j:Number = 0; j < media.length; j++)
 			{
 				var o:Object = media[j];

 				if((k==0 && !o.is_default) || (k==1 && o.is_default)){
-					trace(k);
 					var m:Media = new Media();

 					m.mediaId = o.media_id;
@@ -195,6 +193,13 @@
 					}
 				}
 			}
+			//Add "Upload new" in between uploaded and default pictures
+			if(k==0){
+				xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+			}
+
 		}
         trace("ItemEditorMediaPickerView: handleLoadingOfMediaIntoXML: Just finished loading Media Objects into XML.  Here's what the new XML looks like:");
         this.printXMLData();


Transferred from the Adobe Open Source Subversion Repository

Revision: 20088
Author:   deeptika@adobe.com
Date:     2011-02-03T11:20:39.567743Z

Log Message:
-----------
Adding null check and creating measuringObjects if it doesn't exist

QE notes:
Doc notes:
Bugs: FLEXENT-1407 (Not Able to Add Flex Data Grid and Objects inside Flex Data Gird are not recognised by QTP)
Reviewer: Sameer
Tests run: Checkintests
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as

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

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -2816,7 +2816,10 @@
     mx_internal function getMeasuringRenderer(c:AdvancedDataGridColumn, forHeader:Boolean, data:Object):IListItemRenderer
     {
         var factory:IFactory = columnItemRendererFactory(c,forHeader,data);
-
+
+		if (!measuringObjects)
+			measuringObjects = new Dictionary(false);
+
         var item:IListItemRenderer = measuringObjects[factory];
         if (!item)
         {


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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBaseContentHolder.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBaseContentHolder.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: 6290
Author:   chaase@adobe.com
Date:     2009-04-27T18:42:18.522446Z

Log Message:
-----------
Added animation behavior to scrollbars and sliders. For now, animation only happens based on mouse events (key events still have previous non-animated behavior).
Also, added shift-click behavior to ScrollBar, behaves essentially like a Slider, going to the clicked location instead of paging toward it.
Finally, fixed an unrelated bug in Animation where Animates set up with a MotionPath with no time=0 keyframe would not run properly.

These changes necessitate changes in Mustella (need to listen to 'change' event on scrollbars/sliders, not 'updateComplete' or 'click', since the animations may cause several valid 'updateComplete' events on the way to the final changed value.

QE Notes: Mustella changes in ScrollBar and Slider necessary. See note above. Changes have been made and are awaiting this checkin to update Mustella tests.
Doc Notes: None
Bugs:
Reviewer: Hans and Glenn (scrolling/sliding changes), Jason (Animation bug changes)
tests: checkintests, Mustella ScrollBar, Slider, Scroller (all required minor changes to pass)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/KeyFrame.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/flex4/flex4test_testScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/AnimationTarget.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/ScrollbarFrenzy.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
@@ -22,8 +22,14 @@
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
 import mx.core.UIComponent;
+import mx.events.EffectEvent;
 import mx.formatters.NumberFormatter;
 import mx.managers.IFocusManagerComponent;
+
+import spark.effects.SimpleMotionPath;
+import spark.effects.animation.Animation;
+import spark.effects.easing.IEaser;
+import spark.effects.easing.Sine;

 include "../../styles/metadata/BasicTextLayoutFormatStyles.as"

@@ -102,6 +108,8 @@

 	private var dataFormatter:NumberFormatter;

+    private var animator:Animation = null;
+
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -396,6 +404,11 @@
      */
     override protected function system_mouseMoveHandler(event:MouseEvent):void
     {
+        // TODO (chaase): I think we can do this without a persistent
+        // currValue property, and therefore just call super.mouseMove to
+        // handle the main functionality, with extra code just for the
+        // dataTipInstance case
+
         currValue = calculateNewValue(currValue, event);

         positionThumb(valueToPosition(currValue));
@@ -430,6 +443,8 @@
      */
     override protected function system_mouseUpHandler(event:MouseEvent):void
     {
+        // TODO (chaase): get rid of currValue and just calculate the new
+        // value here dynamically
         if (!liveDragging && currValue != value)
         {
             setValue(currValue);
@@ -539,12 +554,54 @@

         if (RtempValue != value)
         {
-            setValue(RtempValue);
-            dispatchEvent(new Event("change"));
+            var slideDuration:Number = getStyle("slideDuration");
+            if (slideDuration != 0)
+            {
+                if (!animator)
+                {
+                    animator = new Animation();
+                    var animTarget:AnimationTarget = new AnimationTarget(animationUpdateHandler);
+                    animTarget.endFunction = animationEndHandler;
+                    animator.animationTarget = animTarget;
+                    // TODO (chaase): hard-coding easer for now - how to style it?
+                    animator.easer = new Sine(0);
+                }
+                animator.stop();
+                animator.duration = slideDuration *
+                    (Math.abs(value - RtempValue) / (maximum - minimum));
+                animator.motionPaths = [
+                    new SimpleMotionPath("value", value, RtempValue)];
+                animator.play();
+            }
+            else
+            {
+                setValue(RtempValue);
+                dispatchEvent(new Event("change"));
+            }
         }

         event.updateAfterEvent();
     }
+
+    /**
+     * @private
+     * Handles events from the Animation that runs the animated slide.
+     * We just call setValue() with the current animated value
+     */
+    private function animationUpdateHandler(animation:Animation):void
+    {
+        setValue(animation.currentValue["value"]);
+    }
+
+    /**
+     * @private
+     * Handles end event from the Animation that runs the animated slide.
+     * We dispatch the "change" event at this time, after the animation
+     * is done.
+     */
+    private function animationEndHandler(animation:Animation):void
+    {
+        dispatchEvent(new Event("change"));
+    }
 }
-
 }


fixed bug where xml node couldn't be found due to added metadata.

--- WeaveData/src/weave/data/DataSources/CKANDataSource.as
+++ WeaveData/src/weave/data/DataSources/CKANDataSource.as
@@ -19,6 +19,8 @@

 package weave.data.DataSources
 {
+	import mx.utils.ObjectUtil;
+
 	import weave.api.WeaveAPI;
 	import weave.api.data.IDataSource;
 	import weave.api.data.IWeaveTreeNode;
@@ -94,7 +96,12 @@
 			if (!ds)
 				return null;

-			var internalNode:IWeaveTreeNode = ds.findHierarchyNode(metadata);
+			var search:Object = ObjectUtil.copy(metadata);
+			delete search[PARAMS_CKAN_ID];
+			delete search[PARAMS_CKAN_URL];
+			delete search[PARAMS_CKAN_FORMAT];
+
+			var internalNode:IWeaveTreeNode = ds.findHierarchyNode(search);
 			if (!internalNode)
 				return null;


Migrated VisualTestCase to modern test case

--- asunit-4.0/test/asunit/framework/VisualTestCaseTest.as
+++ asunit-4.0/test/asunit/framework/VisualTestCaseTest.as
@@ -1,43 +1,39 @@
 package asunit.framework {
+
+    import asunit.asserts.*;
+
     import flash.display.Sprite;

-    public class VisualTestCaseTest extends TestCase {
-        private var instance:Sprite;
+    public class VisualTestCaseTest {

-        public function VisualTestCaseTest(testMethod:String = null) {
-            super(testMethod);
+        [Inject]
+        public var sprite:Sprite;
+
+        [Test]
+        public function instantiated():void {
+            assertTrue(sprite is Sprite);
+        }
+
+        [Test]
+        public function testSize():void {
+            assertTrue(sprite.width == 0);
+            assertTrue(sprite.height == 0);
         }

-        protected override function setUp():void {
-            instance = new Sprite();
-            addChild(instance);
+        [Test]
+        public function testDrawnSize():void {
+            sprite.graphics.beginFill(0xFF0000);
+            sprite.graphics.drawRect(0, 0, 100, 200);
+
+            assertEquals(100, sprite.width);
+            assertEquals(200, sprite.height);
         }

-        protected override function tearDown():void {
-            removeChild(instance);
+        [Test]
+        public function testSecondSize():void {
+            assertTrue(sprite.width == 0);
+            assertTrue(sprite.height == 0);
         }
-
-        public function testInstance():void {
-            assertTrue(instance is Sprite);
-        }
-
-        public function testSize():void {
-            assertTrue(instance.width == 0);
-            assertTrue(instance.height == 0);
-        }
+    }
+}

-        public function testDrawnSize():void {
-            instance.graphics.beginFill(0xFF0000);
-            instance.graphics.drawRect(0, 0, 10, 20);
-
-            assertTrue(instance.width == 10);
-            assertTrue(instance.height == 20);
-        }
-
-        public function testSecondSize():void {
-            assertTrue(instance.width == 0);
-            assertTrue(instance.height == 0);
-        }
-
-    }
-}


Fixed order of mouse event handling in toggle mode.

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

--- src/laml/display/SelectableButton.as
+++ src/laml/display/SelectableButton.as
@@ -164,8 +164,8 @@
 		}

 		override protected function mouseClickHandler(mouseEvent:MouseEvent):void {
+			toggleState();
 			mouseEventHandler(mouseEvent);
-			toggleState();
 		}
 	}
 }