Transferred from the Adobe Open Source Subversion Repository

Revision: 17330
Author:   chiedozi@adobe.com
Date:     2010-08-16T17:36:59.538425Z

Log Message:
-----------
Removed the sections functionality from ViewNavigator and refactored that logic into TabbedViewNavigator.  Updated dependent performance tests and components.
Introduced MobileApplicationBase and TabbedMobileApplication do support the tabbed use case for mobile.
Deleted SliderSkin from the framework.  All mobile skins now extend MobileSkin.

QE notes:
Doc notes:
Bugs:
Reviewer: Glenn and Ryan
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/ViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as" copyfrom-rev="17260" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/NavigationStack.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ScriptRunner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/ComponentCatalog/src/ComponentCatalog.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorSection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedMobileApplicationSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewHistoryData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/IPersistenceManager.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/IViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SliderSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/MobileApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as
@@ -1,7 +1,17 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package spark.effects
 {
 import flash.display.BitmapData;
-import flash.display.Sprite;

 import mx.core.IVisualElementContainer;
 import mx.core.UIComponent;
@@ -10,15 +20,15 @@
 import mx.events.EffectEvent;

 import spark.components.ActionBar;
-import spark.components.ButtonBar;
 import spark.components.Group;
 import spark.components.Image;
-import spark.components.supportClasses.OverlayDepth;
-import spark.effects.Fade;
+import spark.components.TabbedViewNavigator;
+import spark.components.ViewNavigator;
+import spark.components.supportClasses.ButtonBarBase;
+import spark.components.supportClasses.ViewNavigatorBase;
 import spark.effects.animation.MotionPath;
 import spark.effects.animation.SimpleMotionPath;
 import spark.effects.easing.Sine;
-

 /**
  *
@@ -31,9 +41,25 @@
     //
     //--------------------------------------------------------------------------

-    // TODO (chiedozi): Only support left and right slides
-    public static const SLIDE_LEFT:int = 0;
-    public static const SLIDE_RIGHT:int = 1;
+    /**
+     *  Slide the views to the left.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public static const SLIDE_LEFT:String = "left";
+
+    /**
+     *  Slide the views to the right.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.1
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public static const SLIDE_RIGHT:String = "right";

     //--------------------------------------------------------------------------
     //
@@ -41,7 +67,18 @@
     //
     //--------------------------------------------------------------------------

-    public function SlideViewTransition(duration:Number = 300, direction:int = SLIDE_LEFT)
+    /**
+     *  Constructor.
+     *
+     *  @param duration The duration of the effect
+     *  @param direction The direction of the transition.  Can be "left" or "right".
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function SlideViewTransition(duration:Number = 300, direction:String = SLIDE_LEFT)
     {
         super();

@@ -55,27 +92,70 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     */
+    private var parentNavigator:ViewNavigatorBase;
+
+    /**
+     *  @private
+     */
+    private var targetNavigator:ViewNavigatorBase;
+
+    /**
+     *  @private
+     */
     private var actionBar:ActionBar;
-    private var doInternalActionBarAnimation:Boolean;
-    private var actionBarWasVisible:Boolean;
-    private var contentGroupY:Number;
-
-    private var tabBar:ButtonBar;
-    private var tabBarWasVisible:Boolean;
-
+
+    /**
+     *  @private
+     */
+    private var cachedNavigator:Image;
+
+    /**
+     *  @private
+     */
     private var cachedActionBar:Image;
+
+    /**
+     *  @private
+     */
     private var cachedActionGroup:Image;
+
+    /**
+     *  @private
+     */
     private var cachedTitleGroup:Image;
+
+    /**
+     *  @private
+     */
     private var cachedNavigationGroup:Image;
-    private var cachedTabBar:Image;
-
-    /**
-     * The following properties keep track of the include in layout
-     * settings of the individual navigator components
-     */
-    private var tabBarExplicitIncludeInLayout:Boolean;
-    private var actionBarExplicitIncludeInLayout:Boolean;
-    private var contentGroupExplicitIncludeInLayout:Boolean;
+
+    /**
+     *  @private
+     */
+    private var currentViewProps:Object;
+
+    /**
+     *  @private
+     */
+    private var nextViewProps:Object;
+
+    /**
+     *  @private
+     */
+    private var explicitContentGroupIncludeInLayout:Boolean;
+
+    /**
+     *  @private
+     */
+    private var explicitIncludeInLayout:Boolean;
+
+    /**
+     *  @private
+     */
+    private var fullScreenAnimation:Boolean;

     //--------------------------------------------------------------------------
     //
@@ -83,7 +163,16 @@
     //
     //--------------------------------------------------------------------------

-    public var direction:int = SLIDE_LEFT;
+    [Inspectable(category="General", enumeration="left, right", defaultValue="left")]
+    /**
+     *  The direction of the slide animation.  Can be either "left" or "right".
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public var direction:String = SLIDE_LEFT;

     //--------------------------------------------------------------------------
     //
@@ -92,168 +181,177 @@
     //--------------------------------------------------------------------------

     /**
-     *
-     */
-    // TODO (chiedozi): ViewNavigator was changed to always create a dummy view
-    // if the instance was null for some reason.  In theory, the nextView and
-    // currentView properties should never be null.  Can remove the null checks.
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     override public function prepare():void
     {
-        actionBar = navigator.actionBar;
-        tabBar = navigator.tabBar;
-        contentGroupY = navigator.contentGroup.y;
-
-        if (currentView)
-            currentView.cacheAsBitmap = true;
-
-        if (nextView)
-            nextView.cacheAsBitmap = true;
-
-        actionBarWasVisible = componentIsVisible(actionBar);
-        if (actionBar && actionBarWasVisible)
-        {
-            // Always generate titleContent and actionBar caches
-            cachedActionBar = generateBitmap(actionBar);
-
-            if (actionBar.titleGroup)
-            {
-                cachedTitleGroup = generateBitmap(actionBar.titleGroup);
-
-                if (cachedTitleGroup)
-                    cachedTitleGroup.cacheAsBitmap = true;
-            }
-
-            // If the actionContent or navigationContent will change,
-            // prepare a bitmap image of the group
-            if (currentView.actionContent != nextView.actionContent)
-            {
-                cachedActionGroup = generateBitmap(actionBar.actionGroup);
+        var tabBar:ButtonBarBase;
+        parentNavigator = navigator.parentNavigator;
+        targetNavigator = parentNavigator ? parentNavigator : navigator;
+
+        fullScreenAnimation = false;
+
+        // Determine if this will be a full screen slide animation.  A
+        // fullScreen animation will occur if the parent navigator is a
+        // TabbedViewNavigator and the tabBar visiblity has changed, the
+        // overlayControls property changes between views or the size of
+        // the actionBar changes.
+        if (parentNavigator is TabbedViewNavigator)
+        {
+            tabBar = TabbedViewNavigator(parentNavigator).tabBar;
+
+            if (tabBar)
+                fullScreenAnimation = (componentIsVisible(tabBar) != nextView.tabBarVisible);
+        }
+
+        // Check for actionBar visiblity and overlayControls property change
+        if (!fullScreenAnimation)
+        {
+            if (nextView.overlayControls != currentView.overlayControls)
+            {
+                fullScreenAnimation = true;
+            }
+            else if (navigator is ViewNavigator)
+            {
+                if (componentIsVisible(ViewNavigator(navigator).actionBar) != nextView.actionBarVisible)
+                {
+                    fullScreenAnimation = true;
+                    targetNavigator = navigator;
+                }
+            }
+        }
+
+        // If the transition still can't determine if the animation will be fullscreen,
+        // prepare bitmaps of the actionBar in the case they are needed
+        if (!fullScreenAnimation)
+        {
+            targetNavigator = navigator;
+
+            if (navigator is ViewNavigator)
+            {
+                actionBar = ViewNavigator(navigator).actionBar;
+
+                if (componentIsVisible(actionBar))
+                {
+                    // Always generate full ActionBar caches
+                    cachedActionBar = generateBitmap(actionBar);
+
+                    // This transition was designed to always animate the title content
+                    if (actionBar.titleGroup)
+                        cachedTitleGroup = generateBitmap(actionBar.titleGroup);
+
+                    // If the actionContent will change prepare a bitmap image of the group
+                    if (currentView.actionContent != nextView.actionContent)
+                        cachedActionGroup = generateBitmap(actionBar.actionGroup);
+
+                    // If the navigationContent will change prepare a bitmap image of the group
+                    if (currentView.navigationContent != nextView.navigationContent)
+                        cachedNavigationGroup = generateBitmap(actionBar.navigationGroup);
+                }
+            }
+        }
+
+        // Always generate a bitmap representation of the navigator because
+        // we can't determine if it will be a full screen animation at this point.
+        // The acitonBar's dimensions can change between now and play() since a
+        // validation pass will run.
+        cachedNavigator = generateBitmap(targetNavigator);
+    }
+
+    /**
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    override public function play():void
+    {
+        var targets:Array = new Array();
+
+        // Check if the height of the actionBar changed.  If so, perform a
+        // fullscreen animation
+        if (!fullScreenAnimation)
+        {
+            fullScreenAnimation = cachedActionBar &&
+                                  (actionBar.height != cachedActionBar.height) ||
+                                  (actionBar.width != cachedActionBar.width);
+        }
+
+        // Create the animation
+        if (fullScreenAnimation)
+        {
+            currentView.visible = false;
+            targets.push(cachedNavigator);
+            targets.push(targetNavigator.contentGroup);
+
+            explicitContentGroupIncludeInLayout = targetNavigator.contentGroup.includeInLayout;
+            targetNavigator.contentGroup.includeInLayout = false;
+
+            if (targetNavigator is TabbedViewNavigator)
+            {
+                targets.push(TabbedViewNavigator(targetNavigator).tabBar);
+                explicitIncludeInLayout = TabbedViewNavigator(targetNavigator).tabBar.includeInLayout;
+                TabbedViewNavigator(targetNavigator).tabBar.includeInLayout = false;
+            }
+            else if (targetNavigator is ViewNavigator)
+            {
+                targets.push(ViewNavigator(targetNavigator).actionBar);
+                explicitIncludeInLayout = ViewNavigator(targetNavigator).actionBar.includeInLayout;
+                ViewNavigator(targetNavigator).actionBar.includeInLayout = false;
+            }
+
+            if (cachedNavigator)
+            {
+                cachedNavigator.x = cachedNavigator.y = 0;
+                cachedNavigator.includeInLayout = false;

-                if (cachedActionGroup)
-                    cachedActionGroup.cacheAsBitmap = true;
-            }
-
-            if (currentView.navigationContent != nextView.navigationContent)
-            {
-                cachedNavigationGroup = generateBitmap(actionBar.navigationGroup);
+                addComponentToContainerSkin(cachedNavigator, targetNavigator.skin);
+            }
+
+            effect = createFullScreenAnimation(targets);
+        }
+        else
+        {
+            // If we aren't doing a full screen transition, this transition will
+            // slide the child views and the internals of the actionBar only
+            if (currentView)
+            {
+                currentViewProps = { includeInLayout:currentView.includeInLayout,
+                                     cacheAsBitmap:currentView.cacheAsBitmap };

-                if (cachedNavigationGroup)
-                    cachedNavigationGroup.cacheAsBitmap = true;
-            }
-        }
-
-        if (tabBar)
-        {
-            tabBarWasVisible = componentIsVisible(tabBar);
-            if (tabBarWasVisible != nextView.tabBarVisible ||
-                nextView.overlayControls != currentView.overlayControls)
-            {
-                cachedTabBar = generateBitmap(tabBar);
-            }
-        }
-    }
-
-    /**
-     *
-     */
-    override public function play():void
-    {
-        var targets:Array = new Array();
-
-        if (currentView)
-        {
-            currentView.includeInLayout = false;
-
-            if (contentGroupY != navigator.contentGroup.y)
-                currentView.y = contentGroupY - navigator.contentGroup.y;
-
-            targets.push(currentView);
-        }
-
-        if (nextView)
-        {
-            nextView.includeInLayout = false;
-            targets.push(nextView);
-        }
-
-        effect = new Parallel();
-
-        // Determine if we are doing an internal actionbar transition
-        // or sliding in a new one
-        if (actionBar)
-        {
-            if (actionBarWasVisible && componentIsVisible(actionBar) && cachedActionBar &&
-                actionBar.height == cachedActionBar.height &&
-                actionBar.width == cachedActionBar.width &&
-                currentView.overlayControls == nextView.overlayControls)
-            {
-                doInternalActionBarAnimation = true;
+                currentView.includeInLayout = false;
+                currentView.cacheAsBitmap = true;
+                targets.push(currentView);
+            }
+
+            if (nextView)
+            {
+                nextViewProps = { includeInLayout:nextView.includeInLayout,
+                                  cacheAsBitmap:nextView.cacheAsBitmap };
+
+                nextView.includeInLayout = false;
+                nextView.cacheAsBitmap = true;
+                targets.push(nextView);
+            }
+
+            effect = new Parallel();
+
+            // Determine if we are doing an internal actionbar transition
+            // or sliding in a new one
+            if (actionBar)
                 appendActionBarAnimations(Parallel(effect));
-            }
-            else
-            {
-                doInternalActionBarAnimation = false;
-
-                if (cachedActionBar)
-                {
-                    cachedActionBar.includeInLayout = false;
-                    cachedActionBar.cacheAsBitmap = true;
-
-                    if (navigator.skin is IVisualElementContainer)
-                    {
-                        cachedActionBar.depth = IVisualElementContainer(navigator.skin).numElements - 1;
-                        IVisualElementContainer(navigator.skin).addElementAt(cachedActionBar, IVisualElementContainer(navigator.skin).numElements - 1);
-                    }
-                    else
-                        navigator.skin.addChild(cachedActionBar);
-
-                    targets.push(cachedActionBar);
-                }
-
-                if (componentIsVisible(actionBar))
-                    targets.push(actionBar);
-            }
-
-            actionBarExplicitIncludeInLayout = navigator.actionBar.includeInLayout;
-            navigator.actionBar.includeInLayout = false;
-        }
-
-        if (navigator.contentGroup)
-        {
-            contentGroupExplicitIncludeInLayout = navigator.contentGroup.includeInLayout;
-            navigator.contentGroup.includeInLayout = false;
-        }
-
-        if (tabBar)
-        {
-            tabBarExplicitIncludeInLayout = tabBar.includeInLayout;
-            tabBar.includeInLayout = false;
-
-            if (cachedTabBar)
-            {
-                if (navigator.skin is IVisualElementContainer)
-                {
-                    cachedTabBar.depth = IVisualElementContainer(navigator.skin).numElements - 1;
-                    IVisualElementContainer(navigator.skin).addElementAt(cachedTabBar, IVisualElementContainer(navigator.skin).numElements - 1);
-                }
-                else
-                    navigator.skin.addChild(cachedTabBar);
-
-                targets.push(cachedTabBar);
-                tabBar.x = (direction == SLIDE_LEFT) ? navigator.width : -navigator.width;
-                targets.push(tabBar);
-            }
-            else if (tabBarWasVisible != tabBar.visible)
-            {
-                tabBar.x = (direction == SLIDE_LEFT) ? navigator.width : -navigator.width;
-                targets.push(tabBar);
-            }
-        }
-
+
+            Parallel(effect).addChild(createViewAnimation(targets));
+        }
+
 		// Create view animations
-		Parallel(effect).addChild(createViewAnimations(targets));
 		effect.addEventListener(EffectEvent.EFFECT_END, transitionComplete);
-
 		effect.play();
     }

@@ -264,95 +362,81 @@
      *
      * @param event The effect complete event dispatched by the single
      * parallel effect this transition plays.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     override public function transitionComplete(event:EffectEvent=null):void
     {
         event.target.removeEventListener(EffectEvent.EFFECT_END, transitionComplete);

-        if (currentView)
-        {
-            currentView.includeInLayout = true;
-            currentView.cacheAsBitmap = false;
-        }
-
-        if (nextView)
-        {
-            nextView.includeInLayout = true;
-            nextView.cacheAsBitmap = false;
-        }
-
-        if (doInternalActionBarAnimation)
-        {
+        if (fullScreenAnimation)
+        {
+            if (cachedNavigator)
+                removeComponentFromContainerSkin(cachedNavigator, targetNavigator.skin);
+
+            targetNavigator.contentGroup.includeInLayout = explicitContentGroupIncludeInLayout;
+
+            if (targetNavigator is TabbedViewNavigator)
+            {
+                TabbedViewNavigator(targetNavigator).tabBar.includeInLayout =
+                    explicitIncludeInLayout;
+            }
+            else if (targetNavigator is ViewNavigator)
+            {
+                ViewNavigator(targetNavigator).actionBar.includeInLayout =
+                    explicitIncludeInLayout;
+            }
+        }
+        else
+        {
+            if (currentView)
+            {
+                currentView.includeInLayout = currentViewProps.includeInLayout;
+                currentView.cacheAsBitmap = currentViewProps.cacheAsBitmap;
+                currentViewProps = null;
+            }
+
+            if (nextView)
+            {
+                nextView.includeInLayout = nextViewProps.includeInLayout;
+                nextView.cacheAsBitmap = nextViewProps.cacheAsBitmap;
+                nextViewProps = null;
+            }
+
             if (actionBar.titleGroup)
                 actionBar.titleGroup.cacheAsBitmap = false;

             if (cachedTitleGroup)
-            {
-                if (actionBar.skin is IVisualElementContainer)
-                    IVisualElementContainer(actionBar.skin).removeElement(cachedTitleGroup);
-                else
-                    actionBar.skin.removeChild(cachedTitleGroup);
-
-                cachedTitleGroup = null;
-            }
+                removeComponentFromContainerSkin(cachedTitleGroup, actionBar.skin);

             if (cachedNavigationGroup)
-            {
-                if (actionBar.skin is IVisualElementContainer)
-                    IVisualElementContainer(actionBar.skin).removeElement(cachedNavigationGroup);
-                else
-                    actionBar.skin.removeChild(cachedNavigationGroup);
-
-                actionBar.navigationGroup.cacheAsBitmap = false;
-                cachedNavigationGroup = null;
-            }
+                removeComponentFromContainerSkin(cachedNavigationGroup, actionBar.skin);

             if (cachedActionGroup)
             {
-                if (actionBar.skin is IVisualElementContainer)
-                    IVisualElementContainer(actionBar.skin).removeElement(cachedActionGroup);
-                else
-                    actionBar.skin.removeChild(cachedActionGroup);
-
+                removeComponentFromContainerSkin(cachedActionGroup, actionBar.skin);
                 actionBar.actionGroup.cacheAsBitmap = false;
-                cachedActionGroup = null;
-            }
-        }
-        else
-        {
-            if (cachedActionBar)
-            {
-                if (navigator.skin is IVisualElementContainer)
-                    IVisualElementContainer(navigator.skin).removeElement(cachedActionBar)
-                else
-                    navigator.skin.removeChild(cachedActionBar);
-
-                cachedActionBar = null;
-            }
-        }
-
-        if (cachedTabBar)
-        {
-            if (navigator.skin is IVisualElementContainer)
-                IVisualElementContainer(navigator.skin).removeElement(cachedTabBar);
-            else
-                navigator.skin.removeChild(cachedTabBar);
-
-            cachedTabBar = null;
-        }
-
-        // Remove items from layout
-        navigator.contentGroup.includeInLayout = contentGroupExplicitIncludeInLayout;
-
-        if (actionBar)
-            navigator.actionBar.includeInLayout = actionBarExplicitIncludeInLayout;
-
-        if (tabBar)
-            tabBar.includeInLayout = tabBarExplicitIncludeInLayout;
+            }
+        }
+
+        if (cachedTitleGroup)
+            cachedTitleGroup = null;
+
+        if (cachedNavigationGroup)
+            cachedNavigationGroup = null;
+
+        if (cachedActionGroup)
+            cachedActionGroup = null;
+
+        if (cachedNavigator)
+            cachedNavigator = null;
+
+        effect = null;

-        // TODO (chiedozi): Comment why clean up happens before transitionComplete
         super.transitionComplete(event);
-        effect = null;
     }

     //--------------------------------------------------------------------------
