Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
+++ frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
@@ -64,16 +64,16 @@
      *  The isInheritingTextFormatStyle() method queries this set.
      */
     private static var inheritingTextFormatStyles:Object =
-    {
-        align: true,
-        bold: true,
-        color: true,
-        font: true,
-        indent: true,
-        italic: true,
-        size: true
-    };
-
+        {
+            align: true,
+            bold: true,
+            color: true,
+            font: true,
+            indent: true,
+            italic: true,
+            size: true
+        };
+
     /**
      *  @private
      *  Set of styles for which setStyle() causes
@@ -82,67 +82,67 @@
      *  and isSizeInvalidatingStyle() queries this set.
      */
     private static var sizeInvalidatingStyles:Object =
-    {
-        alignmentBaseline: true,
-        baselineShift: true,
-        blockProgression: true,
-        borderStyle: true,
-        borderThickness: true,
-        cffHinting: true,
-        columnCount: true,
-        columnGap: true,
-        columnWidth: true,
-        digitCase: true,
-        digitWidth: true,
-        direction: true,
-        dominantBaseline: true,
-        firstBaselineOffset: true,
-        fontAntiAliasType: true,
-        fontFamily: true,
-        fontGridFitType: true,
-        fontLookup: true,
-        fontSharpness: true,
-        fontSize: true,
-        fontStyle: true,
-        fontThickness: true,
-        fontWeight: true,
-        headerHeight: true,
-        horizontalAlign: true,
-        horizontalGap: true,
-        justificationRule: true,
-        justificationStyle: true,
-        kerning: true,
-        leading: true,
-        letterSpacing: true,
-        ligatureLevel: true,
-        lineBreak: true,
-        lineHeight: true,
-        lineThrough: true,
-        locale: true,
-        marginBottom: true,
-        marginLeft: true,
-        marginRight: true,
-        marginTop: true,
-        paddingBottom: true,
-        paddingLeft: true,
-        paddingRight: true,
-        paddingTop: true,
-        renderingMode: true,
-        strokeWidth: true,
-        tabHeight: true,
-        tabWidth: true,
-        textAlign: true,
-        textAlignLast: true,
-        textRotation: true,
-        tracking: true,
-        trackingLeft: true,
-        trackingRight: true,
-        typographicCase: true,
-        verticalAlign: true,
-        verticalGap: true,
-        whitespaceCollapse: true
-    }
-
+        {
+            alignmentBaseline: true,
+            baselineShift: true,
+            blockProgression: true,
+            borderStyle: true,
+            borderThickness: true,
+            cffHinting: true,
+            columnCount: true,
+            columnGap: true,
+            columnWidth: true,
+            digitCase: true,
+            digitWidth: true,
+            direction: true,
+            dominantBaseline: true,
+            firstBaselineOffset: true,
+            fontAntiAliasType: true,
+            fontFamily: true,
+            fontGridFitType: true,
+            fontLookup: true,
+            fontSharpness: true,
+            fontSize: true,
+            fontStyle: true,
+            fontThickness: true,
+            fontWeight: true,
+            headerHeight: true,
+            horizontalAlign: true,
+            horizontalGap: true,
+            justificationRule: true,
+            justificationStyle: true,
+            kerning: true,
+            leading: true,
+            letterSpacing: true,
+            ligatureLevel: true,
+            lineBreak: true,
+            lineHeight: true,
+            lineThrough: true,
+            locale: true,
+            marginBottom: true,
+            marginLeft: true,
+            marginRight: true,
+            marginTop: true,
+            paddingBottom: true,
+            paddingLeft: true,
+            paddingRight: true,
+            paddingTop: true,
+            renderingMode: true,
+            strokeWidth: true,
+            tabHeight: true,
+            tabWidth: true,
+            textAlign: true,
+            textAlignLast: true,
+            textRotation: true,
+            tracking: true,
+            trackingLeft: true,
+            trackingRight: true,
+            typographicCase: true,
+            verticalAlign: true,
+            verticalGap: true,
+            whitespaceCollapse: true
+        }
+
     /**
      *  @private
      *  Set of styles for which setStyle() causes
@@ -151,16 +151,16 @@
      *  and isParentSizeInvalidatingStyle() queries this set.
      */
     private static var parentSizeInvalidatingStyles:Object =
-    {
-        baseline: true,
-        bottom: true,
-        horizontalCenter: true,
-        left: true,
-        right: true,
-        top: true,
-        verticalCenter: true
-    }
-
+        {
+            baseline: true,
+            bottom: true,
+            horizontalCenter: true,
+            left: true,
+            right: true,
+            top: true,
+            verticalCenter: true
+        }
+
     /**
      *  @private
      *  Set of styles for which setStyle() causes
@@ -169,16 +169,16 @@
      *  and isParentDisplayListInvalidatingStyle() queries this set.
      */
     private static var parentDisplayListInvalidatingStyles:Object =
-    {
-        baseline: true,
-        bottom: true,
-        horizontalCenter: true,
-        left: true,
-        right: true,
-        top: true,
-        verticalCenter: true
-    }
-
+        {
+            baseline: true,
+            bottom: true,
+            horizontalCenter: true,
+            left: true,
+            right: true,
+            top: true,
+            verticalCenter: true
+        }
+
     /**
      *  @private
      *  Set of color names.
@@ -192,36 +192,36 @@
      *  in conformance with the CSS spec.
      */
     private static var colorNames:Object =
-    {
-        transparent: "transparent",
-        black: 0x000000,
-        blue: 0x0000FF,
-        green: 0x008000,
-        gray: 0x808080,
-        silver: 0xC0C0C0,
-        lime: 0x00FF00,
-        olive: 0x808000,
-        white: 0xFFFFFF,
-        yellow: 0xFFFF00,
-        maroon: 0x800000,
-        navy: 0x000080,
-        red: 0xFF0000,
-        purple: 0x800080,
-        teal: 0x008080,
-        fuchsia: 0xFF00FF,
-        aqua: 0x00FFFF,
-        magenta: 0xFF00FF,
-        cyan: 0x00FFFF,
-
-        // IMPORTANT: Theme colors must also be updated
-        // in the Flex compiler's CSS parser
-        // (in \src\java\macromedia\css\Descriptor.java)
-        // and possibly other places as well. Grep for them!
-        halogreen: 0x80FF4D,
-        haloblue: 0x009DFF,
-        haloorange: 0xFFB600,
-        halosilver: 0xAECAD9
-    };
+        {
+            transparent: "transparent",
+            black: 0x000000,
+            blue: 0x0000FF,
+            green: 0x008000,
+            gray: 0x808080,
+            silver: 0xC0C0C0,
+            lime: 0x00FF00,
+            olive: 0x808000,
+            white: 0xFFFFFF,
+            yellow: 0xFFFF00,
+            maroon: 0x800000,
+            navy: 0x000080,
+            red: 0xFF0000,
+            purple: 0x800080,
+            teal: 0x008080,
+            fuchsia: 0xFF00FF,
+            aqua: 0x00FFFF,
+            magenta: 0xFF00FF,
+            cyan: 0x00FFFF,
+
+            // IMPORTANT: Theme colors must also be updated
+            // in the Flex compiler's CSS parser
+            // (in \src\java\macromedia\css\Descriptor.java)
+            // and possibly other places as well. Grep for them!
+            halogreen: 0x80FF4D,
+            haloblue: 0x009DFF,
+            haloorange: 0xFFB600,
+            halosilver: 0xAECAD9
+        };

     //--------------------------------------------------------------------------
     //
