Transferred from the Adobe Open Source Subversion Repository

Revision: 11865
Author:   egeorgie@adobe.com
Date:     2009-11-16T21:41:43.786427Z

Log Message:
-----------
Fix bugs and regressions around List selection and drag and drop

Problems:
1. DND caused regression in ctrl+click deselection because it prevented listeners for mouse up to be attached unless dragEnabled was true (SDK-24210).
2. ListBase check for commitSelection() relies on internal variables that are updated *before* calling itemSelected(). If the item selection at that point causes layout manager to validate properties before returning, the List will enter into a second commitSelection() while the first is mid-way through below on the stack. Net result is the selection is undone giving the illusion the item is not selected (SDK-24132, SDK-24105, SDK-24130).

Fixes:
1. Add listeners for mouse up when either DND is enabled, or there's pending selection on mouse up.
2. ListBase, commitSelection: commit internal variables state before calling itemSelected to prevent entering a second time into commitSelection.

QE notes: None
Doc notes: None
Bugs: SDK-24132, SDK-24105, SDK-24130, SDK-24210
Reviewer: Deepa
Tests run: checkintests, mustella (gumbo/components)
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1043,15 +1043,16 @@
             return false;
         }

-        // Step 3: commit the selection change and caret change
-        if (_selectedIndex != NO_SELECTION)
-            itemSelected(_selectedIndex, false);
-        if (_proposedSelectedIndex != NO_SELECTION && _proposedSelectedIndex != CUSTOM_SELECTED_ITEM)
-            itemSelected(_proposedSelectedIndex, true);
+        // Step 3: commit the selection change and caret change
         _selectedIndex = _proposedSelectedIndex;
-        setCurrentCaretIndex(_proposedSelectedIndex);
         _proposedSelectedIndex = NO_PROPOSED_SELECTION;

+        if (oldSelectedIndex != NO_SELECTION)
+            itemSelected(oldSelectedIndex, false);
+        if (_selectedIndex != NO_SELECTION && _selectedIndex != CUSTOM_SELECTED_ITEM)
+            itemSelected(_selectedIndex, true);
+        setCurrentCaretIndex(_selectedIndex);
+
         // Step 4: dispatch the "change" event and "caretChange"
         // events based on the dispatchChangeEvents parameter. Overrides may
         // chose to dispatch the change/caretChange events


Transferred from the Adobe Open Source Subversion Repository

Revision: 12537
Author:   smgilson@adobe.com
Date:     2009-12-04T17:41:47.951816Z

Log Message:
-----------
Fix for FLEXDOCS-1157 - Spark List-based comps have documenation saying they don't support BasicLayout

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -83,6 +83,11 @@
 /**
  *  The ListBase class is the base class for all components that support
  *  selection.
+ *
+ *
Note: The Spark list-based controls (the Spark ListBase class and its subclasses
+ *  such as ButtonBar, ComboBox, DropDownList, List, and TabBar) do not support the BasicLayout class
+ *  as the value of the layout property.
+ *  Do not use BasicLayout with the Spark list-based controls.

  *
  *  @mxml
The <s:ListBase> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:


Transferred from the Adobe Open Source Subversion Repository

Revision: 20292
Author:   smgilson@adobe.com
Date:     2011-02-11T16:53:14.813687Z

Log Message:
-----------
Minor ASDoc updates

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintets
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/styles/metadata/AdvancedNonInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1558,6 +1558,7 @@
     //--------------------------------------------------------------------------

     /**
+     *  @private
      *  Called when an item has been added to this component.
      *
      *  @langversion 3.0
@@ -1577,6 +1578,7 @@
     }

     /**
+     *  @private
      *  Called when an item has been removed from this component.
      *
      *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 8031
Author:   egeorgie@adobe.com
Date:     2009-06-20T01:10:03.288554Z

Log Message:
-----------
Scrub the TODOs in the framework, convert to FIXMEs in the new convention and assigning an owner.

Doc Notes: N/A
Bugs: N/A
Reviewer: Deepa
tests: build, checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/VolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ModifiedCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ErrorSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.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/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.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/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/LineSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -263,7 +263,7 @@
     	visibleChanged = true;

     	invalidateDisplayList();
-    }
+        }

     //--------------------------------------------------------------------------
     //
@@ -472,89 +472,89 @@
     //
     //--------------------------------------------------------------------------

-	//----------------------------------
+    //----------------------------------
 	//  isTruncated
-	//----------------------------------
+    //----------------------------------

-	/**
-	 *  @private
+    /**
+     *  @private
 	 *  Storage for the isTruncated property.
-	 */
+     */
 	mx_internal var _isTruncated:Boolean = false;
-
-	/**
+
+    /**
 	 *  Determines if the text, once composed, has been truncated.
 	 *
 	 *  @return true if the text has been truncated.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
 	public function get isTruncated():Boolean
-	{
+    {
 		// For some reason, the compiler needs an explicit cast to Boolean
 		// to avoid a warning even though at runtime "is Boolean" is true.
 		return Boolean(_isTruncated);
-	}
+    }
+
+    //----------------------------------
+	//  maxDisplayedLines
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+	private var _maxDisplayedLines:int = 0;
+
+    /**
+     *  Documentation is not currently available.
+     *  This property is ignored if lineBreak="explicit".
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+	public function get maxDisplayedLines():int
+    {
+		return _maxDisplayedLines;
+    }
+
+    /**
+     *  @private
+     */
+	public function set maxDisplayedLines(value:int):void
+    {
+		if (value != _maxDisplayedLines)
+    	{
+			_maxDisplayedLines = value;
+
+			invalidateTextLines();
+
+    		invalidateSize();
+    		invalidateDisplayList();
+    	}
+    }

-	//----------------------------------
-	//  maxDisplayedLines
-	//----------------------------------
-
-	/**
-	 *  @private
-	 */
-	private var _maxDisplayedLines:int = 0;
-
-	/**
-	 *  Documentation is not currently available.
-	 *  This property is ignored if lineBreak="explicit".
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get maxDisplayedLines():int
-	{
-		return _maxDisplayedLines;
-	}
-
-	/**
-	 *  @private
-	 */
-	public function set maxDisplayedLines(value:int):void
-	{
-		if (value != _maxDisplayedLines)
-		{
-			_maxDisplayedLines = value;
-
-			invalidateTextLines();
-
-			invalidateSize();
-			invalidateDisplayList();
-		}
-	}
-
-	/**
-	 *  @private
-	 */
-	override public function canShareWithNext(element:IGraphicElement):Boolean
-	{
-		return false;
-		// TODO: Returning false is a temporary workaround to fix SDK-21084
-		// for Beta 1. The real problem involves how Group does z-ordering
-		// of its children without taking TextLines into account.
-		// We should restore the code below after we have a proper fix
-		// for SDK-21084.
-
-		// We can share with the next GraphicElement only if it is also
-		// a TextGraphicElement, as TextGraphicElements add child DisplayObjects
-		// instead of drawing the the DisplayObject's graphics.
-		//return element is TextGraphicElement && super.canShareWithNext(element);
-	}
+    /**
+     *  @private
+     */
+    override public function canShareWithNext(element:IGraphicElement):Boolean
+    {
+        return false;
+        // FIXME (egeorgie): Returning false is a temporary workaround to fix SDK-21084
+        // for Beta 1. The real problem involves how Group does z-ordering
+        // of its children without taking TextLines into account.
+        // We should restore the code below after we have a proper fix
+        // for SDK-21084.
+
+        // We can share with the next GraphicElement only if it is also
+        // a TextGraphicElement, as TextGraphicElements add child DisplayObjects
+        // instead of drawing the the DisplayObject's graphics.
+        //return element is TextGraphicElement && super.canShareWithNext(element);
+    }

     //----------------------------------
     //  styleChainInitialized