@@ -363,7 +447,6 @@

     /**
      * @private
-     *
      * Creates the animations used to animate the content of the
      * action bar.  This method is only called if the slide transition
      * isn't doing a full action bar transition.
@@ -373,6 +456,11 @@
      *
      * @param effect The parallel effect that will be played by the
      * slide animation
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     protected function appendActionBarAnimations(effect:Parallel):void
     {
@@ -407,10 +495,8 @@

         if (cachedTitleGroup)
         {
-            if (actionBarSkin is IVisualElementContainer)
-                IVisualElementContainer(actionBarSkin).addElementAt(cachedTitleGroup, actionBarSkin.getChildIndex(titleGroup) - 1);
-            else
-                actionBarSkin.addChildAt(cachedTitleGroup, actionBarSkin.getChildIndex(titleGroup) - 1);
+            childIndex = actionBarSkin.getChildIndex(titleGroup) - 1;
+            addComponentToContainerSkinAt(cachedTitleGroup, actionBarSkin, childIndex);
         }

         // If a cache of the navigation group exists, that means the content
@@ -419,7 +505,7 @@
         if (cachedNavigationGroup)
         {
             childIndex = actionBarSkin.getChildIndex(actionBar.navigationGroup) - 1;
-            actionBarSkin.addChildAt(cachedNavigationGroup, childIndex);
+            addComponentToContainerSkinAt(cachedNavigationGroup, actionBarSkin, childIndex);

             fadeOutTargets.push(cachedNavigationGroup);

@@ -433,7 +519,7 @@
         if (cachedActionGroup)
         {
             childIndex = actionBarSkin.getChildIndex(actionBar.actionGroup) - 1;
-            actionBarSkin.addChildAt(cachedActionGroup, childIndex);
+            addComponentToContainerSkinAt(cachedActionGroup, actionBarSkin, childIndex);

             fadeOutTargets.push(cachedActionGroup);

@@ -486,35 +572,57 @@

     /**
      * @private
-     *
      * Creates the animation used to transition the previous and new view.
-     */
-    private function createViewAnimations(targets:Array):IEffect
-    {
-        var slideDistance:Number;
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function createViewAnimation(targets:Array):IEffect
+    {
+        var slideDistance:Number = direction == SLIDE_LEFT ? -navigator.width : navigator.width;
         var effect:Move = new Move();

         effect.targets = targets;
         effect.duration = duration;
-
-        switch(direction)
-        {
-            case SLIDE_LEFT:
-                effect.xBy = -navigator.width;
-                nextView.x = navigator.width;
-
-                if (!doInternalActionBarAnimation && componentIsVisible(actionBar))
-                    actionBar.x = navigator.width;
-                break;
-
-            case SLIDE_RIGHT:
-                effect.xBy = navigator.width;
-                nextView.x = -navigator.width;
-
-                if (!doInternalActionBarAnimation && componentIsVisible(actionBar))
-                    actionBar.x = -navigator.width;
-                break;
-        }
+        effect.xBy = slideDistance;
+
+        nextView.x = -slideDistance;
+
+        return effect;
+    }
+    /**
+     * @private
+     * Creates the animation when it is a full screen aniamtion.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    protected function createFullScreenAnimation(targets:Array):IEffect
+    {
+        var slideDistance:Number = (direction == SLIDE_LEFT) ?
+                                      -targetNavigator.width : targetNavigator.width;
+
+        if (targetNavigator == parentNavigator)
+        {
+            if (targetNavigator is TabbedViewNavigator)
+                TabbedViewNavigator(targetNavigator).tabBar.x = -slideDistance;
+        }
+        else
+        {
+            if (targetNavigator is ViewNavigator)
+                ViewNavigator(targetNavigator).actionBar.x = -slideDistance;
+        }
+
+        targetNavigator.contentGroup.x = -slideDistance;
+
+        var effect:Move = new Move();
+        effect.xBy = slideDistance;
+        effect.targets = targets;
+        effect.duration = duration;

         return effect;
     }
@@ -524,6 +632,11 @@
      *
      * Convenience method for generating a bitmap of a component.
      * Returns a spark image.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     // TODO (chiedozi): We shouldn't use spark image, seems a bit too heavy for this
     private function generateBitmap(component:UIComponent):Image
@@ -542,6 +655,7 @@
         image.source = bitmapData;
         image.setActualSize(width, height);
         image.includeInLayout = false;
+        image.cacheAsBitmap = true;

         image.x = component.x;
         image.y = component.y;
@@ -555,10 +669,15 @@
      *
      * Convenience property to determine whether the action bar is
      * visible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     private function componentIsVisible(component:UIComponent):Boolean
     {
-        return component.visible && component.width > 0 && component.height > 0;
+        return component && component.visible && component.width > 0 && component.height > 0;
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3222
Author:   jimurphy@adobe.com
Date:     2008-09-16T14:09:08.134976Z

Log Message:
-----------
Merged 3.0.x revisions 3157,3162,3165-3166,3168,3177,3180-3183,3185,3187,3189,3199 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TileList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.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/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/build_framework.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/InterDragManagerEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.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/events/InterManagerRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -1045,7 +1045,6 @@
                     // adds for the individual children
                     for (i = 0; i < doc.numChildren; i++)
                     {
-                    	// VERSION_SKEW
                         try
                         {
                             addFocusables(doc.getChildAt(i));


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

--- frameworks/projects/framework/src/mx/modules/ModuleManager.as
+++ frameworks/projects/framework/src/mx/modules/ModuleManager.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-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.modules
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4514
Author:   hmuller@adobe.com
Date:     2009-01-13T22:24:44.571725Z

Log Message:
-----------
Added recycling support for virtualized layouts.

Removed itemRendererRegistry from DataGroup.

QE Notes: Existing layout, viewport, and scroller mustella tests pass, virtualization tests are still TBD
Doc Notes: None
Bugs: sdk-18630, sdk-18632, sdk-18660
Reviewer: ryan

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/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -1297,7 +1297,13 @@
         if (!layoutTarget)
             return;

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6812
Author:   clucier@adobe.com
Date:     2009-05-12T00:12:47.147255Z

Log Message:
-----------
Merging beta1 change 6811 to trunk to take care of an RTE affecting the performance suite.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/bundles/en_US/components.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -902,7 +902,10 @@
         }

         if (useVirtualLayout)
+        {
             g.invalidateDisplayList();
+            g.validateNow();
+        }

         setIndexInView(i0, i1);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20843
Author:   mhorn@adobe.com
Date:     2011-03-14T14:36:04.836183Z

Log Message:
-----------
merge

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as
@@ -403,12 +403,7 @@
     }

     /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @private
      */
     override protected function commitProperties():void
     {
@@ -1310,6 +1305,8 @@
      *  This function triggers calls to the updateMapping()
      *  and updateTransform() methods on the next call
      *  to the commitProperties() method.
+     *
+     *  @param invalid true if the data has changed.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 11027
Author:   dloverin@adobe.com
Date:     2009-10-20T15:50:09.018295Z

Log Message:
-----------
Changes to enable using multiple style managers.

Multiple style managers are not the default yet. Can be enabled by compiling with -create-style-manager.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex, Paul
Tests run: checkintests, all mustella
Is noteworthy for integration: Yes.

Modified Paths:
--------------
<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/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</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/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceGenerator.java</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/events/FlexChangeEvent.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/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.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/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.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/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java</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/controls/DateField.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/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.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/managers/CursorManagerImpl.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/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</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/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.as
+++ frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.as
@@ -0,0 +1,366 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.styles
+{
+
+import flash.display.DisplayObject;
+import flash.events.EventDispatcher;
+import flash.utils.Dictionary;
+
+import mx.core.Singleton;
+import mx.core.mx_internal;
+import mx.events.FlexChangeEvent;
+import mx.managers.ISystemManager;
+import mx.managers.SystemManagerGlobals;
+import mx.utils.ObjectUtil;
+import flash.events.Event;
+
+use namespace mx_internal;
+
+[ExcludeClass]
+
+/**
+ *  The CSSStyleDeclaration class represents a set of CSS style rules.
+ *  The MXML compiler automatically generates one CSSStyleDeclaration object
+ *  for each selector in the CSS files associated with a Flex application.
+ *
+ *
A CSS rule such as
+ *

+ *      Button { color: #FF0000 }
+ *

+ *  affects every instance of the Button class;
+ *  a selector like Button is called a type selector
+ *  and must not start with a dot.

+ *
+ *
A CSS rule such as
+ *

+ *      .redButton { color: #FF0000 }
+ *

+ *  affects only components whose styleName property
+ *  is set to "redButton";
+ *  a selector like .redButton is called a class selector
+ *  and must start with a dot.

+ *
+ *
You can access the autogenerated CSSStyleDeclaration objects
+ *  using the StyleManager.getStyleDeclaration() method,
+ *  passing it either a type selector
+ *

+ *  var buttonDeclaration:CSSStyleDeclaration =
+ *      StyleManager.getStyleDeclaration("Button");
+ *

+ *  or a class selector
+ *

+ *  var redButtonStyleDeclaration:CSSStyleDeclaration =
+ *      StyleManager.getStyleDeclaration(".redButton");
+ *

+ *

+ *
+ *
You can use the getStyle(), setStyle(),
+ *  and clearStyle() methods to get, set, and clear
+ *  style properties on a CSSStyleDeclaration.

+ *
+ *
You can also create and install a CSSStyleDeclaration at run time
+ *  using the StyleManager.setStyleDeclaration() method:
+ *

+ *  var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration(".bigMargins");
+ *  newStyleDeclaration.defaultFactory = function():void
+ *  {
+ *      leftMargin = 50;
+ *      rightMargin = 50;
+ *  }
+ *  StyleManager.setStyleDeclaration(".bigMargins", newStyleDeclaration, true);
+ *

+ *

+ *
+ *  @see mx.core.UIComponent
+ *  @see mx.styles.StyleManager
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class CSSMergedStyleDeclaration extends CSSStyleDeclaration
+{
+    include "../core/Version.as";
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *
+     *  A CSSStyleDeclaration that is a merger between two styles. The styles are for the same
+     *  selector. One style is from the local style manager and the other style is from the style manager's
+     *  parent.
+     *
+     *  @param style - A style from the local style manager. May be null.
+     *
+     *  @param parentStyle - The style in the parent style manager for the same selector. May be null.
+     *
+     *  @param selector - If the selector is a CSSSelector then advanced
+     *  CSS selectors are supported. If a String is used for the selector then
+     *  only simple CSS selectors are supported. If the String starts with a
+     *  dot it is interpreted as a universal class selector, otherwise it must
+     *  represent a simple type selector. If not null, this CSSStyleDeclaration
+     *  will be registered with StyleManager.
+     *
+     *  @param styleManager - The style manager to set this declaration into. If the
+     *  styleManager is null the top-level style manager will be used.
+     *
+     *  @param setSelector - If true set the selector in the styleManager. If setSelector
+     *  is false this style declaration can be set in the styleManager at a later time
+     *  by calling styleManager.setStyleDeclaration(styleDeclaration.selectorString, styleDeclaration, false);
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     *
+     */
+    public function CSSMergedStyleDeclaration(style:CSSStyleDeclaration, parentStyle:CSSStyleDeclaration,
+                        selector:Object=null, styleManager:IStyleManager2=null, setSelector:Boolean = false)
+    {
+        super(selector, styleManager, setSelector);
+
+        this.style = style;
+        this.parentStyle = parentStyle;
+
+        var i:uint;
+        var n:uint;
+        var effectsArray:Array;
+
+        // combine effects child and parent effects array
+        if (style && style.effects)
+        {
+            effects = [];
+
+            effectsArray = style.effects;
+            n = effectsArray.length;
+            for (i = 0; i < n; i++)
+                effects[i] = effectsArray[i];
+        }
+
+        if (parentStyle && parentStyle.effects)
+        {
+            if (!effects)
+                effects = [];
+
+            effectsArray = parentStyle.effects;
+            n = effectsArray.length;
+            for (i = 0; i < n; i++)
+            {
+                effects[i] = effectsArray[i];
+                if (effects.indexOf(effectsArray[i]) == -1)
+                    effects[i] = effectsArray[i];
+            }
+        }
+
+        updateOverrides = true;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *
+     *  Local storage for the style in the local style manager.
+     */
+    private var style:CSSStyleDeclaration;
+
+    /**
+     *  @private
+     *
+     *  Local storage for the style in the parent style manager.
+     */
+    private var parentStyle:CSSStyleDeclaration;
+
+    /**
+     *  @private
+     *
+     *  If true then update the overrides array from the style and
+     *  parentStyle.
+     */
+    private var updateOverrides:Boolean;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  defaultFactory
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _defaultFactory:Function;
+
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  @private
+     */
+    override public function get defaultFactory():Function
+    {
+        if (_defaultFactory != null)
+            return _defaultFactory;
+
+        if ((style != null && style.defaultFactory != null) ||
+           (parentStyle != null && parentStyle.defaultFactory != null))
+        {
+            _defaultFactory = function():void
+            {
+                if (parentStyle && parentStyle.defaultFactory != null)
+                    parentStyle.defaultFactory.apply(this);
+
+                if (style && style.defaultFactory != null)
+                    style.defaultFactory.apply(this);
+            };
+        }
+
+        return _defaultFactory;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set defaultFactory(f:Function):void
+    {
+        // not supported
+    }
+
+    //----------------------------------
+    //  factory
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _factory:Function;
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  @private
+     */
+    override public function get factory():Function
+    {
+        if (_factory != null)
+            return _factory;
+
+        if ((style != null && style.factory != null) ||
+            (parentStyle != null && parentStyle.factory != null))
+        {
+            _factory = function():void
+            {
+                if (parentStyle && parentStyle.factory != null)
+                    parentStyle.factory.apply(this);
+
+                if (style && style.factory != null)
+                    style.factory.apply(this);
+            };
+        }
+
+        return _factory;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set factory(f:Function):void
+    {
+        // not supported
+    }
+
+    /**
+     *  @private
+     */
+    override public function get overrides():Object
+    {
+        if (!updateOverrides)
+            return super.overrides;
+
+        var obj:Object;
+        var tempOverrides:Object = null; // collect the overrides before setting
+        if (style && style.overrides)
+        {
+            var childOverrides:Object = style.overrides;
+            for (obj in childOverrides)
+                tempOverrides[obj] = childOverrides[obj];
+        }
+
+        if (parentStyle && parentStyle.overrides)
+        {
+            var parentOverrides:Object = parentStyle.overrides;
+            for (obj in parentOverrides)
+            {
+                if (tempOverrides[obj] === undefined)
+                    tempOverrides[obj] = parentOverrides[obj];
+            }
+        }
+
+        super.overrides = tempOverrides;
+        updateOverrides = false;
+
+        return tempOverrides;
+    }
+
+    /**
+     *  @private
+     */
+    override public function set overrides(o:Object):void
+    {
+        // not supported
+    }
+
+    /**
+     *  @private
+     */
+    override public function setStyle(styleProp:String, newValue:*):void
+    {
+        // not supported
+    }
+
+    /**
+     *  @private
+     */
+    override mx_internal function addStyleToProtoChain(chain:Object,
+                                              target:DisplayObject,
+                                              filterMap:Object = null):Object
+    {
+        // If we have a local style, then add only it to the chain. It will
+        // take are of adding its parent to the chain.
+        // If then is no style, but a parentStyle, then add the parent Style
+        // to the chain.
+        if (style)
+            return style.addStyleToProtoChain(chain, target, filterMap);
+        else if (parentStyle)
+            return parentStyle.addStyleToProtoChain(chain, target, filterMap);
+        else
+            return chain;
+    }
+
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8574
Author:   aharui@adobe.com
Date:     2009-07-15T05:33:44.225721Z

Log Message:
-----------
Bugs related to TLF and focus.  Also TLF Marshall Plan adjustments, and some IME fixes

QE Notes: None
Doc Notes: None
Bugs: SDK-21278, SDK-21686, SDK-21375, SDK-18516, SDK-15093, SDK-21335
Reviewer: darrell, carol
tests: checkintests mustella/gumbo mustella/components

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.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/framework/src/mx/core/IIMESupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.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/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.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/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.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/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.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/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>

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

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
@@ -230,6 +230,15 @@
         return _embeddedFontRegistry;
     }

+    private static var _defaultItemEditorFactory:IFactory;
+
+    mx_internal static function get defaultItemEditorFactory():IFactory
+    {
+        if (!_defaultItemEditorFactory)
+            _defaultItemEditorFactory = new ClassFactory(TextInput);
+        return _defaultItemEditorFactory;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -610,6 +619,8 @@
     //  editable
     //----------------------------------

+    private var _editable:Boolean = true;
+
     [Inspectable(category="General")]

     /**
@@ -627,7 +638,19 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public var editable:Boolean = true;
+    public function get editable():Boolean
+    {
+        return _editable;
+    }
+
+    /**
+     *  @private
+     */
+    public function set editable(value:Boolean):void
+    {
+        _editable = value;
+    }
+

     //----------------------------------
     //  itemEditor
@@ -646,7 +669,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public var itemEditor:IFactory = new ClassFactory(TextInput);
+    public var itemEditor:IFactory = defaultItemEditorFactory;

     //----------------------------------
     //  editorDataField


Transferred from the Adobe Open Source Subversion Repository

Revision: 7295
Author:   dsubrama@adobe.com
Date:     2009-05-26T23:59:25.112903Z

Log Message:
-----------
-Add in caret support to Spark List. Our default renderers draw a thin 1px blue line (same color as selection color) around items that are currently in focus.
-Selection and careted item stay in-sync unless the Ctrl key is down in which you can caret away on your own.
-With careting (current item in focus) comes the itemFocusChanged event.
-Add in more states to ItemRenderer, which now supports: normal, hovered, selected, normalAndCaret, hoveredAndCaret, selectedAndCaret.
-Because of the addition of a hasState() method on IStateClient2, IR's that don't support the above-mentioned states won't RTE!
-findKey support like in Halo, for Spark List
-Null check for Line when generating DAPI-2 stroke

Reviewers: Ryan for caret stuff, Ryan/Corey for hasState() impl
Doc: Yes
QA: Yes
Checkintests: Pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IStateClient2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DefaultComplexItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -672,8 +672,18 @@
     }

     /**
-     *  @inheritDoc
-     *
+     *  Updates the renderer for use/re-use. When a renderer is first
+     *  created, or when it is recycled because of virtualization, this
+     *  SkinnableDataContainer gets the chance to come in and set the
+     *  renderer's labelText property as well as the
+     *  owner property. This is how, from a renderer, one
+     *  can access the parent component "owning" the renderer. In cases
+     *  like Lists and SkinnableDataContainers, the owner property points
+     *  to the List or SkinnableDataContainer even though the dataGroup
+     *  part is actually parenting the renderers.
+     *
+     *  @param renderer The renderer being updated
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5


Transferred from the Adobe Open Source Subversion Repository

Revision: 18395
Author:   klin@adobe.com
Date:     2010-11-01T20:24:01.994827Z

Log Message:
-----------
Fixed an RTE when removing rows in GridLayout. It needed to check if the index is valid for removing elements. Also, removed logic in the dataProvider changed handler code that determined whether a visible element had changed. The collection changed handler now returns void. Lastly, I cleaned up some asdocs in DataGrid including adding the stretchCursor style metadata.

QE notes: No
Doc notes: No
Bugs: SDK-28205, SDK-28368
Reviewer: Hans
Tests run: cyclone server
Is noteworthy for integration: Yes, API change in GridLayout

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -1669,47 +1669,60 @@
     // TBD(hmuller): make a note about the fact that this handler runs AFTER the GridDimension
     // object has been updated.

-    public function dataProviderCollectionChanged(event:CollectionEvent):Boolean
+    public function dataProviderCollectionChanged(event:CollectionEvent):void
     {
         switch (event.kind)
         {
-            case CollectionEventKind.ADD:
-                return dataProviderCollectionAdd(event);
+            case CollectionEventKind.ADD:
+            {
+                dataProviderCollectionAdd(event);
+                break;
+            }

             case CollectionEventKind.REMOVE:
-                return dataProviderCollectionRemove(event);
+            {
+                dataProviderCollectionRemove(event);
+                break;
+            }

             case CollectionEventKind.MOVE:
+            {
                 // TBD(hmuller)
                 break;
+            }

             case CollectionEventKind.REFRESH:
             case CollectionEventKind.RESET:
-                return dataProviderCollectionReset(event);
+            {
+                dataProviderCollectionReset(event);
+                break;
+            }

             case CollectionEventKind.UPDATE:
-                return dataProviderCollectionUpdate(event);
+            {
+                dataProviderCollectionUpdate(event);
+                break;
+            }
+
             case CollectionEventKind.REPLACE:
+            {
                 break;
-        }
-
-        return false;
+            }
+        }
     }

     /**
      *  @private
      *  Called in response to one or more items having been inserted into the
      *  grid's dataProvider.  Ensure that visibleRowIndices and visibleRowSelectionIndices
-     *  correspond to the same, potentially shifted, dataProvider items.  Return true
-     *  any visible index had to be changed.
-     */
-    private function dataProviderCollectionAdd(event:CollectionEvent):Boolean
+     *  correspond to the same, potentially shifted, dataProvider items.
+     */
+    private function dataProviderCollectionAdd(event:CollectionEvent):void
     {
         const insertIndex:int = event.location;
         const insertLength:int = event.items.length;
-        const b1:Boolean = incrementIndicesGTE(visibleRowIndices, insertIndex, insertLength);
-        const b2:Boolean = incrementIndicesGTE(visibleRowSelectionIndices, insertIndex, insertLength);
-        return b1 || b2;
+        incrementIndicesGTE(visibleRowIndices, insertIndex, insertLength);
+        incrementIndicesGTE(visibleRowSelectionIndices, insertIndex, insertLength);
     }

     /**
@@ -1717,7 +1730,7 @@
      *  Called in response to one or more items having been removed from the
      *  grid's dataProvider.
      */
-    private function dataProviderCollectionRemove(event:CollectionEvent):Boolean
+    private function dataProviderCollectionRemove(event:CollectionEvent):void
     {
         const eventItemsLength:uint = event.items.length;
         const firstRemoveIndex:int = event.location;
@@ -1753,27 +1766,25 @@
         {
             const removeCount:int = (lastVisibleOffset - firstVisibleOffset) + 1;
             visibleRowIndices.splice(firstVisibleOffset, removeCount);
-            freeGridElements(visibleRowBackgrounds.splice(firstVisibleOffset, removeCount));
-            freeGridElements(visibleRowSeparators.splice(firstVisibleOffset, removeCount));
+
+            if (lastVisibleOffset < visibleRowBackgrounds.length)
+                freeGridElements(visibleRowBackgrounds.splice(firstVisibleOffset, removeCount));
+
+            if (lastVisibleOffset < visibleRowSeparators.length)
+                freeGridElements(visibleRowSeparators.splice(firstVisibleOffset, removeCount));

             const visibleColCount:int = visibleColumnIndices.length;
             const firstRendererOffset:int = firstVisibleOffset * visibleColCount;
             freeItemRenderers(visibleItemRenderers.splice(firstRendererOffset, removeCount * visibleColCount));
-
-            return true;
-        }
-
-        return false;
+        }
     }

     /**
      *  @private
-     *  Increment the elements of indices that are >= insertIndex by delta.  Returns true if any
-     *  element was changed.
-     */
-    private function incrementIndicesGTE(indices:Vector.<int>, insertIndex:int, delta:int):Boolean
-    {
-        var elementChanged:Boolean = false;
+     *  Increment the elements of indices that are >= insertIndex by delta.
+     */
+    private function incrementIndicesGTE(indices:Vector.<int>, insertIndex:int, delta:int):void
+    {
         const indicesLength:int = indices.length;
         for (var i:int = 0; i < indicesLength; i++)
         {
@@ -1781,20 +1792,17 @@
             if (index >= insertIndex)
             {
                 indices[i] = index + delta;
-                elementChanged = true;
-            }
-        }
-        return elementChanged;
+            }
+        }
     }

     /**
      *  @private
      *  Called in response to a refresh/reset CollectionEvent.  Clear everything.
      */
-    private function dataProviderCollectionReset(event:CollectionEvent):Boolean
+    private function dataProviderCollectionReset(event:CollectionEvent):void
     {
         clearVirtualLayoutCache();
-        return true;
     }

     /**
@@ -1803,7 +1811,7 @@
      *  to see if the item is visible and invalidates the grid if it is. Otherwise,
      *  do nothing.
      */
-    private function dataProviderCollectionUpdate(event:CollectionEvent):Boolean
+    private function dataProviderCollectionUpdate(event:CollectionEvent):void
     {
         var data:Object;
         const itemsLength:int = event.items.length;
@@ -1823,7 +1831,6 @@
                 }
             }
         }
-        return true;
     }

     /**


ps: SDK 4.5 and 4.6 support and cleanup

ps: SDK 4.5 and 4.6 support and cleanup

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

--- FlashRoughcutLib/src/com/kaltura/net/streaming/ExNetStream.as
+++ FlashRoughcutLib/src/com/kaltura/net/streaming/ExNetStream.as
@@ -27,7 +27,7 @@
 	import com.kaltura.net.streaming.events.ExNetStreamEvent;
 	import com.kaltura.net.streaming.status.NetStatus;
 	import com.kaltura.utils.url.URLProccessing;
-
+
 	import flash.display.BitmapData;
 	import flash.events.AsyncErrorEvent;
 	import flash.events.Event;
@@ -43,7 +43,7 @@
 	import flash.utils.Timer;
 	import flash.utils.getTimer;
 	import flash.utils.setTimeout;
-
+
 	import mx.core.EventPriority;
 	import mx.events.MetadataEvent;
 	import mx.events.VideoEvent;
@@ -105,7 +105,7 @@
 		 * this is used to determine if we should seek to 0 after hitting play for preloading.
 		 */
 		private var _preloadingNoCommands:Boolean=false;