@@ -245,8 +245,17 @@
     public static function getInstance():IStyleManager2
     {
         if (!instance)
+        {
+            // In Flex 4 each application/module creates its own style manager.
+            // There will be no style manager if the application/module was compiled for
+            // Flex 3 compatibility. In that case create there will be no instance
+            // associated with the top-level application so create a new instance.
             instance = IStyleManager2(IFlexModuleFactory(SystemManagerGlobals.topLevelSystemManagers[0]).
                        getImplementation("mx.styles::IStyleManager2"));
+
+            if (!instance)
+                instance = new StyleManagerImpl(SystemManagerGlobals.topLevelSystemManagers[0]);
+        }

         return instance;
     }
@@ -272,7 +281,7 @@
         // get our parent styleManager
         if (moduleFactory is DisplayObject)
         {
-            var request:Request = new Request(Request.GET_FLEX_MODULE_FACTORY_REQUEST);
+            var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
             DisplayObject(moduleFactory).dispatchEvent(request);
             var moduleFactory:IFlexModuleFactory = request.value as IFlexModuleFactory;
             if (moduleFactory)
@@ -370,6 +379,28 @@
     public function set parent(parent:IStyleManager2):void
     {
         _parent = parent;
+    }
+
+    //----------------------------------
+    //  qualifiedTypeSelectors
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private static var _qualifiedTypeSelectors:Boolean = true;
+
+    public function get qualifiedTypeSelectors():Boolean
+    {
+        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_0)
+            return false;
+        else
+            return _qualifiedTypeSelectors;
+    }
+
+    public function set qualifiedTypeSelectors(value:Boolean):void
+    {
+        _qualifiedTypeSelectors = value;
     }

     //----------------------------------
@@ -626,6 +657,47 @@
         return _selectors[selector];
     }