@@ -638,7 +638,7 @@
      */
     override public function parentChanged(value:Group):void
     {
-        // TODO EGeorgie: we add event listener to the parent, as adding event
+        // FIXME (egeorgie): we add event listener to the parent, as adding event
         // listener to the TextGraphicElement itself doesn't work, as we perform
         // double invalidation, but our updateDisplayList gets called only once
         // and  the code in the base GraphicElement class assumes that
@@ -721,7 +721,7 @@
     {
         super.setLayoutBoundsSize(width, height, postLayoutTransform);

-        // TODO EGeorgie: possible optimization - if we reflow the text
+        // FIXME (egeorgie): possible optimization - if we reflow the text
         // immediately, we'll be able to detect whether the constrained
         // width causes the measured height to change.
         // Also certain layouts like vertical/horizontal will
@@ -792,7 +792,7 @@
         var compose:Boolean = false;
         var clipText:Boolean = false;

-        // ToDo: optimize for right-to-left text so compose isn't always done
+        // FIXME (gosmith): optimize for right-to-left text so compose isn't always done
         // when height or width changes.
         if (invalidateCompose ||
             composeForAlignStyles(unscaledWidth, unscaledHeight))
@@ -1179,14 +1179,14 @@
             // redo the truncation if we don't already have the number of
             // truncation lines needed.
             if (maxDisplayedLines > 0 &&
-                (unscaledHeight < bounds.height ||
+               (unscaledHeight < bounds.height ||
                  textLines.length != maxDisplayedLines))
             {
                 return true;
             }
         }

-        // ToDo: optimize this case.
+        // FIXME (gosmith): optimize this case.
         if (getStyle("blockProgression") != "tb")
             return true;

@@ -1206,7 +1206,7 @@
                 return true;
         }

-        // ToDo: optimize this case.
+        // FIXME (gosmith): optimize this case.
         if (getStyle("blockProgression") != "tb")
             return true;


TLF might add a shape and mess up baseline calculations when there is a backgroundColor

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -29,8 +29,6 @@
 import flash.text.engine.TextLine;
 import flash.text.engine.TextLineValidity;

-import flashx.textLayout.compose.TextLineRecycler;
-
 import mx.core.IFlexModuleFactory;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
@@ -40,6 +38,8 @@

 import spark.core.IDisplayText;
 import spark.utils.TextUtil;
+
+import flashx.textLayout.compose.TextLineRecycler;

 use namespace mx_internal;

@@ -275,11 +275,23 @@
         // text is vertically aligned then need the composeHeight so the
         // baseline remains consistent when the width is so narrow there
         // are no textLines.
-        if (textLines.length == 0)
+        if (textLines.length == 0 ||
+            (textLines.length == 1 && textLines[0] is Shape))
             createEmptyTextLine(_composeHeight);

         // Return the baseline of the first line of composed text.
-        return textLines.length > 0 ? textLines[0].y : 0;
+        return textLines.length > 0 ? getBaselineFromFirstTextLine() : 0;
+    }
+
+    private function getBaselineFromFirstTextLine():Number
+    {
+        // you may find a Shape in here when background colors are on
+        for each (var tl:DisplayObject in textLines)
+        {
+            if (tl is TextLine)
+                return tl.y;
+        }
+        return 0;
     }

     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 19398
Author:   smgilson@adobe.com
Date:     2010-12-15T20:20:48.744767Z

Log Message:
-----------
ASDoc updates

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/managers/PersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/ContainerDestructionPolicy.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/managers/IPersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/events/ViewNavigatorEvent.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/core/ContainerDestructionPolicy.as
+++ frameworks/projects/mobilecomponents/src/spark/core/ContainerDestructionPolicy.as
@@ -16,11 +16,11 @@
  *  for the destructionPolicy property of spark view
  *  classes.
  *
- *  @see spark.components.ViewNavigatorBase#destructionPolicy
+ *  @see spark.components.supportClasses.ViewNavigatorBase#destructionPolicy
  *  @see spark.components.View#destructionPolicy
  *
  *  @langversion 3.0
- *  @playerversion Flash 10.1
+ *  @playerversion Flash 10
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */


Transferred from the Adobe Open Source Subversion Repository

Revision: 19590
Author:   jasonsj@adobe.com
Date:     2011-01-04T23:44:20.039628Z

Log Message:
-----------
Minimal implementation of IVisualElemnt to support baselinePosition in StyleableTextField.

Updated ActionBar and LabelItemRenderer baselinePosition.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.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/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
@@ -831,6 +831,18 @@
     //
     //--------------------------------------------------------------------------

+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get baselinePosition():Number
+    {
+        return getBaselinePositionForPart(titleDisplay as IVisualElement);
+    }
+
     /**
      *  @private
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 17374
Author:   jasonsj@adobe.com
Date:     2010-08-19T00:49:38.895209Z

Log Message:
-----------
Fixed separator highlight issues in ActionBar buttons
Fixed FXG alignment issues in ActionBar buttons
Added BasicInheritingTextStyles to ActionBar in lieu of finalized mobile styling spec
Changed ActionBar titleDisplay SkinPart from Label to IDisplayText

QE notes:
Doc notes:
Reviewer: jszeto, gruehle
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/.externalToolBuilders</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/NavigationButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ActionButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ActionBarBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/NavigationButton_down.fxg</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/.settings</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/mobiletheme/src/spark/skins/mobile/ActionBarSkin.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/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ActionButton_up.fxg</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as
@@ -16,6 +16,7 @@
 import mx.utils.BitFlagUtil;

 import spark.components.supportClasses.SkinnableComponent;
+import spark.core.IDisplayText;
 import spark.layouts.supportClasses.LayoutBase;

 use namespace mx_internal;
@@ -32,10 +33,370 @@
  */
 [Style(name="backgroundAlpha", type="Number", inherit="no")]