-
+
 		/**
 		 *true if the user clicked play before we got metadata (probably always true otherwise we would
 		 * not have started loading the netstream
@@ -234,7 +234,7 @@
 				// We set the stream volume to 0 since the audio starts rendering just before
 				// the video does and creates an annoying blip. Once NetStream.Buffer.Full is reached, we set it back.
 				super.soundTransform=new SoundTransform(0);
-
+
 				internalPlayMedia(true);
 				pauseMedia();
 				_preloadingNoCommands=true;
@@ -293,7 +293,7 @@
 			}
 			if (playStatus == PlayStatusStates.PLAY && streamVideo)
 				streamVideo.visible = true;
-
+
 			super.soundTransform=new SoundTransform(_volLevel);
 		}

@@ -345,11 +345,11 @@
 					areWeStuck++;
 				else
 					areWeStuck = 0;
-
+
 				lastMonitoredNetStreamTime=time;
 				// if we reached the end of the stream or we're on the same value for the last 400 msecs
 				// and the value is almost the same as the total length of the video - call end of stream handler.
-				if (/* (_length != -1 && time >= _length) || */ (areWeStuck > 10 && Math.floor(time) >= Math.floor(_length) - 1))
+				if (/* (_length != -1 && time >= _length) || */ (areWeStuck > 10 && Math.floor(time) >= Math.floor(_length) - 1))
 					onStreamEnd(true);
 			}
 		}
