Transferred from the Adobe Open Source Subversion Repository

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

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

Removed itemRendererRegistry from DataGroup.

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

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

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -256,7 +256,7 @@
     {
         super.itemSelected(index, selected);

-        var renderer:Object = dataGroup.mx_internal::getRendererForItemAt(index);
+        var renderer:Object = dataGroup.getRendererForItemAt(index);

         if (renderer)
         {


default labeling now uses String()

default labeling now uses String()

--- WeaveUI/src/weave/ui/VariableListController.as
+++ WeaveUI/src/weave/ui/VariableListController.as
@@ -235,7 +235,7 @@
 			if (_labelFunction != null)
 				return _labelFunction(item);
 			else
-				return getItemName(item);
+				return String(item);
 		}

 		public function set labelFunction(value:Function):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

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

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

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListItemDragProxy.as
@@ -25,6 +25,11 @@
  *  or copies of the objects being dragged
  *
  *  @see mx.controls.dataGridClasses.DataGridDragProxy
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ListItemDragProxy extends UIComponent
 {
@@ -38,6 +43,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ListItemDragProxy()
     {
@@ -124,6 +134,11 @@
             {
                 /*trace("ListItemDragProxy.measure x",child.x,"y",child.y,"h",child.getExplicitOrMeasuredHeight(),
                         "w",child.getExplicitOrMeasuredWidth(),"child",child);
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 9
+                *  @playerversion AIR 1.1
+                *  @productversion Flex 3
                 */
                 w = Math.max(w, child.x + child.width);
                 h = Math.max(h, child.y + child.height);


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

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

 package mx.collections
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12540
Author:   smgilson@adobe.com
Date:     2009-12-04T18:35:53.988232Z

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

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/airspark/src/spark/components/WindowedApplication.as
+++ frameworks/projects/airspark/src/spark/components/WindowedApplication.as
@@ -415,9 +415,7 @@
  *  />
  *  </pre>
  *
- *  @see spark.components.Windowed
- *  @see spark.skins.spark.SparkChromeWindowedApplicationSkin
- *  @see spark.skins.spark.WindowedApplicationSkin
+ *  @see spark.components.Window
  *
  *  @langversion 3.0
  *  @playerversion AIR 1.5


Transferred from the Adobe Open Source Subversion Repository

Revision: 6384
Author:   smgilson@adobe.com
Date:     2009-04-29T17:35:57.804487Z

Log Message:
-----------
First pass on ASDoc for containers

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/SelectionFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -43,7 +43,7 @@
  *  Dispatched when a renderer is removed from the content holder.
  * event.renderer is the renderer that was removed.
  *
- *  @eventType spark.events.RendererExistenceEvent.ITEM_REMOVE
+ *  @eventType spark.events.RendererExistenceEvent.RENDERER_REMOVE
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -55,7 +55,9 @@
 include "../styles/metadata/BasicTextLayoutFormatStyles.as"

 /**
- *  @copy spark.components.supportClasses.GroupBase#focusColor
+ *  Color of focus ring when the component is in focus.
+ *
+ *  @default 0x70B2EE
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -71,8 +73,52 @@
 /**
  *  The SkinnableDataContainer class is the base class for all skinnable components that have
  *  data content.
+ *  While this container can hold visual items, it is often used only
+ *  to hold data items as children.
+ *
+ *
The SkinnableDataContainer class takes as children visual components that implement
+ *  the IUIComponent interface and data items.
+ *  Data items can be simple date items such String and Number objects,
+ *  and more complicated data items such as Object and XMLNode objects.
+ *  While these containers can hold visual items,
+ *  they are often used only to hold data items as children.

+ *
+ *
An item renderer defines the visual representation of the
+ *  data item in the container.
+ *  The item renderer converts the data item into a format that can
+ *  be displayed by the container.
+ *  You must pass an item renderer to a SkinnableDataContainer container.

+ *
+ *
To improve performance and minimize application size,
+ *  you can use the DataGroup container. The DataGroup container cannot be skinned.

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

+ *
+ *

+ *  <SkinnableDataContainer
+ *    Properties
+ *    autoLayout="true"
+ *    clipAndEnableScrolling="false"
+ *    dataProvider="null"
+ *    horizontalScrollPosition"null"
+ *    itemRenderer="null"
+ *    itemRendererFunction="null"
+ *    layout"VerticalLayout"
+ *    typicalItem"null"
+ *    verticalScrollPosition="null"
+ *
+ *    Events
+ *    rendererAdd="No default"
+ *    rendererRemove="No default"
+ *  />
+ *

  *
  *  @see SkinnableContainer
+ *  @see DataGroup
+ *  @see spark.skins.default.SkinnableDataContainerSkin
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -164,8 +210,8 @@
     [SkinPart(required="false")]

     /**
-     *  A required skin part that defines the DataGroup where the data
-     *  items get pushed into, rendered, and laid out.
+     *  A required skin part that defines the DataGroup in the skin class
+     *  where data items get pushed into, rendered, and laid out.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -213,6 +259,8 @@

     /**
      *  @copy spark.components.supportClasses.GroupBase#autoLayout
+     *
+     *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -252,6 +300,8 @@

     /**
      *  @inheritDoc
+     *
+     *  @default false
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -462,6 +512,8 @@

     /**
      *  @copy spark.components.supportClasses.GroupBase#layout
+     *
+     *  @default VerticalLayout
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -605,13 +657,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Given a data item, return the correct text representation
-     *  a renderer should display.
-     *
-     *  @param item A data item
-     *
-     *  @return String representing the text to display for the
-     *  passed in item's renderer.
+     *  @copy spark.components.DataGroup#itemToLabel()
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -620,35 +666,26 @@
      */
     public function itemToLabel(item:Object):String
     {
-    	if (item)
+        if (item)
             return item.toString();
         else return " ";
     }

     /**
-     *  A bottleneck method which updates renderer specific information.
+     *  @copy spark.components.DataGroup#updateRendererInformation()
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      *
-     *  The DataGroup skinpart handles updating the renderer's 'data'
-     *  property when necessary. This method comes in and sets the
-     *  'labelText' (which is dependant on the renderer's data)
-     *  and 'owner' properties.
-     *
-     *  @param renderer The renderer to update
-     *
-     *  @param data The renderer's data
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     *
      */
     public function updateRendererInformation(renderer:IVisualElement, data:Object=null):void
     {
-    	if (!renderer)
-    	   return;
-
-    	IVisualElement(renderer).owner = this;
+        if (!renderer)
+           return;
+
+        IVisualElement(renderer).owner = this;

         if (renderer is IItemRenderer)
             IItemRenderer(renderer).labelText = itemToLabel(IItemRenderer(renderer).data);
@@ -921,7 +958,7 @@
      */
     private function dataGroup_rendererAddChangeHandler(event:RendererExistenceEvent):void
     {
-    	var renderer:IVisualElement = event.renderer;
+        var renderer:IVisualElement = event.renderer;

         updateRendererInformation(renderer);


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

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

 package mx.binding
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5770
Author:   gruehle@adobe.com
Date:     2009-03-30T20:58:54.529722Z

Log Message:
-----------
Add [Alternative] metadata to the Halo components that have a Gumbo replacement.

Bugs: SDK-20190
QA notes: none
Doc notes: Additional ASDoc comments added for many of the classes. These should all be reviewed.
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TileList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Zoom.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Cubic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/RemoveChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/TweenEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeRight.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/VBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Glow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quartic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeLeft.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quintic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quadratic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/AddChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeDown.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/SetPropertyAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Canvas.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Blur.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HorizontalList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeUp.as</path>

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

--- frameworks/projects/mx/src/mx/effects/easing/Quartic.as
+++ frameworks/projects/mx/src/mx/effects/easing/Quartic.as
@@ -11,6 +11,15 @@

 package mx.effects.easing
 {
+
+/**
+ *  The new effects provided as of Flex 4 use classes which implement the
+ *  IEaser interface instead of the easing functions in classes like Quartic for
+ *  the earlier Flex 3 effects. To achieve the same functionality of Quartic,
+ *  create a Power instance with an exponent of 4 and set the
+ *  easeInFraction appropriately to get the desired result.
+ */
+[Alternative(replacement="spark.effects.easing.Power", since="4.0")]

 /**
  *  The Quartic class defines three easing functions to implement


Transferred from the Adobe Open Source Subversion Repository

Revision: 2570
Author:   gruehle@adobe.com
Date:     2008-07-22T23:10:37.258789Z

Log Message:
-----------
Bug fixes:
SDK-16112 - Graphic elements don't render correctly in List
SDK-16066 - List displays graphic objects on top of each other, and on top of Array object
SDK-16159 - RTE when graphic element is added to gumbo List if List content is ArrayCollection
SDK-16072 - RTE when getting gumbo List selectedItem if nothing is selected

Reviewer: Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Selector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -685,7 +685,7 @@
     {
         var item:* = getItemAt(index);

-        if (item is IGraphicElement)
+        if (item is IGraphicElement && !alwaysUseItemRenderer)
             return item;
         else
             return getItemSkin(item);


Transferred from the Adobe Open Source Subversion Repository

Revision: 18025
Author:   egeorgie@adobe.com
Date:     2010-10-05T23:57:27.340957Z

Log Message:
-----------
Rename IGraphicElementHost to IGraphicElementContainer

QE notes: N/A
Doc notes: None.
Bugs:
Reviewer: Ryan
Tests run: build
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElementHost.as" copyfrom-rev="18023" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElementContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElementHost.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/IGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -41,7 +41,7 @@
 import spark.components.supportClasses.GroupBase;
 import spark.core.DisplayObjectSharingMode;
 import spark.core.IGraphicElement;
-import spark.core.IGraphicElementHost;
+import spark.core.IGraphicElementContainer;
 import spark.core.ISharedDisplayObject;
 import spark.events.ElementExistenceEvent;

@@ -177,7 +177,7 @@
  *  @productversion Flex 4
  */
 public class Group extends GroupBase implements IVisualElementContainer,
-                                                IGraphicElementHost,
+                                                IGraphicElementContainer,
                                                 ISharedDisplayObject
 {
     /**
@@ -1625,7 +1625,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function discardDisplayObject(element:IGraphicElement):void
+    mx_internal function discardDisplayObject(element:IGraphicElement):void
     {
         var oldDisplayObject:DisplayObject = element.displayObject;
         if (!oldDisplayObject)
@@ -1649,39 +1649,6 @@
             // the invalid ones.  We should only redraw, no need to redo the layout.
             super.$invalidateDisplayList();
         }
-    }
-
-    /**
-     *  @copy spark.core.IGraphicElementHost#detachDisplayObject()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    public function detachDisplayObject(element:IGraphicElement):int
-    {
-        var displayObject:DisplayObject = element.displayObject;
-        if (!displayObject)
-            return -1;
-        var index:int = getChildIndex(displayObject);
-        $removeChild(displayObject);
-        return index;
-    }
-
-    /**
-     *  @copy spark.core.IGraphicElementHost#attachDisplayObject()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    public function attachDisplayObject(element:IGraphicElement, index:int):void
-    {
-        if (index == -1)
-            return;
-        $addChildAt(element.displayObject, index);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 10144
Author:   aharui@adobe.com
Date:     2009-09-11T01:46:11.980326Z

Log Message:
-----------
Change Label verticalAlign to use "top" if there is too much text.  RichText already works this way.

QE Notes: None
Doc Notes: None
Bugs: SDK-20589
Reviewer: Gordon
API Change: No
Is noteworthy for integration: No
tests: checkintests

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as

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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.as
@@ -1059,7 +1059,7 @@
 			else if (rightAligned)
 				textLine.x = rightOffset - textLine.textWidth;

-			if (verticalAlign == "top")
+			if (verticalAlign == "top" || !createdAllLines || totalTextHeight > innerHeight)
 			{
 				textLine.y += topOffset;
 			}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17331
Author:   jasonsj@adobe.com
Date:     2010-08-16T17:37:24.374535Z

Log Message:
-----------
Added DiscouragedForProfile metadata for use with FB mobile projects.

QE notes: DiscouragedForProfile features should now be visible in FB
Doc notes: ASDoc content omitted for DiscouragedForProfile where the boilerplate comment is desired
Bugs:
Reviewer: gruehle
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/BorderContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/FormHeading.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Form.as</path>

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

--- frameworks/projects/spark/src/spark/components/Panel.as
+++ frameworks/projects/spark/src/spark/components/Panel.as
@@ -92,6 +92,14 @@
 [AccessibilityClass(implementation="spark.accessibility.PanelAccImpl")]

 [IconFile("Panel.png")]
+
+/**
+ * Because this component does not define a skin for the mobile theme, Adobe
+ * recommends that you not use it in a mobile application. Alternatively, you
+ * can define your own mobile skin for the component. For more information,
+ * see Spark Skinning.
+ */
+[DiscouragedForProfile("mobileDevice")]

 /**
  *  The Panel class defines a container that includes a title bar,


added mp4 to the mime type map

added mp4 to the mime type map

--- flex_src/src/com/adobe/net/MimeTypeMap.as
+++ flex_src/src/com/adobe/net/MimeTypeMap.as
@@ -139,6 +139,7 @@
 			["text/x-setext","etx"],
 			["video/mpeg","mpg","mpeg","mpe"],
 			["video/quicktime","mov","qt"],
+			["video/mp4","mp4"],
 			["video/vnd.mpegurl","m4u","mxu"],
 			["video/x-flv","flv"],
 			["video/x-msvideo","avi"],
@@ -193,4 +194,4 @@
 			types.push(newType);
 		}
 	}
-}+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 2462
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:13:06.620116Z

Log Message:
-----------
gumbo push to trunk

Modified Paths:
--------------
214 paths were modified

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

--- frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as
+++ frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as
@@ -0,0 +1,138 @@
+package mx.graphics
+{
+
+import flash.display.GradientType;
+import flash.display.Graphics;
+import flash.geom.Rectangle;
+import mx.core.mx_internal;
+import flash.geom.Matrix;
+
+public class RadialGradientStroke extends GradientStroke implements IStroke
+{
+	public function RadialGradientStroke(weight:Number=0, pixelHinting:Boolean=false, scaleMode:String="none", caps:String=null, joints:String=null, miterLimit:Number=0)
+	{
+		super(weight, pixelHinting, scaleMode, caps, joints, miterLimit);
+		matrix = new Matrix();
+	}
+
+	//----------------------------------
+    //  focalPointRatio
+    //----------------------------------
+
+    /**
+	 *  @private
+	 *  Storage for the focalPointRatio property.
+	 */
+    private var _focalPointRatio:Number = 0.0;
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  Sets the location of the start of the radial fill.
+	 *
+	 *
Valid values are from -1.0 to 1.0.
+     *  A value of -1.0 sets the focal point
+	 *  (or, start of the gradient fill)
+	 *  on the left of the bounding Rectangle.
+	 *  A value of 1.0 sets the focal point
+	 *  on the right of the bounding Rectangle.
+     *
+     *
If you use this property in conjunction
+	 *  with the angle property,
+     *  this value specifies the degree of distance
+	 *  from the center that the focal point occurs.
+     *  For example, with an angle of 45
+	 *  and focalPointRatio of 0.25,
+	 *  the focal point is slightly lower and to the right of center.
+     *  If you set focalPointRatio to 0,
+     *  the focal point is in the middle of the bounding Rectangle.

+	 *  If you set focalPointRatio to 1,
+	 *  the focal point is all the way to the bottom right corner
+	 *  of the bounding Rectangle.

+	 *
+	 *  @default 0.0
+     */
+    public function get focalPointRatio():Number
+    {
+        return _focalPointRatio;
+    }
+
+    /**
+	 *  @private
+	 */
+	public function set focalPointRatio(value:Number):void
+    {
+        var oldValue:Number = _focalPointRatio;
+        if (value != oldValue)
+        {
+            _focalPointRatio = value;
+
+            mx_internal::dispatchGradientChangedEvent("focalPointRatio",
+            										  oldValue, value);
+        }
+    }
+
+    //----------------------------------
+	//  scaleY
+	//----------------------------------
+
+    private var _scaleY:Number;
+
+    [Bindable("propertyChange")]
+    [Inspectable(category="General")]
+
+    /**
+     *  The vertical scale of the gradient transform, which defines the height of the (unrotated) gradient
+     */
+    public function get scaleY():Number
+    {
+    	return _scaleY;
+    }
+
+	/**
+	 *  @private
+	 */
+    public function set scaleY(value:Number):void
+    {
+    	var oldValue:Number = _scaleY;
+    	if (value != oldValue)
+    	{
+    		_scaleY = value;
+    		mx_internal::dispatchGradientChangedEvent("scaleY", oldValue, value);
+    	}
+    }
+
+    //--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	public function apply(g:Graphics):void
+	{
+		// No-op. Need to deprecate. Was never implemented for this class
+	}
+
+	public function draw(g:Graphics, rc:Rectangle):void
+    {
+    	g.lineStyle(weight, 0, 1, pixelHinting, scaleMode,
+                    caps, joints, miterLimit);
+
+    	var w:Number = !isNaN(scaleX) ? scaleX : rc.width;
+    	var h:Number = !isNaN(scaleY) ? scaleY : rc.height;
+		var bX:Number = !isNaN(x) ? x + rc.left : rc.left;
+		var bY:Number = !isNaN(y) ? y + rc.top : rc.top;
+
+        matrix.createGradientBox(w, h,
+        						 mx_internal::rotationInRadians,
+								 bX, bY);
+
+		g.lineGradientStyle(GradientType.RADIAL, mx_internal::colors,
+                            mx_internal::alphas, mx_internal::ratios,
+                            matrix, spreadMethod,
+                            interpolationMethod, focalPointRatio);
+    }
+
+}
+}


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

--- frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Skin.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 2803
Author:   rfrishbe@adobe.com
Date:     2008-08-11T18:31:30.575706Z

Log Message:
-----------
Changes based on MXMLComponent discussion.  Removed the data property from Group, which meant adding it (and the IDataRenderer interface).  Also did some cleanup on Button and ItemRenderer around adding event listeners.

QE: Yes - I already updated the affected mustella tests and Steve looked at those changes
Doc: No
Bugs: -
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Skin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/MXMLComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Skin.as
@@ -11,11 +11,12 @@

 package flex.core
 {
+import mx.core.IDataRenderer;

 /**
  *  Documentation is not currently available.
  */
-public class Skin extends Group
+public class Skin extends Group implements IDataRenderer
 {
     include "../core/Version.as";

@@ -32,6 +33,25 @@
 	{
 		super();
 	}
+
+	//--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+	private var _data:Object;
+    [Bindable]
+    public function get data():Object
+    {
+        return _data;
+    }
+
+    public function set data(value:Object):void
+    {
+        _data = value;
+    }
+
 }

 }


Handled weird link-to-self behavior in loading old saves...

--- src/Components/Link.as
+++ src/Components/Link.as
@@ -11,7 +11,7 @@

 		public var source:Port;
 		public var destination:Port;
-		public var deleted:Boolean = false;
+		public var deleted:Boolean = false; //only necessary to cleanup 'hovering' links that never get attached
 		public var placed:Boolean = false;
 		public var hovering:Boolean = false;
 		public var FIXED:Boolean = false;
@@ -87,6 +87,9 @@
 				if (!link.source.isSource())
 					throw new Error("Link connected with no source!");
 			}
+
+			if (link.source == link.destination) //old save error?
+				return false;

 			link.connect();
 			link.placed = true;


- removed internal stacktrace class since a error doesn't need to be thrown and catched in order to obtain the stacktrace


Do basic mobile browser User-Agent matching in should_disable.

--- swfcat.as
+++ swfcat.as
@@ -3,6 +3,7 @@
     import flash.display.Sprite;
     import flash.display.StageAlign;
     import flash.display.StageScaleMode;
+    import flash.external.ExternalInterface;
     import flash.text.TextField;
     import flash.text.TextFormat;
     import flash.net.Socket;
@@ -136,9 +137,38 @@

         /* Are circumstances such that we should self-disable and not be a
            proxy? We take a best-effort guess as to whether this device runs on
-           a battery or the data transfer might be expensive. */
+           a battery or the data transfer might be expensive.
+
+           Matching mobile User-Agents is complex; but we only need to match
+           those devices that can also run a recent version of Adobe Flash,
+           which is a subset of this list:
+           https://secure.wikimedia.org/wikipedia/en/wiki/Adobe_Flash_Player#Mobile_operating_systems
+
+           Other resources:
+           http://www.zytrax.com/tech/web/mobile_ids.html
+           http://googlewebmastercentral.blogspot.com/2011/03/mo-better-to-also-detect-mobile-user.html
+           http://search.cpan.org/~cmanley/Mobile-UserAgent-1.05/lib/Mobile/UserAgent.pm
+        */
         private function should_disable():Boolean
         {
+            const UA_LIST:Array = [
+                /\bmobile\b/i,
+                /\bandroid\b/i,
+                /\bopera mobi\b/i,
+            ];
+            var ua:String;
+
+            ua = ExternalInterface.call("window.navigator.userAgent.toString");
+
+            for (var i:uint = 0; i < UA_LIST.length; i++) {
+                var re:RegExp = UA_LIST[i];
+
+                if (ua.match(re)) {
+                    puts("Disabling because User-Agent matched " + re + ".");
+                    return true;
+                }
+            }
+
             return false;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12796
Author:   cframpto@adobe.com
Date:     2009-12-10T18:05:16.265768Z

Log Message:
-----------
Because TLF does not have the concept of "auto" fontLookup like we have at the Flex-level, we have had to rework the meaning of the fontLookup attribute so it is possible to have spans with device text in a component whose fontLookup is "embeddedCFF" without requiring fontLookup "device" to be explicitly specified for those spans.

For Spark text components, the default fontLookup has been changed from "auto" to "embeddedCFF".  The default fontFamily is "Arial".

If the component level fontLookup either defaults to "embeddedCFF" or is explicitly set to "embeddedCFF", for each element that is not explicitly set to fontLookup "device", it will first look for the embedded font, and failing that, will fail back to the device font.  All fonts for a given text component must be in the same swf context.

If the component-level fontLookup is "device" or the component-level fontFamily is not found in the swf context, the font lookup for all elements in the component will revert to "device".

If the player doesn't find the device font it will fallback to one of the builtin default fonts.

QE notes: probably need some new mustella tests to cover all the cases - 5 RichText truncation tests fail but I'm not sure this change has anything to do with that
Doc notes:
Bugs: SDK-24470
Reviewer: Gordon
Tests run: checkintests, TextArea, Label, RichText
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</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/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -18,13 +18,18 @@
 import flash.display.Sprite;
 import flash.events.Event;
 import flash.geom.Rectangle;
+import flash.text.engine.FontLookup;
 import flash.text.engine.TextLine;

 import flashx.textLayout.compose.TextLineRecycler;

+import mx.core.IEmbeddedFontRegistry;
+import mx.core.IFlexModuleFactory;
+import mx.core.IFontContextComponent;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
+import mx.managers.ISystemManager;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
 import mx.styles.CSSStyleDeclaration;
@@ -32,6 +37,8 @@
 import mx.styles.StyleManager;
 import mx.styles.StyleProtoChain;
 import mx.utils.NameUtil;
+
+import spark.utils.TextUtil;

 use namespace mx_internal;

@@ -89,7 +96,7 @@
  *  @productversion Flex 4
  */

-public class TextBase extends UIComponent
+public class TextBase extends UIComponent implements IFontContextComponent
 {

     include "../../core/Version.as";
@@ -488,6 +495,43 @@
         }
     }

+    //--------------------------------------------------------------------------
+    //
+    //  Properties: IFontContextComponent
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  fontContext
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _fontContext:IFlexModuleFactory;
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get fontContext():IFlexModuleFactory
+    {
+        return _fontContext;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fontContext(value:IFlexModuleFactory):void
+    {
+        _fontContext = value;
+    }
+
+    //--------------------------------------------------------------------------
     /**
      *  @private
      */
@@ -978,6 +1022,37 @@
         }
     }

+    /**
+     *  @private
+     */
+    mx_internal function getEmbeddedFontContext():IFlexModuleFactory
+    {
+        var moduleFactory:IFlexModuleFactory;
+        var fontLookup:String = getStyle("fontLookup");
+        if (fontLookup != FontLookup.DEVICE)
+        {
+            var font:String = getStyle("fontFamily");
+            var bold:Boolean = getStyle("fontWeight") == "bold";
+            var italic:Boolean = getStyle("fontStyle") == "italic";
+
+            var localLookup:ISystemManager =
+                fontContext && fontContext is ISystemManager ?
+                ISystemManager(fontContext) : systemManager;
+
+            var registry:IEmbeddedFontRegistry =
+                                UIComponent.embeddedFontRegistry;
+            if (registry)
+            {
+                moduleFactory =
+                    registry.getAssociatedModuleFactory(
+                        font, bold, italic,
+                        this, fontContext, localLookup, true);
+            }
+        }
+
+        return moduleFactory;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Event handlers


Transferred from the Adobe Open Source Subversion Repository

Revision: 2464
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:50:33.449468Z

Log Message:
-----------
add flex 4 to trunk

Modified Paths:
--------------
134 paths were modified

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 13194
Author:   cframpto@adobe.com
Date:     2009-12-23T15:34:01.077207Z

Log Message:
-----------
RichText needs to recompose if the contentHeight isn't the same as the unscaledHeight since the content height could be an estimated height which doesn't all the text lines composed yet to back up that height.

baselinePosition should always return a non-0 value, even if there are no text lines so that components that use the baseline for positioning, such as ButtonBar, don't jump around when the width of the component is changed.

QE notes:
Doc notes:
Bugs: SDK-24750, SDK-24773
Reviewer: Gordon
Tests run: checkintests, cyclone on Label, RichText
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -218,13 +218,13 @@
      *  @private
      *  The value of bounds.width, before the compose was done.
      */
-    private var _composeWidth:Number;
+    mx_internal var _composeWidth:Number;

     /**
      *  @private
      *  The value of bounds.height, before the compose was done.
      */
-    private var _composeHeight:Number;
+    mx_internal var _composeHeight:Number;

     /**
      *  @private
@@ -258,6 +258,13 @@
     {
         if (!validateBaselinePosition())
             return NaN;
+
+        // Create an empty text line so we can measure the height. If the
+        // 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)
+            createEmptyTextLine(_composeHeight);

         // Return the baseline of the first line of composed text.
         return textLines.length > 0 ? textLines[0].y : 0;
@@ -720,6 +727,14 @@
     /**
      *  @private
      */
+    mx_internal function createEmptyTextLine(height:Number=NaN):void
+    {
+        // override this
+    }
+
+    /**
+     *  @private
+     */
     mx_internal function invalidateTextLines():void
     {
         invalidateCompose = true;
@@ -876,15 +891,12 @@
 		if (n == 0)
 			return;

-		// The old TextLines might have been added to a different
-		// container than the one we'd use now to add new TextLines.
-		var container:DisplayObjectContainer =
-			textLines[0].parent;
-
 		for (var i:int = 0; i < n; i++)
 		{
-			var textLine:DisplayObject = textLines[i];
-            UIComponent(container).$removeChild(textLine);
+			var textLine:DisplayObject = textLines[i];
+            var parent:UIComponent = textLine.parent as UIComponent;
+            if (parent)
+                UIComponent(textLine.parent).$removeChild(textLine);
 		}
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3124
Author:   gosmith@adobe.com
Date:     2008-09-05T20:27:41.537174Z

Log Message:
-----------
TextGraphicElement now actually implements IStyleClient, rather than just having stubs for it.

In order to avoid duplicating code, TextGraphicElement and UIComponent now call new static methods on StyleProtoChain to implement their initProtoChain(), getClassStyleDeclarations(), setStyle(), and styleChanged() methods.

The CSS mechanism is not yet used to determine the default text format in a TextGraphicElement.as

Reviewer: Glenn
Bugs: -
QA: No
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.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/flex/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -29,6 +29,7 @@
 import mx.styles.IStyleClient;
 import mx.styles.StyleManager;
 import mx.styles.StyleProtoChain;
+import mx.utils.ObjectUtil;

 import text.formats.TextAlign;
 import text.formats.VerticalAlign;
@@ -37,7 +38,7 @@
  *  Documentation is not currently available.
  */
 public class TextGraphicElement extends GraphicElement
-	implements IDisplayObjectElement, ISimpleStyleClient, IStyleClient
+	implements IDisplayObjectElement, IStyleClient
 {
 	include "../../core/Version.as";

@@ -634,7 +635,21 @@
     public function set styleName(
         value:Object /* String, CSSStyleDeclaration, or UIComponent */):void
     {
-        // to be implemented
+        if (value == _styleName)
+            return;
+
+        _styleName = value;
+
+        // If inheritingStyles is undefined, then this object is being
+        // initialized and we haven't yet generated the proto chain.
+        // To avoid redundant work, don't bother to create
+        // the proto chain here.
+        if (inheritingStyles == StyleProtoChain.STYLE_UNINITIALIZED)
+            return;
+
+        regenerateStyleCache(true);
+
+        styleChanged("styleName");
     }

 	//--------------------------------------------------------------------------
@@ -652,14 +667,7 @@
      */
     public function get className():String
     {
-        var name:String = getQualifiedClassName(this);
-
-        // If there is a package name, strip it off.
-        var index:int = name.indexOf("::");
-        if (index != -1)
-            name = name.substr(index + 2);
-
-        return name;
+        return ObjectUtil.getUnqualifiedClassName(this);
     }

     //----------------------------------
@@ -825,7 +833,7 @@
      */
     public function styleChanged(styleProp:String):void
     {
-        // to be implemented
+        StyleProtoChain.styleChanged(this, styleProp);
     }

 	//--------------------------------------------------------------------------
@@ -849,7 +857,7 @@
      */
     public function setStyle(styleProp:String, newValue:*):void
     {
-        // to be implemented
+        StyleProtoChain.setStyle(this, styleProp, newValue);
     }

     /**
@@ -865,8 +873,7 @@
      */
     public function getClassStyleDeclarations():Array
     {
-        // to be implemented
-        return null;
+        return StyleProtoChain.getClassStyleDeclarations(this);
     }

     /**
@@ -875,7 +882,6 @@
     public function notifyStyleChangeInChildren(
                         styleProp:String, recursive:Boolean):void
     {
-        // to be implemented
     }

     /**
@@ -883,7 +889,7 @@
      */
     public function regenerateStyleCache(recursive:Boolean):void
     {
-        // to be implemented
+        mx_internal::initProtoChain();
     }

 	/**
@@ -891,7 +897,6 @@
 	 */
     public function registerEffects(effects:Array /* of String */):void
     {
-        // to be implemented
     }

 	//--------------------------------------------------------------------------
@@ -913,7 +918,7 @@
      */
     mx_internal function initProtoChain():void
     {
-        // to be implemented
+        StyleProtoChain.initProtoChain(this);
     }

 	/**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4077
Author:   gosmith@adobe.com
Date:     2008-11-12T00:17:52.619247Z

Log Message:
-----------
TextBox and TextGraphic now avoid getting or setting their displayObject's scrollRect unnecessarily, because this causes Player 10.0 to allocate a surface.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4250
Author:   jimurphy@adobe.com
Date:     2008-12-08T18:51:55.835583Z

Log Message:
-----------
Merged 3.x revisions 4231,4244,4249 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/bundles.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/StageEventProxy.as</path>

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

--- frameworks/projects/framework/src/mx/core/FlexLoader.as
+++ frameworks/projects/framework/src/mx/core/FlexLoader.as
@@ -37,7 +37,6 @@
      *
Sets the name property to a string
      *  returned by the createUniqueName()
      *  method of the mx.utils.NameUtils class.

-     *
      *
This string is the name of the object's class concatenated
      *  with an integer that is unique within the application,
      *  such as "FlexLoader13".


Transferred from the Adobe Open Source Subversion Repository

Revision: 2462
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:13:06.620116Z

Log Message:
-----------
gumbo push to trunk

Modified Paths:
--------------
214 paths were modified

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

--- frameworks/projects/framework/src/mx/states/SetStyle.as
+++ frameworks/projects/framework/src/mx/states/SetStyle.as
@@ -41,7 +41,7 @@
  *
  *  @includeExample examples/StatesExample.mxml
  */
-public class SetStyle implements IOverride
+public class SetStyle extends OverrideBase implements IOverride
 {
     include "../core/Version.as";

@@ -110,6 +110,18 @@
      *  Storage for the old related property values, if used.
      */
     private var oldRelatedValues:Array;
+
+    /**
+     *  @private
+     *  Flag which tracks if we're actively overriding a style.
+     */
+    private var applied:Boolean = false;
+
+    /**
+     *  @private
+     *  Our most recent parent context.
+     */
+    private var parentContext:UIComponent = null;

     //--------------------------------------------------------------------------
     //
@@ -146,7 +158,7 @@
      *
      *  @default null
      */
-    public var target:IStyleClient;
+    public var target:Object;

     //----------------------------------
     //  value
@@ -155,12 +167,34 @@
     [Inspectable(category="General")]

     /**
-     *
+     *  @private
+     *  Storage for the style value.
+     */
+    public var _value:Object;
+
+    /**
      *  The new value for the style.
      *
-     *  @default null
-     */
-    public var value:Object;
+     *  @default undefined
+     */
+    public function get value():Object
+    {
+        return _value;
+    }
+
+    /**
+     *  @private
+     */
+    public function set value(val:Object):void
+    {
+        _value = val;
+
+        // Reapply if necessary.
+        if (applied)
+        {
+            apply(parentContext);
+        }
+    }

     //--------------------------------------------------------------------------
     //
@@ -182,78 +216,100 @@
      */
     public function apply(parent:UIComponent):void
     {
-        var obj:IStyleClient = target ? target : parent;
-        var relatedProps:Array = RELATED_PROPERTIES[name] ?
-                                 RELATED_PROPERTIES[name] :
-                                 null;
-
-        // Remember the current value so it can be restored
-        oldValue = obj.getStyle(name);
-
-        if (relatedProps)
+        var context:Object = getOverrideContext(target, parent);
+        if (context != null)
         {
-            oldRelatedValues = [];
-
-            for (var i:int = 0; i < relatedProps.length; i++)
-                oldRelatedValues[i] = obj[relatedProps[i]];
+        	target = context;
+        	var obj:IStyleClient = IStyleClient(target);
+
+	        var relatedProps:Array = RELATED_PROPERTIES[name] ?
+	                                 RELATED_PROPERTIES[name] :
+	                                 null;
+
+	        // Remember the original value so it can be restored later
+	        // after we are asked to remove our override (and only if we
+	        // aren't being asked to re-apply a value).
+	        if (!applied)
+	        {
+	            oldValue = obj.getStyle(name);
+	        }
+
+	        if (relatedProps)
+	        {
+	            oldRelatedValues = [];
+
+	            for (var i:int = 0; i < relatedProps.length; i++)
+	                oldRelatedValues[i] = obj[relatedProps[i]];
+	        }
+
+	        // Set new value
+	        if (value === null)
+	        {
+	            obj.clearStyle(name);
+	        }
+	        else if (oldValue is Number)
+	        {
+	            // The "value" for colors can be several different formats:
+	            // 0xNNNNNN, #NNNNNN or "red". We can't use
+	            // StyleManager.isColorStyle() because that only returns true
+	            // for inheriting color styles and misses non-inheriting styles like
+	            // backgroundColor.
+	            if (name.toLowerCase().indexOf("color") != -1)
+	                obj.setStyle(name, StyleManager.getColorName(value));
+	            else
+	                obj.setStyle(name, Number(value));
+	        }
+	        else if (oldValue is Boolean)
+	        {
+	            obj.setStyle(name, toBoolean(value));
+	        }
+	        else
+	        {
+	            obj.setStyle(name, value);
+	        }
+
+	        // Save state in case our value is changed again while applied.  This can
+	        // occur when our style value is databound.
+	        applied = true;
+	        this.parentContext = parent;
         }
-
-        // Set new value
-        if (value === null)
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function remove(parent:UIComponent):void
+    {
+        var obj:IStyleClient = IStyleClient(getOverrideContext(target, parent));
+        if (obj != null)
         {
-            obj.clearStyle(name);
-        }
-        else if (oldValue is Number)
-        {
-            // The "value" for colors can be several different formats:
-            // 0xNNNNNN, #NNNNNN or "red". We can't use
-            // StyleManager.isColorStyle() because that only returns true
-            // for inheriting color styles and misses non-inheriting styles like
-            // backgroundColor.
-            if (name.toLowerCase().indexOf("color") != -1)
-                obj.setStyle(name, StyleManager.getColorName(value));
-            else
-                obj.setStyle(name, Number(value));
-        }
-        else if (oldValue is Boolean)
-        {
-            obj.setStyle(name, toBoolean(value));
-        }
-        else
-        {
-            obj.setStyle(name, value);
-        }
-    }
-
-    /**
-     *  @inheritDoc
-     */
-    public function remove(parent:UIComponent):void
-    {
-        var obj:IStyleClient = target ? target : parent;
-
-        // Restore the old value
-        if (oldValue is Number)
-            obj.setStyle(name, Number(oldValue));
-        else if (oldValue is Boolean)
-            obj.setStyle(name, toBoolean(oldValue));
-        else if (oldValue === null)
-            obj.clearStyle(name);
-        else
-            obj.setStyle(name, oldValue);
-
-
-        var relatedProps:Array = RELATED_PROPERTIES[name] ?
-                                 RELATED_PROPERTIES[name] :
-                                 null;
-
-        // Restore related property values, if needed
-        if (relatedProps)
-        {
-            for (var i:int = 0; i < relatedProps.length; i++)
-            {
-                obj[relatedProps[i]] = oldRelatedValues[i];
-            }
+	        // Restore the old value
+	        if (oldValue is Number)
+	            obj.setStyle(name, Number(oldValue));
+	        else if (oldValue is Boolean)
+	            obj.setStyle(name, toBoolean(oldValue));
+	        else if (oldValue === null)
+	            obj.clearStyle(name);
+	        else
+	            obj.setStyle(name, oldValue);
+
+
+	        var relatedProps:Array = RELATED_PROPERTIES[name] ?
+	                                 RELATED_PROPERTIES[name] :
+	                                 null;
+
+	        // Restore related property values, if needed
+	        if (relatedProps)
+	        {
+	            for (var i:int = 0; i < relatedProps.length; i++)
+	            {
+	                obj[relatedProps[i]] = oldRelatedValues[i];
+	            }
+	        }
+
+	        // Clear our flags and override context.
+	        applied = false;
+	        parentContext = null;
         }
     }


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

--- frameworks/projects/mx/src/mx/effects/easing/Quartic.as
+++ frameworks/projects/mx/src/mx/effects/easing/Quartic.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects.easing
+{
+
+/**
+ *  The Quartic class defines three easing functions to implement
+ *  motion with Flex effect classes. The acceleration of motion for a Quartic easing
+ *  equation is greater than for a Quadratic or Cubic easing equation.
+ *
+ *  For more information, see http://www.robertpenner.com/profmx.
+ */
+public class Quartic
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  The easeIn() method starts motion from a zero velocity,
+     *  and then accelerates motion as it executes.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeIn(t:Number, b:Number,
+								  c:Number, d:Number):Number
+	{
+		return c * (t /= d) * t * t * t + b;
+	}
+
+    /**
+     *  The easeOut() method starts motion fast,
+     *  and then decelerates motion to a zero velocity.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeOut(t:Number, b:Number,
+								   c:Number, d:Number):Number
+	{
+		return -c * ((t = t / d - 1) * t * t * t - 1) + b;
+	}
+
+    /**
+     *  The easeInOut() method combines the motion
+     *  of the easeIn() and easeOut() methods
+	 *  to start the motion from a zero velocity, accelerate motion,
+	 *  then decelerate to a zero velocity.
+     *
+     *  @param t Specifies time.
+	 *
+     *  @param b Specifies the initial position of a component.
+	 *
+     *  @param c Specifies the total change in position of the component.
+	 *
+     *  @param d Specifies the duration of the effect, in milliseconds.
+     *
+     *  @return Number corresponding to the position of the component.
+     */
+	public static function easeInOut(t:Number, b:Number,
+									 c:Number, d:Number):Number
+	{
+		if ((t /= d / 2) < 1)
+			return c / 2 * t * t * t * t + b;
+
+		return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12324
Author:   smgilson@adobe.com
Date:     2009-12-01T16:08:24.785393Z

Log Message:
-----------
ASDoc updates in preparation for localization

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/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/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/BorderContainer.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/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -112,10 +112,10 @@
  *  the Group container cannot be skinned.
  *  If you want to apply a skin, use the SkinnableContainer instead.

  *
- *
Note: scale grid may not function correctly when there
+ *
Note: The scale grid might not function correctly when there
  *  are DisplayObject children inside of the Group, such as a component
- *  or another Group.  If the children are GraphicElements and
- *  they all share the Group's DisplayObject, then scale grid will work
+ *  or another Group.  If the children are GraphicElement objects, and
+ *  they all share the Group's DisplayObject, then the scale grid works
  *  properly.

  *
  *
Setting any of the following properties on a GraphicElement child


Transferred from the Adobe Open Source Subversion Repository

Revision: 16744
Author:   clucier@adobe.com
Date:     2010-06-30T17:46:37.411811Z

Log Message:
-----------
Bug fixes:

SDK-26597: Spark Image w/ fillMode=clip doesnt respect horizontalAlign and verticalAlign
SDK-26761: Spark Image should have option to clear existing source while loading new source
SDK-26556: Spark Image should support contentBackgroundAlpha and contentBackgroundColor styles
SDK-26733: HTML comments in HTML default template: Flash Builder

QE notes: None
Doc notes: None
Bugs: SDK-26761, SDK-26556, SDK-26597, SDK-26733
Reviewer: Glenn, Ryan, Carol
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/templates/swfobject/index.template.html</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/ImageSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/Image.as
+++ frameworks/projects/spark/src/spark/components/Image.as
@@ -192,6 +192,30 @@
 //-----------------------------------
 //  Styles
 //-----------------------------------
+
+/**
+ *  The alpha of the background for this component.
+ *
+ *  @default NaN
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="backgroundAlpha", type="Number", inherit="no", theme="spark", minValue="0.0", maxValue="1.0")]
+
+/**
+ *  The background color for this component.
+ *
+ *  @default NaN
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="backgroundColor", type="uint", format="Color", inherit="no", theme="spark")]

 /**
  *  When true, enables the 'loading' skin state.
@@ -271,20 +295,21 @@
     //  Class constants
     //
     //--------------------------------------------------------------------------
-    mx_internal static const CONTENT_LOADER_PROPERTY_FLAG:uint = 1 << 0;
-    mx_internal static const CONTENT_LOADER_GROUPING_PROPERTY_FLAG:uint = 1 << 1;
-    mx_internal static const FILL_MODE_PROPERTY_FLAG:uint = 1 << 2;
-    mx_internal static const PRELIMINARY_WIDTH_PROPERTY_FLAG:uint = 1 << 3;
-    mx_internal static const PRELIMINARY_HEIGHT_PROPERTY_FLAG:uint = 1 << 4;
-    mx_internal static const HORIZONTAL_ALIGN_PROPERTY_FLAG:uint = 1 << 5;
-    mx_internal static const SCALE_MODE_PROPERTY_FLAG:uint = 1 << 6;
-    mx_internal static const SMOOTH_PROPERTY_FLAG:uint = 1 << 7;
-    mx_internal static const SMOOTHING_QUALITY_PROPERTY_FLAG:uint = 1 << 8;
-    mx_internal static const SOURCE_PROPERTY_FLAG:uint = 1 << 9;
-    mx_internal static const SOURCE_WIDTH_PROPERTY_FLAG:uint = 1 << 10;
-    mx_internal static const SOURCE_HEIGHT_PROPERTY_FLAG:uint = 1 << 11;
-    mx_internal static const TRUSTED_SOURCE_PROPERTY_FLAG:uint = 1 << 12;
-    mx_internal static const VERTICAL_ALIGN_PROPERTY_FLAG:uint = 1 << 13;
+    mx_internal static const CLEAR_ON_LOAD_PROPERTY_FLAG:uint = 1 << 0;
+    mx_internal static const CONTENT_LOADER_PROPERTY_FLAG:uint = 1 << 1;
+    mx_internal static const CONTENT_LOADER_GROUPING_PROPERTY_FLAG:uint = 1 << 2;
+    mx_internal static const FILL_MODE_PROPERTY_FLAG:uint = 1 << 3;
+    mx_internal static const PRELIMINARY_WIDTH_PROPERTY_FLAG:uint = 1 << 4;
+    mx_internal static const PRELIMINARY_HEIGHT_PROPERTY_FLAG:uint = 1 << 5;
+    mx_internal static const HORIZONTAL_ALIGN_PROPERTY_FLAG:uint = 1 << 6;
+    mx_internal static const SCALE_MODE_PROPERTY_FLAG:uint = 1 << 7;
+    mx_internal static const SMOOTH_PROPERTY_FLAG:uint = 1 << 8;
+    mx_internal static const SMOOTHING_QUALITY_PROPERTY_FLAG:uint = 1 << 9;
+    mx_internal static const SOURCE_PROPERTY_FLAG:uint = 1 << 10;
+    mx_internal static const SOURCE_WIDTH_PROPERTY_FLAG:uint = 1 << 11;
+    mx_internal static const SOURCE_HEIGHT_PROPERTY_FLAG:uint = 1 << 12;
+    mx_internal static const TRUSTED_SOURCE_PROPERTY_FLAG:uint = 1 << 13;
+    mx_internal static const VERTICAL_ALIGN_PROPERTY_FLAG:uint = 1 << 14;

     //--------------------------------------------------------------------------
     //
@@ -418,6 +443,37 @@
     }

     //----------------------------------
+    //  clearOnLoad
+    //----------------------------------
+
+    /**
+     *  @copy mx.primitives.BitmapImage#clearOnLoad
+     *  @default true
+     */
+    public function get clearOnLoad():Boolean
+    {
+        if (imageDisplay)
+            return imageDisplay.clearOnLoad;
+        else
+            return imageDisplayProperties.clearOnLoad;
+    }
+
+    /**
+     *  @private
+     */
+    public function set clearOnLoad(value:Boolean):void
+    {
+        if (imageDisplay)
+        {
+            imageDisplay.clearOnLoad = value;
+            imageDisplayProperties = BitFlagUtil.update(imageDisplayProperties as uint,
+                CLEAR_ON_LOAD_PROPERTY_FLAG, true);
+        }
+        else
+            imageDisplayProperties.clearOnLoad = value;
+    }
+
+    //----------------------------------
     //  contentLoader
     //----------------------------------

@@ -817,6 +873,13 @@
             imageDisplay.addEventListener(HTTPStatusEvent.HTTP_STATUS, dispatchEvent, false, 0, true);

             var newImageDisplayProperties:uint = 0;
+
+            if (imageDisplayProperties.clearOnLoad !== undefined)
+            {
+                imageDisplay.clearOnLoad = imageDisplayProperties.clearOnLoad;
+                newImageDisplayProperties = BitFlagUtil.update(newImageDisplayProperties,
+                    CLEAR_ON_LOAD_PROPERTY_FLAG, true);
+            }

             if (imageDisplayProperties.contentLoader !== undefined)
             {
@@ -929,6 +992,9 @@

             var newImageDisplayProperties:Object = {};

+            if (BitFlagUtil.isSet(imageDisplayProperties as uint, CLEAR_ON_LOAD_PROPERTY_FLAG))
+                newImageDisplayProperties.clearOnLoad = imageDisplay.clearOnLoad;
+
             if (BitFlagUtil.isSet(imageDisplayProperties as uint, CONTENT_LOADER_PROPERTY_FLAG))
                 newImageDisplayProperties.contentLoader = imageDisplay.contentLoader;


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

--- frameworks/projects/spark/src/spark/components/Label.as
+++ frameworks/projects/spark/src/spark/components/Label.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
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 16078
Author:   hmuller@adobe.com
Date:     2010-05-12T21:41:13.568628Z

Log Message:
-----------
Moved GridEvent to the spark.events package and added GridEvent metadata to Grid.as.  Removed the following delegated properties from DataGrid:

  anchorRowIndex
  anchorColumnIndex
  hoverRowIndex
  hoverColumnIndex
  caretRowIndex
  caretColumnIndex

They're now just defined on Grid and they invalidateDisplayList() as needed.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/events/GridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/flex4_5/frameworks/projects/spark/src/spark/components/supportClasses/GridEvent.as</path>

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

--- frameworks/projects/spark/src/spark/events/GridEvent.as
+++ frameworks/projects/spark/src/spark/events/GridEvent.as
@@ -0,0 +1,141 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.events
+{
+import flash.events.Event;
+import flash.events.MouseEvent;
+
+import mx.core.IVisualElement;
+import spark.components.supportClasses.GridColumn;
+
+
+public class GridEvent extends MouseEvent
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    public static const GRID_MOUSE_DOWN:String = "gridMouseDown";
+
+    public static const GRID_MOUSE_DRAG:String = "gridMouseDrag";
+
+    public static const GRID_MOUSE_UP:String = "gridMouseUp";
+
+    public static const GRID_ROLL_OVER:String = "gridRollOver";
+
+    public static const GRID_ROLL_OUT:String = "gridRollOut";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function GridEvent(
+        type:String,
+        bubbles:Boolean = false,
+        cancelable:Boolean = false,
+        gridX:Number = NaN,
+        gridY:Number = NaN,
+        rowIndex:int = -1,
+        columnIndex:int = -1,
+        column:GridColumn = null,
+        item:Object = null,
+        itemRenderer:IVisualElement = null,
+        ctrlKey:Boolean = false,
+        altKey:Boolean = false,
+        shiftKey:Boolean = false,
+        buttonDown:Boolean = false,
+        delta:int = 0)
+    {
+        super(type, bubbles, cancelable, gridX, gridY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta);
+
+        this.rowIndex = rowIndex;
+        this.columnIndex = columnIndex;
+        this.column = column;
+        this.item = item;
+        this.itemRenderer = itemRenderer;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  rowIndex
+    //----------------------------------
+
+    public var rowIndex:int;
+
+    //----------------------------------
+    //  rowIndex
+    //----------------------------------
+
+    public var columnIndex:int;
+
+
+    //----------------------------------
+    //  column
+    //----------------------------------
+
+    public var column:GridColumn;
+
+
+    //----------------------------------
+    //  item
+    //----------------------------------
+
+    public var item:Object;
+
+    //----------------------------------
+    //  itemRenderer
+    //----------------------------------
+
+    public var itemRenderer:IVisualElement;
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Event
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function clone():Event
+    {
+        var cloneEvent:GridEvent = new GridEvent(type, bubbles, cancelable,
+            localX, localY, rowIndex, columnIndex, column, item, itemRenderer,
+            ctrlKey, altKey, shiftKey, buttonDown, delta);
+
+        cloneEvent.relatedObject = this.relatedObject;
+
+        return cloneEvent;
+    }
+
+    override public function toString():String
+    {
+        return "GridEvent{" +
+            "type=\"" + type + "\"" +
+            " localX,Y=" + localX + "," + localY +
+            " rowIndex,columnIndex=" + rowIndex + "," + columnIndex +
+            "}";
+    }
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3594
Author:   pfarland@adobe.com
Date:     2008-10-13T18:00:52.025975Z

Log Message:
-----------
Initial check-in for Advanced CSS selector support. Note that since direct AST generation for advanced styles (i.e. equivalent code of StyleModule.vm, StyleDef.vm, ClassDefLib.vm) is not yet implemented and as such advanced selector support is only enabled when the compiler -keep=true is enabled at this time. Direct AST generation to follow.

This change adds support for descendant type selectors (e.g. Panel VBox Button), non-global class selectors (e.g. Button.special), id selectors (e.g. Button#button14), and combinations of these types of selectors (e.e. Panel.special VBox.box12 Button.cancel). Pseudo selector awareness is included but it is not yet wired up to the runtime states mechanism as an efficient method of reacting to state changes is still being developed. Combinator conditional global selectors will be supported soon (i.e. the scenario of combining both an id and class selector at the top level, e.g. .foo#foo12, this requires a more expensive search of global class selectors).

This change juggles both the introduction of advanced selector support while retaining legacy styles APIs. The major difference with advanced styles is that multiple styles need to be considered for a type. This requires new data structures to keep track of selectors by subject. Performance analysis will be conducted to ensure these new data structures do not add unacceptable overhead to the style subsystem.

For the compiler this change consolidates styles processing in the base StyleModule class and then MXML-specific overrides (i.e. inline <Styles> nodes and SWC defaults.css) are in the StylesContainer.java class, which now extends StyleModule. The existing structure for legacy simple style codegen was retained and advanced style codegen wedged in.

QA: Yes
Doc: Not yet
Checkintests: Pass 100%
mxunit styles tests: Pass 100% (note that styles modules include tests you need to manually compile the .css files to swf and they're currently cleaned out each time a build runs... QE please correct this).
mustella styles tests: QE's select list of components testsuites pass 100%. Any failures in the full suite will be addressed in the next-checkin.
Reviewers: Glenn (framework), Paul (compiler)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/CssCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager3.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSelector.java</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleProperty.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDeclaration.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelectorKind.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSConditionKind.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/FontFaceRule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleSheet.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDocumentHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.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="D">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleProperty.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/Rule.java</path>
<path kind="file" action="A">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleCondition.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleParser.java</path>

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

--- frameworks/projects/framework/src/mx/styles/StyleManager.as
+++ frameworks/projects/framework/src/mx/styles/StyleManager.as
@@ -15,8 +15,8 @@
 import flash.events.IEventDispatcher;
 import flash.system.ApplicationDomain;
 import flash.system.SecurityDomain;
+
 import mx.core.Singleton;
-import mx.core.mx_internal;

 /**
  *  The StyleManager class manages the following:
@@ -63,21 +63,23 @@
      *  not at static initialization time, in order to ensure
      *  that the Singleton registry has already been initialized.
      */
-    private static var _impl:IStyleManager2;
+    private static var _impl:IStyleManager3;

     /**
      *  @private
      *  The singleton instance of StyleManagerImpl which was
      *  registered as implementing the IStyleManager2 interface.
      */
-    private static function get impl():IStyleManager2
+    private static function get impl():IStyleManager3
     {
         if (!_impl)
         {
-            _impl = IStyleManager2(
-                Singleton.getInstance("mx.styles::IStyleManager2"));
+            // TODO: Do we need to check compatibility first?
+
+            _impl = IStyleManager3(
+                Singleton.getInstance("mx.styles::IStyleManager3"));
         }
-
+
         return _impl;
     }

@@ -155,7 +157,29 @@
     {
         return impl.selectors;
     }
-
+
+    /**
+     *  Determines whether any of the selectors for this subject declared a
+     *  pseudo selector (which is state specific). This is used to avoid
+     *  unnecessary style regeneration between state changes.
+     */
+    public static function hasPseudoSelector(subject:String):Boolean
+    {
+        return impl.hasPseudoSelector(subject);
+    }
+
+    /**
+     *  Gets the list of style declarations for the given subject. The subject
+     *  is the right most simple type selector in a potential selector chain.
+     *
+     *  @param subject The style subject.
+     *  @return Object of the style declarations of this subject.
+     */
+    public static function getStyleDeclarations(subject:String):Object
+    {
+        return impl.getStyleDeclarations(subject);
+    }
+
     /**
      *  Gets the CSSStyleDeclaration object that stores the rules
      *  for the specified CSS selector.