-// FIXME (jasonsj): text styles for titleDisplay?
-//include "../../styles/metadata/BasicInheritingTextStyles.as"
-//include "../../styles/metadata/AdvancedInheritingTextStyles.as"
-//include "../../styles/metadata/SelectionFormatTextStyles.as"
+//--------------------------------------
+// TODO (jasonsj): Final styles are pending mobile styling spec
+// Copied from /spark/src/spark/styles/BasicNonInheritingTextStyles.as
+//--------------------------------------
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#lineBreak
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="lineBreak", type="String", enumeration="toFit,explicit", inherit="no")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingBottom
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="paddingBottom", type="Number", format="Length", inherit="no", minValue="0.0", maxValue="1000.0")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingLeft
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="paddingLeft", type="Number", format="Length", inherit="no", minValue="0.0", maxValue="1000.0")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingRight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="paddingRight", type="Number", format="Length", inherit="no", minValue="0.0", maxValue="1000.0")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingTop
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="paddingTop", type="Number", format="Length", inherit="no", minValue="0.0", maxValue="1000.0")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#verticalAlign
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="verticalAlign", type="String", enumeration="top,middle,bottom,justify", inherit="no")]
+
+//--------------------------------------
+// TODO (jasonsj): Final styles are pending mobile styling spec
+// Copied from /spark/src/spark/styles/BasicInheritingTextStyles.as
+//--------------------------------------
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#alignmentBaseline
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="alignmentBaseline", type="String", enumeration="useDominantBaseline,roman,ascent,descent,ideographicTop,ideographicCenter,ideographicBottom", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#baselineShift
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="baselineShift", type="Object", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#cffHinting
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="cffHinting", type="String", enumeration="horizontalStem,none", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#color
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="color", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#digitCase
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="digitCase", type="String", enumeration="default,lining,oldStyle", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#digitWidth
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="digitWidth", type="String", enumeration="default,proportional,tabular", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#direction
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="direction", type="String", enumeration="ltr,rtl", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#dominantBaseline
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="dominantBaseline", type="String", enumeration="auto,roman,ascent,descent,ideographicTop,ideographicCenter,ideographicBottom", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontFamily
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="fontFamily", type="String", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontLookup
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="fontLookup", type="String", enumeration="auto,device,embeddedCFF", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontSize
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="fontSize", type="Number", format="Length", inherit="yes", minValue="1.0", maxValue="720.0")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontStyle
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="fontStyle", type="String", enumeration="normal,italic", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontWeight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="fontWeight", type="String", enumeration="normal,bold", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#justificationRule
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="justificationRule", type="String", enumeration="auto,space,eastAsian", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#justificationStyle
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="justificationStyle", type="String", enumeration="auto,prioritizeLeastAdjustment,pushInKinsoku,pushOutOnly", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#kerning
+ *
+ *
Kerning is enabled by default for Spark components, but is disabled by default for MX components.
+ *  Spark components interpret default as auto,
+ *  while MX components interpret default as false.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="kerning", type="String", enumeration="auto,on,off", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#ligatureLevel
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="ligatureLevel", type="String", enumeration="common,minimum,uncommon,exotic", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#lineHeight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="lineHeight", type="Object", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#lineThrough
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="lineThrough", type="Boolean", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#locale
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="locale", type="String", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#renderingMode
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="renderingMode", type="String", enumeration="cff,normal", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#textAlign
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textAlign", type="String", enumeration="start,end,left,right,center,justify", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#textAlignLast
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textAlignLast", type="String", enumeration="start,end,left,right,center,justify", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#textAlpha
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textAlpha", type="Number", inherit="yes", minValue="0.0", maxValue="1.0")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#textDecoration
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textDecoration", type="String", enumeration="none,underline", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#textJustify
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="textJustify", type="String", enumeration="interWord,distribute", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#trackingLeft
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="trackingLeft", type="Object", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#trackingRight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="trackingRight", type="Object", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#typographicCase
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="typographicCase", type="String", enumeration="default,capsToSmallCaps,uppercase,lowercase,lowercaseToSmallCaps", inherit="yes")]
+

 /**
  *  The ActionBar class defines a component that includes title, navigation
@@ -216,7 +577,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4
      */
-    public var titleDisplay:Label; // TODO fix after Text spec is drafted
+    public var titleDisplay:IDisplayText;

     //----------------------------------
     //  title
