Transferred from the Adobe Open Source Subversion Repository

Revision: 2644
Author:   egeorgie@adobe.com
Date:     2008-07-28T23:58:09.872940Z

Log Message:
-----------
First pass at unifying layout APIs between UIComponent and GraphicElement, more to come with additional check-ins.

reviewed by Ryan, Glenn, Gordon, Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.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/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/FilledElement.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/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -117,10 +117,10 @@
 		var w:Number;
 		var h:Number;

-		if (drawWidth != 0 && drawHeight != 0)
-		{
-			w = drawWidth;
-			h = drawHeight;
+		if (!isNaN(explicitWidth) && !isNaN(explicitHeight))
+		{
+			w = explicitWidth;
+			h = explicitHeight;
 		}
 		else
 		{
@@ -170,7 +170,8 @@
 			dispatchPropertyChangeEvent("blockProgression", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+			invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -203,7 +204,8 @@
 			dispatchPropertyChangeEvent("direction", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+            invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -236,7 +238,8 @@
 			dispatchPropertyChangeEvent("lineBreak", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+            invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -269,7 +272,8 @@
 			dispatchPropertyChangeEvent("lineThrough", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+            invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -302,7 +306,8 @@
 			dispatchPropertyChangeEvent("marginBottom", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+            invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -335,7 +340,8 @@
 			dispatchPropertyChangeEvent("marginLeft", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+            invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -368,7 +374,8 @@
 			dispatchPropertyChangeEvent("marginRight", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+            invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -401,7 +408,8 @@
 			dispatchPropertyChangeEvent("marginTop", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+			invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -434,7 +442,8 @@
 			dispatchPropertyChangeEvent("textAlignLast", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+			invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -467,7 +476,8 @@
 			dispatchPropertyChangeEvent("textDecoration", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+			invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -500,7 +510,8 @@
 			dispatchPropertyChangeEvent("textIndent", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+			invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -533,7 +544,8 @@
 			dispatchPropertyChangeEvent("whiteSpaceCollapse", oldValue, value);

 			invalidateTextLines("style");
-			notifyElementChanged();
+			invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -572,7 +584,8 @@
 			dispatchPropertyChangeEvent("content", oldValue, value);

 			invalidateTextLines("content");
-			notifyElementChanged();
+			invalidateSize();
+			invalidateDisplayList();
 		}
 	}

@@ -583,13 +596,14 @@
 	//--------------------------------------------------------------------------

 	/**
-	 *  @private
-	 */
-	override public function draw(g:Graphics):void
-	{
-		super.draw(g);
+	 *  @inheritDoc
+	 */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+	{
+		super.updateDisplayList(unscaledWidth, unscaledHeight);

-		compose(drawWidth, drawHeight);
+		compose(unscaledWidth, unscaledHeight);

 		applyDisplayObjectProperties();
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3243
Author:   rfrishbe@adobe.com
Date:     2008-09-17T16:14:14.399661Z

Log Message:
-----------
DataGroup/Group split work.  DataGroup is for holding data items that may require item rendering. Group only holds visual items now.  The Group APIs stay the same (numItems, addItem, etc...).  DataGroup uses the IList APIs through its dataProvider.  So the equivalent methods are now dataProvider.length, dataProvider, addItem, etc...  This is just the initial split work as there's more to come to get the files up to spec.  We will also have to visit how we deal with graphic elements in DataGroup vs. Group.  For now the implementations are roughly the same.

QE: Yes - tests may break.  please update them.
Doc: Yes
Bugs: -
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/BasicLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DataComponentSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/GroupBase.as</path>
<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/skin/SelectorSkin.mxml</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/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/intf/ILayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/ComplexPanelSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/layouts/BasicLayout.as
+++ frameworks/projects/spark/src/spark/layouts/BasicLayout.as
@@ -15,7 +15,7 @@
 import flash.geom.Point;
 import flash.geom.Rectangle;

-import flex.core.Group;
+import flex.core.GroupBase;
 import flex.intf.ILayout;
 import flex.intf.ILayoutItem;

@@ -68,14 +68,14 @@
     // target
     //----------------------------------

-    private var _target:Group;
-
-    public function get target():Group
+    private var _target:GroupBase;
+
+    public function get target():GroupBase
     {
         return _target;
     }

-    public function set target(value:Group):void
+    public function set target(value:GroupBase):void
     {
         _target = value;
     }
@@ -89,7 +89,7 @@

     public function measure():void
     {
-        var layoutTarget:Group = target;
+        var layoutTarget:GroupBase = target;
         if (!layoutTarget)
             return;

@@ -156,7 +156,7 @@

     public function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        var layoutTarget:Group = target;
+        var layoutTarget:GroupBase = target;
         if (!layoutTarget)
             return;


FLEX-34390 - added null check on skin.currentState

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -2699,7 +2699,7 @@

         // We may have gone from empty to non-empty or vice-versa. This should
         // cause the prompt to show or hide.
-        if (prompt != null && prompt != "" && skin &&
+        if (prompt != null && prompt != "" && skin && skin.currentState &&
             (skin.currentState.indexOf("WithPrompt") != -1 && text.length != 0 ||
             skin.currentState.indexOf("WithPrompt") == -1 && text.length == 0))
             invalidateSkinState();


Transferred from the Adobe Open Source Subversion Repository

Revision: 9177
Author:   jimurphy@adobe.com
Date:     2009-08-07T21:15:07.894169Z

Log Message:
-----------
Merged 3.4 revisions 8630,8660,8683,8735,8750,8753,8755,8757,8759,8764,8776,8798,8821,8824,8837,8862,8911,8946,8949,8962,8965,9026,9109,9131,9138-9139,9147 -> trunk

integrates:
player: 10.0.32.18
AIR kit: 1.5.2.8870 (20090721ap)

checkintests: pass

(btw: I'm not happy about doing this on a Friday PM!)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/BrowserManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Install Flash Player 10 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/player/10/playerglobal.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLDecoder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/flashplayer.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/libflashplayer.so.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/FlashPlayer.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Flash Player.app.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageAgent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/mxml/IMXMLSupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/ISOAPDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/install_flash_player_10_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLEncoder.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/rpc/src/mx/rpc/xml/IXMLSchemaInstance.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Menu.as
+++ frameworks/projects/mx/src/mx/controls/Menu.as
@@ -53,8 +53,8 @@
 import mx.events.FlexMouseEvent;
 import mx.events.InterManagerRequest;
 import mx.events.ListEvent;
+import mx.events.MenuEvent;
 import mx.events.SandboxMouseEvent;
-import mx.events.MenuEvent;
 import mx.managers.IActiveWindowManager;
 import mx.managers.IFocusManagerContainer;
 import mx.managers.ISystemManager;
@@ -721,6 +721,13 @@
      *  Where to add this menu on the display list.
      */
     mx_internal var parentDisplayObject:DisplayObject;
+
+    /**
+     *  @private
+     *  Whether the menu was opened from the left or the right.
+     *  This really only applies to submenus and helps with cascading submenus.
+     */
+    private var isDirectionLeft:Boolean = false;

     // the anchor is the row in the parent menu that opened to be this menu
     // or the row in this menu that opened to be a submenu
@@ -1576,7 +1583,7 @@
      *
      *  The x and y arguments of the show() method specify the
      *  coordinates of the upper-left corner of the Menu control relative to the
-     *  parent application, which is not necessarily the direct parent of the
+     *  sandbox root, which is not necessarily the direct parent of the
      *  Menu control.
      *
      *  For example, if the Menu control is in an HBox container which is
@@ -1585,6 +1592,7 @@
      *
      *  @param x Horizontal location of the Menu control's upper-left
      *  corner (optional).
+     *
      *  @param y Vertical location of the Menu control's upper-left
      *  corner (optional).
      *
@@ -1607,7 +1615,7 @@
         if (visible)
             return;

-        if (parentDisplayObject && parent != parentDisplayObject)
+        if (parentDisplayObject && (!parent || !parent.contains(parentDisplayObject)))
         {
             PopUpManager.addPopUp(this, parentDisplayObject, false);
             addEventListener(MenuEvent.MENU_HIDE, menuHideHandler, false, EventPriority.DEFAULT_HANDLER);
@@ -1975,6 +1983,8 @@
         if (row && row.data)
             item = row.data;

+        isPressed = event.buttonDown;
+
         if (row && row != anchorRow)
         {
             if (anchorRow)
@@ -2039,6 +2049,17 @@
         if (row)
         {
             drawItem(row, false, Boolean(item && _dataDescriptor.isEnabled(item)));
+
+            if (isPressed)
+            {
+                if (item && _dataDescriptor.isEnabled(item))
+                {
+                    if (!_dataDescriptor.isBranch(item))
+                        selectItem(row, event.shiftKey, event.ctrlKey);
+                    else
+                        clearSelected();
+                }
+            }

             if (item && _dataDescriptor.isEnabled(item))
             {
@@ -2321,10 +2342,10 @@
     mx_internal function openSubMenu(row:IListItemRenderer):void
     {
         supposedToLoseFocus = true;
-
+
         var r:Menu = getRootMenu();
         var menu:Menu;
-
+
         // check to see if the menu exists, if not create it
         if (!IMenuItemRenderer(row).menu)
         {
@@ -2342,7 +2363,7 @@
             menu.rowHeight = r.rowHeight;
             menu.scaleY = r.scaleY;
             menu.scaleX = r.scaleX;
-
+
             // if there's data and it has children then add the items
             if (row.data &&
                 _dataDescriptor.isBranch(row.data) &&
@@ -2352,7 +2373,7 @@
             }
             menu.sourceMenuBar = sourceMenuBar;
             menu.sourceMenuBarItem = sourceMenuBarItem;
-
+
             IMenuItemRenderer(row).menu = menu;
             PopUpManager.addPopUp(menu, r, false);
         }
@@ -2360,14 +2381,63 @@
         {
             menu = IMenuItemRenderer(row).menu;
         }
-
+
         var _do:DisplayObject = DisplayObject(row);
-        var pt:Point = new Point(0,0);
-        pt = _do.localToGlobal(pt);
+        var sandBoxRootPoint:Point = new Point(0,0);
+        sandBoxRootPoint = _do.localToGlobal(sandBoxRootPoint);
         // when loadMovied, you may not be in global coordinates
         if (_do.root)   //verify this is sufficient
-            pt = _do.root.globalToLocal(pt);
-        menu.show(pt.x + row.width, pt.y);
+            sandBoxRootPoint = _do.root.globalToLocal(sandBoxRootPoint);
+
+        // showX, showY are in sandbox root coordinates
+        var showY:Number = sandBoxRootPoint.y;
+        var showX:Number;
+        if (!isDirectionLeft)
+            showX = sandBoxRootPoint.x + row.width;
+        else
+            showX = sandBoxRootPoint.x - menu.getExplicitOrMeasuredWidth();
+
+        // convert to global coordinates to compare with getVisibleApplicationRect().
+        // the screen is the visible coordinates of our sandbox (written in global coordinates)
+        var screen:Rectangle = systemManager.getVisibleApplicationRect();
+        var sbRoot:DisplayObject = systemManager.getSandboxRoot();
+
+        var screenPoint:Point = sbRoot.localToGlobal(new Point(showX, showY));
+
+        // do x
+        var shift:Number = screenPoint.x + menu.getExplicitOrMeasuredWidth() - screen.right;
+        if (shift > 0 || screenPoint.x < screen.x)
+        {
+            // if we want to ensure our parent's visible, let's
+            // modify the shift so that we're not just on-screen
+            // but we're also shifted away from our parent.
+            var shiftForParent:Number = getExplicitOrMeasuredWidth() + menu.getExplicitOrMeasuredWidth();
+
+            // if was going left, shift to right.  otherwise, shift to left
+            if (isDirectionLeft)
+                shiftForParent *= -1;
+
+            showX = Math.max(showX - shiftForParent, 0);
+
+            // now make sure we're still on-screen again
+            screenPoint = new Point(showX, showY);
+            screenPoint = sbRoot.localToGlobal(screenPoint);
+
+            // only shift if greater our position + width > width of screen
+            shift = Math.max(0, screenPoint.x + width - screen.right);
+
+            showX = Math.max(showX - shift, 0);
+        }
+
+        menu.isDirectionLeft = this.x > showX;
+
+        // now do y
+        shift = screenPoint.y + height - screen.bottom;
+        if (shift > 0 || screenPoint.y < screen.y)
+            showY = Math.max(showY - shift, 0);
+
+        menu.show(showX, showY);
+
         subMenu = menu;
         clearInterval(openSubMenuTimer);
         openSubMenuTimer = 0;


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

--- frameworks/projects/mx/src/mx/core/Repeater.as
+++ frameworks/projects/mx/src/mx/core/Repeater.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.core
 {


projects refresh

projects refresh

--- Arguments/src/Controller/AGORAController.as
+++ Arguments/src/Controller/AGORAController.as
@@ -300,6 +300,7 @@
 		protected function onProjectPush(event:AGORAEvent):void{
 			Alert.show(Language.lookup("ProjectCreated"));
 			FlexGlobals.topLevelApplication.projectNameBox.visible=false;
+			fetchDataChildCategory(this.categoryChain.getItemAt((this.categoryChain.length - 1)).current,true);
 			fetchDataProjectList();
 			fetchDataMyProjects();
 		}


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

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


Cleaner approach for the issue where a thumb wasn't shown if it had a percent size and the value was set before it was added to stage

--- src/org/openPyro/controls/Slider.as
+++ src/org/openPyro/controls/Slider.as
@@ -259,10 +259,14 @@
 				this._thumbButton.y = this.thumbButtonY;
 				this._thumbButton.x = this.thumbButtonX;
 			}
-
-
-		}
-
+		}
+
+		override public function validateSize():void
+		{
+			super.validateSize();
+			positionThumb(_value);
+		}
+
 		public function get value():Number{
 			return _value;
 		}
@@ -270,6 +274,12 @@
 		public function set value(v:Number):void{
 			_value = v;
 			if(!thumbButton) return;
+			positionThumb(v);
+			dispatchEvent(new SliderEvent(SliderEvent.CHANGE));
+		}
+
+		private function positionThumb(v:Number):void
+		{
 			if(_direction == Direction.HORIZONTAL)
 			{
 				_thumbButton.x = v*(this.width-_thumbButton.width)/(_maximum-_minimum) ;
@@ -280,7 +290,6 @@
 				_thumbButton.y = v*(this.height-_thumbButton.height)/(_maximum-_minimum) ;
 				thumbButtonY = _thumbButton.y;
 			}
-			dispatchEvent(new SliderEvent(SliderEvent.CHANGE));
 		}

 		public function set thumbButtonHeight(value:Number):void


Test for cloning array in CompositeCloneableClass.

--- dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
+++ dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
@@ -5,7 +5,14 @@
 import org.as3commons.reflect.Field;
 import org.as3commons.reflect.Type;
 import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertFalse;
 import org.flexunit.asserts.assertNotNull;
+import org.hamcrest.assertThat;
+import org.hamcrest.collection.array;
+import org.hamcrest.collection.arrayWithSize;
+import org.hamcrest.collection.everyItem;
+import org.hamcrest.core.isA;
+import org.hamcrest.object.equalTo;

 use namespace dolly_internal;

@@ -33,5 +40,17 @@
 		assertNotNull(writableFields);
 		assertEquals(4, writableFields.length);
 	}
+
+	[Test]
+	public function cloningOfArray():void {
+		const clone:CompositeCloneableClass = Cloner.clone(compositeCloneableClass);
+
+		assertNotNull(clone.array);
+		assertThat(clone.array, arrayWithSize(5));
+		assertThat(clone.array, compositeCloneableClass.array);
+		assertFalse(clone.array == compositeCloneableClass.array);
+		assertThat(clone.array, everyItem(isA(Number)));
+		assertThat(clone.array, array(equalTo(0), equalTo(1), equalTo(2), equalTo(3), equalTo(4)));
+	}
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3341
Author:   rfrishbe@adobe.com
Date:     2008-09-24T23:10:20.245436Z

Log Message:
-----------
Changing the definition of some methods in SkinnableComponent.  So instead of:

protected function partAdded(partName:String, instance:*):void

We now have:

protected function partAdded(partName:String, instance:Object):void

Technically this just means we can't support the value of "undefined" anymore.  This change was made to partAdded(), partRemoved(), createPartInstance(), removePartInstance(), and getDyanamicPartAt().

As I was making these changes in all the files that override these methods, I noticed Slider should have a partRemoved() method, so I added it.

I also made a minor change in Selector where there was a bug in the dataProvider collectionChange eventHandler.  Basically we were doing remove code on replace rather than remove.

QE: Yes - This will break (as in, it won't compile) some tests in SkinnableComponent.  Joann will change them soon after I checkin.
Doc: Yes
Bugs: SDK-16640, SDK-16709
Reviewer: Hans

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/SkinnableComponent.as</path>
<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/component/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Scroller.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -172,7 +172,8 @@
         if (skinChanged)
         {
             skinChanged = false;
-            unloadSkin();
+            if (skinObject)
+                unloadSkin();
             loadSkin();
         }

@@ -434,13 +435,11 @@
      */
     protected function unloadSkin():void
     {
-        if (skinObject)
-        {
-            unloadingSkin();
-            clearSkinParts();
-            removeChild(skinObject);
-            _skinObject = null;
-        }
+
+        unloadingSkin();
+        clearSkinParts();
+        removeChild(skinObject);
+        _skinObject = null;
     }

     //--------------------------------------------------------------------------
@@ -453,7 +452,7 @@
      *  Called when a part has been added. Override this function to attach
      *  behavior to the part.
      */
-    protected function partAdded(partName:String, instance:*):void
+    protected function partAdded(partName:String, instance:Object):void
     {
     }

@@ -461,7 +460,7 @@
      *  Called when an instance of a dynamic part is being removed.
      *  Override this function to remove behavior from the part.
      */
-    protected function partRemoved(partName:String, instance:*):void
+    protected function partRemoved(partName:String, instance:Object):void
     {
     }

@@ -480,7 +479,7 @@
      *  by this method, rather than directly calling newInstance() on the factory.
      *  This method creates the part, but does not add it to the display list.
      */
-    protected function createPartInstance(partName:String):*
+    protected function createPartInstance(partName:String):Object
     {
         var factory:IFactory = this[partName];

@@ -510,7 +509,7 @@
      *  Remove an instance of a dynamic part. This method must be called before a dynamic part is
      *  deleted. This method does not remove the part from the display list.
      */
-    protected function removePartInstance(partName:String, instance:*):void
+    protected function removePartInstance(partName:String, instance:Object):void
     {
         // Send notification
         partRemoved(partName, instance);
@@ -534,7 +533,7 @@
     /**
      *  Returns a specific instance of a dynamic part.
      */
-    protected function getDynamicPartAt(partName:String, index:int):*
+    protected function getDynamicPartAt(partName:String, index:int):Object
     {
         if (dynamicPartsCache && dynamicPartsCache[partName])
             return dynamicPartsCache[partName][index];


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 20644
Author:   mhorn@adobe.com
Date:     2011-03-07T18:49:20.181589Z

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarFirstTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorTabBarLastTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonBarButtonClassFactory.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as
@@ -5,6 +5,15 @@

 use namespace mx_internal;

+/**
+ *  The ActionScript-based skin used for TextAreaHScrollBarThumb components
+ *  in mobile applications.
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ *
+ */
 public class TextAreaHScrollBarThumbSkin extends HScrollBarThumbSkin
 {
     //--------------------------------------------------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 22561
Author:   smgilson@adobe.com
Date:     2011-09-14T19:12:37.612519Z

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

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/events/ModuleEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/advancedgrids/src/mx/events/AdvancedDataGridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/advancedgrids/src/mx/events/AdvancedDataGridEvent.as
+++ frameworks/projects/advancedgrids/src/mx/events/AdvancedDataGridEvent.as
@@ -745,6 +745,8 @@
      *
      *  @param triggerEvent The MouseEvent or KeyboardEvent that triggered this
      *  event or null if this event was triggered programmatically.
+     *
+     *  @param headerPart The part of the header that was clicked.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


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

--- frameworks/projects/charts/src/mx/charts/styles/metadata/MarginStyles.as
+++ frameworks/projects/charts/src/mx/charts/styles/metadata/MarginStyles.as
@@ -1,4 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////

+/**
+ *  Number of pixels between the container's left border and its content area.
+ *  The default value is 0.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="paddingLeft", type="Number", format="Length", inherit="no")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 6891
Author:   rfrishbe@adobe.com
Date:     2009-05-13T18:07:03.276533Z

Log Message:
-----------
Fixing a bunch of Flash Component Kit bugs.

SDK-20269: Add exclude metadata for placeholder components
SDK-20670: Setting the content of a ContainerMovieClip in ActionScript doesn't size the new items
SDK-20710: ContainerMovieClip shows Flex placeholder image when Placeholder is not on the first frame
SDK-21094: Animating TransformOffset scale values on ContainerMovieClip/UIMovieClip causes size to explode to huge values
SDK-16673: Cannot have two instances of FlexContentHolder in separate SWC files, only one shows up.

For SDK-20710, we now support containers where the FlexContentHolder is not present in the first frame.  This makes creating an expanding panel relatively easy and with no code.

Had to modify the build.xml to build from a manifest file--otherwise we're not exporting the files correctly and Flash authoring won't understand them.  Because of this, I've made a change in the project files for the flash-integration Flex Builder project (and the utilities one)

QE Notes: There's a new MXP File for Flash Authoring.  I'll be making this change in the 3.x branch as well.
Doc Notes: -
Bugs: SDK-20269, SDK-20670, SDK-20710, SDK-21094, SDK-16673
Reviewer: Glenn
tests: checkintests, mustella FCK

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flash-integration/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashContainerPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/flash-integration/FlexComponentKit.mxp</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flash-integration/manifest.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flash-integration/src/FlashIntegrationClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashComponentPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/JSFL/MakeFlexComponent.jsfl</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flash-integration/.flexLibProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/readme.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flash-integration/.project</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/flash-integration/readme.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/MyFlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/FlexComponentKit.mxi</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/utilities/.actionScriptProperties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/JSFL/Convert Symbol to Flex Container.jsfl</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as
@@ -15,6 +15,7 @@
 import flash.display.BitmapData;
 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
+import flash.events.Event;
 import flash.events.FocusEvent;
 import flash.geom.ColorTransform;
 import flash.geom.Point;
@@ -94,6 +95,9 @@
     public function ContainerMovieClip()
     {
         super();
+
+        addEventListener(Event.ADDED, addedHandler);
+        addEventListener(Event.REMOVED, removedHandler);
     }

     //--------------------------------------------------------------------------
@@ -243,10 +247,10 @@
         {
             contentHolderObj.content = value;
         }
-        else
-        {
-            _content = value;
-        }
+
+        _content = value;
+
+        invalidateParentSizeAndDisplayList();
     }

     //----------------------------------
@@ -554,5 +558,70 @@
     {
         throw new ArgumentError("This operation is not supported.");
     }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event Handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Any time a display object gets added, let's see if this is a child
+     *  that belongs to use and needs to be initialized.  Also if it is
+     *  the contentHolder, let's stuff the content down into it.
+     *
+     *
We only need this method if the child gets added after
+     *  we've already been initialized.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    protected function addedHandler(event:Event):void
+    {
+        // if we haven't initialized, we'll handle
+        // that stuff in there
+        if (!initialized)
+            return;
+
+        // if it's not a direct descendent, don't
+        // worry about it
+        if (event.target.parent != this)
+            return;
+
+        // if it's the FlexContentHolder, let's
+        // treat it as such.
+        if (event.target is FlexContentHolder && !_contentHolder)
+        {
+            _contentHolder = event.target;
+            if (_content)
+                content = _content;
+        }
+
+        // Call initialize() on any IUIComponent children
+        var child:IUIComponent = event.target as IUIComponent;
+
+        if (child)
+            child.initialize();
+    }
+
+    /**
+     *  Any time a display object gets removed, let's see if this child
+     *  is the contentHolder.  If it is, let's null out our reference to
+     *  _contentHolder.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    protected function removedHandler(event:Event):void
+    {
+        if (event.target == _contentHolder)
+        {
+            _contentHolder = null;
+        }
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20097
Author:   jasonsj@adobe.com
Date:     2011-02-03T17:48:25.773740Z

Log Message:
-----------
Remove use of minWidth and minHeight where possible from mobile skins to fix constraint use cases. Replace usage of minWidth/minHeight and layoutMeasuredWidth/layoutMeasuredHeight with MobileSkin property measuredDefaultWidth/measuredDefaultHeight.

Use minWidth/minHeight for skins that do not scale down: Beveled buttons, CheckBox, RadioButton, and scroll bars.

Doc notes:
Bugs:
SDK-28715 Cannot size and position button correctly in i4 build.
Reviewer: egeorgie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarFirstButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarMiddleButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TabbedViewNavigatorTabBarTabSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarLastButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ImageSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as
@@ -74,7 +74,7 @@
             }
             default:
             {
-                // default PPI160
+                // default DPI_160
                 minWidth = 6;
                 paddingRight = VScrollBarThumbSkin.PADDING_RIGHT_DEFAULTDPI;
                 paddingVertical = VScrollBarThumbSkin.PADDING_VERTICAL_DEFAULTDPI;


Transferred from the Adobe Open Source Subversion Repository

Revision: 13097
Author:   cframpto@adobe.com
Date:     2009-12-18T02:36:41.995341Z

Log Message:
-----------
Add ISystemCursorClient so that it is possible to detect whether system cursor should be displayed in mouseOverHandler.  In particular this will detect if it is a RichEditableText component.  This removes a FIXME.

QE notes:
Doc notes:
Bugs:
Reviewer: Alex, Glenn
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ISystemCursorClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>

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

--- frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as
@@ -32,6 +32,7 @@
 import mx.core.FlexGlobals;
 import mx.core.FlexSprite;
 import mx.core.mx_internal;
+import mx.core.ISystemCursorClient;
 import mx.core.IUIComponent;
 import mx.events.Request;
 import mx.styles.CSSStyleDeclaration;
@@ -114,17 +115,6 @@

 			}
 		}
-
-		// If available, get soft-link to the RichEditableText class
-		// to use in mouseMoveHandler().
-        // FIXME (cframpto): revisit the correct way to do this for modules.
-        if (ApplicationDomain.currentDomain.hasDefinition(
-				"spark.components.RichEditableText"))
-		{
-            richEditableTextClass =
-				Class(ApplicationDomain.currentDomain.getDefinition(
-					"spark.components.RichEditableText"));
-		}
     }

     //--------------------------------------------------------------------------
@@ -225,12 +215,6 @@
      *  @private
      */
     private var sourceArray:Array = [];
-
-    /**
-     *  @private
-     *  Soft-link to RichEditableText class object, if available.
-     */
-    private var richEditableTextClass:Class;

     //--------------------------------------------------------------------------
     //
@@ -889,7 +873,8 @@

         var isInputTextField:Boolean =
             (target is TextField && target.type == TextFieldType.INPUT) ||
-                (richEditableTextClass && target is richEditableTextClass && (target["editable"] || target["selectable"]));
+                (target is ISystemCursorClient &&
+                    ISystemCursorClient(target).showSystemCursor);

         // Do target test.
         if (!overTextField && isInputTextField)


improved error messages for parseConstant()

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -291,16 +291,23 @@
 		 */
 		public static function parseConstant(constantExpression:String):*
 		{
-			if (!_staticInstance)
-				_staticInstance = new Compiler(false);
-			var compiled:ICompiledObject = _staticInstance.finalize(_staticInstance.compileTokens(_staticInstance.getTokens(constantExpression), false), true);
-			if (compiled is CompiledConstant)
-			{
-				return (compiled as CompiledConstant).value;
-			}
-			else
-			{
-				throw new Error("Expression does not evaluate to a constant");
+			try
+			{
+				if (!_staticInstance)
+					_staticInstance = new Compiler(false);
+				var compiled:ICompiledObject = _staticInstance.finalize(_staticInstance.compileTokens(_staticInstance.getTokens(constantExpression), false), true);
+				if (compiled is CompiledConstant)
+				{
+					return (compiled as CompiledConstant).value;
+				}
+				else
+				{
+					throw new Error("Expression does not evaluate to a constant");
+				}
+			}
+			catch (e:Error)
+			{
+				throw new Error("Expression does not evaluate to a constant. " + e.message);
 			}
 		}


fixed whitespace error in stringify()

fixed whitespace error in stringify()

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -1121,7 +1121,7 @@
 		public static function stringify(value:*, replacer:Function = null, indent:* = null, json_values_only:Boolean = false):String
 		{
 			indent = indent is Number ? StandardLib.lpad('', indent as Number, ' ') : indent as String || ''
-			return _stringify("", value, replacer, indent ? '\n' : ' ', indent, json_values_only);
+			return _stringify("", value, replacer, indent ? '\n' : '', indent, json_values_only);
 		}
 		private static function _stringify(key:String, value:*, replacer:Function, lineBreak:String, indent:String, json_values_only:Boolean):String
 		{
@@ -1173,7 +1173,7 @@

 			return (value is Array ? "[" : "{")
 				+ lineBreakIndent
-				+ output.join("," + lineBreakIndent)
+				+ output.join(indent ? ',' + lineBreakIndent : ', ')
 				+ lineBreak
 				+ (value is Array ? "]" : "}");
 		}


Updated ASDoc comments

Updated ASDoc comments

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

--- flare.data/flare/data/DataUtil.as
+++ flare.data/flare/data/DataUtil.as
@@ -13,7 +13,7 @@
 		public static const DATE:int   = 2;
 		/** Constant indicating a String data type. */
 		public static const STRING:int = 3;
-		/** Constant indicating an arbitraty Object data type. */
+		/** Constant indicating an arbitrary Object data type. */
 		public static const OBJECT:int = 4;

 		/**


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

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

 package spark.skins.mobile.supportClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 2796
Author:   jimurphy@adobe.com
Date:     2008-08-11T14:31:56.866734Z

Log Message:
-----------
Merged 3.0.x revisions [2767,2780,2784] -> trunk

Modified Paths:
--------------
<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/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/Compc.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
+++ frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
@@ -18,6 +18,8 @@
 import flash.display.BitmapData;
 import flash.display.DisplayObject;
 import flash.display.InteractiveObject;
+import flash.events.Event;
+import flash.events.IEventDispatcher;
 import flash.events.MouseEvent;
 import flash.events.NativeDragEvent;
 import flash.geom.Point;
@@ -31,6 +33,8 @@
 import mx.core.mx_internal;
 import mx.events.DragEvent;
 import mx.events.FlexEvent;
+import mx.events.MarshalEvent;
+import mx.events.MarshalDragEvent;
 import mx.managers.dragClasses.DragProxy;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.StyleManager;
@@ -56,7 +60,7 @@
 	/**
 	 *  @private
 	 */
-	private static var sm:ISystemManager;
+	private static var sm:ISystemManager2;

 	/**
 	 *  @private
@@ -100,6 +104,16 @@
 			throw new Error("Instance already exists.");

 		registerSystemManager(sm);
+		sandboxRoot = sm.getSandboxRoot();
+		sandboxRoot.addEventListener(MarshalDragEvent.DISPATCH_EVENT, marshalDispatchEventHandler, false, 0, true);
+
+		// trace("creating DragManagerImpl", sm);
+		sandboxRoot.addEventListener(MarshalEvent.DRAG_MANAGER, marshalDragManagerHandler, false, 0, true);
+		var me:MarshalEvent = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+		me.name = "update";
+		// trace("--->update request for DragManagerImpl", sm);
+		sandboxRoot.dispatchEvent(me);
+		// trace("<---update request for DragManagerImpl", sm);
 	}

 	//--------------------------------------------------------------------------
@@ -144,6 +158,12 @@

 	private var _relatedObject:InteractiveObject;

+	/**
+	 *  @private
+	 *  The highest place we can listen for events in our DOM
+	 */
+	private var sandboxRoot:IEventDispatcher;
+
 	//--------------------------------------------------------------------------
 	//
 	//  Properties
@@ -226,6 +246,19 @@
 			return;
 		}

+		var me:MarshalEvent = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+		me.name = "isDragging";
+		me.value = true;
+		// trace("-->dispatch isDragging for DragManagerImpl", sm, true);
+		sandboxRoot.dispatchEvent(me);
+		// trace("<--dispatch isDragging for DragManagerImpl", sm, true);
+
+		me = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+		me.name = "mouseShield";
+		me.value = true;
+		// trace("-->dispatch add mouseShield.for DragManagerImpl", sm);
+		sandboxRoot.dispatchEvent(me);
+
 		_clipboard = new Clipboard();
 		_dragInitiator = dragInitiator;
 		_offset = new Point(xOffset, yOffset);
@@ -340,10 +373,22 @@
 	 */
 	public function acceptDragDrop(target:IUIComponent):void
 	{
-		// trace("NativeDragMgr.acceptDragDrop targ",target);
-		var dispObj:InteractiveObject = target as InteractiveObject;
-		if (dispObj)
-			flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
+		if (isDragging)
+		{
+			// trace("NativeDragMgr.acceptDragDrop targ",target);
+			var dispObj:InteractiveObject = target as InteractiveObject;
+			if (dispObj)
+				flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
+		}
+		else
+		{
+			var me:MarshalEvent = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+			me.name = "acceptDragDrop";
+			me.value = target;
+			// trace("-->dispatch acceptDragDrop for DragManagerImpl", sm, target);
+			sandboxRoot.dispatchEvent(me);
+			// trace("<--dispatch acceptDragDrop for DragManagerImpl", sm, target);
+		}
 	}

 	/**
@@ -355,13 +400,25 @@
 	 */
 	public function showFeedback(feedback:String):void
 	{
-		if (feedback == DragManager.MOVE && !_allowedActions.allowMove)
-			return;
-		else if (feedback == DragManager.COPY && !_allowedActions.allowCopy)
-			return;
-		else if (feedback == DragManager.LINK && !_allowedActions.allowLink)
-			return;
-		flash.desktop.NativeDragManager.dropAction = feedback;
+		if (isDragging)
+		{
+			if (feedback == DragManager.MOVE && !_allowedActions.allowMove)
+				return;
+			else if (feedback == DragManager.COPY && !_allowedActions.allowCopy)
+				return;
+			else if (feedback == DragManager.LINK && !_allowedActions.allowLink)
+				return;
+			flash.desktop.NativeDragManager.dropAction = feedback;
+		}
+		else
+		{
+			var me:MarshalEvent = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+			me.name = "showFeedback";
+			me.value = feedback;
+			// trace("-->dispatch showFeedback for DragManagerImpl", sm, feedback);
+			sandboxRoot.dispatchEvent(me);
+			// trace("<--dispatch showFeedback for DragManagerImpl", sm, feedback);
+		}
 	}

 	/**
@@ -373,6 +430,16 @@
 	 */
 	public function getFeedback():String
 	{
+		if (!isDragging)
+		{
+			var me:MarshalEvent = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+			me.name = "getFeedback";
+			// trace("-->dispatch getFeedback for DragManagerImpl", sm);
+			sandboxRoot.dispatchEvent(me);
+			// trace("<--dispatch getFeedback for DragManagerImpl", sm);
+			return me.value as String;
+		}
+
 		return flash.desktop.NativeDragManager.dropAction;
 	}

@@ -382,6 +449,22 @@
 	 */
 	public function endDrag():void
 	{
+		var me:MarshalEvent;
+
+		me = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+		me.name = "mouseShield";
+		me.value = false;
+		// trace("-->dispatch remove mouseShield.for DragManagerImpl", sm);
+		sandboxRoot.dispatchEvent(me);
+
+		me = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+		me.name = "isDragging";
+		me.value = false;
+		// trace("-->dispatch isDragging for DragManagerImpl", sm, false);
+		sandboxRoot.dispatchEvent(me);
+		// trace("<--dispatch isDragging for DragManagerImpl", sm, false);
+		// trace("<--endDrag for DragManagerImpl", sm);
+
 	}

 	/**
@@ -454,6 +537,7 @@
 		var len:int = origFormats.length;
 		var format:String;
 		var data:Object;
+		var me:MarshalEvent;

 		_allowedActions = event.allowedActions;

@@ -499,7 +583,140 @@
 		else
 			dragEvent.relatedObject = event.relatedObject;
 		// Resend the event as a DragEvent.
-		target.dispatchEvent(dragEvent);
+		_dispatchDragEvent(target, dragEvent);
+
+		if (newType == DragEvent.DRAG_COMPLETE)
+		{
+			me = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+			me.name = "endDrag";
+			// trace("-->dispatch endDrag for DragManagerImpl", sm);
+			sandboxRoot.dispatchEvent(me);
+			// trace("<--dispatch endDrag for DragManagerImpl", sm);
+		}
+	}
+
+    /**
+     *  @private
+     */
+    private function _dispatchDragEvent(target:DisplayObject, event:DragEvent):void
+    {
+		// in trusted mode, the target could be in another application domain
+		// in untrusted mode, the mouse events shouldn't work so we shouldn't be here
+
+		// same domain
+		if (isSameOrChildApplicationDomain(target))
+			target.dispatchEvent(event);
+		else
+		{
+			// wake up all the other DragManagers
+			var me:MarshalEvent = new MarshalEvent(MarshalEvent.INIT_MANAGER);
+			me.name = MarshalEvent.DRAG_MANAGER
+			sandboxRoot.dispatchEvent(me);
+			// bounce this message off the sandbox root and hope
+			// another DragManager picks it up
+			var mde:MarshalDragEvent = new MarshalDragEvent(target, event);
+			sandboxRoot.dispatchEvent(mde);
+		}
+	}
+
+	private function isSameOrChildApplicationDomain(target:Object):Boolean
+	{
+		var swfRoot:DisplayObject = SystemManager.getSWFRoot(target);
+		return (swfRoot != null);
+	}
+
+	/**
+	 *  Marshal dispatchEvents
+	 */
+	private function marshalDispatchEventHandler(event:Event):void
+	{
+		if (event is MarshalDragEvent)
+			return;
+
+		var marshalEvent:Object = event;
+
+		var swfRoot:DisplayObject = SystemManager.getSWFRoot(marshalEvent.dragTarget);
+		if (!swfRoot)
+			return;	// doesn't belong to this appdomain
+
+		var dragEvent:DragEvent = new DragEvent(marshalEvent.eventType, marshalEvent.bubbles, marshalEvent.cancelable);
+		dragEvent.localX = marshalEvent.localX;
+		dragEvent.localY = marshalEvent.localY;
+		dragEvent.action = marshalEvent.action;
+		dragEvent.ctrlKey = marshalEvent.ctrlKey;
+		dragEvent.altKey = marshalEvent.altKey;
+		dragEvent.shiftKey = marshalEvent.shiftKey;
+		dragEvent.draggedItem = marshalEvent.draggedItem;
+		dragEvent.dragSource = new DragSource();
+		var formats:Array = marshalEvent.dragSource.formats;
+		var n:int = formats.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			// this will call handlers right away, so deferred clipboard will be costly
+			dragEvent.dragSource.addData(marshalEvent.dragSource.dataForFormat(formats[i]), formats[i]);
+		}
+		if (!marshalEvent.dragTarget.dispatchEvent(dragEvent))
+		{
+			event.preventDefault();
+		}
+	}
+
+	/**
+	 *  Marshal dragManager
+	 */
+	private function marshalDragManagerHandler(event:Event):void
+	{
+		if (event is MarshalEvent)
+			return;
+
+		var marshalEvent:Object = event;
+		switch (marshalEvent.name)
+		{
+		case "isDragging":
+			// trace("--marshaled isDragging for DragManagerImpl", sm, marshalEvent.value);
+			// bDoingDrag = marshalEvent.value; // not supported in AIR right now, we'd need more info
+			break;
+		case "acceptDragDrop":
+			if (isDragging)
+			{
+				// trace("NativeDragMgr.acceptDragDrop targ",target);
+				var dispObj:InteractiveObject = marshalEvent.value as InteractiveObject;
+				if (dispObj)
+					flash.desktop.NativeDragManager.acceptDragDrop(dispObj);
+			}
+			break;
+		case "showFeedback":
+			if (isDragging)	// it is our drag
+			{
+				// trace("--marshaled showFeedback for DragManagerImpl", sm, marshalEvent.value);
+				showFeedback(marshalEvent.value);
+			}
+			break;
+		case "getFeedback":
+			if (isDragging)	// it is our drag
+			{
+				marshalEvent.value = getFeedback();
+				// trace("--marshaled getFeedback for DragManagerImpl", sm, marshalEvent.value);
+			}
+			break;
+		case "endDrag":
+			// trace("--marshaled endDrag for DragManagerImpl", sm, marshalEvent.value);
+			endDrag();
+			break;
+		case "update":
+			// if we own the drag, then redispatch to tell the new guy
+			if (isDragging)
+			{
+				// trace("-->marshaled update for DragManagerImpl", sm);
+				var me:MarshalEvent = new MarshalEvent(MarshalEvent.DRAG_MANAGER);
+				me.name = "isDragging";
+				me.value = true;
+				// trace("-->dispatched isDragging for DragManagerImpl", sm, true);
+				sandboxRoot.dispatchEvent(me);
+				// trace("<--dispatched isDragging for DragManagerImpl", sm, true);
+				// trace("<--marshaled update for DragManagerImpl", sm);
+			}
+		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6215
Author:   smgilson@adobe.com
Date:     2009-04-23T17:12:57.259499Z

Log Message:
-----------
ASDoc updates for effect classes

Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/KeyFrame.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/WipeDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/CrossFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>

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

--- frameworks/projects/spark/src/spark/effects/animation/SimpleMotionPath.as
+++ frameworks/projects/spark/src/spark/effects/animation/SimpleMotionPath.as
@@ -15,12 +15,16 @@

 /**
- * This class is used to hold the name of a property and the values that
- * that property will assume over time for instances of the Animate
- * effect, or subclasses of that effect. This class is a simple utility
- * subclass of MotionPath, setting up two keyframes to hold the
- * valueFrom, valueTo, and
- * valueBy properties.
+ *  The SimpleMotionPath class specifies the name of a property, and the values that
+ *  that property takes over time, for instances of the Animate
+ *  effect.
+ *
+ *
This class is a simple subclass of MotionPath for defining
+ *  two keyframes to hold the valueFrom, valueTo, and
+ *  valueBy properties.
+ *  The MotionPath class itself can define any number of keyframes.

+ *
+ *  @see MotionPath
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -37,16 +41,21 @@
     //--------------------------------------------------------------------------

     /**
-     * Constructs a SimpleMotionPath object. The from/to/by values are used
-     * to construct a simple one-keyframe MotionPath where the from value
-     * is defined in the MotionPath object itself and the single keyframe.
+     *  Constructor. You can specify both the valueFrom and valueTo parameters,
+     *  or specify the valueBy parameter and either the valueFrom
+     *  or valueTo parameter.
+     *  If you omit these parameters, Flex calculates them from the effect target.
      *
-     * @param property The name of the property being animated
-     * @param valueFrom The value that the animation starts from
-     * @param valueTo The value that the animation ends on
-     * @param duration The time, in milliseconds, that the animation should take
-     * @param valueBy An optional parameter that specifies the delta with
-     * which to calculate either the from or to values.
+     *  @param property The name of the property being animated.
+     *
+     *  @param valueFrom The initial value of the property.
+     *
+     *  @param valueTo The final value of the property.
+     *
+     *  @param duration The time, in milliseconds, of the animation.
+     *
+     *  @param valueBy An optional parameter that specifies the delta with
+     *  which to calculate either the from or to values, if one is omitted.
      */
     public function SimpleMotionPath(property:String = null,
         valueFrom:Object = null, valueTo:Object = null,
@@ -78,13 +87,13 @@
     //--------------------------------------------------------------------------

     /**
-     * The starting value for the property during the animation.
+     *  The starting value for the property during the animation.
      *
-     *
Null or NaN (in the case of Numbers) element values indicate that a
-     * value must be determined dynamically at runtime, either by
-     * getting the value from the target property directly or calculating
-     * it if the other value is valid and there is also a valid
-     * valueBy value supplied.

+     *
A value of Null or NaN (in the case of Numbers) specifies that a
+     *  value must be determined dynamically at runtime, either by
+     *  getting the value from the target property directly or calculating
+     *  it if the other value is valid and there is also a valid
+     *  valueBy value supplied.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -101,13 +110,13 @@
     }

     /**
-     * The value that the named property will animate to.
+     *  The value that the named property will animate to.
      *
-     *
Null or NaN (in the case of Numbers) element values indicate that a
-     * value must be determined dynamically at runtime, either by
-     * getting the value from the target property directly or calculating
-     * it if the other value is valid and there is also a valid valueBy
-     * value supplied.

+     *
A value of Null or NaN (in the case of Numbers) element specifies that a
+     *  value must be determined dynamically at runtime, either by
+     *  getting the value from the target property directly or calculating
+     *  it if the other value is valid and there is also a valid valueBy
+     *  value supplied.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -124,27 +133,29 @@
     }

     /**
-     * Optional property which specifies the delta used to calculate
-     * either the valueFrom or valueTo value.
-     * Providing this optional 'by' value gives a
-     * mechanism to calculate necessary from/to values if either
-     * are not provided or are to be determined dynamically when the Animation
-     * begins.
-     *
The way that the valueBy value is used depends on which of the
-     * other values are set. If neither are set, then the valueFrom
-     * value is determined from the current value and the valueTo
-     * value is valueFrom + valueBy.
-     * If one or the other is set, but not both, then
-     * the unset value is calulated by the other value plus or minus the
-     * delta (valueTo = valueFrom + valueBy,
-     * valueFrom = valueTo - valueBy). If both are set, then the
-     * valueBy property is ignored.

-     *
Note that by since valueBy is of type
-     * Object, the system does not know how to calculate the other values
-     * from it. It will call into the supplied interpolator
-     * object to calculate the values through its increment() and decrement()
-     * functions. If no interpolator is set, then it will use NumberInterpolator
-     * by default.

+     *  Optional property which specifies the delta used to calculate
+     *  either the valueFrom or valueTo value.
+     *  Providing this optional property lets the effect
+     *  calculate the necessary from/to values if either
+     *  are not provided or are to be determined dynamically when the animation
+     *  begins.
+     *
+     *
The way that the valueBy value is used depends on which of the
+     *  other values are set. If neither are set, then the valueFrom
+     *  value is determined from the current property value in the target,
+     *  and the valueTo value is valueFrom + valueBy.
+     *  If one or the other is set, but not both, then
+     *  the unset value is calculated by the other value:
+     *  valueTo = valueFrom + valueBy or
+     *  valueFrom = valueTo - valueBy). If both are set, then the
+     *  valueBy property is ignored.

+     *
+     *
Note that since valueBy is of type
+     *  Object, the effect cannot directly calculate the other values
+     *  from it. It uses the effect's interpolator
+     *  to calculate the values by calling the interpolator's increment()
+     *  and decrement() methods.
+     *  If no interpolator is set, then it will use NumberInterpolator by default.

      *
      *  @langversion 3.0
      *  @playerversion Flash 10


FLEX-35031 FLEX-33058 Clarifying intent by renaming function and changing the order of its parameters.

--- frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
+++ frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
@@ -324,7 +324,7 @@
         var done:Boolean = false;
         while (!done)
         {
-            if (objectMatchesValues(hierarchicalData.getData(current), valuesToMatch))
+            if (valuesAreSubsetOfObject(valuesToMatch, hierarchicalData.getData(current)))
                 return true;

             done = !moveNext();
@@ -333,7 +333,7 @@
         return false;
     }

-    private static function objectMatchesValues(object:Object, values:Object):Boolean
+    private static function valuesAreSubsetOfObject(values:Object, object:Object):Boolean
     {
         if(!object && !values)
             return true;
@@ -393,7 +393,7 @@
         var done:Boolean = false;
         while (!done)
         {
-            if (objectMatchesValues(hierarchicalData.getData(current), valuesToMatch))
+            if (valuesAreSubsetOfObject(valuesToMatch, hierarchicalData.getData(current)))
                 return true;

             done = !movePrevious();


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/collections/IHierarchicalCollectionViewCursor.as
+++ frameworks/projects/advancedgrids/src/mx/collections/IHierarchicalCollectionViewCursor.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+
+/**
+ *  The IHierarchicalCollectionViewCursor interface defines the interface
+ *  for enumerating a hierarchical collection view bidirectionally.
+ *  This cursor provides capabilities to find the current depth of an item.
+ *
+ *  @see mx.collections.IViewCursor
+ *  @see mx.controls.IHierarchicalCollectionView
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public interface IHierarchicalCollectionViewCursor extends IViewCursor
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Contains the depth of the node at the location
+     *  in the source collection referenced by this cursor.
+     *  If the cursor is beyond the end of the collection,
+     *  this property contains 0.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     function get currentDepth():int;
+
+}
+
+}


Changed _totalProgress to private.

Changed _totalProgress to private.


Added readByteAt() to enable optimized reading of BinaryData

--- frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
+++ frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
@@ -259,6 +259,33 @@
             return view[0];
         }
 	}
+
+	/**
+	 *  Read a byte of binary data at the specified index. Does not change the position property.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public function readByteAt(idx:uint):int
+	{
+		COMPILE::SWF
+		{
+			return ba[idx];
+		}
+		COMPILE::JS
+		{
+			if(typedArray == null)
+				typedArray = new Uint8Array(ba);
+			return typedArray[idx];
+		}
+	}
+	COMPILE::JS
+	{
+		private var typedArray:Uint8Array;
+	}
+

     /**
      *  Read a short int of binary data at the current position
@@ -398,6 +425,7 @@
         var view:Uint8Array = new Uint8Array(ba, 0, Math.min(newSize,n));
         newView.set(view);
         ba = newBuffer;
+		typedArray = null;
     }
     /**
      *  The total number of bytes remaining to be read.
@@ -491,6 +519,7 @@
                     newView[i] = view[i];
                 }
                 ba = newBuffer;
+				typedArray = null;
             }
         }
 	}
@@ -640,6 +669,7 @@
                 var encoder:TextEncoder = new TextEncoder('utf-8');
                 bytes = encoder.encode(str);
                 ba = bytes.buffer;
+				typedArray = null;
                 return;
             }

@@ -677,7 +707,7 @@
             }
             bytes = new Uint8Array(out);
             ba = bytes.buffer;
-
+			typedArray = null;
         }
     }
 }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 21946
Author:   chiedozi@adobe.com
Date:     2011-08-12T00:51:31.372773Z

Log Message:
-----------
ViewNavigator now waits for UPDATE_COMPLETE before preparing ViewTransitions.  This allowed for the removal of a validateNow() that was interfering with layout.

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -1872,12 +1872,11 @@

             activeTransition = transitionsEnabled ? pendingViewTransition : null;

-            // Force a validation of the navigator so that all validation events are
-            // dispatched to the developer before preparing the view transition.
-            validateNow();
-
-            // Prepare the view transition
-            prepareViewTransition();
+            // TODO (chiedozi): Consider capturingStartValues now and updating actionBar
+            // to remove forced validation in prepareViewTransition()
+
+            // Prepare the view transition after the navigator has validated the new View
+            addEventListener(FlexEvent.UPDATE_COMPLETE, prepareViewTransition);
         }

         pendingViewTransition = null;
@@ -2046,12 +2045,18 @@
      *  instance of the new view is added to the display list.  It initializes
      *  the underlying ViewDescriptor object and prepares the transition.
      *
-     *  @langversion 3.0
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    private function prepareViewTransition():void
-    {
+     *  Called after the UPDATE_COMPLETE event is received on the navigator
+     *  after the pendingView is added to the display list.
+     *  See commitNavigatorAction.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    private function prepareViewTransition(event:Event):void
+    {
+        removeEventListener(FlexEvent.UPDATE_COMPLETE, prepareViewTransition);
+
         var currentView:View;
         var pendingView:View;

@@ -2061,9 +2066,10 @@
             currentView = currentViewDescriptor.instance;
             currentView.setActive(false);

-            // Need to validateNow() to make sure our old screen is currently
-            // up to date before starting the transition and possibly storing a bitmap
-            // for the transition
+            // In most cases this is a No-Op because this method is called in response
+            // to UPDATE_COMPLETE on the navigator and there should be no objects
+            // in the LayoutManager's queue.  It's only here to ensure that the
+            // current view is up to date incase anything changed.
             currentView.validateNow();
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20503
Author:   chiedozi@adobe.com
Date:     2011-03-01T01:35:23.376092Z

Log Message:
-----------
Altering focus changes made in revision 20384.  View and ViewNavigatorBase can no longer gain focus.

QE notes:
Doc notes:
Bugs: SDK-29667
Reviewer: Ryan, Alex
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as
@@ -1713,15 +1713,8 @@
         // If there is no focus or the item that had focus isn't
         // on the display list anymore, update the focus to be
         // the active view or the view navigator
-        var focusedObject:Object = focusManager.getFocus();
-        if (!focusedObject || !focusedObject.stage || focusedObject == this)
-        {
-            if (activeView)
-                focusManager.setFocus(activeView);
-            else
-                focusManager.setFocus(this);
-        }
-
+        updateFocus();
+
         // Clear the returned object
         _poppedViewReturnedObject = null;


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

--- frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/FadeInstance.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.effects.supportClasses
 {