@@ -431,7 +431,7 @@
 		{
 			internalPlayMedia();
 		}
-
+
 		public function internalPlayMedia(_force:Boolean = false):void
 		{
 			if (!_gotMetaData)
@@ -442,9 +442,9 @@
 					_volLevel=super.soundTransform.volume;
 					super.soundTransform=new SoundTransform(0);
 					_gotPlayBeforeMetadata = true;
-				}
-			}
-
+				}
+			}
+
 			isStreamEnd=false;
 			dontRecievePlayStopEventTwice=0;
 			// if the stream is  stopped (meaning no data is loaded yet), reload and play:
@@ -492,7 +492,7 @@
 		public function seekMedia(offset:Number, originalStart:Number=-1, nearestNext:Boolean=false):void
 		{
 			// round offset to exact millisecond otherwise our exact seek to 27.720 which is passed as 27.719999999999995
-			// due to calculations will get us to the previous keyframe
+			// due to calculations will get us to the previous keyframe
 			offset = Math.round(offset * 1000)/1000;
 			_originalSeekTime=offset;
 			if (!_gotMetaData)
@@ -689,10 +689,10 @@
 		{
 			updatePlayheadTimer.start();
 			resetToStartBuffer();
-
+
 			if (_gotMetaData)
 				super.soundTransform=new SoundTransform(_volLevel);
-
+
 			if (client is NetClient && _gotMetaData && (!downloadBeforePlay || percentageLoaded == 100))
 			{
 				//traceAction ("XNS: resume");
@@ -877,7 +877,7 @@
 					// currently there's no use to this - we always seek precisely to keyframes - so this should neevr be called.
 					// unless metaData does not contain keyframe information...
 					break;
-
+
 				case NetStatus.NETSTREAM_PLAY_START:
 					dispatchEvent(new Event("Play.Start"));
 					break;
@@ -888,7 +888,7 @@
 					// not in use anymore - just for debugging purposes.
 					++dontRecievePlayStopEventTwice;
 					break;
-
+
 			}
 		}

@@ -953,27 +953,55 @@
 			trace(getTimer(), action);
 		}