+    /**
+     * Gets a CSSStyleDeclaration object that stores the rules
+     * for the specified CSS selector. The CSSStyleDeclaration object is the created by merging
+     * the properties of the specified CSS selector of this style manager with all of the parent
+     * style managers.
+     *
+     *
If the selector parameter starts with a period (.),
+     * the returned CSSStyleDeclaration is a class selector and applies only to those instances
+     * whose styleName property specifies that selector
+     * (not including the period).
+     * For example, the class selector ".bigMargins"
+     * applies to any UIComponent whose styleName
+     * is "bigMargins".

+     *
+     *
If the selector parameter does not start with a period,
+     * the returned CSSStyleDeclaration is a type selector and applies to all instances
+     * of that type.
+     * For example, the type selector "Button"
+     * applies to all instances of Button and its subclasses.

+     *
+     *
The global selector is similar to a type selector
+     * and does not start with a period.

+     *
+     * @param selector The name of the CSS selector.
+     * @param localOnly Controls whether the returned style declaration is the result of merging
+     * the properties of this and any parent style managers or if the style declaration is only
+     * from this style manager.
+     *
+     * @return The style declaration whose name matches the selector property.
+     *
+     * @langversion 3.0
+     * @playerversion Flash 9
+     * @playerversion AIR 1.1
+     * @productversion Flex 4
+     */
+    public function getMergedStyleDeclaration(selector:String):CSSStyleDeclaration
+    {
+        // FIXME (dloverin) merge in styles from parent style manager.
+        return getStyleDeclaration(selector);
+    }
+
     /**
      *  Sets the CSSStyleDeclaration object that stores the rules
      *  for the specified CSS selector.
@@ -1103,7 +1175,7 @@
     public function getColorName(colorName:Object):uint
     {
         var n:Number;
-
+
         if (colorName is String)
         {
             if (colorName.charAt(0) == "#")
@@ -1112,23 +1184,23 @@
                 n = Number("0x" + colorName.slice(1));
                 return isNaN(n) ? StyleManager.NOT_A_COLOR : uint(n);
             }
-
+
             if (colorName.charAt(1) == "x" && colorName.charAt(0) == '0')
             {
                 // Map "#77EE11" to 0x77EE11
-                 n = Number(colorName);
+                n = Number(colorName);
                 return isNaN(n) ? StyleManager.NOT_A_COLOR : uint(n);
             }
-
+
             // Map "red" or "Red" to 0xFF0000;
             // Map "haloGreen" or "HaLoGrEeN" to 0x46FF00.
             var c:* = colorNames[colorName.toLowerCase()];
             if (c === undefined)
                 return StyleManager.NOT_A_COLOR;
-
+
             return uint(c);
         }
-
+
         return uint(colorName);
     }

@@ -1151,7 +1223,7 @@
     {
         if (!colors)
             return;
-
+
         var n:int = colors.length;
         for (var i:int = 0; i < n; i++)
         {
@@ -1238,6 +1310,10 @@
             var styleModule:IStyleModule =
                 IStyleModule(moduleEvent.module.factory.create());

+            // Register the style module to use this style manager.
+            moduleEvent.module.factory.registerImplementation("mx.styles::IStyleManager2", instance);
+            if ("setStyleDeclarations" in styleModule)
+                styleModule["setStyleDeclarations"](instance);
             styleModules[moduleEvent.module.url].styleModule = styleModule;

             if (update)


Transferred from the Adobe Open Source Subversion Repository

Revision: 5115
Author:   rfrishbe@adobe.com
Date:     2009-02-27T21:27:41.731597Z

Log Message:
-----------
Adding SpriteVisualElement, a light-weight, Sprited-based implementation of IVisualElement.  This will be used for some FXG compiler optimizations.

Added setter for includeInLayout into IVisualElement so that DataGroup's virtualization code can use this, rather than cast it to a UIComponent.  I also removed an unused method in DataGroup: _removeChild.  We needed this before to remove children on a previously parented DataGroup, but now that we do the cleanup pro-actively, this is no longer needed.

Also a few ASDoc cleanups in IVisualElement, ILayoutElement, and FxDataContainer.

QE Notes: -
Doc Notes: -
Bugs: -
Reviewer: Chet, Evtim
tests: checkintests, mustella list, datagroup, fxdatacontainer, buttonbar.  Some mustella were failing, but I think it's just a mac thing.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -0,0 +1,765 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
+import flash.display.DisplayObjectContainer;
+import flash.geom.Matrix;
+import flash.geom.Matrix3D;
+import flash.geom.Point;
+
+import mx.core.FlexSprite;
+import mx.core.IInvalidating;
+import mx.core.IVisualElement;
+import mx.utils.MatrixUtil;
+
+/**
+ *  The SpriteVisualElement class is a light-weight Sprite-based implemention
+ *  of IVisualElement.  It can be dropped in to Spark containers and be laid
+ *  out and renderered correctly.
+ */
+public class SpriteVisualElement extends FlexSprite implements IVisualElement
+{
+    public function SpriteVisualElement()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baseline
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the baseline property.
+     */
+    private var _baseline:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get baseline():Object
+    {
+        return _baseline;
+    }
+
+    /**
+     *  @private
+     */
+    public function set baseline(value:Object):void
+    {
+        if (_baseline == value)
+            return;
+
+        _baseline = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+	//----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get baselinePosition():Number
+    {
+        return 0;
+    }
+
+    //----------------------------------
+    //  bottom
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the blendMode property.
+     */
+    private var _bottom:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get bottom():Object
+    {
+        return _bottom;
+    }
+
+    /**
+     *  @private
+     */
+    public function set bottom(value:Object):void
+    {
+        if (_bottom == value)
+            return;
+
+        _bottom = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  height
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    [PercentProxy("percentHeight")]
+    override public function get height():Number
+    {
+        return super.height;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set height(value:Number):void
+    {
+        if (super.height == value)
+            return;
+
+        super.height = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  horizontalCenter
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the horizontalCenter property.
+     */
+    private var _horizontalCenter:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get horizontalCenter():Object
+    {
+        return _horizontalCenter;
+    }
+
+    /**
+     *  @private
+     */
+    public function set horizontalCenter(value:Object):void
+    {
+        if (_horizontalCenter == value)
+            return;
+
+        _horizontalCenter = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  includeInLayout
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the includeInLayout property.
+     */
+    private var _includeInLayout:Boolean = true;
+
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get includeInLayout():Boolean
+    {
+        return _includeInLayout;
+    }
+
+    /**
+     *  @private
+     */
+    public function set includeInLayout(value:Boolean):void
+    {
+        if (_includeInLayout == value)
+            return;
+
+        _includeInLayout = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  layer
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the layer property.
+     */
+    private var _layer:Number = 0;
+
+    /**
+     * @inheritDoc
+     */
+    public function get layer():Number
+    {
+        return _layer;
+    }
+
+    /**
+     *  @private
+     */
+    public function set layer(value:Number):void
+    {
+        if(value == _layer)
+            return;
+
+        _layer = value;
+        if(parent != null && "invalidateLayering" in parent && parent["invalidateLayering"] is Function)
+            parent["invalidateLayering"]();
+    }
+
+    //----------------------------------
+    //  left
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the left property.
+     */
+    private var _left:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get left():Object
+    {
+        return _left;
+    }
+
+    /**
+     *  @private
+     */
+    public function set left(value:Object):void
+    {
+        if (_left == value)
+            return;
+
+        _left = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  owner
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _owner:DisplayObjectContainer;
+
+    /**
+     *  @inheritDoc
+     */
+    public function get owner():DisplayObjectContainer
+    {
+        return _owner ? _owner : parent;
+    }
+
+    public function set owner(value:DisplayObjectContainer):void
+    {
+        _owner = value;
+    }
+
+    //----------------------------------
+    //  percentHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the percentHeight property.
+     */
+    private var _percentHeight:Number;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get percentHeight():Number
+    {
+        return _percentHeight;
+    }
+
+    /**
+     *  @private
+     */
+    public function set percentHeight(value:Number):void
+    {
+        if (_percentHeight == value)
+            return;
+
+        _percentHeight = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  percentWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the percentWidth property.
+     */
+    private var _percentWidth:Number;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @copy mx.core.UIComponent#percentWidth
+     */
+    public function get percentWidth():Number
+    {
+        return _percentWidth;
+    }
+
+    /**
+     *  @private
+     */
+    public function set percentWidth(value:Number):void
+    {
+        if (_percentWidth == value)
+            return;
+
+        _percentWidth = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  right
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the right property.
+     */
+    private var _right:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get right():Object
+    {
+        return _right;
+    }
+
+    /**
+     *  @private
+     */
+    public function set right(value:Object):void
+    {
+        if (_right == value)
+            return;
+
+        _right = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  top
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the top property.
+     */
+    private var _top:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get top():Object
+    {
+        return _top;
+    }
+
+    /**
+     *  @private
+     */
+    public function set top(value:Object):void
+    {
+        if (_top == value)
+            return;
+
+        _top = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  verticalCenter
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the verticalCenter property.
+     */
+    private var _verticalCenter:Object;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  @inheritDoc
+     */
+    public function get verticalCenter():Object
+    {
+        return _verticalCenter;
+    }
+
+    /**
+     *  @private
+     */
+    public function set verticalCenter(value:Object):void
+    {
+        if (_verticalCenter == value)
+            return;
+
+        _verticalCenter = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  width
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    [PercentProxy("percentWidth")]
+    override public function get width():Number
+    {
+        return super.width;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set width(value:Number):void
+    {
+        if (super.width == value)
+            return;
+
+        super.width = value;
+        invalidateParentSizeAndDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Gets the transformation matrix.
+     *
+     *  @return Returns the transformation matrix for this element, or null
+     *  if it is delta identity.
+     */
+    protected function computeMatrix():Matrix
+    {
+        return transform.matrix;
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getLayoutBoundsX(postTransform:Boolean = true):Number
+    {
+        var m:Matrix = postTransform ? computeMatrix() : null;
+        if (!m)
+            return x;
+
+        var topLeft:Point = new Point(0, 0);
+        MatrixUtil.transformBounds(new Point(width, height), m, topLeft);
+        return topLeft.x;
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getLayoutBoundsY(postTransform:Boolean = true):Number
+    {
+        var m:Matrix = postTransform ? computeMatrix() : null;
+        if (!m)
+            return y;
+
+        var topLeft:Point = new Point(0, 0);
+        MatrixUtil.transformBounds(new Point(width, height), m, topLeft);
+        return topLeft.y;
+    }
+
+    /**
+     *  @inheirtDoc
+     */
+    public function getLayoutBoundsWidth(postTransform:Boolean = true):Number
+    {
+        return transformWidthForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getLayoutBoundsHeight(postTransform:Boolean = true):Number
+    {
+        return transformHeightForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getMaxBoundsWidth(postTransform:Boolean = true):Number
+    {
+        return transformWidthForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getMaxBoundsHeight(postTransform:Boolean = true):Number
+    {
+        return transformHeightForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getMinBoundsWidth(postTransform:Boolean = true):Number
+    {
+        return transformWidthForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getMinBoundsHeight(postTransform:Boolean = true):Number
+    {
+        return transformHeightForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getPreferredBoundsWidth(postTransform:Boolean = true):Number
+    {
+        return transformWidthForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getPreferredBoundsHeight(postTransform:Boolean = true):Number
+    {
+        return transformHeightForLayout(width, height, postTransform);
+    }
+
+    /**
+     *  Helper method to invalidate parent size and display list if
+     *  this object affects its layout (includeInLayout is true).
+     */
+    protected function invalidateParentSizeAndDisplayList():void
+    {
+        if (!includeInLayout)
+            return;
+
+        var p:IInvalidating = parent as IInvalidating;
+        if (!p)
+            return;
+
+        p.invalidateSize();
+        p.invalidateDisplayList();
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function setLayoutBoundsPosition(newBoundsX:Number, newBoundsY:Number, postTransform:Boolean = true):void
+    {
+        var currentBoundsX:Number = getLayoutBoundsX(postTransform);
+        var currentBoundsY:Number = getLayoutBoundsY(postTransform);
+
+        var newX:Number = x + newBoundsX - currentBoundsX;
+        var newY:Number = y + newBoundsY - currentBoundsY;
+
+        if (newX != x || newY != y)
+        {
+            super.x = newX;
+            super.y = newY;
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function setLayoutBoundsSize(width:Number = NaN,
+                                  height:Number = NaN,
+                                  postTransform:Boolean = true):void
+    {
+        // Calculate the width and height pre-transform:
+        var m:Matrix;
+        if (postTransform)
+            m = computeMatrix();
+        if (!m)
+        {
+            if (isNaN(width))
+                width = this.width;
+            if (isNaN(height))
+                height = this.height;
+        }
+        else
+        {
+            var newSize:Point = MatrixUtil.fitBounds(width, height, m,
+                                                     this.width,
+                                                     this.height,
+                                                     this.width, this.height,
+                                                     this.width, this.height);
+
+            if (newSize)
+            {
+                width = newSize.x;
+                height = newSize.y;
+            }
+            else
+            {
+                width = this.width;
+                height = this.height;
+            }
+        }
+
+        if (this.width != width || this.height != height)
+        {
+            super.width = width;
+            super.height = height;
+        }
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getLayoutMatrix():Matrix
+    {
+        // flash returns copies.
+        return transform.matrix;
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function setLayoutMatrix(value:Matrix, triggerLayout:Boolean):void
+    {
+        // flash will make a copy of this on assignment.
+        transform.matrix = value;
+
+        if (triggerLayout)
+            invalidateParentSizeAndDisplayList();
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getLayoutMatrix3D():Matrix3D
+    {
+        // flash returns copies.
+        return transform.matrix3D;
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function setLayoutMatrix3D(value:Matrix3D, triggerLayout:Boolean):void
+    {
+        // flash will make a copy of this on assignment.
+        transform.matrix3D = value;
+
+        if (triggerLayout)
+            invalidateParentSizeAndDisplayList();
+    }
+
+    /**
+     *  Transform the element's size.
+     *
+     *  @param width The target pre-transform width.
+     *
+     *  @param height The target pre-transform height.
+     *
+     *  @return Returns the transformed width. Transformation is this element's
+     *  layout transformation matrix.
+     */
+    protected function transformWidthForLayout(width:Number,
+                                               height:Number,
+                                               postTransform:Boolean = true):Number
+    {
+        if (postTransform)
+        {
+            var m:Matrix = computeMatrix();
+            if (m)
+            {
+                var size:Point = new Point(width, height);
+                width = MatrixUtil.transformSize(size, m).x;
+            }
+        }
+
+        return width;
+    }
+
+    /**
+     *  Transform the element's size.
+     *
+     *  @param width The target pre-transform width.
+     *
+     *  @param height The target pre-transform height.
+     *
+     *  @return Returns the transformed height. Transformation is this element's
+     *  layout transformation matrix.
+     */
+    protected function transformHeightForLayout(width:Number,
+                                                height:Number,
+                                                postTransform:Boolean = true):Number
+    {
+        if (postTransform)
+        {
+            var m:Matrix = computeMatrix();
+            if (m)
+            {
+                var size:Point = new Point(width, height);
+                height = MatrixUtil.transformSize(size, m).y;
+            }
+        }
+
+        return height;
+    }
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5140
Author:   gauravj@adobe.com
Date:     2009-03-02T20:09:24.249785Z

Log Message:
-----------
Removing [ExcludeClass] from classes outside the package.

QE Notes: None.
Doc Notes: None.
tests: checkintests

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

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -1300,8 +1300,6 @@
 }
 }

-[ExcludeClass]
-
 import mx.core.ILayoutElement;
 import mx.containers.utilityClasses.FlexChildInfo;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5226
Author:   hmuller@adobe.com
Date:     2009-03-10T22:28:07.063836Z

Log Message:
-----------
Added support for dynamic DataGroup dataProvider changes for virtual layouts.

QE Notes:
Doc Notes:
Bugs:
Reviewer: Evtim

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

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -845,6 +845,17 @@
      */
      private function updateLLV(layoutTarget:GroupBase):void
      {
+        var contentChangeDeltas:Vector.<int> = layoutTarget.mx_internal::contentChangeDeltas;
+        if (contentChangeDeltas)
+            for(var i:int = 0; i < contentChangeDeltas.length; i++)
+            {
+                var delta:int = contentChangeDeltas[i];
+                if (delta < 0)
+                    llv.remove(-(delta + 1));
+                else
+                    llv.insert(delta - 1);
+            }
+
         var typicalElt:ILayoutElement = typicalLayoutElement;
         if (typicalElt)
         {


fix submenu

fix submenu

--- src/milkshape/media/flash/src/cc/milkshape/main/SubMenu.as
+++ src/milkshape/media/flash/src/cc/milkshape/main/SubMenu.as
@@ -40,7 +40,7 @@

 		private function _clickHandlerRSS(e:MouseEvent):void
 		{
-			navigateToURL(new URLRequest(Constance.url('/square/feeds/rss/')), 'blank');
+			navigateToURL(new URLRequest(Constance.url('square/feeds/rss/')), 'blank');
 		}

 	}


Line Ending Normalization Added working line ending normalization

--- HLSPlugin/src/com/kaltura/hls/manifest/HLSManifestParser.as
+++ HLSPlugin/src/com/kaltura/hls/manifest/HLSManifestParser.as
@@ -65,7 +65,8 @@
 			//trace("BASE URL " + baseUrl);

 			// Normalize line endings.
-			input = input.replace("\r\n", "\n");
+			var windowsEndingPattern:RegExp = /\r\n/g;
+			input = input.replace(windowsEndingPattern, "\n");

 			// split into array.
 			var lines:Array = input.split("\n");


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/charts/src/mx/styles/metadata/FocusStyles.as
+++ frameworks/projects/charts/src/mx/styles/metadata/FocusStyles.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Specifies the alpha transparency value of the focus skin.
+ *
+ *  @default 0.4
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="focusAlpha", type="Number", inherit="no")]
+
+/**
+ *  Specifies which corners of the focus rectangle should be rounded.
+ *  This value is a space-separated String that can contain any
+ *  combination of "tl", "tr", "bl"
+ *  and "br".
+ *  For example, to specify that the right side corners should be rounded,
+ *  but the left side corners should be square, use "tr br".
+ *  The cornerRadius style property specifies
+ *  the radius of the rounded corners.
+ *  The default value depends on the component class; if not overridden for
+ *  the class, default value is "tl tr bl br".
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="focusRoundedCorners", type="String", inherit="no")]


fix ambiguous reference to getQualifiedClassName()

--- src/aerys/minko/scene/SceneIterator.as
+++ src/aerys/minko/scene/SceneIterator.as
@@ -3,8 +3,6 @@
 	import aerys.minko.scene.node.Group;
 	import aerys.minko.scene.node.ISceneNode;
 	import aerys.minko.type.binding.DataBindings;
-
-	import avmplus.getQualifiedClassName;

 	import flash.utils.Dictionary;
 	import flash.utils.Proxy;


Fixed bad access to Vector3 in Matrix4x4.getRotationQuaternion.

--- src/aerys/minko/type/math/Matrix4x4.as
+++ src/aerys/minko/type/math/Matrix4x4.as
@@ -705,7 +705,7 @@
 			var rotation	: Vector3D			= components[1];

 			output ||= new Quaternion();
-			output.set(rotation[3], rotation[0], rotation[1], rotation[2]);
+			output.set(rotation.w, rotation.x, rotation.y, rotation.z);

 			return output;
 		}


Add tags to spawned entities

Add tags to spawned entities


Added FunctionSequence to flare.animate
Updated visibility of Transition._start to protected
Renamed Tween._start to Tween._from
Updated Chart demo to use new AxisLayout scale type setting
Added OperatorSequence to flare.vis.operator
Added scale and init parameters to AxisLayout

git-svn-id: 6aa7ccb0a2048310a30f08a72aaff4ca39d980ed@118 91848ab2-c4ae-4e4f-8e6a-6a52ea0dccc3

--- flare.demos/flare/demos/Chart.as
+++ flare.demos/flare/demos/Chart.as
@@ -4,7 +4,6 @@
 	import flare.util.Button;
 	import flare.util.Stats;
 	import flare.vis.Visualization;
-	import flare.vis.axis.CartesianAxes;
 	import flare.vis.controls.HoverControl;
 	import flare.vis.controls.SelectionControl;
 	import flare.vis.data.Data;
@@ -72,14 +71,13 @@
 			sc.onDeselect = hc.onRollOut;

 			// add scale update button
-			var flip:Boolean = false;
 			var bs:Button = new Button("Change Scale");
 			bs.addEventListener(MouseEvent.CLICK, function(evt:MouseEvent):void {
 				// change the x-axis scale and animate the result
-				vis.xyAxes.xAxis.axisScale =
-					flip ? Scales.linear(stats1) : Scales.log(stats1);
+				var al:AxisLayout = vis.operators[0] as AxisLayout;
+				al.xScaleType =
+					al.xScaleType==Scales.LOG ? Scales.LINEAR : Scales.LOG;
 				vis.update(new Transitioner(2)).play();
-				flip = !flip;
 			});
 			bs.x = 10; bs.y = HEIGHT - 10 - bs.height;
 			addChild(bs);


simplified backwards compatibility code.

--- WeaveUI/src/weave/ui/DataFilter.as
+++ WeaveUI/src/weave/ui/DataFilter.as
@@ -15,10 +15,6 @@

 package weave.ui
 {
-	import avmplus.getQualifiedClassName;
-
-	import weave.api.core.DynamicState;
-	import weave.api.objectWasDisposed;
 	import weave.editors.StringDataFilterEditor;

 	[ExcludeClass]
@@ -27,25 +23,9 @@
 	{
 		public function DataFilter()
 		{
-			super();
-			callLater(init);
-		}
-
-		private function init():void
-		{
-			if (objectWasDisposed(this))
-				return;
-
-			editor.setSessionState([
-				DynamicState.create(
-					null,
-					getQualifiedClassName(StringDataFilterEditor),
-					{
-						layoutMode: MenuToolViewStack.LAYOUT_COMBO,
-						showToggle: true
-					}
-				)
-			], true);
+			var sdfe:StringDataFilterEditor = editor.requestLocalObject(StringDataFilterEditor, false);
+			sdfe.layoutMode.value = MenuToolViewStack.LAYOUT_COMBO;
+			sdfe.showToggle.value = true;
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11332
Author:   gosmith@adobe.com
Date:     2009-10-30T21:40:07.686464Z

Log Message:
-----------
Added the beginnings of accessibility support for Spark's Window and WindowedApplication.

The new WindowAccImpl and WindowedApplicationAccImpl classes live in airframework.swc, not spark.swc, because this is where Window and WindowedApplication live. All AIR components for both MX and Spark are in airframework.swc, which gets compiled against airglobal.swc rather than playerglobal.swc in order to get AIR-specific classes like NativeWindow.

The trunk has AIR 1.5.2, which is the current version. This version has classes like AccessibilityImplementation, but they aren't operational; there is no actual MSAA support. However, AIR 2.0 will support MSAA, so accessibility code compiled against 1.5.2 should start to work in 2.0.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Evtim
Tests run: ant checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowedApplicationAccImpl.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>

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

--- frameworks/projects/airspark/src/spark/components/Window.as
+++ frameworks/projects/airspark/src/spark/components/Window.as
@@ -335,6 +335,8 @@
 //--------------------------------------
 //  Other metadata
 //--------------------------------------
+
+[AccessibilityClass(implementation="spark.accessibility.WindowAccImpl")]

 /**
  *  The frameworks must be initialized by WindowedSystemManager.
@@ -456,6 +458,18 @@

     //--------------------------------------------------------------------------
     //
+    //  Class mixins
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Placeholder for mixin by WindowAccImpl.
+     */
+    mx_internal static var createAccessibilityImplementation:Function;
+
+    //--------------------------------------------------------------------------
+    //
     //  Class constants
     //
     //--------------------------------------------------------------------------
@@ -1678,68 +1692,18 @@

     //--------------------------------------------------------------------------
     //
-    //  Overridden methods: SkinnableContainer
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function partAdded(partName:String, instance:Object):void
-    {
-        super.partAdded(partName, instance);
-
-        if (instance == statusBar)
-        {
-            statusBar.visible = _showStatusBar;
-            statusBar.includeInLayout = _showStatusBar;
-            showStatusBarChanged = false;
-        }
-        else if (instance == titleBar)
-        {
-            if (!nativeWindow.closed)
-            {
-                // If the initial title is the default and the native window is set
-                // from the initial window settings,
-                // then use the initial window settings title.
-                if (_title == "" && systemManager.stage.nativeWindow.title != null)
-                    _title = systemManager.stage.nativeWindow.title;
-                else
-                    systemManager.stage.nativeWindow.title = _title;
-            }
-
-            titleBar.title = _title;
-            titleChanged = false;
-        }
-        else if (instance == statusText)
-        {
-            statusText.text = status;
-            statusChanged = false;
-        }
-        else if (instance == gripper)
-        {
-            gripper.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
-        }
-    }
-
-    /**
-     *  @private
-     */
-    override protected function partRemoved(partName:String, instance:Object):void
-    {
-        super.partRemoved(partName, instance);
-
-        if (instance == gripper)
-        {
-            gripper.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
-        }
-    }
-
-    //--------------------------------------------------------------------------
-    //
     //  Overridden methods: UIComponent
     //
     //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function initializeAccessibility():void
+    {
+        if (Window.createAccessibilityImplementation != null)
+            Window.createAccessibilityImplementation(this);
+    }

     /**
      *  @private
@@ -1947,6 +1911,65 @@
             tmp.x = x;
             tmp.y = y;
             nativeWindow.bounds = tmp;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: SkinnableContainer
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == statusBar)
+        {
+            statusBar.visible = _showStatusBar;
+            statusBar.includeInLayout = _showStatusBar;
+            showStatusBarChanged = false;
+        }
+        else if (instance == titleBar)
+        {
+            if (!nativeWindow.closed)
+            {
+                // If the initial title is the default and the native window is set
+                // from the initial window settings,
+                // then use the initial window settings title.
+                if (_title == "" && systemManager.stage.nativeWindow.title != null)
+                    _title = systemManager.stage.nativeWindow.title;
+                else
+                    systemManager.stage.nativeWindow.title = _title;
+            }
+
+            titleBar.title = _title;
+            titleChanged = false;
+        }
+        else if (instance == statusText)
+        {
+            statusText.text = status;
+            statusChanged = false;
+        }
+        else if (instance == gripper)
+        {
+            gripper.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function partRemoved(partName:String, instance:Object):void
+    {
+        super.partRemoved(partName, instance);
+
+        if (instance == gripper)
+        {
+            gripper.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
         }
     }


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

--- frameworks/projects/framework/src/mx/events/DynamicEvent.as
+++ frameworks/projects/framework/src/mx/events/DynamicEvent.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: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

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

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

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

--- frameworks/projects/mx/src/mx/styles/metadata/SkinStyles.as
+++ frameworks/projects/mx/src/mx/styles/metadata/SkinStyles.as
@@ -1,4 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

+/**
+ *  Color of the border.
+ *  The following controls support this style: Button, CheckBox,
+ *  ComboBox, MenuBar,
+ *  NumericStepper, ProgressBar, RadioButton, ScrollBar, Slider, and any
+ *  components that support the borderStyle style.
+ *  The default value depends on the component class;
+ *  if not overridden for the class, the default value is 0xB7BABC.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="borderColor", type="uint", format="Color", inherit="no", theme="halo")]

 /**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/mx/src/mx/styles/metadata/TextStyles.as
+++ frameworks/projects/mx/src/mx/styles/metadata/TextStyles.as
@@ -1,4 +1,25 @@
-
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Color of text in the component, including the component label.
+ *
+ *  The default value for the Halo theme is 0x0B333C.
+ *  The default value for the Spark theme is 0x000000.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="color", type="uint", format="Color", inherit="yes")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 11899
Author:   rfrishbe@adobe.com
Date:     2009-11-17T18:24:33.641492Z

Log Message:
-----------
Cleaning up some FIXMEs assigned to me in the code:

In UIMC, we now call invalidateParentSizeAndDL() on setting explicitMaxWidth.  We already do this for explicitMaxHeight.  I also changed a FIXME around invalidateLayering() in to a TODO.

In GroupBase, I removed a FIXME around the focusPane as we are using the overlay API now.

In DataGroup, I changed a FIXME to a TODO with some clarifying comments.

In SkinnableContainer, I removed a FIXME and just commented on why it was needed.  I also removed another FIXME and some code now that it seems like we don’t need to do the array conversion with IDefferedInstance since the compiler handles it for us now.

In SkinnableDataContainer, I changed a FIXME around event delegation to a TODO.

In DropDownController, when you drag around the volume bar, the popup stays open even if the mouse isn’t over the open button or the dropdown.  However, when the mouse is released, we should immediately close the drop down, rather than wait for another mouseMove to occur.  This involved some refactoring of some code in to a private helper method.  The "@private" protected methods in DropDownController should probably be made mx_internal.  I will do that in a subsequent checkin.

QE notes: -
Doc notes: -
Bugs: -
Reviewer: Jason for the DropDownController change, Glenn for the rest
Tests run: checkintests, mustella FCK, Panel, SkinnableContainer, DropDownList
Is noteworthy for integration: No

Modified Paths:
--------------
<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/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.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/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -533,7 +533,7 @@
             {
                 for (index = indexToRenderer.length - 1; index >= 0; index--)
                 {
-                    // FIXME (rfrishbe): we can't key off of the oldDataProvider for
+                    // TODO (rfrishbe): we can't key off of the oldDataProvider for
                     // the item because it might not be there anymore (for instance,
                     // in a dataProvider reset where the new data is loaded into
                     // the dataProvider--the dataProvider doesn't actually change,
@@ -543,6 +543,9 @@
                     //       and there is an itemRenderer or itemRendererFunction
                     //   2.  The item itself

+                    // Probably could fix above by also storing indexToData[], but that doesn't
+                    // seem worth it.  Sending in the wrong item here doesn't result in a big error...
+                    // just the event with have the wrong item associated with it
                     renderer = indexToRenderer[index] as IVisualElement;
                     if (renderer is IDataRenderer && (itemRenderer != null || itemRendererFunction != null))
                         item = IDataRenderer(renderer).data;
@@ -558,7 +561,7 @@
                 var startIndex:int = virtualLayoutStartIndex; // itemRemoved decrements virtualLayoutStartIndex
                 for (index = endIndex; (index >= 0) && (index >= startIndex); index--)
                 {
-                    // FIXME (rfrishbe): same as above
+                    // TODO (rfrishbe): same as above

                     renderer = indexToRenderer[index] as IVisualElement;
                     if (renderer is IDataRenderer && (itemRenderer != null || itemRendererFunction != null))


FLEX-34634 - add null check (patch provided by Gareth Daniel Smith)

Signed-off-by: Erik de Bruin <c195b508e6f0c57aeafdb5e96947e2b79e6a4b40@ixsoftware.nl>

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -1751,7 +1751,7 @@
                 virtualRendererIndices.splice(vrItemIndex, 1);
         }

-        // Remove the old renderer at index from indexToRenderer[], from the
+        // Remove the old renderer at index (if any) from indexToRenderer[], from the
         // DataGroup, and clear its data property (if any).

         const oldRenderer:IVisualElement = indexToRenderer[index];
@@ -1759,6 +1759,8 @@
         if (indexToRenderer.length > index)
             indexToRenderer.splice(index, 1);

+        if (oldRenderer)
+        {
         dispatchEvent(new RendererExistenceEvent(
             RendererExistenceEvent.RENDERER_REMOVE, false, false, oldRenderer, index, item));

@@ -1768,6 +1770,7 @@
         var child:DisplayObject = oldRenderer as DisplayObject;
         if (child)
             super.removeChild(child);
+        }

         invalidateSize();
         invalidateDisplayList();


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

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

 package spark.events
 {


- RMTP fixes - additional play/playing events

--- src/flash/htmlelements/VideoElement.as
+++ src/flash/htmlelements/VideoElement.as
@@ -1,5 +1,4 @@
-
-package htmlelements
+package htmlelements
 {
 	import flash.display.Sprite;
 	import flash.events.*;
@@ -8,92 +7,95 @@
 	import flash.media.Video;
 	import flash.media.SoundTransform;
 	import flash.utils.Timer;
-
+
 	import FlashMediaElement;
 	import HtmlMediaEvent;
-
+
 	public class VideoElement extends Sprite implements IMediaElement
 	{
 		private var _currentUrl:String = "";
 		private var _autoplay:Boolean = true;
-
+
         private var _connection:NetConnection;
         private var _stream:NetStream;
         private var _video:Video;
 		private var _element:FlashMediaElement;
 		private var _soundTransform;
 		private var _oldVolume:Number = 1;
-
+
 		// event values
 		private var _duration:Number = 0;
 		private var _framerate:Number;
 		private var _isPaused:Boolean = true;
 		private var _isEnded:Boolean = false;
-		private var _isLoaded:Boolean = false;
 		private var _volume:Number = 1;
 		private var _isMuted:Boolean = false;
-
+
 		private var _bytesLoaded:Number = 0;
 		private var _bytesTotal:Number = 0;
 		private var _bufferedTime:Number = 0;
-
+
 		private var _videoWidth:Number = -1;
 		private var _videoHeight:Number = -1;
-
+
 		private var _timer:Timer;

 		private var _isRTMP:Boolean = false;
-		private var _playRTMPasap:Boolean = false;
-
+		private var _isConnected:Boolean = false;
+		private var _playWhenConnected:Boolean = false;
+		private var _hasStartedPlaying:Boolean = false;
+

 		public function get video():Video {
 			return _video;
 		}
-
+
 		public function get videoHeight():Number {
 			return _videoHeight;
 		}
-
+
 		public function get videoWidth():Number {
 			return _videoWidth;
 		}
-
-
+
+
 		public function duration():Number {
 			return _duration;
 		}
-
+
 		public function currentTime():Number {
 			return _stream.time;
 		}
-
-
-
+
+		// (1) load()
+		// calls _connection.connect();
+		// waits for NetConnection.Connect.Success
+		// _stream gets created
+
+
 		public function VideoElement(element:FlashMediaElement, autoplay:Boolean, timerRate:Number)
 		{
 			_element = element;
 			_autoplay = autoplay;
-
+
 			_video = new Video();
 			addChild(_video);
-
+
             _connection = new NetConnection();
             _connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
             _connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
-
-            //will be called in load()
-            //_connection.connect(null);
-
+			//_connection.connect(null);
+
 			_timer = new Timer(timerRate);
 			_timer.addEventListener("timer", timerHandler);
-
-		}
-
+
+		}
+
 		private function timerHandler(e:TimerEvent) {

 			_bytesLoaded = _stream.bytesLoaded;
 			_bytesTotal = _stream.bytesTotal;
-
+
 			sendEvent(HtmlMediaEvent.TIMEUPDATE);

 			trace("bytes", _bytesLoaded, _bytesTotal);
@@ -101,18 +103,18 @@
 			if (_bytesLoaded < _bytesTotal)
 				sendEvent(HtmlMediaEvent.PROGRESS);
 		}
-
+
 		// internal events
         private function netStatusHandler(event:NetStatusEvent):void {
 			trace("netStatus", event.info.code);

 			switch (event.info.code) {
-
+
 				case "NetStream.Buffer.Empty":
                 case "NetStream.Buffer.Full":
 					_bytesLoaded = _stream.bytesLoaded;
 					_bytesTotal = _stream.bytesTotal;
-
+
 					sendEvent(HtmlMediaEvent.PROGRESS);
                     break;

@@ -122,122 +124,128 @@
                 case "NetStream.Play.StreamNotFound":
                     trace("Unable to locate video");
                     break;
-
+
 				// STREAM
                 case "NetStream.Play.Start":
 					_isPaused = false;
 					sendEvent(HtmlMediaEvent.PLAY);
+					sendEvent(HtmlMediaEvent.PLAYING);
 					_timer.start();
                     break;
-
+
                 case "NetStream.Seek.Notify":
 					sendEvent(HtmlMediaEvent.SEEKED);
                     break;
-
+
 				case "NetStream.Pause.Notify":
 					_isPaused = true;
-					sendEvent(HtmlMediaEvent.PAUSED);
+					sendEvent(HtmlMediaEvent.PAUSE);
                     break;
-
+
 				case "NetStream.Play.Stop":
 					_isPaused = false;
 					_timer.stop();
 					sendEvent(HtmlMediaEvent.ENDED);
                     break;
-
+
             }
         }
-
+
         private function connectStream():void {
 			trace("connectStream");
             _stream = new NetStream(_connection);

 			_stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); // same event as connection
             _stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
-
+
 			var customClient:Object = new Object();
 			customClient.onMetaData = onMetaDataHandler;
 			_stream.client = customClient;

-
-            _video.attachNetStream(_stream);
-
-
-			if (_playRTMPasap) {
+            _video.attachNetStream(_stream);
+
+			_isConnected = true;
+
+			if (_playWhenConnected && !_hasStartedPlaying) {
 				play();
-				_playRTMPasap=false;
-			}
+				_playWhenConnected = false;
+			}
+
         }
-
+
         private function securityErrorHandler(event:SecurityErrorEvent):void {
             trace("securityErrorHandler: " + event);
         }
-
+
 		private function asyncErrorHandler(event:AsyncErrorEvent):void {
             // ignore AsyncErrorEvent events.
         }
-
-
+
+
 		private function onMetaDataHandler(info:Object):void {
 			_duration = info.duration;
 			_framerate = info.framerate;
 			_videoWidth = info.width;
 			_videoHeight = info.height;
-
+
 			// set size?
-
+
 			sendEvent(HtmlMediaEvent.LOADEDMETADATA);
 		}
-
-
-
-
+
+
+
+
 		// interface members
 		public function setSrc(url:String):void {
-			if (_isLoaded) {
+			if (_isConnected && _stream) {
 				// stop and restart
 				_stream.pause();
 			}

-			_currentUrl = url;
-
-
 			_isRTMP = !!_currentUrl.match(/^rtmp(s|t|e|te)?\:\/\//);
-		}
-
+			_currentUrl = url;
+			_isConnected = false;
+			_hasStartedPlaying = false;
+		}
+
 		public function load():void {
-			// there really isn't an equivalent here
-			if (_stream)
+			// as far as I know there is no way to start downloading a file without playing it (preload="auto" in HTML5)
+			// so this "load" just begins a Flash connection
+			if (_isConnected && _stream) {
 				_stream.pause();
-
-			// there really isn't an equivalent here
+			}
+			_isConnected = false;
+
 			if (_isRTMP) {
 				_connection.connect(_currentUrl.replace(/\/[^\/]+$/,"/"));
 			} else {
 				_connection.connect(null);
 			}
-			_isLoaded =false;
-		}
-
-		public function play():void {
-
-			// RTMP streams have to wait for the first NetConnection.Connect.Success event to begin playing
-			if (_isRTMP && !_stream) {
-				trace("Delaying RTMP play()");
-				_playRTMPasap=true;
-				return;
-			}
-			_playRTMPasap=false;
-
-
-			if (_isLoaded) {
-				_stream.resume();
-				_timer.start();
-				_isPaused = false;
-				_isLoaded = true;
-				sendEvent(HtmlMediaEvent.PLAYING);
+			// in a few moments the "NetConnection.Connect.Success" event will fire
+			// and call createConnection which finishes the "load" sequence
+
+
+		}
+
+		public function play():void {
+
+			if (!_hasStartedPlaying && !_isConnected) {
+				_playWhenConnected = true;
+				load();
+				return;
+			}
+
+			if (_hasStartedPlaying) {
+				if (_isPaused) {
+					_stream.resume();
+					_timer.start();
+					_isPaused = false;
+					sendEvent(HtmlMediaEvent.PLAY);
+					sendEvent(HtmlMediaEvent.PLAYING);
+				}
 			} else {
-				// error: play() called without a URL
+
 				if (_isRTMP) {
 					_stream.play(_currentUrl.split("/").pop());
 				} else {
@@ -245,58 +253,68 @@
 				}
 				_timer.start();
 				_isPaused = false;
-				_isLoaded = true;
-				sendEvent(HtmlMediaEvent.PLAYING);
+				sendEvent(HtmlMediaEvent.PLAY);
+				sendEvent(HtmlMediaEvent.PLAYING);
+				_hasStartedPlaying = true;
 			}

 		}
-
+
 		public function pause():void {
+			if (_stream == null)
+				return;
+
 			_stream.pause();
 			_isPaused = true;
 			_timer.stop();
-
+
 			_isPaused = true;
-			sendEvent(HtmlMediaEvent.PAUSED);
+			sendEvent(HtmlMediaEvent.PAUSE);
 		}
-
+
 		public function setCurrentTime(pos:Number):void {
+			if (_stream == null)
+				return;
+
 			_stream.seek(pos);
 			sendEvent(HtmlMediaEvent.SEEKED);
 		}
-
+
 		public function setVolume(volume:Number):void {
+			if (_stream == null)
+				return;
+
 			_soundTransform = new SoundTransform(volume);
 			_stream.soundTransform = _soundTransform;
 			_volume = volume;
-
+
 			_isMuted = (_volume == 0);
-
+
 			sendEvent(HtmlMediaEvent.VOLUMECHANGE);
 		}

-
+
 		public function setMuted(muted:Boolean):void {
-
+
 			if (_isMuted == muted)
 				return;
-
+
 			if (muted) {
 				_oldVolume = _stream.soundTransform.volume;
 				setVolume(0);
 			} else {
 				setVolume(_oldVolume);
 			}
-
+
 			_isMuted = muted;
 		}

-
+
 		private function sendEvent(eventName:String) {
-
+
 			// calculate this to mimic HTML5
 			_bufferedTime = _bytesLoaded / _bytesTotal + _duration;
-
+
 			// build JSON
 			var values:String =
 							"{duration:" + _duration +
@@ -313,9 +331,8 @@
 							",videoWidth:" + _videoWidth +
 							",videoHeight:" + _videoHeight +
 							"}";
-
+
 			_element.sendEvent(eventName, values);
 		}
 	}
-}
-
+}


array copy added to managed array

array copy added to managed array

--- src/Modi/ManagedArray.as
+++ src/Modi/ManagedArray.as
@@ -495,5 +495,17 @@
 			}

 		}
+
+        public function arrayCopy():Array
+        {
+            var array:Array = [];
+
+            for (var i:int = 0; i < _data.length; i++)
+            {
+                array.push(_data[i]);
+            }
+
+            return array;
+        }
 	}
 }


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

--- frameworks/projects/mx/src/mx/core/ContainerLayout.as
+++ frameworks/projects/mx/src/mx/core/ContainerLayout.as
@@ -18,6 +18,11 @@
  *
  *  @see mx.containers.Panel#layout
  *  @see mx.core.Application#layout
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public final class ContainerLayout
 {
@@ -61,6 +66,11 @@
 	 *  horizontalGap, verticalGap,
 	 *  horizontalAlign, andverticalAlign
 	 *  styles are ignored.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const ABSOLUTE:String = "absolute";

@@ -82,6 +92,11 @@
 	 *  paddingRight, and paddingBottom styles
 	 *  control the space between the border of the container
 	 *  and the children.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const VERTICAL:String = "vertical";

@@ -103,6 +118,11 @@
 	 *  paddingRight, and paddingBottom styles
 	 *  control the space between the border of the container
 	 *  and the children.

+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const HORIZONTAL:String = "horizontal";
 }


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

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

 package mx.events
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPCube.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPCube.as
@@ -0,0 +1,202 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.olap
+{
+import mx.collections.ICollectionView;
+import mx.collections.IList;
+import mx.rpc.AsyncToken;
+
+/**
+ *  The IOLAPCube interface represents an OLAP cube that holds
+ *  an N-dimensional representation of a flat data set.
+ *  You use an OLAP schema to define how the cube represents the
+ *  input flat data set.
+ *
+ *
An OLAP cube is analogous to a table in a relational database.
+ *  Where a table in a relational database has two dimensions,
+ *  an OLAP cube can have any number of dimensions.
+ *  In its simplest form, the dimensions of an OLAP cube correspond
+ *  to a field of the flat data set.

+ *
+ *
After setting the schema of the OLAP cube, you must call
+ *  the IOLAPCube.refresh() method to build the cube.
+ *  Upon completion of cube initialization, the OLAP cube dispatches
+ *  the complete event to signal that the cube is ready to query.

+ *.
+ *  @see mx.olap.OLAPCube
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public interface IOLAPCube
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  dimensions
+	//----------------------------------
+
+	/**
+     *  All dimensions in the cube, as a list of IOLAPDimension instances.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get dimensions():IList; //of IOLAPDimensions
+
+    //----------------------------------
+	//  name
+	//----------------------------------
+
+    /**
+     *  The name of the OLAP cube.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get name():String;
+
+    //--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Aborts a query that has been submitted for execution.
+     *
+     *  @param query The query to abort.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function cancelQuery(query:IOLAPQuery):void;
+
+    /**
+     *  Aborts the current cube refresh, if one is executing.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function cancelRefresh():void;
+
+    /**
+     *  Queues an OLAP query for execution.
+     *  After you call the refresh() method to update the cube,
+     *  you must wait for a complete event
+     *  before you call the execute() method.
+     *
+     *
OLAP cubes can be complex, so you do not want your application
+     *  to pause while Flex calculates the results of your OLAP query.
+     *  The execute() method returns an instance of the AsyncToken class,
+     *  which lets you set up handlers for asynchronous operations so that
+     *  your application can continue to execute during query processing.

+     *
+     *
When using the AsyncToken class, you set up two functions to handle the query results.
+     *  In this example, the showResult() function handles the query results when the query succeeds,
+     *  and the showFault() function handles any errors detected during query execution:

+     *
+     *

+     *  <mx:Script>
+     *
+     *          // Function to execute a query.
+     *          private function runQuery(cube:IOLAPCube):void {
+     *              // Create a query instance.
+     *              var query:IOLAPQuery = getQuery(cube);
+     *              // Execute the query.
+     *              var token:AsyncToken = cube.execute(query);
+     *              // Set up handlers for the query results.
+     *              token.addResponder(new AsyncResponder(showResult, showFault));
+     *          }
+     *
+     *          // Handle a query fault.
+     *          private function showFault(result:Object, token:Object):void {
+     *              Alert.show("Error in query.");
+     *          }
+     *
+     *          // Handle a query success.
+     *          private function showResult(result:Object, token:Object):void {
+     *              if (!result) {
+     *                  Alert.show("No results from query.");
+     *                  return;
+     *              }
+     *
+     *              myOLAPDG.dataProvider= result as OLAPResult;
+     *          }
+     *  </mx:Script>
+     *
+     *  <mx:OLAPDataGrid id="myOLAPDG" width="100%" height="100%" />
+     *

+     *
+     *  @param query The query to execute, represented by an IOLAPQuery instance.
+     *
+     *  @return An AsyncToken instance.
+     *
+     *  @see mx.rpc.AsyncToken
+     *  @see mx.rpc.AsyncResponder
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function execute(query:IOLAPQuery):AsyncToken;
+
+    /**
+     *  Returns the dimension with the given name within the OLAP cube.
+     *
+     *  @param name The name of the dimension.
+     *
+     *  @return An IOLAPDimension instance representing the dimension,
+     *  or null if a dimension is not found.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function findDimension(name:String):IOLAPDimension;
+
+    /**
+     *  Refreshes the cube from the data provider.
+     *  After setting the cube's schema, you must call this method to build the cube.
+     *
+     *
This method dispatches a progress event to indicate progress,
+     *  and dispatches a complete event when the cube is complete
+     *  and ready to execute queries.
+     *  You must wait for a complete event
+     *  before you call the execute() method to run a query.

+     *
+     *  @see mx.events.CubeEvent
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function refresh():void;
+}
+}


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

--- frameworks/projects/framework/src/mx/core/FlexMovieClip.as
+++ frameworks/projects/framework/src/mx/core/FlexMovieClip.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006 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.
 //
 ////////////////////////////////////////////////////////////////////////////////