@@ -395,9 +756,14 @@
         if (titleGroup)
         {
             if (value)
+            {
                 titleGroup.mxmlContent = value;
+            }
             else
-                titleGroup.mxmlContent = titleDisplay ? [titleDisplay] : null;
+            {
+                titleGroup.mxmlContent = (titleDisplay is IVisualElement)
+                    ? [titleDisplay] : null;
+            }

             contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX] =
                 BitFlagUtil.update(contentGroupProperties[TITLE_GROUP_PROPERTIES_INDEX] as uint,
@@ -546,7 +912,6 @@
     /**
      *  @private
      */
-    // TODO (chiedozi): Update != to !==
     override protected function partAdded(partName:String, instance:Object):void
     {
         super.partAdded(partName, instance);
@@ -568,7 +933,8 @@
             index = TITLE_GROUP_PROPERTIES_INDEX;

             // use titleContent if provided
-            defaultContent = (titleDisplay) ? [titleDisplay] : null;
+            defaultContent = (titleDisplay is IVisualElement)
+                ? [titleDisplay] : null;
         }
         else if (instance == actionGroup)
         {
@@ -579,7 +945,8 @@
         {
             titleDisplay.text = title;

-            if (titleGroup && !titleContent)
+            if ((titleGroup && !titleContent)
+                && (titleDisplay is IVisualElement))
             {
                 titleGroup.mxmlContent = [titleDisplay];
             }
@@ -592,7 +959,7 @@

             var newContentGroupProperties:uint = 0;

-            if (contentGroupProperties[index].content != undefined)
+            if (contentGroupProperties[index].content !== undefined)
             {
                 group.mxmlContent = contentGroupProperties[index].content;
                 newContentGroupProperties = BitFlagUtil.update(newContentGroupProperties,


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

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

 package mx.collections.errors
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/IDataGridElement.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/IDataGridElement.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.components.gridClasses
 {


FLEX-25617 FLEX-20117 Fix RTE when no errors and accessing message

--- frameworks/projects/framework/src/mx/events/ValidationResultEvent.as
+++ frameworks/projects/framework/src/mx/events/ValidationResultEvent.as
@@ -183,9 +183,12 @@
 	 */
     public function get message():String
     {
-        var msg:String = "";;
-
-		var n:int = results.length;
+        var msg:String = "";
+		var n:int;
+
+		if (results)
+			n = results.length;
+
 		for (var i:int = 0; i < n; ++i)
         {
 			if (results[i].isError)


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

--- frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
+++ frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


fixed null pointer error

fixed null pointer error

--- WeaveCore/src/weave/compiler/StandardLib.as
+++ WeaveCore/src/weave/compiler/StandardLib.as
@@ -603,7 +603,7 @@
 		 */
 		public static function getArrayType(a:Array):Class
 		{
-			if (a.length == 0 || a[0] == null)
+			if (a == null || a.length == 0 || a[0] == null)
 				return null;
 			var type:Class = Object(a[0]).constructor;
 			for each (var item:Object in a)


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/ActionEffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/ActionEffectInstance.as
@@ -14,6 +14,8 @@

 import mx.core.mx_internal;
 import mx.effects.EffectInstance;
+
+use namespace mx_internal;

 /**
  *  The ActionEffectInstance class is the superclass for all
@@ -126,7 +128,7 @@
 		super.play();

 		// Don't save the value if we are playing in reverse.
-		if (!mx_internal::playReversed)
+		if (!playReversed)
 			_startValue = saveStartValue();

 		playedAction = true;


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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.components.supportClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22079
Author:   cframpto@adobe.com
Date:     2011-08-18T19:41:35.622216Z

Log Message:
-----------
Can't @inheritDoc from IEditableText when it doesn't implement the interface.

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -899,7 +899,7 @@
     [Inspectable(category="General", defaultValue="false")]

     /**
-     *  @inheritDoc
+     *  @copy flash.text.TextField#displayAsPassword
      *
      *  @default false
      *
@@ -1079,7 +1079,7 @@
     [Inspectable(category="General", defaultValue="0")]

     /**
-     *  @inheritDoc
+     *  @copy flash.text.TextField#maxChars
      *
      *  @default 0
      *
@@ -1125,7 +1125,7 @@
     [Inspectable(category="General", defaultValue="null")]

     /**
-     *  @inheritDoc
+     *  @copy flash.text.TextField#restrict
      *
      *  @default null
      *
@@ -1888,7 +1888,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  @inheritDoc
+     *  @copy spark.core.IEditableText#insertText()
      *
      *  @see spark.components.RichEditableText#insertText()
      *  @see spark.components.supportClasses.StyleableStageText#insertText()
@@ -1910,7 +1910,7 @@
     }

     /**
-     *  @inheritDoc
+     *  @copy spark.core.IEditableText#appendText()
      *
      *  @see spark.components.RichEditableText#appendText()
      *  @see spark.components.supportClasses.StyleableStageText#appendText()
@@ -1932,7 +1932,7 @@
     }

     /**
-     *  @inheritDoc
+     *  @copy spark.core.IEditableText#selectRange()
      *
      *  @see spark.components.RichEditableText#selectRange()
      *  @see spark.components.supportClasses.StyleableStageText#selectRange()
@@ -1954,7 +1954,7 @@
     }

     /**
-     *  @inheritDoc
+     *  @copy spark.core.IEditableText#selectAll()
      *
      *  @see spark.components.RichEditableText#selectAll()
      *  @see spark.components.supportClasses.StyleableStageText#selectAll()


Transferred from the Adobe Open Source Subversion Repository

Revision: 6843
Author:   jimurphy@adobe.com
Date:     2009-05-12T13:58:34.182467Z

Log Message:
-----------
Merged beta1 revisions 6793,6796-6797,6802,6805,6808-6809,6831 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonBarFirstButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/MouseShieldUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonBarLastButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -29,7 +29,6 @@
 import spark.components.TextSelectionVisibility;
 import spark.events.TextOperationEvent;
 import spark.primitives.RichEditableText;
-import spark.utils.MouseShieldUtil;

 //--------------------------------------
 //  Events
@@ -220,12 +219,6 @@
      */
     mx_internal var parentDrawsFocus:Boolean = false;

-    /**
-     *  @private
-     *  Mouse shield that is put up when this component is disabled.
-     */
-    private var mouseShield:DisplayObject;
-
     //--------------------------------------------------------------------------
     //
     //  Overridden properties: UIComponent
@@ -233,13 +226,40 @@
     //--------------------------------------------------------------------------

     //----------------------------------
+    //  mouseChildren
+    //----------------------------------
+
+    private var _explicitMouseChildren:Boolean = true;
+
+    /**
+     *  @private
+     */
+    override public function set mouseChildren(value:Boolean):void
+    {
+        if (enabled)
+            super.mouseChildren = value;
+        _explicitMouseChildren = value;
+    }
+
+    //----------------------------------
+    //  mouseEnabled
+    //----------------------------------
+
+    private var _explicitMouseEnabled:Boolean = true;
+
+    /**
+     *  @private
+     */
+    override public function set mouseEnabled(value:Boolean):void
+    {
+        if (enabled)
+            super.mouseEnabled = value;
+        _explicitMouseEnabled = value;
+    }
+
+    //----------------------------------
     //  enabled
     //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var enabledChanged:Boolean = false;

     /**
      *  @private
@@ -250,15 +270,14 @@
             return;

         super.enabled = value;
-        enabledChanged = true;
-
         invalidateSkinState();
-
-        // We update the mouseShield that prevents clicks to propagate to
-        // children in our updateDisplayList.
-        invalidateDisplayList();
-    }
-
+
+        // If enabled, reset the mouseChildren, mouseEnabled to the previously
+        // set explicit value, otherwise disable mouse interaction.
+        super.mouseChildren = value ? _explicitMouseChildren : false;
+        super.mouseEnabled  = value ? _explicitMouseEnabled  : false;
+    }
+
     //----------------------------------
     //  baselinePosition
     //----------------------------------
@@ -867,12 +886,6 @@
     //
     //--------------------------------------------------------------------------

-    override protected function updateDisplayList(width:Number, height:Number):void
-    {
-        super.updateDisplayList(width, height);
-        mouseShield = MouseShieldUtil.updateMouseShield(this, mouseShield);
-    }
-
     /**
      *  @private
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 21267
Author:   tkraikit@adobe.com
Date:     2011-05-17T00:07:31.146629Z

Log Message:
-----------
Minor performance tweak on fix to SDK-30308: cache whether or not we're running on iOS to avoid unnecessary String parsing during touch scrolling in/around text fields.

QE notes: -
Doc notes: -
Bugs: SDK-30308
Reviewer: Jason Szeto, Glenn
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -340,6 +340,9 @@
     public function SkinnableTextBase()
     {
         super();
+
+        // cache iOS property
+        isIOS = (Capabilities.version.indexOf("IOS") == 0);
     }

     //--------------------------------------------------------------------------
@@ -370,6 +373,12 @@
      *  The target from the current mouseDown event
      */
     private var mouseDownTarget:InteractiveObject;
+
+    /**
+     *  @private
+     *  Variable that determines whether this application is running on iOS.
+     */
+    private var isIOS:Boolean = false;

     //--------------------------------------------------------------------------
     //
@@ -2192,8 +2201,7 @@
     {
         // if in iOS and keyboard is up and scrolling is occurring, drop the keyboard
         var topLevelApp:Application = FlexGlobals.topLevelApplication as Application;
-        var _isIOS:Boolean = (Capabilities.version.indexOf("IOS") == 0);
-        if (_isIOS && topLevelApp && topLevelApp.isSoftKeyboardActive && editable)
+        if (isIOS && topLevelApp && topLevelApp.isSoftKeyboardActive && editable)
         {
             // set focus
             stage.focus = null;


Set the _xobj metadata property to be non-enumerable so that it does not contaminate for each (in) constructs

--- as3/xobjas3/src/com/rpath/xobj/XObjMetadata.as
+++ as3/xobjas3/src/com/rpath/xobj/XObjMetadata.as
@@ -48,6 +48,7 @@
                try
                {
                    target[METADATA_PROPERTY] = new XObjMetadata();
+                   target.setPropertyIsEnumerable(METADATA_PROPERTY, false);
                    result = target[METADATA_PROPERTY];
                }
                catch (e:Error)


Use better antialiasing when rendering text.

--- flash/src/playn/flash/as/com/googlecode/flashcanvas/CanvasRenderingContext2D.as
+++ flash/src/playn/flash/as/com/googlecode/flashcanvas/CanvasRenderingContext2D.as
@@ -52,6 +52,7 @@
     import flash.text.TextField;
     import flash.text.TextFieldAutoSize;
     import flash.text.TextFormat;
+    import flash.text.AntiAliasType;
     import flash.utils.ByteArray;

     public class CanvasRenderingContext2D
@@ -894,6 +895,7 @@
             var textField:TextField     = new TextField();
             textField.autoSize          = TextFieldAutoSize.LEFT;
             textField.defaultTextFormat = textFormat;
+            textField.antiAliasType     = AntiAliasType.ADVANCED;
             textField.text              = text.replace(/[\t\n\f\r]/g, " ");
             textField.setTextFormat(textFormat);
             return {width: textField.textWidth + 4, height: textField.textHeight + 4 };
@@ -1174,7 +1176,7 @@

             // Remove 2px margins around the text
             var matrix:Matrix = new Matrix();
-//            matrix.translate(-2, -2);
+            matrix.translate(0, -2);

             if (isStroke)
             {
@@ -1187,7 +1189,7 @@

             // Convert the text into BitmapData
             var bitmapData:BitmapData = new BitmapData(width + 4, height + 4, true, 0);
-            bitmapData.draw(textField, matrix);
+            bitmapData.draw(textField, matrix, null, null, null, true);

             // Adjust x coordinates
             switch (state.textAlign)
@@ -1434,4 +1436,4 @@
         }

 }
-}+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6433
Author:   rfrishbe@adobe.com
Date:     2009-04-30T19:55:29.193814Z

Log Message:
-----------
Fix a bug where the display object sharing code in GraphicElement assumes that that drawnDisplayObject is a Sprite, when it could be any display object (in this case a flash.media.Video).

QE Notes: -
Doc Notes: -
Bugs: SDK-20879
Reviewer: Evtim
tests: checkintests

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as
@@ -29,14 +29,12 @@
 import flash.geom.Transform;
 import flash.geom.Vector3D;

-import spark.components.Group;
 import mx.core.AdvancedLayoutFeatures;
 import mx.core.IID;
 import mx.core.IInvalidating;
 import mx.core.ILayoutElement;
 import mx.core.IUIComponent;
 import mx.core.IVisualElement;
-import spark.components.supportClasses.InvalidatingSprite;
 import mx.core.UIComponent;
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
@@ -47,13 +45,16 @@
 import mx.filters.IBitmapFilter;
 import mx.geom.Transform;
 import mx.geom.TransformOffsets;
-import spark.core.IGraphicElement;
 import mx.graphics.IStroke;
-import spark.core.MaskType;
 import mx.managers.ILayoutManagerClient;
 import mx.managers.LayoutManager;
 import mx.utils.MatrixUtil;
 import mx.utils.OnDemandEventDispatcher;
+
+import spark.components.Group;
+import spark.components.supportClasses.InvalidatingSprite;
+import spark.core.IGraphicElement;
+import spark.core.MaskType;
 use namespace mx_internal;

 /**
@@ -3180,7 +3181,13 @@
         // TODO EGeorgie: don't clear the graphics if the GraphicElement is invisible and explicitly owns the DO?
         // If we are the first in the sequence, clear the graphics:
         if (sharedIndex <= 0)
-            Sprite(drawnDisplayObject).graphics.clear();
+        {
+            if (drawnDisplayObject is Sprite)
+                Sprite(drawnDisplayObject).graphics.clear();
+            // TODO (rfrishbe): We don't really support shapes, but we should
+            //else if (drawnDisplayObject is Shape)
+                //Shape(drawnDisplayObject).graphics.clear();
+        }

         if (visible || sharedIndex == -1)
             updateDisplayList(_width, _height);


Transferred from the Adobe Open Source Subversion Repository

Revision: 22481
Author:   chiedozi@adobe.com
Date:     2011-09-09T22:25:45.682826Z

Log Message:
-----------
Fixed a small issue where the cube flip transition would run in the wrong location when a navigator is not positioned at 0, 0

QE notes:
Doc notes:
Bugs:SDK-31475
Reviewer: Evtim
Tests run: mustella-mobile, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
@@ -597,8 +597,8 @@
     private function alignCubeFaces(startFace:Object, endFace:Object):void
     {
         // Position the xform center of outer transitionGroup.
-        transitionGroup.x = viewWidth / 2;
-        transitionGroup.y = viewHeight / 2;
+        transitionGroup.x += viewWidth / 2;
+        transitionGroup.y += viewHeight / 2;
         transitionGroup.z = vertical ? (viewHeight / 2) : (viewWidth / 2);

         // Position the 'faces' of our cube.


Transferred from the Adobe Open Source Subversion Repository

Revision: 17880
Author:   chiedozi@adobe.com
Date:     2010-09-27T18:29:10.549984Z

Log Message:
-----------
Fixed an infinite validation loop in ViewNavigator that would occur if the firstView of a navigator was set to null

QE notes:
Doc notes:
Bugs: SDK-27988
Reviewer: Ryan
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/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/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -30,9 +30,9 @@
 import mx.resources.ResourceManager;

 import spark.components.supportClasses.NavigationStack;
-import spark.core.ContainerDestructionPolicy;
 import spark.components.supportClasses.ViewHistoryData;
 import spark.components.supportClasses.ViewNavigatorBase;
+import spark.core.ContainerDestructionPolicy;
 import spark.effects.Animate;
 import spark.effects.Fade;
 import spark.effects.Move;
@@ -1065,8 +1065,10 @@

         // If this is the components first validation pass, push the firstView
         // on the stack if possible, otherwise set the currentViewChange flag
-        // to true so that an empty screen is created
-        if (!initialized && navigationStack.length == 0)
+        // to true so that an empty screen is created.  If the currentViewData
+        // property exists, that means an empty view was previously created
+        // because a firstView property wasn't supplied.
+        if (!initialized && navigationStack.length == 0 && !currentViewData)
         {
             if (firstView)
                 navigationStack.push(firstView, firstViewData);
@@ -1993,6 +1995,8 @@
      */
     override public function updatePropertiesForView(view:View):void
     {
+        super.updatePropertiesForView(view);
+
         if (!actionBar)
             return;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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

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

Modified Paths:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
@@ -53,6 +53,11 @@
     /**
      *  Number of pixels by which to modify the y of the component.
      *  Values may be negative.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var yBy:Number;

@@ -62,6 +67,11 @@

     /**
      *  Initial y. If omitted, Flex uses the current size.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var yFrom:Number;

@@ -72,6 +82,11 @@

     /**
      *  Final y, in pixels.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var yTo:Number;

@@ -82,6 +97,11 @@
     /**
      *  Number of pixels by which to modify the width of the component.
      *  Values may be negative.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var xBy:Number;

@@ -91,6 +111,11 @@

     /**
      *  Initial x. If omitted, Flex uses the current size.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var xFrom:Number;

@@ -100,6 +125,11 @@

     /**
      *  Final x, in pixels.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public var xTo:Number;


203 Removed unused bits

203 Removed unused bits

--- raw/src/org/yellcorp/format/printf/parser/Parser.as
+++ raw/src/org/yellcorp/format/printf/parser/Parser.as
@@ -19,10 +19,7 @@

 public class Parser
 {
-    public static const ARG_PTR:int = 0;
-
     private var lexer:Lexer;
-    private var code:Array;
     private var field:FieldProperties;
     private var output:StringBuilder;
     private var context:RenderContext;
@@ -50,7 +47,7 @@
         return output.toString();
     }

-    private function parse(text:String):Array
+    private function parse(text:String):void
     {
         output.clear();
         lexer.start(text);
@@ -60,8 +57,6 @@
         {
             parseToken();
         }
-
-        return code;
     }

     private function parseToken():void


Transferred from the Adobe Open Source Subversion Repository

Revision: 16649
Author:   cframpto@adobe.com
Date:     2010-06-24T13:41:51.341811Z

Log Message:
-----------
The following changes apply to Spark DataGrid only.   Code reviews have been deferred until the implementation is closer to completion.

Implemented most of the requireSelection functionality.  The interactive and programmatic pieces should work if the dataProvider and columns collections remains constant.  A few of the collectionChange handlers, marked with FIXMEs, notably remove, still need to have this functionality added.

Also fixed preserveSelection for rows so the selection will be preserved across refreshes.  Cells are still not preserved across refreshes because that requires much more work and perhaps some changes to the cell selection data structures - marked with a FIXME.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridContainerBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
@@ -205,8 +205,9 @@
             return;

         _requireSelection = value;
-
-        // TBD: implement requireSelection
+
+        if (_requireSelection)
+            ensureRequiredSelection();
     }

     //----------------------------------
@@ -259,6 +260,9 @@
                 removeAll();
                 break;
         }
+
+        if (requireSelection)
+            ensureRequiredSelection();
     }

     /**
@@ -395,7 +399,8 @@
      }

     /**
-     *  Removes the current selection.
+     *  If requireSelection is false, removes the current
+     *  selection.
      *
      *  @return true if the selection is changed.
      *
@@ -406,9 +411,10 @@
      */
     public function removeAll():Boolean
     {
-        var selectionChanged:Boolean = removeSelection() || selectAllFlag;
-        selectAllFlag = false;
-        return selectionChanged;
+        if (requireSelection)
+            return false;
+
+        return removeSelection();
     }

     //----------------------------------
@@ -559,7 +565,7 @@
         if (!validateIndex(rowIndex))
             return false;

-        removeAll();
+        removeSelection();

         selectedRows.length = 1;
         selectedRows[0] = rowIndex;
@@ -629,7 +635,10 @@
     {
         if (!validateIndex(rowIndex) )
             return false;
-
+
+        if (requireSelection && containsOnlyRow(rowIndex))
+            return false;
+
         if (selectAllFlag)
         {
             // Add the row to the delete list.
@@ -665,7 +674,7 @@
         if (!validateIndices(rowIndices))
             return false;

-        removeAll();
+        removeSelection();

         for each (var rowIndex:int in rowIndices)
         {
@@ -834,7 +843,7 @@
         if (!validateCell(rowIndex, columnIndex))
             return false;

-        removeAll();
+        removeSelection();
         addCellRegion(rowIndex, columnIndex, 1, 1);

         return true;
@@ -897,6 +906,9 @@
     public function removeCell(rowIndex:int, columnIndex:int):Boolean
     {
         if (!validateCell(rowIndex, columnIndex))
+            return false;
+
+        if (requireSelection && containsOnlyCell(rowIndex, columnIndex))
             return false;

         if (selectAllFlag)
@@ -940,7 +952,7 @@
         if (!validateCellRegion(rowIndex, columnIndex, rowCount, columnCount))
             return false;

-        removeAll();
+        removeSelection();
         addCellRegion(rowIndex, columnIndex, rowCount, columnCount);

         return true;
@@ -998,7 +1010,7 @@
      */
     private function hasRowSelection():Boolean
     {
-        return selectedRows.length > 0;
+        return allRows().length > 0;
     }

     /**
@@ -1008,26 +1020,54 @@
      *  selected rows.
      */
     private function hasCellSelection():Boolean
-    {
-        return cellRegions.length > 0;
-    }
-
-    /**
-     *  @private
-     *  Remove any currently selected rows, cells and cached items.
+    {
+        return allCells().length > 0;
+    }
+
+    /**
+     *  @private
+     *  If requiredSelection, then there must always be at least one row/cell
+     *  selected.
      *
      *  @return true if the selection has changed.
      */
+    private function ensureRequiredSelection():Boolean
+    {
+        var selectionChanged:Boolean;
+
+        if (isRowSelectionMode())
+        {
+            if (!hasRowSelection())
+                selectionChanged = setRow(0);
+        }
+        else if (isCellSelectionMode())
+        {
+            if (!hasCellSelection())
+                selectionChanged = setCell(0, 0);
+        }
+
+        return selectionChanged;
+    }
+
+    /**
+     *  @private
+     *  Remove any currently selected rows, cells and cached items.  This
+     *  disregards the requireSelection flag.
+     *
+     *  @return true if the selection has changed.
+     */
     private function removeSelection():Boolean
     {
-        const hasSelection:Boolean = selectedRows.length > 0 ||
-            cellRegions.length > 0;
+        const hasSelection:Boolean =
+            selectAllFlag || hasRowSelection() || hasCellSelection();

         selectedRows.length = 0;
         cellRegions.length = 0;

         // Remove cached data items.
         selectedRowValues.length = 0;
+
+        selectAllFlag = false;

         return hasSelection;
     }
@@ -1558,6 +1598,9 @@
         else if (cellRegions.length)
             adjustCellsAfterRefresh();

+        if (requireSelection)
+            ensureRequiredSelection();
+
         return true;
     }

@@ -1570,7 +1613,6 @@
         // Make a pass thru the saved items, and if the item is still in
         // the data provider, keep it in the selection, else remove it from
         // the selection.
-        var newSelectedRowValues:Array = [];
         selectedRows.length = 0;
         for each (var item:Object in selectedRowValues)
         {
@@ -1581,15 +1623,12 @@
             if (itemIndex != -1)
             {
                 selectedRows.push(itemIndex);
-                newSelectedRowValues[itemIndex] = item;
-            }
-        }
-
-        selectedRowValues = newSelectedRowValues;
+            }
+        }

         return true;
     }
-
+
     /**
      *  @private
      *  Sort or filter on collection changed.  Update selected cells.
@@ -1600,7 +1639,9 @@
         // the data provider, keep it in the selection, else remove it from
         // the selection.

-        var newSelectedRowValues:Array = [];
+        // FIXME(cframpto): this only works for the first refresh since the
+        // selection before the refresh which is in cellRegions is overwritten
+
         var oldCellRegions:Vector.<CellRegion> = cellRegions;
         cellRegions = new Vector.<CellRegion>();

@@ -1629,13 +1670,10 @@
                         selectAllFlag, oldCellRegions, oldRowIndex, columnIndex))
                 {
                     addCell(itemIndex, columnIndex);
-                    newSelectedRowValues[itemIndex] = item;
                 }
             }
         }
-
-        selectedRowValues = newSelectedRowValues;
-
+
         return true;
     }

@@ -1649,6 +1687,8 @@
         if (selectAllFlag)
             return true;

+        // FIXME(cframpto): handle requireSelection
+
         const firstRemoveIndex:int = event.location;
         const lastRemoveIndex:int = event.location + event.items.length - 1;

@@ -1665,7 +1705,7 @@
      *  Item removed.  Update selected rows.
      */
     private function adjustRowsAfterRemove(firstRemoveIndex:int,
-                                            lastRemoveIndex:int):Boolean
+                                           lastRemoveIndex:int):Boolean
     {
         var elementChanged:Boolean;

@@ -1703,7 +1743,7 @@

         if ((firstVisibleOffset != -1) && (lastVisibleOffset != -1))
         {
-            // TBD: so this is assuming selectedRows is in some kind of order??
+            // FIXME: so this is assuming selectedRows is in some kind of order??
             var removeCount:int = (lastVisibleOffset - firstVisibleOffset) + 1;
             selectedRows.splice(firstVisibleOffset, removeCount);
             elementChanged = true;
@@ -1781,8 +1821,9 @@
      */
     private function dataProviderCollectionReset(event:CollectionEvent):Boolean
     {
-        // Remove selection and clear selectAllFlag.
-        removeAll();
+        removeSelection();
+        if (requireSelection)
+            ensureRequiredSelection();

         return true;
     }
@@ -1873,6 +1914,7 @@
             case CollectionEventKind.REFRESH:
             case CollectionEventKind.RESET:
             {
+                // FIXME: is this right for requireSelection?
                 if (hasCellSelection())
                     removeAll();
                 result = true;
@@ -1970,6 +2012,8 @@
         if (!hasCellSelection())
             return true;

+        // FIXME(cframpto): requireSelection
+
         var elementChanged:Boolean;

         const firstRemoveIndex:int = event.location;


FLEX-33315 fixed selectedItems not being in sync with selectedItem when selectedItem changes

--- frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
+++ frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as
@@ -3033,6 +3033,7 @@
         if (!collection || collection.length == 0)
         {
             _selectedItem = data;
+			bSelectedItemsChanged = true;
             bSelectedItemChanged = true;
             bSelectionChanged = true;

@@ -3065,7 +3066,7 @@
      */
     public function get selectedItems():Array
     {
-        return bSelectedItemsChanged ? _selectedItems : copySelectedItems();
+        return bSelectedItemsChanged && _selectedItems ? _selectedItems : copySelectedItems();
     }

     /**
@@ -5613,6 +5614,7 @@

         _selectedIndex = -1;
         _selectedItem = null;
+		_selectedItems = null;

         caretIndex = -1;
         anchorIndex = -1;


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/SoundEffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/SoundEffectInstance.as
@@ -0,0 +1,597 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects.effectClasses
+{
+
+import flash.events.Event;
+import flash.events.TimerEvent;
+import flash.media.Sound;
+import flash.media.SoundChannel;
+import flash.media.SoundTransform;
+import flash.utils.Timer;
+import mx.core.mx_internal;
+import mx.effects.EffectInstance;
+import mx.effects.Tween;
+
+/**
+ *  The SoundEffectInstance class implements the instance class
+ *  for the SoundEffect effect.
+ *  Flex creates an instance of this class when it plays a SoundEffect effect;
+ *  you do not create one yourself.
+ *
+ *  @see mx.effects.Fade
+ */
+public class SoundEffectInstance extends EffectInstance
+{
+    include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param target The Object to animate with this effect.
+	 */
+	public function SoundEffectInstance(target:Object)
+	{
+		super(target);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private.
+	 */
+	private var origVolume:Number;
+
+	/**
+	 *  @private.
+	 */
+	private var origPan:Number;
+
+	/**
+	 *  @private.
+	 */
+	private var volumeTween:Tween;
+
+	/**
+	 *  @private.
+	 */
+	private var panTween:Tween;
+
+	/**
+	 *  @private.
+	 */
+	private var soundDuration:Number;
+
+	/**
+	 *  @private.
+	 */
+	private var tweenCount:int = 0;
+
+	/**
+	 *  @private.
+	 */
+	private var intervalID:Number;
+
+	/**
+	 *  @private.
+	 */
+	private var endOnTweens:Boolean = false;
+
+	/**
+	 *  @private.
+	 */
+	private var pausedPosition:Number;
+
+	/**
+	 *  @private.
+	 */
+	private var resumedPosition:Number = 0;
+
+	/**
+	 *  @private.
+	 */
+	private var pausedTransform:SoundTransform;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  totalDuration
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function get totalDuration():Number
+	{
+		if (useDuration)
+		{
+			return duration;
+		}
+		else
+		{
+			// Include the number of loops .
+			var multiplier:int = loops + 1;
+			return sound.length * multiplier;
+		}
+	}
+
+	//----------------------------------
+	//  bufferTime
+	//----------------------------------
+
+	/**
+     *  The SoundEffect class uses an internal Sound object to control
+     *  the MP3 file.
+	 *  This property specifies the minimum number of milliseconds
+	 *  worth of sound data
+	 *  to hold in the Sound object's buffer.
+	 *  The Sound object waits until it has at least
+	 *  this much data before beginning playback,
+	 *  and before resuming playback after a network stall.
+	 *
+	 *  @default 1000
+	 */
+	public var bufferTime:Number = 1000;
+
+	//----------------------------------
+	//  loops
+	//----------------------------------
+
+	/**
+	 *	The number of times to play the sound in a loop, where a value of
+	 *  0 means play the effect once, a value of 1 means play the effect twice,
+	 *  and so on. If you repeat the MP3 file, it still uses the setting of the
+	 *  useDuration property to determine the playback time.
+	 *
+	 *
The duration property takes precedence
+	 *  over this property.
+	 *	If the effect duration is not long enough to play the sound at least once,
+	 *  the sound does not loop.

+	 *
+	 *  @default 0
+	 */
+	public var loops:int = 0;
+
+	//----------------------------------
+	//  isLoading
+	//----------------------------------
+
+	/**
+	 *	This property is true if the MP3 has been loaded.
+	 */
+	public function get isLoading():Boolean
+	{
+		return source is Class ||
+			   sound.bytesTotal > 0;
+	}
+
+	//----------------------------------
+	//  panEasingFunction
+	//----------------------------------
+
+	/**
+	 *	The easing function for the pan effect.
+	 *  This function is used to interpolate between the values
+	 *  of panFrom and panTo.
+	 */
+	public var panEasingFunction:Function;
+
+	//----------------------------------
+	//  panFrom
+	//----------------------------------
+
+	/**
+	 *	Initial pan of the Sound object.
+	 *  The value can range from -1.0 to 1.0, where -1.0 uses only the left channel,
+	 *  1.0 uses only the right channel, and 0.0 balances the sound evenly
+	 *  between the two channels.
+	 *
+	 *  @default 0
+	 */
+	public var panFrom:Number;
+
+	//----------------------------------
+	//  panTo
+	//----------------------------------
+
+	/**
+	 *	Final pan of the Sound object.
+	 *  The value can range from -1.0 to 1.0, where -1.0 uses only the left channel,
+	 *  1.0 uses only the right channel, and 0.0 balances the sound evenly
+	 *  between the two channels.
+	 *
+	 *  @default 0
+	 */
+	public var panTo:Number;
+
+	//----------------------------------
+	//  soundChannel
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the soundChannel property.
+	 */
+	private var _soundChannel:SoundChannel;
+
+	/**
+	 *	The SoundChannel object that the MP3 file has been loaded into.
+	 */
+	public function get soundChannel():SoundChannel
+	{
+		return _soundChannel;
+	}
+
+	//----------------------------------
+	//  sound
+	//----------------------------------
+
+	/**
+	 *  Reference to the internal Sound object. The SoundEffect uses this
+	 *  instance to play the MP3 file.
+	 */
+	public var sound:Sound;
+
+	//----------------------------------
+	//  source
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the source property.
+	 */
+	private var _source:Object;
+
+	/**
+	 *	The URL or class of the MP3 file to play.
+	 *  If you have already embedded the MP3 file, using the
+	 *  Embed keyword, you can pass the Class object
+	 *  of the MP3 file to the source property.
+	 *  Otherwise, specify the full URL to the MP3 file.
+	 */
+	public function get source():Object
+	{
+		return _source;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set source(value:Object):void
+	{
+		_source = value;
+	}
+
+	//----------------------------------
+	//  startTime
+	//----------------------------------
+
+	/**
+	 *  The initial position in the MP3 file, in milliseconds,
+	 *  at which playback should start.
+	 *
+	 *  @default 0
+	 */
+	public var startTime:Number = 0;
+
+	//----------------------------------
+	//  useDuration
+	//----------------------------------
+
+	/**
+	 *  If true, stop the effect
+	 *  after the time specified by the duration
+	 *  property has elapsed.
+	 *  If false, stop the effect
+	 *  after the MP3 finishes playing or looping.
+	 *
+	 *  @default true
+	 */
+	public var useDuration:Boolean = true;
+
+	//----------------------------------
+	//  volumeEasingFunction
+	//----------------------------------
+
+	/**
+	 *	The easing function for the volume effect.
+	 *  Use this function to interpolate between the values
+	 *  of volumeFrom and volumeTo.
+	 */
+	public var volumeEasingFunction:Function;
+
+	//----------------------------------
+	//  volumeFrom
+	//----------------------------------
+
+	/**
+	 *	Initial volume of the Sound object.
+	 *  Value can range from 0.0 to 1.0.
+	 *
+	 *  @default 1.0
+	 */
+	public var volumeFrom:Number;
+
+	//----------------------------------
+	//  volumeTo
+	//----------------------------------
+
+	/**
+	 *	Final volume of the Sound object.
+	 *  Value can range from 0.0 to 1.0.
+	 *
+	 *  @default 1.0
+	 */
+	public var volumeTo:Number;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function play():void
+	{
+		// Dispatch an effectStart event from the target.
+		super.play();
+
+		/*
+		if (!isLoading && sound)
+			sound.load(new URLRequest(source), bufferTime);
+		*/
+
+		var transform:SoundTransform = new SoundTransform();
+
+		if (!isNaN(volumeFrom) || !isNaN(volumeTo))
+		{
+			if (isNaN(volumeFrom))
+				volumeFrom = 1;
+			else if (isNaN(volumeTo))
+				volumeTo = 1;
+
+			transform.volume = volumeFrom;
+
+			volumeTween = new Tween(this, volumeFrom, volumeTo, totalDuration);
+
+			if (volumeEasingFunction != null)
+				volumeTween.easingFunction = volumeEasingFunction;
+
+			volumeTween.setTweenHandlers(mx_internal::onVolumeTweenUpdate,
+										 mx_internal::onVolumeTweenEnd);
+
+			tweenCount++;
+		}
+
+		if (!isNaN(panFrom) || !isNaN(panTo))
+		{
+			if (isNaN(panFrom))
+				panFrom = 0;
+			else if (isNaN(panTo))
+				panTo = 0;
+
+			transform.pan = panFrom;
+
+			panTween = new Tween(this, panFrom, panTo, totalDuration);
+
+			if (panEasingFunction != null)
+				panTween.easingFunction = panEasingFunction;
+
+			panTween.setTweenHandlers(mx_internal::onPanTweenUpdate,
+									  mx_internal::onPanTweenEnd);
+
+			tweenCount++;
+		}
+
+		endOnTweens = (tweenCount > 0);
+
+		if (useDuration && !endOnTweens)
+		{
+			var timer:Timer = new Timer(totalDuration, 1);
+			timer.addEventListener(TimerEvent.TIMER, durationEndHandler);
+			timer.start();
+		}
+
+		pausedPosition = NaN; // Clear the paused position
+		resumedPosition = startTime;
+
+		_soundChannel = sound.play(startTime, loops, transform);
+		_soundChannel.addEventListener("soundComplete", soundCompleteHandler);
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function pause():void
+	{
+		super.pause();
+
+		if (volumeTween)
+			volumeTween.pause();
+		if (panTween)
+			panTween.pause();
+
+		pausedPosition = _soundChannel.position; // Save the paused position
+		pausedTransform = _soundChannel.soundTransform;
+
+		_soundChannel.stop();
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function stop():void
+	{
+		super.stop();
+
+		if (volumeTween)
+			volumeTween.stop();
+		if (panTween)
+			panTween.stop();
+
+		_soundChannel.stop();
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function resume():void
+	{
+		super.resume();
+
+		if (volumeTween)
+			volumeTween.resume();
+
+		if (panTween)
+			panTween.resume();
+
+		resumedPosition += pausedPosition;
+
+		_soundChannel = sound.play(resumedPosition, loops, pausedTransform);
+		_soundChannel.addEventListener("soundComplete", soundCompleteHandler);
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function end():void
+	{
+		super.end();
+
+		pausedPosition = NaN; // Clear the paused position
+		resumedPosition = startTime;
+
+		if (volumeTween)
+			volumeTween.endTween();
+
+		if (panTween)
+			panTween.endTween();
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function finishEffect():void
+	{
+		if (_soundChannel)
+			_soundChannel.stop();
+
+		super.finishEffect();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	mx_internal function onVolumeTweenUpdate(value:Object):void
+	{
+		// Need to reset the soundTransform object in order
+		var copyTransform:SoundTransform = _soundChannel.soundTransform;
+		copyTransform.volume = Number(value);
+		_soundChannel.soundTransform = copyTransform;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function onVolumeTweenEnd(value:Object):void
+	{
+		mx_internal::onVolumeTweenUpdate(value);
+
+		finishTween();
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function onPanTweenUpdate(value:Object):void
+	{
+		// Need to reset the soundTransform object in order
+		var copyTransform:SoundTransform = _soundChannel.soundTransform;
+		copyTransform.pan = Number(value);
+		_soundChannel.soundTransform = copyTransform;
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function onPanTweenEnd(value:Object):void
+	{
+		mx_internal::onPanTweenUpdate(value);
+
+		finishTween();
+	}
+
+	/**
+	 *  @private
+	 */
+	private function finishTween():void
+	{
+		if (tweenCount == 0 || --tweenCount == 0)
+		{
+			if (_soundChannel)
+				_soundChannel.stop();
+
+			finishRepeat();
+		}
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Event handlers
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function durationEndHandler(event:TimerEvent):void
+	{
+		finishTween();
+	}
+
+	/**
+	 *  @private
+	 */
+	private function soundCompleteHandler(event:Event):void
+	{
+		dispatchEvent(event);
+		// We don't have any tweens, so we need to explicitly
+		// tell the effect that we are finished.
+		if (!useDuration && !endOnTweens)
+			finishTween();
+	}
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17033
Author:   chiedozi@adobe.com
Date:     2010-07-23T07:27:59.569540Z

Log Message:
-----------
Fixed a RTE that occurred when a slide transition was run when no ActionBar was visible
Fixed a RTE that occurred when the slide transition failed to generated valid bitmaps
Fixed a bug in ActionBarSkin and ViewNavigatorSkin where content groups could have negative sizes

QE notes:
Doc notes:
Bugs: SDK-26996, SDK-26997
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<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/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>

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