-		/**
-		 * dispose function:
-		 */
-		public function dispose():void
-		{
-			_preloadingNoCommands=false;
-			_gotMetaData=false;
-			if (streamVideo)
-			{
-				streamVideo.clear();
-				streamVideo.attachNetStream(null);
-				streamVideo=null;
-			}
-			pause();
-			close();
-			client={};
-			removeEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
-			removeEventListener(SecurityErrorEvent.SECURITY_ERROR, netSecurityError);
-			removeEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
-			loadingProgressTimer.removeEventListener(TimerEvent.TIMER, updateLoadingProgress);
-			loadingProgressTimer.stop();
+		CONFIG::isSDK46 {
+			/**
+			 * dispose function:
+			 */
+			override public function dispose():void
+			{
+				_preloadingNoCommands=false;
+				_gotMetaData=false;
+				if (streamVideo)
+				{
+					streamVideo.clear();
+					streamVideo.attachNetStream(null);
+					streamVideo=null;
+				}
+				pause();
+				close();
+				client={};
+				removeEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
+				removeEventListener(SecurityErrorEvent.SECURITY_ERROR, netSecurityError);
+				removeEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
+				loadingProgressTimer.removeEventListener(TimerEvent.TIMER, updateLoadingProgress);
+				loadingProgressTimer.stop();
+			}
+
+		}
+
+		CONFIG::isSDK45 {
+			/**
+			 * dispose function:
+			 */
+			public function dispose():void
+			{
+				_preloadingNoCommands=false;
+				_gotMetaData=false;
+				if (streamVideo)
+				{
+					streamVideo.clear();
+					streamVideo.attachNetStream(null);
+					streamVideo=null;
+				}
+				pause();
+				close();
+				client={};
+				removeEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
+				removeEventListener(SecurityErrorEvent.SECURITY_ERROR, netSecurityError);
+				removeEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
+				loadingProgressTimer.removeEventListener(TimerEvent.TIMER, updateLoadingProgress);
+				loadingProgressTimer.stop();
+			}
 		}
 	}
 }


evaluateExpression() now catches and reports errors from inline
functions

Change-Id: I70f9d8625fe4b01ab16e0ad105afd9627dbc2a3b

--- WeaveCore/src/weave/core/ExternalSessionStateInterface.as
+++ WeaveCore/src/weave/core/ExternalSessionStateInterface.as
@@ -286,23 +286,12 @@
 				var thisObject:Object = getObjectFromPathOrVariableName(scopeObjectPathOrVariableName);
 				var compiledObject:ICompiledObject = _compiler.compileToObject(expression);
 				var isFuncDef:Boolean = _compiler.compiledObjectIsFunctionDefinition(compiledObject);
-				var compiledMethod:Function = _compiler.compileObjectToFunction(compiledObject, [_variables, variables], null, thisObject != null);
+				var compiledMethod:Function = _compiler.compileObjectToFunction(compiledObject, [_variables, variables], reportError, thisObject != null);
 				var result:*;
 				if (isAssignment && isFuncDef)
 				{
-					// bind 'this' scope and wrap in try/catch
-					result = function(...args):*
-					{
-						try
-						{
-							return compiledMethod.apply(thisObject, args);
-						}
-						catch (e:Error)
-						{
-							reportError(e);
-						}
-						return undefined;
-					};
+					// bind 'this' scope
+					result = Compiler.bind(compiledMethod, thisObject);
 				}
 				else
 				{


Transferred from the Adobe Open Source Subversion Repository

Revision: 8627
Author:   jszeto@adobe.com
Date:     2009-07-16T18:40:07.408921Z

Log Message:
-----------
Adding copyright headers to filter classes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as
+++ frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as
@@ -1,7 +1,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-2007 Adobe Systems Incorporated
+//  Copyright 2008 Adobe Systems Incorporated
 //  All Rights Reserved.
 //
 //  NOTICE: Adobe permits you to use, modify, and distribute this file


fixed incoming web hooks as requirement not showing potential objects

--- flexEditor/src/org/arisgames/editor/util/AppUtils.as
+++ flexEditor/src/org/arisgames/editor/util/AppUtils.as
@@ -750,7 +750,8 @@
 		if (req.requirement == AppConstants.REQUIREMENT_PLAYER_HAS_ITEM_DATABASE ||
 			req.requirement == AppConstants.REQUIREMENT_PLAYER_VIEWED_ITEM_DATABASE ||
 			req.requirement == AppConstants.REQUIREMENT_PLAYER_VIEWED_WEBPAGE_DATABASE ||
-			req.requirement == AppConstants.REQUIREMENT_PLAYER_VIEWED_AUGBUBBLE_DATABASE ||
+			req.requirement == AppConstants.REQUIREMENT_PLAYER_VIEWED_AUGBUBBLE_DATABASE ||
+			req.requirement == AppConstants.REQUIREMENT_PLAYER_HAS_RECEIVED_INCOMING_WEB_HOOK_DATABASE ||
 			req.requirement == AppConstants.REQUIREMENT_PLAYER_VIEWED_PLAYER_NOTE_DATABASE ||
 			req.requirement == AppConstants.REQUIREMENT_PLAYER_VIEWED_NODE_DATABASE ||
 			req.requirement == AppConstants.REQUIREMENT_PLAYER_VIEWED_NPC_DATABASE ||


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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/mx/src/mx/effects/easing/Sine.as
+++ frameworks/projects/mx/src/mx/effects/easing/Sine.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-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.effects.easing
+{
+
+/**
+ *  The Sine class defines three easing functions to implement
+ *  motion with Flex effect classes, where the motion is defined by
+ *  a sine wave.
+ *
+ *  For more information, see http://www.robertpenner.com/profmx.
+ */
+public class Sine
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  The easeIn() method starts motion from zero velocity,
+     *  and then accelerates motion as it executes.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeIn(t:Number, b:Number,
+								  c:Number, d:Number):Number
+	{
+		return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
+	}
+
+    /**
+     *  The easeOut() method starts motion fast,
+     *  and then decelerates motion to a zero velocity as it executes.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeOut(t:Number, b:Number,
+								   c:Number, d:Number):Number
+	{
+		return c * Math.sin(t / d * (Math.PI / 2)) + b;
+	}
+
+    /**
+     *  The easeInOut() method combines the motion
+     *  of the easeIn() and easeOut() methods
+	 *  to start the motion from a zero velocity, accelerate motion,
+	 *  then decelerate to a zero velocity.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeInOut(t:Number, b:Number,
+									 c:Number, d:Number):Number
+	{
+		return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
+	}
+}
+
+}


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

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


Transferred from the Adobe Open Source Subversion Repository

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TouchScrollHelper.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TouchScrollHelper.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Compiler: fixed js-output-type being added at the wrong location

--- src/ASConfigC.as
+++ src/ASConfigC.as
@@ -435,6 +435,12 @@
 			{
 				this._additionalOptions = configData[ASConfigFields.ADDITIONAL_OPTIONS];
 			}
+			//if js-output-type was not specified, use the default
+			//swf projects won't have a js-output-type
+			if(this._jsOutputType)
+			{
+				this._compilerArgs.push("--" + CompilerOptions.JS_OUTPUT_TYPE + "=" + this._jsOutputType);
+			}
 			if(ASConfigFields.APPLICATION in configData)
 			{
 				//if the path is relative, path.resolve() will give us the
@@ -503,12 +509,6 @@
 					compilerOptionsJSON = configData[ASConfigFields.COMPILER_OPTIONS];
 				}
 				readHTMLTemplateOptions(compilerOptionsJSON);
-			}
-			//if js-output-type was not specified, use the default
-			//swf projects won't have a js-output-type
-			if(this._jsOutputType)
-			{
-				this._compilerArgs.push("--" + CompilerOptions.JS_OUTPUT_TYPE + "=" + this._jsOutputType);
 			}
 		}


MF-23 Add to shader color add binary mask for Color type

--- src/com/merlinds/miracle_tool/controllers/converters/XMLColorConverter.as
+++ src/com/merlinds/miracle_tool/controllers/converters/XMLColorConverter.as
@@ -6,8 +6,6 @@
 package com.merlinds.miracle_tool.controllers.converters {
 	import com.merlinds.miracle.meshes.Color;
 	import com.merlinds.unitls.ColorUtils;
-
-	import flash.debugger.enterDebugger;

 	/**
 	 * The XMLColorConverter class present color transformations from the XML to Miracle format.
@@ -91,19 +89,14 @@
 				}
 			}
 			//define color transformation type
-			this.type = TINT;//by default set TINT as type.
-			if(this.alphaMultiplier + this.alphaOffset == 0){
-				if(this.redMultiplier + this.greenMultiplier + this.blueMultiplier == this.redMultiplier * 3 &&
-						this.redOffset + this.greenOffset + this.blueOffset == this.redOffset * 3){
-					this.type = BRIGHTNESS;
-				}
-			}else{
-				if(this.redMultiplier + this.greenMultiplier + this.blueMultiplier +
-					this.redOffset + this.greenOffset + this.blueOffset == 0){
-					this.type = ALPHA;
-				}
+			if(this.alphaMultiplier + this.alphaOffset > 0){
+				this.type += ALPHA;
 			}
-			//in other case Color type is tint
+			if(this.redMultiplier + this.greenMultiplier + this.blueMultiplier +
+					this.redOffset + this.greenOffset + this.blueOffset > 0){
+				this.type += COLOR;
+			}
+			//in other case Color type is none
 		}

 		private function covertTintColor(hex:String):void{