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

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -16,6 +16,8 @@
 import flash.display.DisplayObjectContainer;
 import flash.display.Graphics;
 import flash.display.InteractiveObject;
+import flash.display.Loader;
+import flash.display.LoaderInfo;
 import flash.display.MovieClip;
 import flash.display.Sprite;
 import flash.display.Stage;
@@ -26,12 +28,17 @@
 import flash.events.MouseEvent;
 import flash.geom.Point;
 import flash.geom.Rectangle;
+import flash.net.getClassByAlias;
+import flash.net.registerClassAlias;
 import flash.system.ApplicationDomain;
 import flash.text.Font;
 import flash.text.TextFormat;
 import flash.ui.ContextMenu;
+import flash.utils.ByteArray;
+import flash.utils.Dictionary;

 import mx.core.FlexSprite;
+import mx.core.IApplicationLoader;
 import mx.core.IChildList;
 import mx.core.IFlexDisplayObject;
 import mx.core.IFlexModule;
@@ -40,13 +47,26 @@
 import mx.core.Window;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
+import mx.events.FocusRequest;
 import mx.events.MarshalEvent;
+import mx.events.ModalWindowRequest;
+import mx.events.PopUpRequest;
+import mx.events.SizeRequest;
+import mx.events.EventListenerRequest;
+import mx.events.MarshalMouseEvent;
+import mx.events.SandboxBridgeRequest;
+import mx.events.SandboxBridgeEvent;
+import mx.sandbox.IParentAccess;
 import mx.sandbox.ISandboxBridgeGroup;
 import mx.sandbox.SandboxBridgeGroup;
 import mx.events.SandboxBridgeRequest;
 import mx.events.SandboxBridgeEvent;
 import mx.styles.ISimpleStyleClient;
 import mx.styles.IStyleClient;
+import mx.utils.EventUtil;
+import mx.utils.NameUtil;
+import mx.utils.ObjectUtil;
+import mx.utils.SandboxUtil;

 use namespace mx_internal;
@@ -67,7 +87,7 @@
  *
  *  @playerversion AIR 1.1
  */
-public class WindowedSystemManager extends MovieClip implements ISystemManager, ISystemManager2
+public class WindowedSystemManager extends MovieClip implements ISystemManager, ISystemManager2, IParentAccess
 {

 	public function WindowedSystemManager(rootObj:IUIComponent)
@@ -90,7 +110,7 @@
 	 *  @private
 	 *  The current top level window.
 	 */
-	private var form:IFocusManagerContainer;
+	private var form:Object;

 	private var topLevel:Boolean = true;

@@ -726,27 +746,53 @@
 	 */
 	public function activate(f:IFocusManagerContainer):void
 	{
+		activateForm(f);
+	}
+
+	/**
+	 * @private
+	 *
+	 * New version of activate that does not require a
+	 * IFocusManagerContainer.
+	 */
+	private function activateForm(f:Object):void
+	{
+
 		// trace("SM: activate " + f + " " + forms.length);
-
 		if (form)
 		{
 			if (form != f && forms.length > 1)
 			{
 				// Switch the active form.
-				var z:IFocusManagerContainer = form;
-				// trace("OLW " + f + " deactivating old form " + z);
-				z.focusManager.deactivate();
+				if (isRemotePopUp(form))
+				{
+					if (!areRemotePopUpsEqual(form, f))
+						deactivateRemotePopUp(form);
+				}
+				else
+				{
+					var z:IFocusManagerContainer = IFocusManagerContainer(form);
+					// trace("OLW " + f + " deactivating old form " + z);
+					z.focusManager.deactivate();
+				}
 			}
 		}

 		form = f;

 		// trace("f = " + f);
-		if (f.focusManager)
+		if (isRemotePopUp(f))
+		{
+			activateRemotePopUp(f);
+		}
+		else if (f.focusManager)
+		{
 			// trace("has focus manager");
-
-		f.focusManager.activate();
-
+			f.focusManager.activate();
+		}
+
+		updateLastActiveForm();
+
 		// trace("END SM: activate " + f);
 	}

@@ -755,51 +801,245 @@
 	 */
 	public function deactivate(f:IFocusManagerContainer):void
 	{
+		deactivateForm(Object(f));
+	}
+
+	/**
+	 * @private
+	 *
+	 * New version of deactivate that works with remote pop ups.
+	 *
+	 */
+	private function deactivateForm(f:Object):void
+	{
 		// trace(">>SM: deactivate " + f);

 		if (form)
 		{
-			// If there's more thna one form and this is it, find a new form.
+			// If there's more than one form and this is it, find a new form.
 			if (form == f && forms.length > 1)
 			{
-				form.focusManager.deactivate();
-
-				var newForm:IFocusManagerContainer;
-
-				var n:int = forms.length;
-				for (var i:int = 0; i < n; i++)
-				{
-					var g:IFocusManagerContainer = forms[i];
-					if (g == f)
-					{
-						// use the first form above us in taborder, or the first one below.
-						for (i = i + 1; i < n; i++)
-						{
-							g = forms[i];
-							// remember the highest visible window.
-							if (Sprite(g).visible == true && IUIComponent(g).enabled)
-								newForm = g;
-						}
-						form = newForm;
-						break;
-					}
-					else
-					{
-						// remember the highest visible window.
-						if (Sprite(g).visible && IUIComponent(g).enabled)
-							newForm = g;
-					}
-				}
-
+				if (isRemotePopUp(form))
+					deactivateRemotePopUp(form);
+				else
+					form.focusManager.deactivate();
+
+				form = findLastActiveForm(f);
+
 				// make sure we have a valid top level window.
 				// This can be null if top level window has been hidden for some reason.
 				if (form)
-					form.focusManager.activate();
+				{
+					if (isRemotePopUp(form))
+						activateRemotePopUp(form);
+					else
+						form.focusManager.activate();
+				}
 			}
 		}

 		// trace("<<SM: deactivate " + f);
 	}
+
+
+	/**
+	 * @private
+	 *
+	 * @param f form being deactivated
+	 *
+	 * @return the next form to activate, excluding the form being deactivated.
+	 */
+	private function findLastActiveForm(f:Object):Object
+	{
+		var n:int = forms.length;
+		for (var i:int = forms.length - 1; i >= 0; i--)
+		{
+			// Verify the form is visible and enabled
+			if (forms[i] != f && canActivatePopUp(forms[i]))
+				return forms[i];
+		}
+
+		throw new Error();  // shouldn't get here
+	}
+
+
+	/**
+	 * @private
+	 *
+	 * @return true if the form can be activated, false otherwise.
+	 */
+	 private function canActivatePopUp(f:Object):Boolean
+	 {
+	 	if (isRemotePopUp(f))
+	 	{
+	 		var remotePopUp:RemotePopUp = RemotePopUp(f);
+			var event:SandboxBridgeEvent = new SandboxBridgeEvent(SandboxBridgeRequest.CAN_ACTIVATE,
+																  false, true, null,
+																  remotePopUp.window);
+			return !IEventDispatcher(remotePopUp.bridge).dispatchEvent(event);
+	 	}
+	 	else if (canActivateLocalComponent(f))
+			return true;
+
+		return false;
+	 }
+
+
+	 /**
+	 * @private
+	 *
+	 * Test is a local component can be activated.
+	 */
+	 private function canActivateLocalComponent(o:Object):Boolean
+	 {
+
+	 	if (o is Sprite && o is IUIComponent &&
+	 	    Sprite(o).visible && IUIComponent(o).enabled)
+			return true;
+
+		return false;
+	 }
+
+	/**
+	 * @private
+	 *
+	 * @return true if the form is a RemotePopUp, false if the form is IFocusManagerContainer.
+	 *
+	 */
+	private static function isRemotePopUp(form:Object):Boolean
+	{
+		return !(form is IFocusManagerContainer);
+	}
+
+	/**
+	 * @private
+	 *
+	 * @return true if form1 and form2 are both of type RemotePopUp and are equal, false otherwise.
+	 */
+	private static function areRemotePopUpsEqual(form1:Object, form2:Object):Boolean
+	{
+		if (!(form1 is RemotePopUp))
+			return false;
+
+		if (!(form2 is RemotePopUp))
+			return false;
+
+		var remotePopUp1:RemotePopUp = RemotePopUp(form1);
+		var remotePopUp2:RemotePopUp = RemotePopUp(form2);
+
+		if (remotePopUp1.window == remotePopUp2.window &&
+		    remotePopUp1.bridge && remotePopUp2.bridge)
+			return true;
+
+		return false;
+	}
+
+
+	/**
+	 * @private
+	 *
+	 * Find a remote form that is hosted by this system manager.
+	 *
+	 * @param window unique id of popUp within a bridged application
+	 * @param bridge bridge of owning application.
+	 *
+	 * @return RemotePopUp if hosted by this system manager, false otherwise.
+	 */
+	private function findRemotePopUp(window:Object, bridge:IEventDispatcher):RemotePopUp
+	{
+        // remove the placeholder from forms array
+		var n:int = forms.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			if (isRemotePopUp(forms[i]))
+			{
+				var popUp:RemotePopUp = RemotePopUp(forms[i]);
+				if (popUp.window == window &&
+				    popUp.bridge == bridge)
+				    return popUp;
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Remote a remote form from the forms array.
+	 *
+	 * form Locally created remote form.
+	 */
+	private function removeRemotePopUp(form:RemotePopUp):void
+	{
+	    // remove popup from forms array
+		var n:int = forms.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			if (isRemotePopUp(forms[i]))
+			{
+				if (forms[i].window == form.window)
+				{
+					if (forms[i] == form)
+						deactivateForm(form);
+					forms.splice(i, 1);
+					break;
+				}
+			}
+		}
+	}
+
+	/**
+	 * @private
+	 *
+	 * Activate a form that belongs to a system manager in another
+	 * sandbox or peer application domain.
+	 *
+	 * @param form	a RemotePopUp object.
+	 * */
+	private function activateRemotePopUp(form:Object):void
+	{
+		var request:SandboxBridgeRequest = new SandboxBridgeRequest(SandboxBridgeRequest.ACTIVATE,
+																	false, false,
+																	form.bridge,
+																	form.window);
+		var bridge:Object = form.bridge;
+		if (bridge)
+			bridge.dispatchEvent(request);
+	}
+
+
+	private function deactivateRemotePopUp(form:Object):void
+	{
+		var request:SandboxBridgeRequest = new SandboxBridgeRequest(SandboxBridgeRequest.DEACTIVATE,
+																	false, false,
+																	form.bridge,
+																	form.window);
+		var bridge:Object = form.bridge;
+		if (bridge)
+			bridge.dispatchEvent(request);
+	}
+
+	/**
+	 * Test if two forms are equal.
+	 *
+	 * @param form1 - may be of type a DisplayObjectContainer or a RemotePopUp
+	 * @param form2 - may be of type a DisplayObjectContainer or a RemotePopUp
+	 *
+	 * @return true if the forms are equal, false otherwise.
+	 */
+	private function areFormsEqual(form1:Object, form2:Object):Boolean
+	{
+		if (form1 == form2)
+			return true;
+
+		// if the forms are both remote forms, then compare them, otherwise
+		// return false.
+		if (form1 is RemotePopUp && form2 is RemotePopUp)
+		{
+			return areRemotePopUpsEqual(form1, form2);
+		}
+
+		return false;
+	}

 	/**
 	 *  @inheritDoc
@@ -836,6 +1076,46 @@
 		// trace("END OLW: remove focus manager" + f);
 	}

+	//--------------------------------------------------------------------------
+	//
+	//  Methods: IParentAccess
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 * @inheritdoc
+	 */
+	public function canAccessParent():Boolean
+	{
+		try
+		{
+			return loaderInfo.parentAllowsChild;
+		}
+		catch (error:Error)
+		{
+			//Error #2099: The loading object is not sufficiently loaded to provide this information.
+		}
+
+		return false;	// assume the worst
+	}
+
+	/**
+	 * @inheritdoc
+	 */
+	public function accessibleFromParent():Boolean
+	{
+		try
+		{
+			return loaderInfo.childAllowsParent;
+		}
+		catch (error:Error)
+		{
+			//Error #2099: The loading object is not sufficiently loaded to provide this information.
+		}
+
+		return false;	// assume the worst
+	}
+
 	//--------------------------------------------------------------------------
     //
     //  Methods: Access to overridden methods of base classes
@@ -928,6 +1208,21 @@
 	{
 		removeEventListener(Event.ADDED, docFrameHandler);

+		// every SM has to have this listener in case it is the SM for some child AD that contains a manager
+		// and the parent ADs don't have that manager.
+		getSandboxRoot().addEventListener(MarshalEvent.INIT_MANAGER, initManagerHandler, false, 0, true);
+		// once managers get initialized, they bounce things off the sandbox root
+		if (getSandboxRoot() == this)
+		{
+			addEventListener(MarshalEvent.SYSTEM_MANAGER, systemManagerHandler, false, 0, true);
+			addEventListener(MarshalEvent.MARSHAL, marshalHandler, false, 0, true);
+
+			addEventListener(PopUpRequest.ADD_PLACEHOLDER, addPlaceholderPopupRequestHandler);
+			addEventListener(PopUpRequest.REMOVE_PLACEHOLDER, removePlaceholderPopupRequestHandler);
+			addEventListener(SandboxBridgeEvent.ACTIVATE_WINDOW, activateFormSandboxEventHandler);
+			addEventListener(SandboxBridgeEvent.DEACTIVATE_WINDOW, deactivateFormSandboxEventHandler);
+		}
+
 		// Register singleton classes.
 		// Note: getDefinitionByName() will return null
 		// if the class can't be found.
@@ -1238,6 +1533,26 @@
 	}

 	/**
+	 * The system manager proxy has only one child that is a focus manager container.
+	 * Iterate thru the children until we find it.
+	 */
+	mx_internal function findFocusManagerContainer(smp:SystemManagerProxy):IFocusManagerContainer
+	{
+		var children:IChildList = smp.rawChildren;
+		var numChildren:int = children.numChildren;
+		for (var i:int = 0; i < numChildren; i++)
+		{
+			var child:DisplayObject = children.getChildAt(i);
+			if (child is IFocusManagerContainer)
+			{
+				return IFocusManagerContainer(child);
+			}
+		}
+
+		return null;
+	}
+
+	/**
 	 * @private
 	 *
 	 * Listen to messages this System Manager needs to service from its children.
@@ -1250,7 +1565,6 @@
 			return;
 		}

-		/* Uncomment when needed
 		bridge.addEventListener(PopUpRequest.ADD, addPopupRequestHandler);
 		bridge.addEventListener(PopUpRequest.REMOVE, removePopupRequestHandler);
 		bridge.addEventListener(PopUpRequest.ADD_PLACEHOLDER, addPlaceholderPopupRequestHandler);
@@ -1260,8 +1574,10 @@
 		bridge.addEventListener(SandboxBridgeEvent.ACTIVATE_APPLICATION, activateApplicationSandboxEventHandler);
 		bridge.addEventListener(EventListenerRequest.ADD, eventListenerRequestHandler, false, 0, true);
 		bridge.addEventListener(EventListenerRequest.REMOVE, eventListenerRequestHandler, false, 0, true);
-		*/
-
+        bridge.addEventListener(ModalWindowRequest.CREATE, modalWindowRequestHandler);
+        bridge.addEventListener(ModalWindowRequest.SHOW, modalWindowRequestHandler);
+        bridge.addEventListener(ModalWindowRequest.HIDE, modalWindowRequestHandler);
+        bridge.addEventListener(SandboxBridgeRequest.GET_VISIBLE_RECT, getVisibleRectRequestHandler);
 	}

 	/**
@@ -1277,7 +1593,6 @@
 			return;
 		}

-		/* Uncomment when needed
 		bridge.removeEventListener(PopUpRequest.ADD, addPopupRequestHandler);
 		bridge.removeEventListener(PopUpRequest.REMOVE, removePopupRequestHandler);
 		bridge.removeEventListener(PopUpRequest.ADD_PLACEHOLDER, addPlaceholderPopupRequestHandler);
@@ -1287,78 +1602,70 @@
 		bridge.removeEventListener(SandboxBridgeEvent.ACTIVATE_APPLICATION, activateApplicationSandboxEventHandler);
 		bridge.removeEventListener(EventListenerRequest.ADD, eventListenerRequestHandler);
 		bridge.removeEventListener(EventListenerRequest.REMOVE, eventListenerRequestHandler);
-		*/
-	}
-
-	/**
-	 * Create the requested manager
-	 */
-	public function addChildToSandboxRoot(layer:String, child:DisplayObject):void
-	{
-		if (getSandboxRoot() == this)
-		{
-			this[layer].addChild(child);
-		}
-		else
-		{
-			addingChild(child);
-			var me:MarshalEvent = new MarshalEvent(MarshalEvent.SYSTEM_MANAGER);
-			me.name = layer + ".addChild";
-			me.value = child;
-			getSandboxRoot().dispatchEvent(me);
-			childAdded(child);
-		}
-	}
-
-	/**
-	 * Create the requested manager
-	 */
-	public function removeChildFromSandboxRoot(layer:String, child:DisplayObject):void
-	{
-		if (getSandboxRoot() == this)
-		{
-			this[layer].removeChild(child);
-		}
-		else
-		{
-			removingChild(child);
-			var me:MarshalEvent = new MarshalEvent(MarshalEvent.SYSTEM_MANAGER);
-			me.name = layer + ".removeChild";
-			me.value = child;
-			getSandboxRoot().dispatchEvent(me);
-			childRemoved(child);
-		}
+        bridge.removeEventListener(ModalWindowRequest.CREATE, modalWindowRequestHandler);
+        bridge.removeEventListener(ModalWindowRequest.SHOW, modalWindowRequestHandler);
+        bridge.removeEventListener(ModalWindowRequest.HIDE, modalWindowRequestHandler);
+        bridge.removeEventListener(SandboxBridgeRequest.GET_VISIBLE_RECT, getVisibleRectRequestHandler);
 	}

 	/**
 	 * @private
 	 *
-	 * Test if a display object is in an applcation we want to communicate with over a bridge.
-	 *
-	 */
-	public function isDisplayObjectInABridgedApplication(displayObject:DisplayObject):Boolean
-	{
-		if (sandboxBridgeGroup)
-		{
-			var request:SandboxBridgeRequest = new SandboxBridgeRequest(SandboxBridgeRequest.IS_BRIDGE_CHILD,
-																		false, true, null, displayObject);
-			var children:Array = sandboxBridgeGroup.getChildBridges();
-			var n:int = children.length;
-			for (var i:int = 0; i < n; i++)
-			{
-				var childBridge:IEventDispatcher = IEventDispatcher(children[i]);
-
-				// No need to test a child if it does not trust us, we will never see
-				// their display objects.
-				// Also, if the we don't trust the child don't send them a display object.
-				if (sandboxBridgeGroup.canAccessChildBridge(childBridge) &&
-					sandboxBridgeGroup.accessibleFromChildBridge(childBridge) &&
-					!childBridge.dispatchEvent(request))
-					return true;
-			}
-		}
-
-		return false;
+	 * Add listeners for events and requests we might receive from our parent if our
+	 * parent is using a sandbox bridge to communicate with us.
+	 */
+	mx_internal function addParentBridgeListeners():void
+	{
+		if (!topLevel && topLevelSystemManager)
+		{
+			SystemManager(topLevelSystemManager).addParentBridgeListeners();
+			return;
+		}
+
+		var bridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+		bridge.addEventListener(SizeRequest.SET_ACTUAL_SIZE, setActualSizeRequestHandler);
+		bridge.addEventListener(SizeRequest.GET_SIZE, getSizeRequestHandler);
+//		bridge.addEventListener(SandboxBridgeEvent.TOP_LEVEL_APPLICATION,
+//								topLevelSystemManagerEventHandler);
+
+		// need to listener to parent system manager to get broadcast messages.
+		bridge.addEventListener(SandboxBridgeRequest.ACTIVATE,
+								activateRequestHandler);
+		bridge.addEventListener(SandboxBridgeRequest.DEACTIVATE,
+								deactivateRequestHandler);
+		bridge.addEventListener(SandboxBridgeRequest.IS_BRIDGE_CHILD, isBridgeChildHandler);
+		bridge.addEventListener(EventListenerRequest.ADD, eventListenerRequestHandler, false, 0, true);
+		bridge.addEventListener(EventListenerRequest.REMOVE, eventListenerRequestHandler, false, 0, true);
+		bridge.addEventListener(SandboxBridgeRequest.CAN_ACTIVATE, canActivateHandler);
+	}
+
+	/**
+	 * @private
+	 *
+	 * remove listeners for events and requests we might receive from our parent if
+	 * our parent is using a sandbox bridge to communicate with us.
+	 */
+	mx_internal function removeParentBridgeListeners():void
+	{
+		if (!topLevel && topLevelSystemManager)
+		{
+			SystemManager(topLevelSystemManager).removeParentBridgeListeners();
+			return;
+		}
+
+		var bridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+		bridge.removeEventListener(SizeRequest.SET_ACTUAL_SIZE, setActualSizeRequestHandler);
+		bridge.removeEventListener(SizeRequest.GET_SIZE, getSizeRequestHandler);
+
+		// need to listener to parent system manager to get broadcast messages.
+		bridge.removeEventListener(SandboxBridgeRequest.ACTIVATE,
+								activateRequestHandler);
+		bridge.removeEventListener(SandboxBridgeRequest.DEACTIVATE,
+								deactivateRequestHandler);
+		bridge.removeEventListener(SandboxBridgeRequest.IS_BRIDGE_CHILD, isBridgeChildHandler);
+		bridge.removeEventListener(EventListenerRequest.ADD, eventListenerRequestHandler);
+		bridge.removeEventListener(EventListenerRequest.REMOVE, eventListenerRequestHandler);
+		bridge.addEventListener(SandboxBridgeRequest.CAN_ACTIVATE, canActivateHandler);
 	}

 	/**
@@ -1409,7 +1716,10 @@
 		{
 			try
 			{
-				if (root.loaderInfo.parentAllowsChild)
+			    // check if the loader info is valid.
+			    root.loaderInfo.parentAllowsChild;
+
+				if (canAccessParent() && accessibleFromParent())
 				{
 					try
 					{
@@ -1482,12 +1792,12 @@
 			if (sm.topLevelSystemManager)
 				sm = ISystemManager2(sm.topLevelSystemManager);
 			var parent:DisplayObject = DisplayObject(sm).parent;
-			if (parent is Stage)
-				return DisplayObject(sm);
-			// test to see if parent is a Bootstrap
-			if (parent && !parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))
-				return this;
-			var lastParent:DisplayObject = parent;
+            if (parent is Stage)
+                return DisplayObject(sm);
+            // test to see if parent is a Bootstrap
+            if (parent && !parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))
+                return this;
+  			var lastParent:DisplayObject = parent;
 			while (parent)
 			{
 				if (parent is Stage)
@@ -1495,6 +1805,18 @@
 				// test to see if parent is a Bootstrap
 				if (!parent.dispatchEvent(new Event("mx.managers.SystemManager.isBootstrapRoot", false, true)))
 					return lastParent;
+
+			    // Test if the childAllowsParent so we know there is mutual trust between
+			    // the sandbox root and this sm.
+			    // The parentAllowsChild is taken care of by the player because it returns null
+			    // for the parent if we do not have access.
+				if (parent is Loader)
+				{
+				    var loader:Loader = Loader(parent);
+				    var loaderInfo:LoaderInfo = loader.contentLoaderInfo;
+				    if (!loaderInfo.childAllowsParent)
+				        return loaderInfo.content;
+				}
 				lastParent = parent;
 				parent = parent.parent;
 			}
@@ -1506,9 +1828,8 @@

 		return lastParent != null ? lastParent : DisplayObject(sm);
 	}
-
-
-    /**
+
+   /**
      *  @inheritdoc
      */
     public function getVisibleApplicationRect(bounds:Rectangle = null):Rectangle
@@ -1541,6 +1862,358 @@
         return bounds;
     }

+	/**
+	 * @private
+	 *
+	 * Notify parent that a new window has been activated.
+	 *
+	 * @param window window that was activated.
+	 */
+	mx_internal function fireActivatedWindowEvent(window:DisplayObject):void
+	{
+		var bridge:IEventDispatcher = sandboxBridgeGroup ? sandboxBridgeGroup.parentBridge : null;
+		if (bridge)
+		{
+			var sbRoot:DisplayObject = getSandboxRoot();
+			var sendToSbRoot:Boolean = sbRoot != this;
+			var bridgeEvent:SandboxBridgeEvent = new SandboxBridgeEvent(SandboxBridgeEvent.ACTIVATE_WINDOW,
+																	    false, false,
+	       																bridge,
+	       																sendToSbRoot ? window :
+	       																NameUtil.displayObjectToString(window));
+	        if (sendToSbRoot)
+	        	sbRoot.dispatchEvent(bridgeEvent);
+			else
+				bridge.dispatchEvent(bridgeEvent);
+		}
+
+	}
+
+	/**
+	 * @private
+	 *
+	 * Notify parent that a window has been deactivated.
+	 *
+	 * @param id window display object or id string that was activated. Ids are used if
+	 * 		  the message is going outside the security domain.
+	 */
+	private function fireDeactivatedWindowEvent(window:DisplayObject):void
+	{
+		var bridge:IEventDispatcher = sandboxBridgeGroup ? sandboxBridgeGroup.parentBridge : null;
+		if (bridge)
+		{
+			var sbRoot:DisplayObject = getSandboxRoot();
+			var sendToSbRoot:Boolean = sbRoot != this;
+			var bridgeEvent:SandboxBridgeEvent = new SandboxBridgeEvent(SandboxBridgeEvent.DEACTIVATE_WINDOW,
+																	    false,
+																	    false,
+	       																bridge,
+	       																sendToSbRoot ? window :
+	       																NameUtil.displayObjectToString(window));
+	        if (sendToSbRoot)
+	        	sbRoot.dispatchEvent(bridgeEvent);
+			else
+				bridge.dispatchEvent(bridgeEvent);
+		}
+
+	}
+
+
+	/**
+	 * @private
+	 *
+	 * Notify parent that an application has been activated.
+	 */
+	private function fireActivatedApplicationEvent():void
+	{
+		// click on this system manager or one of its sub system managers
+		// If in a sandbox tell the top-level system manager we are active.
+		var bridge:IEventDispatcher = sandboxBridgeGroup ? sandboxBridgeGroup.parentBridge : null;
+		if (bridge)
+		{
+			var bridgeEvent:SandboxBridgeEvent = new SandboxBridgeEvent(SandboxBridgeEvent.ACTIVATE_APPLICATION,
+																		false, false,
+																		bridge);
+			bridge.dispatchEvent(bridgeEvent);
+		}
+	}
+
+	/**
+	 * Adjust the forms array so it is sorted by last active.
+	 * The last active form will be at the end of the forms array.
+	 *
+	 * This method assumes the form variable has been set before calling
+	 * this function.
+	 */
+	private function updateLastActiveForm():void
+	{
+		// find "form" in the forms array and move that entry to
+		// the end of the array.
+		var n:int = forms.length;
+		if (n < 2)
+			return;	// zero or one forms, no need to update
+
+		var index:int = -1;
+		for (var i:int = 0; i < n; i++)
+		{
+			if (areFormsEqual(form, forms[i]))
+			{
+				index = i;
+				break;
+			}
+		}
+
+		if (index >= 0)
+		{
+			forms.splice(index, 1);
+			forms.push(form);
+		}
+		else
+			throw new Error();	// should never get here
+
+	}
+
+	/**
+	 * @private
+	 *
+	 * Add placeholder information to this instance's list of placeholder data.
+	 */
+	private function addPlaceholderId(id:String, previousId:String, bridge:IEventDispatcher,
+									  placeholder:Object):void
+	{
+		if (!bridge)
+			throw new Error();	// bridge is required.
+
+		if (!idToPlaceholder)
+			idToPlaceholder = [];
+
+		idToPlaceholder[id] = new PlaceholderData(previousId, bridge, placeholder);
+	}
+
+	private function removePlaceholderId(id:String):void
+	{
+		delete idToPlaceholder[id];
+	}
+
+	private var currentSandboxEvent:Event;
+
+	/**
+	 * dispatch the event to all sandboxes except the specified one
+	 */
+	public function dispatchEventToSandboxes(event:Event, skip:IEventDispatcher = null, trackClones:Boolean = false):void
+	{
+		var clone:Event;
+		// trace(">>dispatchEventToSandboxes", this, event.type);
+		clone = event.clone();
+		if (trackClones)
+			currentSandboxEvent = clone;
+		var parentBridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+		if (parentBridge && parentBridge != skip)
+		{
+			parentBridge.dispatchEvent(clone);
+		}
+
+		var children:Array = sandboxBridgeGroup.getChildBridges();
+		for (var i:int = 0; i < children.length; i++)
+		{
+			if (children[i] != skip)
+			{
+				// trace("send to child", i, event.type);
+				clone = event.clone();
+				if (trackClones)
+					currentSandboxEvent = clone;
+				IEventDispatcher(children[i]).dispatchEvent(clone);
+			}
+		}
+		currentSandboxEvent = null;
+
+		// trace("<<dispatchEventToSandboxes", this, event.type);
+	}
+
+	/**
+	 * request the parent to add an event listener.
+	 */
+	private function addEventListenerToSandboxes(type:String, listener:Function, useCapture:Boolean = false,
+				priority:int=0, useWeakReference:Boolean=false, skip:IEventDispatcher = null):void
+	{
+		// trace(">>addEventListenerToSandboxes", this, type);
+
+		var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.ADD,
+													type,
+													useCapture,
+													priority,
+													useWeakReference);
+
+		var parentBridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+		if (parentBridge)
+		{
+			parentBridge.addEventListener(type, listener, false, priority, useWeakReference);
+		}
+
+		var children:Array = sandboxBridgeGroup.getChildBridges();
+		for (var i:int; i < children.length; i++)
+		{
+		 	var childBridge:IEventDispatcher = IEventDispatcher(children[i]);
+			childBridge.addEventListener(type, listener, false, priority, useWeakReference);
+		}
+
+		dispatchEventToSandboxes(request, skip);
+		// trace("<<addEventListenerToSandboxes", this, type);
+	}
+
+	/**
+	 * request the parent to remove an event listener.
+	 */
+	private function removeEventListenerFromSandboxes(type:String, listener:Function,
+	                                                  useCapture:Boolean = false,
+	                                                  skip:IEventDispatcher = null):void
+	{
+		// trace(">>removeEventListenerToSandboxes", this, type);
+		var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.REMOVE,
+																				type,
+																				useCapture);
+		var parentBridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+		if (parentBridge)
+			parentBridge.removeEventListener(type, listener, useCapture);
+
+		var children:Array = sandboxBridgeGroup.getChildBridges();
+		for (var i:int; i < children.length; i++)
+		{
+			IEventDispatcher(children[i]).removeEventListener(type, listener, useCapture);
+		}
+
+		dispatchEventToSandboxes(request, skip);
+		// trace("<<removeEventListenerToSandboxes", this, type);
+	}
+
+    /**
+     *   @private
+     *
+     *   @return true if the message should be processed, false if
+     *   no other action is required.
+     */
+    private function preProcessModalWindowRequest(request:ModalWindowRequest,
+                                                  sm:ISystemManager2,
+                                                  sbRoot:DisplayObject):Boolean
+    {
+        // should we process this message?
+        if (request.skip)
+        {
+            // skipping this sandbox,
+            // but don't skip the next one.
+            request.skip = false;
+
+            if (sm.useBridge())
+            {
+                var bridge:IEventDispatcher = sm.sandboxBridgeGroup.parentBridge;
+                request.requestor = bridge;
+                bridge.dispatchEvent(request);
+            }
+            return false;
+        }
+
+        // if we are not the sandbox root, dispatch the message to the sandbox root.
+        if (sm != sbRoot)
+        {
+            var forwardRequest:Boolean = false;
+
+            // convert exclude component into a rectangle and forward to parent bridge.
+            if (request.type == ModalWindowRequest.CREATE ||
+                request.type == ModalWindowRequest.SHOW)
+            {
+                var exclude:IApplicationLoader = sm.sandboxBridgeGroup.getChildBridgeOwner(request.requestor)
+                                                 as IApplicationLoader;
+                var excludeRect:Rectangle = IApplicationLoader(exclude).getVisibleApplicationRect();
+                request.data = excludeRect;
+                forwardRequest = true;
+            }
+            else if (request.type == ModalWindowRequest.HIDE)
+                forwardRequest = true;
+
+            if (forwardRequest)
+            {
+                bridge = sm.sandboxBridgeGroup.parentBridge;
+                request.requestor = bridge;
+
+                // The HIDE request does not need to be processed by each
+                // application, so dispatch it directly to the sandbox root.
+                if (request.type == ModalWindowRequest.HIDE)
+                    sbRoot.dispatchEvent(request);
+                else
+                    bridge.dispatchEvent(request);
+                return false;
+            }
+        }
+
+        // skip aftering sending the message over a bridge.
+        request.skip = false;
+
+        return true;
+    }
+
+
+	private function sandboxMouseListener(event:Event):void
+	{
+		// trace("sandboxMouseListener", this);
+		if (event is MarshalMouseEvent)
+			return;
+
+		var marshaledEvent:Event = MarshalMouseEvent.marshal(event);
+		dispatchEventToSandboxes(marshaledEvent, event.target as IEventDispatcher);
+
+		// ask the sandbox root if it was the original dispatcher of this event
+		// if it was then don't dispatch to ourselves because we could have
+		// got this event by listening to sandboxRoot ourselves.
+		var me:MarshalEvent = new MarshalEvent(MarshalEvent.SYSTEM_MANAGER);
+		me.name = "sameSandbox";
+		me.value = event;
+		getSandboxRoot().dispatchEvent(me);
+
+		if (!me.value)
+			dispatchEvent(marshaledEvent);
+	}
+
+	private function eventListenerRequestHandler(event:Event):void
+	{
+		if (event is EventListenerRequest)
+			return;
+
+        var actualType:String;
+		var eventObj:Object = event;
+		if (event.type == EventListenerRequest.ADD)
+		{
+			if (!eventProxy)
+				eventProxy = new EventProxy(this);
+
+			// trace(">>eventListenerRequestHandler ADD ", this, eventObj.userType);
+
+			actualType = EventUtil.marshalMouseEventMap[eventObj.userType];
+			if (actualType)
+			{
+				addEventListenerToSandboxes(eventObj.userType, sandboxMouseListener,
+							eventObj.useCapture, eventObj.priority, eventObj.useWeakReference, event.target as IEventDispatcher);
+				if (getSandboxRoot() == this)
+					super.addEventListener(actualType, eventProxy.marshalListener,
+							eventObj.useCapture, eventObj.priority, eventObj.useWeakReference);
+			}
+			// trace("<<eventListenerRequestHandler ADD ", this, eventObj.userType);
+		}
+		else if (event.type == EventListenerRequest.REMOVE)
+        {
+            // trace(">>eventListenerRequestHandler REMOVE ", this, eventObj.userType);
+            actualType = EventUtil.marshalMouseEventMap[eventObj.userType];
+            if (actualType)
+            {
+                removeEventListenerFromSandboxes(eventObj.userType, sandboxMouseListener,
+                            eventObj.useCapture, event.target as IEventDispatcher);
+                if (getSandboxRoot() == this)
+                    super.removeEventListener(actualType, eventProxy.marshalListener,
+                            eventObj.useCapture);
+            }
+            // trace("<<eventListenerRequestHandler REMOVE ", this, eventObj.userType);
+        }
+	}
+

 	/**
 	 *  Returns <code>true</code> if the given DisplayObject is the
@@ -1669,6 +2342,21 @@
 	{
 		// Reset the idle counter.
 		idleCounter = 0;
+
+		// If an object was clicked that is inside another system manager
+		// in a bridged application, activate the current document because
+		// the bridge application is considered part of the main application.
+		// We also see mouse clicks on dialogs popped up from compatible applications.
+		if (isDisplayObjectInABridgedApplication(event.target as DisplayObject))
+		{
+			// trace("SM:mouseDownHandler click in a bridged application");
+			if (isTopLevelRoot())
+				activateForm(document);
+			else
+				fireActivatedApplicationEvent();
+
+			return;
+		}

 		if (numModalWindows == 0) // no modal windows are up
 		{
@@ -1737,7 +2425,204 @@
 			g.endFill();
 		}
 	}
-
+
+		// VERSION_SKEW
+	/**
+	 * @private
+	 *
+	 * true if dispatching a mouse bridge event. We don't want to
+	 * handle our own event.
+	 */
+	private var isDispatchingBridgeMouseEvent:Boolean;
+
+	/**
+	 * @private
+	 *
+	 * true if redipatching a resize event.
+	 */
+	 // TODODJL: may be a better of way than dispathing resize event.
+	private var isDispatchingResizeEvent:Boolean;
+
+	/**
+	 * @private
+	 *
+	 * Used to locate untrusted forms. Maps string ids to Objects.
+	 * The object make be the SystemManagerProxy of a form or it may be
+	 * the bridge to the child application where the object lives.
+	 */
+	private var idToPlaceholder:Object;
+
+	private var eventProxy:EventProxy;
+	private var weakReferenceProxies:Dictionary = new Dictionary(true);
+	private var strongReferenceProxies:Dictionary = new Dictionary(false);
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: EventDispatcher
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Only create idle events if someone is listening.
+	 */
+	override public function addEventListener(type:String, listener:Function,
+											  useCapture:Boolean = false,
+											  priority:int = 0,
+											  useWeakReference:Boolean = false):void
+	{
+		// These two events will dispatched to applications in sandboxes.
+		if (type == FlexEvent.RENDER || type == FlexEvent.ENTER_FRAME)
+		{
+			if (type == FlexEvent.RENDER)
+				type = Event.RENDER;
+			else
+				type = Event.ENTER_FRAME;
+
+			try
+			{
+				// TODODJL: problem loading untrusted children, stage is null and we don't
+				// add the listener we wanted.
+				if (stage)
+					stage.addEventListener(type, listener, useCapture, priority, useWeakReference);
+				else
+					super.addEventListener(type, listener, useCapture, priority, useWeakReference);
+
+			}
+			catch (error:SecurityError)
+			{
+				super.addEventListener(type, listener, useCapture, priority, useWeakReference);
+			}
+
+			if (stage && type == Event.RENDER)
+				stage.invalidate();
+
+			return;
+		}
+
+		if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN
+				|| type == Event.ACTIVATE || type == Event.DEACTIVATE)
+		{
+			// also listen to stage if allowed
+			try
+			{
+				if (stage)
+				{
+					var newListener:StageEventProxy = new StageEventProxy(listener);
+					stage.addEventListener(type, newListener.stageListener, false, priority, useWeakReference);
+					if (useWeakReference)
+						weakReferenceProxies[listener] = newListener;
+					else
+						strongReferenceProxies[listener] = newListener;
+				}
+			}
+			catch (error:SecurityError)
+			{
+			}
+		}
+
+		if (hasSandboxBridges())
+		{
+			if (!eventProxy)
+				eventProxy = new EventProxy(this);
+
+			var actualType:String = EventUtil.marshalMouseEventMap[type];
+			if (actualType)
+			{
+				addEventListenerToSandboxes(type, sandboxMouseListener, useCapture, priority, useWeakReference);
+
+				// Set useCapture to false because we will never see an event
+				// marshalled in the capture phase.
+                super.addEventListener(type, listener, false, priority, useWeakReference);
+				return;
+			}
+		}
+
+		super.addEventListener(type, listener, useCapture, priority, useWeakReference);
+	}
+
+	/**
+	 * @private
+	 *
+	 * Test if this system manager has any sandbox bridges.
+	 *
+	 * @return true if there are sandbox bridges, false otherwise.
+	 */
+	private function hasSandboxBridges():Boolean
+	{
+		if (sandboxBridgeGroup)
+			return true;
+
+		return false;
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function removeEventListener(type:String, listener:Function,
+												 useCapture:Boolean = false):void
+	{
+		// These two events will dispatched to applications in sandboxes.
+		if (type == FlexEvent.RENDER || type == FlexEvent.ENTER_FRAME)
+		{
+			if (type == FlexEvent.RENDER)
+				type = Event.RENDER;
+			else
+				type = Event.ENTER_FRAME;
+
+			try
+			{
+				if (stage)
+					stage.removeEventListener(type, listener, useCapture);
+				else
+					super.removeEventListener(type, listener, useCapture);
+			}
+			catch (error:SecurityError)
+			{
+				super.removeEventListener(type, listener, useCapture);
+			}
+
+			return;
+		}
+
+		if (type == MouseEvent.MOUSE_MOVE || type == MouseEvent.MOUSE_UP || type == MouseEvent.MOUSE_DOWN
+				|| type == Event.ACTIVATE || type == Event.DEACTIVATE)
+		{
+			// also listen to stage if allowed
+			try
+			{
+				if (stage)
+				{
+					var newListener:StageEventProxy = weakReferenceProxies[listener];
+					if (!newListener)
+					{
+						newListener = strongReferenceProxies[listener];
+						if (newListener)
+							delete strongReferenceProxies[listener];
+					}
+					if (newListener)
+						stage.removeEventListener(type, newListener.stageListener, false);
+				}
+			}
+			catch (error:SecurityError)
+			{
+			}
+		}
+
+		if (hasSandboxBridges())
+		{
+			var actualType:String = EventUtil.marshalMouseEventMap[type];
+			if (actualType)
+			{
+				removeEventListenerFromSandboxes(type, sandboxMouseListener, useCapture);
+				super.removeEventListener(type, listener, false);
+				return;
+			}
+		}
+
+		super.removeEventListener(type, listener, useCapture);
+	}
+
 	//--------------------------------------------------------------------------
 	//
 	//  Overridden methods: DisplayObjectContainer
@@ -2092,6 +2977,792 @@
 		return super.contains(child);
 	}

+	//--------------------------------------------------------------------------
+	//
+	//  Sandbox Event handlers for messages from children
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 * @private
+	 *
+	 * Add a popup request handler for domain local request and
+	 * remote domain requests.
+	 */
+	private function addPopupRequestHandler(event:Event):void
+	{
+		if (event.target != this && event is PopUpRequest)
+			return;
+
+		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
+
+		// If the is not for mutual trust between us an the child that wants the
+		// popup, then don't host the pop up.
+		if (!SandboxUtil.hasMutualTrustWithChild(this, popUpRequest.bridge))
+		{
+			return;
+		}
+
+		var topMost:Boolean;
+
+		// Need to have mutual trust between two application in order
+		// for an application to host another application's popup.
+		if (SandboxUtil.hasMutualTrustWithParent(this))
+		{
+			// ask the parent to host the popup
+			popUpRequest.bridge = sandboxBridgeGroup.parentBridge;
+			sandboxBridgeGroup.parentBridge.dispatchEvent(popUpRequest);
+			return;
+		}
+
+		// add popup as a child of this system manager
+        if (!popUpRequest.childList || popUpRequest.childList == PopUpManagerChildList.PARENT)
+            topMost = popUpRequest.parent && popUpChildren.contains(popUpRequest.parent);
+        else
+            topMost = (popUpRequest.childList == PopUpManagerChildList.POPUP);
+
+        var children:IChildList;
+        children = topMost ? popUpChildren : this;
+        children.addChild(DisplayObject(popUpRequest.window));
+
+        if (popUpRequest.modal)
+	        numModalWindows++;
+
+		// add popup to the list of managed forms
+		var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.window, popUpRequest.bridge);
+		forms.push(remoteForm);
+
+		if (!isTopLevelRoot() && sandboxBridgeGroup)
+		{
+			// We've added the popup as far as it can go.
+			// Add a placeholder to the top level root application
+			var request:PopUpRequest = new PopUpRequest(PopUpRequest.ADD_PLACEHOLDER,
+			                                            popUpRequest.window,
+			                                            popUpRequest.bridge);
+			request.placeholderId = NameUtil.displayObjectToString(DisplayObject(popUpRequest.window));
+			dispatchEvent(request);
+		}
+	}
+
+	/**
+	 * @private
+	 *
+	 * Message from a child system manager to
+	 * remove the popup that was added by using the
+	 * addPopupRequestHandler.
+	 */
+	private function removePopupRequestHandler(event:Event):void
+	{
+		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
+
+		if (SandboxUtil.hasMutualTrustWithParent(this))
+		{
+			// since there is mutual trust the popup is hosted by the parent.
+			sandboxBridgeGroup.parentBridge.dispatchEvent(popUpRequest);
+			return;
+		}
+
+        if (popUpChildren.contains(popUpRequest.window))
+            popUpChildren.removeChild(popUpRequest.window);
+        else
+            removeChild(DisplayObject(popUpRequest.window));
+
+        if (popUpRequest.modal)
+			numModalWindows--;
+
+		removeRemotePopUp(new RemotePopUp(popUpRequest.window, popUpRequest.bridge));
+
+		if (!isTopLevelRoot() && sandboxBridgeGroup)
+		{
+			// if we got here we know the parent is untrusted, so remove placeholders
+			var request:PopUpRequest = new PopUpRequest(PopUpRequest.REMOVE_PLACEHOLDER,
+														null,
+														sandboxBridgeGroup.parentBridge);
+			request.placeholderId = NameUtil.displayObjectToString(popUpRequest.window);
+			dispatchEvent(request);
+		}
+
+	}
+
+	/**
+	 * @private
+	 *
+	 * Handle request to add a popup placeholder.
+	 * The placeholder represents an untrusted form that is hosted
+	 * elsewhere.
+	 */
+	 private function addPlaceholderPopupRequestHandler(event:Event):void
+	 {
+		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
+
+		if (event.target != this && event is PopUpRequest)
+			return;
+
+		if (!forwardPlaceholderRequest(popUpRequest, true))
+		{
+			// Create a RemotePopUp and add it.
+			var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.placeholderId, popUpRequest.bridge);
+			forms.push(remoteForm);
+		}
+
+	 }
+
+	/**
+	 * @private
+	 *
+	 * Handle request to add a popup placeholder.
+	 * The placeholder represents an untrusted form that is hosted
+	 * elsewhere.
+	 */
+	 private function removePlaceholderPopupRequestHandler(event:Event):void
+	 {
+		var popUpRequest:PopUpRequest = PopUpRequest.marshal(event);
+
+		if (!forwardPlaceholderRequest(popUpRequest, false))
+		{
+	        // remove the placeholder from forms array
+			var n:int = forms.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				if (isRemotePopUp(forms[i]))
+				{
+					if (forms[i].window == popUpRequest.placeholderId &&
+					    forms[i].bridge == popUpRequest.bridge)
+					{
+						forms.splice(i, 1);
+						break;
+					}
+				}
+			}
+		}
+
+	 }
+
+	/**
+	 * Forward a form event update the parent chain.
+	 * Takes care of removing object references and substituting
+	 * ids when an untrusted boundry is crossed.
+	 */
+	private function forwardFormEvent(eObj:Object):Boolean
+	{
+
+		if (isTopLevelRoot())
+			return false;
+
+		var bridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+		if (bridge)
+		{
+			var sbRoot:DisplayObject = getSandboxRoot();
+			eObj.sender =  bridge;
+			if (sbRoot == this)
+			{
+				if (!(eObj.data is String))
+					eObj.data = NameUtil.displayObjectToString(DisplayObject(eObj.data));
+				else
+					eObj.data = NameUtil.displayObjectToString(DisplayObject(this)) + "." + eObj.data;
+
+				bridge.dispatchEvent(Event(eObj));
+			}
+			else
+			{
+				if (eObj.data is String)
+					eObj.data = NameUtil.displayObjectToString(DisplayObject(this)) + "." + eObj.data;
+
+				sbRoot.dispatchEvent(Event(eObj));
+			}
+		}
+
+		return true;
+	}
+
+	/**
+	 * Forward an AddPlaceholder request up the parent chain, if needed.
+	 *
+	 * @param eObj PopupRequest as and Object.
+	 * @param addPlaceholder true if adding a placeholder, false it removing a placeholder.
+	 * @return true if the request was forwared, false otherwise
+	 */
+	private function forwardPlaceholderRequest(eObj:Object, addPlaceholder:Boolean):Boolean
+	{
+	 	// Only the top level root tracks the placeholders.
+	 	// If we are not the top level root then keep passing
+	 	// the message up the parent chain.
+	 	if (isTopLevelRoot())
+	 		return false;
+
+		// If the window object is passed, then this is the first
+		// stop on the way up the parent chain.
+		var refObj:Object = null;
+		var oldId:String = null;
+		if (eObj.window)
+		{
+			refObj = eObj.window;
+
+			// null this ref out so untrusted parent cannot see
+			eObj.window = null;
+		}
+		else
+		{
+			refObj = eObj.bridge;
+
+			// prefix the existing id with the id of this object
+			oldId = eObj.placeholderId;
+			eObj.placeholderId = NameUtil.displayObjectToString(this) + "." + eObj.placeholderId;
+		}
+
+		if (addPlaceholder)
+			addPlaceholderId(eObj.placeholderId, oldId, eObj.bridge, refObj);
+		else
+			removePlaceholderId(eObj.placeholderId);
+
+
+		var sbRoot:DisplayObject = getSandboxRoot();
+		var bridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+		eObj.bridge =  bridge;
+		if (sbRoot == this)
+			bridge.dispatchEvent(Event(eObj));
+		else
+			sbRoot.dispatchEvent(Event(eObj));
+
+		return true;
+	}
+
+	/**
+	 * One of the system managers in another sandbox deactivated and sent a message
+	 * to the top level system manager. In response the top-level system manager
+	 * needs to find a new form to activate.
+	 */
+	private function deactivateFormSandboxEventHandler(event:Event):void
+	{
+		// trace("bridgeDeactivateFormEventHandler");
+
+		if (event is SandboxBridgeRequest)
+			return;
+
+		var eObj:Object = Object(event);
+
+		if (!forwardFormEvent(eObj))
+		{
+			// deactivate the form
+			if (isRemotePopUp(form) &&
+				RemotePopUp(form).window == eObj.data &&
+				RemotePopUp(form).bridge == eObj.sender)
+				deactivateForm(form);
+		}
+	}
+
+
+	/**
+	 * A form in one of the system managers in another sandbox has been activated.
+	 * The form being activate is identified.
+	 * In response the top-level system manager needs to activate the given form
+	 * and deactivate the currently active form, if any.
+	 */
+	private function activateFormSandboxEventHandler(event:Event):void
+	{
+		// trace("bridgeActivateFormEventHandler");
+		var eObj:Object = event;
+
+		if (!forwardFormEvent(eObj))
+			// just call activate on the remote form.
+			activateForm(new RemotePopUp(eObj.data, eObj.sender));
+	}
+
+	/**
+	 * One of the system managers in another sandbox activated and sent a message
+	 * to the top level system manager to deactivate this form. In response the top-level system manager
+	 * needs to deactivate all other forms except the top level system manager's.
+	 */
+	private function activateApplicationSandboxEventHandler(event:Event):void
+	{
+		// trace("bridgeActivateApplicationEventHandler");
+		if (!isTopLevelRoot())
+		{
+			sandboxBridgeGroup.parentBridge.dispatchEvent(event);
+			return;
+		}
+
+		// An application was activated, active the main document.
+		activateForm(document);
+	}
+
+
+    /**
+     *  @private
+     *
+     *  Re-dispatch events sent over the bridge to listeners on this
+     *  system manager. PopUpManager is expected to listen to these
+     *  events.
+     */
+    private function modalWindowRequestHandler(event:Event):void
+    {
+        if (event is ModalWindowRequest)
+            return;
+
+        var request:ModalWindowRequest = ModalWindowRequest.marshal(event);
+
+        if (!preProcessModalWindowRequest(request, this, getSandboxRoot()))
+            return;
+
+        // Ensure a PopUpManager exists and dispatch the request it is
+        // listening for.
+        Singleton.getInstance("mx.managers::IPopUpManager");
+        dispatchEvent(request);
+    }
+
+    /**
+     *  @private
+     *
+     *  Calculate the visible rectangle of the requesting application in this
+     *  application. Forward the request to our parent to see this the rectangle
+     *  is further reduced. Continue up the parent chain until the top level
+     *  root parent is reached.
+     */
+    private function getVisibleRectRequestHandler(event:Event):void
+    {
+        if (event is SandboxBridgeRequest)
+            return;
+
+        var request:SandboxBridgeRequest = SandboxBridgeRequest.marshal(event);
+        var rect:Rectangle = Rectangle(request.data);
+        var owner:DisplayObject = sandboxBridgeGroup.getChildBridgeOwner(request.requestor);
+        var localRect:Rectangle;
+
+        if (owner is IApplicationLoader)
+            localRect = IApplicationLoader(owner).getVisibleApplicationRect();
+        else
+        {
+            localRect = owner.getBounds(this);
+            var pt:Point = localToGlobal(localRect.topLeft);
+            localRect.x = pt.x;
+            localRect.y = pt.y;
+        }
+
+        rect = rect.intersection(localRect); // update rect
+        request.data = rect;
+
+        // forward request
+        if (useBridge())
+        {
+        var bridge:IEventDispatcher = sandboxBridgeGroup.parentBridge;
+            request.requestor = bridge;
+            bridge.dispatchEvent(request);
+        }
+
+        Object(event).data = request.data;           // update request
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Sandbox Event handlers for messages from parent
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 * @private
+	 *
+	 * Sent by the SWFLoader to change the size of the application it loaded.
+	 */
+	private function setActualSizeRequestHandler(event:Event):void
+	{
+		// empty.  This should never be the root of a SWF
+	}
+
+	/**
+	 * @private
+	 *
+	 * Get the size of this System Manager.
+	 * Sent by a SWFLoader.
+	 */
+	private function getSizeRequestHandler(event:Event):void
+	{
+		// empty.  This should never be the root of a SWF
+	}
+
+	/**
+	 * @private
+	 *
+	 * Handle request to activate a particular form.
+	 *
+	 */
+	private function activateRequestHandler(event:Event):void
+	{
+		var eObj:Object = Object(event);
+
+		// If data is a String, then we need to parse the id to find
+		// the form or the next bridge to pass the message to.
+		// If the data is a SystemMangerProxy we can just activate the
+		// form.
+		var child:Object = eObj.data;
+		var nextId:String = null;
+		if (eObj.data is String)
+		{
+			var placeholder:PlaceholderData = idToPlaceholder[eObj.data];
+			child = placeholder.data;
+			nextId = placeholder.id;
+
+			// check if the dialog is hosted on this system manager
+			if (nextId == null)
+			{
+				var popUp:RemotePopUp = findRemotePopUp(child, placeholder.bridge);
+
+				if (popUp)
+				{
+					activateRemotePopUp(popUp);
+					return;
+				}
+			}
+		}
+
+		if (child is SystemManagerProxy)
+		{
+			// deactivate request from the top-level system manager.
+			var smp:SystemManagerProxy = SystemManagerProxy(eObj.data);
+			var f:IFocusManagerContainer = findFocusManagerContainer(smp);
+			if (smp && f)
+				smp.activateProxy(f);
+		}
+		else if (child is IFocusManagerContainer)
+			IFocusManagerContainer(child).focusManager.activate();
+		else if (child is IEventDispatcher)
+		{
+				eObj.data = nextId;
+				eObj.requestor = child;
+				IEventDispatcher(child).dispatchEvent(event);
+		}
+		else
+			throw new Error();	// should never get here
+	}
+
+	/**
+	 * @private
+	 *
+	 * Handle request to deactivate a particular form.
+	 *
+	 */
+	private function deactivateRequestHandler(event:Event):void
+	{
+		var eObj:Object = Object(event);
+
+		var child:Object = eObj.data;
+		var nextId:String = null;
+		if (eObj.data is String)
+		{
+			var placeholder:PlaceholderData = idToPlaceholder[eObj.data];
+			child = placeholder.data;
+			nextId = placeholder.id;
+
+			// check if the dialog is hosted on this system manager
+			if (nextId == null)
+			{
+				var popUp:RemotePopUp = findRemotePopUp(child, placeholder.bridge);
+
+				if (popUp)
+				{
+					deactivateRemotePopUp(popUp);
+					return;
+				}
+			}
+		}
+
+		if (child is SystemManagerProxy)
+		{
+			// deactivate request from the top-level system manager.
+			var smp:SystemManagerProxy = SystemManagerProxy(child);
+			var f:IFocusManagerContainer = findFocusManagerContainer(smp);
+			if (smp && f)
+				smp.deactivateProxy(f);
+		}
+		else if (child is IFocusManagerContainer)
+			IFocusManagerContainer(child).focusManager.deactivate();
+
+		else if (child is IEventDispatcher)
+		{
+			eObj.data = nextId;
+			eObj.requestor = child;
+			IEventDispatcher(child).dispatchEvent(event);
+			return;
+		}
+		else
+			throw new Error();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Sandbox Event handlers for messages from either the
+	//  parent or child
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 * Is the child in event.data this system manager or a child of this
+	 * system manager?
+	 *
+	 * If the display object is a child event.preventDefault is called,
+	 * otherwise nothing is done.
+	 */
+	private function isBridgeChildHandler(event:Event):void
+	{
+		// if we are broadcasting messages, ignore the messages
+		// we send to ourselves.
+		if (event is SandboxBridgeRequest)
+			return;
+
+		var eObj:Object = Object(event);
+
+		if (eObj.data && rawChildren.contains(eObj.data as DisplayObject))
+		{
+			event.preventDefault();
+		}
+	}
+
+	/**
+	 * Can this form be activated. The current test is if the given pop up
+	 * is visible and is enabled.
+	 *
+	 * If the can be activated event.preventDefault is called,
+	 * otherwise nothing is done.
+	 */
+	private function canActivateHandler(event:Event):void
+	{
+		var eObj:Object = Object(event);
+
+		// If data is a String, then we need to parse the id to find
+		// the form or the next bridge to pass the message to.
+		// If the data is a SystemMangerProxy we can just activate the
+		// form.
+		var request:SandboxBridgeRequest;
+		var child:Object = eObj.data;
+		var nextId:String = null;
+		if (eObj.data is String)
+		{
+			var placeholder:PlaceholderData = idToPlaceholder[eObj.data];
+			child = placeholder.data;
+			nextId = placeholder.id;
+
+			// check if the dialog is hosted on this system manager
+			if (nextId == null)
+			{
+				var popUp:RemotePopUp = findRemotePopUp(child, placeholder.bridge);
+
+				if (popUp)
+				{
+					request = new SandboxBridgeRequest(SandboxBridgeRequest.CAN_ACTIVATE,
+																false, true,
+																IEventDispatcher(popUp.bridge),
+																popUp.window);
+				 	if (popUp.bridge)
+				 	{
+				 		popUp.bridge.dispatchEvent(request);
+				 		if (request.isDefaultPrevented())
+				 			event.preventDefault();
+				 	}
+					return;
+				}
+			}
+		}
+
+		if (child is SystemManagerProxy)
+		{
+			var smp:SystemManagerProxy = SystemManagerProxy(child);
+			var f:IFocusManagerContainer = findFocusManagerContainer(smp);
+			if (smp && f && canActivateLocalComponent(f))
+				event.preventDefault();
+		}
+		else if (child is IFocusManagerContainer)
+		{
+			if (canActivateLocalComponent(child))
+				event.preventDefault();
+		}
+		else if (child is IEventDispatcher)
+		{
+			var bridge:IEventDispatcher = IEventDispatcher(child);
+		    request = new SandboxBridgeRequest(SandboxBridgeRequest.CAN_ACTIVATE,
+															false, true,
+															bridge,
+															nextId);
+
+			if (bridge)
+			{
+				bridge.dispatchEvent(request);
+				if (request.isDefaultPrevented())
+					event.preventDefault();
+			}
+		}
+		else
+			throw new Error();	// should never get here
+	}
+
+
+	/**
+	 * @private
+	 *
+	 * Test if a display object is in an applcation we want to communicate with over a bridge.
+	 *
+	 */
+	public function isDisplayObjectInABridgedApplication(displayObject:DisplayObject):Boolean
+	{
+		if (sandboxBridgeGroup)
+		{
+			var request:SandboxBridgeRequest = new SandboxBridgeRequest(SandboxBridgeRequest.IS_BRIDGE_CHILD,
+																		false, true, null, displayObject);
+			var children:Array = sandboxBridgeGroup.getChildBridges();
+			var n:int = children.length;
+			for (var i:int = 0; i < n; i++)
+			{
+				var childBridge:IEventDispatcher = IEventDispatcher(children[i]);
+
+				// No need to test a child if it does not trust us, we will never see
+				// their display objects.
+				// Also, if the we don't trust the child don't send them a display object.
+				if (sandboxBridgeGroup.canAccessChildBridge(childBridge) &&
+					sandboxBridgeGroup.accessibleFromChildBridge(childBridge) &&
+					!childBridge.dispatchEvent(request))
+					return true;
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Create the requested manager
+	 */
+	private function initManagerHandler(event:Event):void
+	{
+		// if we are broadcasting messages, ignore the messages
+		// we send to ourselves.
+		if (event is MarshalEvent)
+			return;
+
+		// initialize the registered manager implementation
+		var name:String = event["name"];
+		Singleton.getInstance(name);
+	}
+
+	/**
+	 * Create the requested manager
+	 */
+	public function addChildToSandboxRoot(layer:String, child:DisplayObject):void
+	{
+		if (getSandboxRoot() == this)
+		{
+			this[layer].addChild(child);
+		}
+		else
+		{
+			addingChild(child);
+			var me:MarshalEvent = new MarshalEvent(MarshalEvent.SYSTEM_MANAGER);
+			me.name = layer + ".addChild";
+			me.value = child;
+			getSandboxRoot().dispatchEvent(me);
+			childAdded(child);
+		}
+	}
+
+	/**
+	 * Create the requested manager
+	 */
+	public function removeChildFromSandboxRoot(layer:String, child:DisplayObject):void
+	{
+		if (getSandboxRoot() == this)
+		{
+			this[layer].removeChild(child);
+		}
+		else
+		{
+			removingChild(child);
+			var me:MarshalEvent = new MarshalEvent(MarshalEvent.SYSTEM_MANAGER);
+			me.name = layer + ".removeChild";
+			me.value = child;
+			getSandboxRoot().dispatchEvent(me);
+			childRemoved(child);
+		}
+	}
+
+
+	/**
+	 * marshal some data
+	 */
+	private function marshalHandler(event:Event):void
+	{
+		// if we are broadcasting messages, ignore the messages
+		// we send to ourselves.
+		if (event is MarshalEvent)
+			return;
+
+		var eventObj:Object = event;
+		var value:Object = eventObj.value.value;
+		var type:Class = eventObj.value.type;
+
+		var info:Object = ObjectUtil.getClassInfo(value);
+
+		var alias:String = info.alias;
+
+		var currentType:Class = getClassByAlias(alias);
+		var ba:ByteArray = new ByteArray();
+		ba.writeObject(value);
+		registerClassAlias(alias, type);
+		ba.position = 0;
+		value = ba.readObject();
+		eventObj.value = value;
+		registerClassAlias(alias, currentType);
+
+	}
+
+	/**
+	 * perform the requested action from a trusted dispatcher
+	 */
+	private function systemManagerHandler(event:Event):void
+	{
+		if (event["name"] == "sameSandbox")
+		{
+			event["value"] = currentSandboxEvent == event["value"];
+			return;
+		}
+
+		// if we are broadcasting messages, ignore the messages
+		// we send to ourselves.
+		if (event is MarshalEvent)
+			return;
+
+		// initialize the registered manager implementation
+		var name:String = event["name"];
+
+		switch (name)
+		{
+		case "popUpChildren.addChild":
+			popUpChildren.addChild(event["value"]);
+			break;
+		case "popUpChildren.removeChild":
+			popUpChildren.removeChild(event["value"]);
+			break;
+		case "cursorChildren.addChild":
+			cursorChildren.addChild(event["value"]);
+			break;
+		case "cursorChildren.removeChild":
+			cursorChildren.removeChild(event["value"]);
+			break;
+		case "toolTipChildren.addChild":
+			toolTipChildren.addChild(event["value"]);
+			break;
+		case "toolTipChildren.removeChild":
+			toolTipChildren.removeChild(event["value"]);
+			break;
+		case "screen":
+			event["value"] = screen;
+			break;
+		case "application":
+		    event["value"] = document;
+		    break;
+		case "isTopLevelRoot":
+		    event["value"] = isTopLevelRoot();
+		    break;
+	    case "getVisibleApplicationRect":
+	        event["value"] = getVisibleApplicationRect();
+		}
+	}
+
 	// fake out mouseX/mouseY
 	mx_internal var _mouseX:*;
 	mx_internal var _mouseY:*;
@@ -2163,4 +3834,115 @@
 		myWindow.nativeWindow.addEventListener("close", cleanup);
 	}
 }
-}+}
+
+import flash.display.DisplayObject;
+import flash.events.IEventDispatcher;
+
+/**
+ * A form that exists in a SystemManager in another sandbox or compiled with
+ * a different version of Flex.
+ *
+ * An instance of a RemotePopUp is put into the forms array of the top-level
+ * System Manager so the top-level System Manager can manage the form's
+ * activation/deactivation along with any other forms that are displayed.
+ */
+class RemotePopUp extends Object
+{
+	/**
+	 * Create new RemotePopUp. There are two kinds of remote pop ups. One for trusted
+	 * popups and one for untrusted popups. Trusted pop ups pass may pass display objects
+	 * and the bridge handle of the form. Untrusted pop ups may only pass a string id and
+	 * the bridge handle of the direct child.
+	 *
+	 * @param window String if the form is a placeholder for an untrusted pop up. A display
+	 * object (SystemManagerProxy) if the form is trusted.
+	 *
+	 * @param bridge If the form is trusted, the bridge handle of the source of the form.
+	 * If the form is untrusted, the bridge of the direct child of this application that parents
+	 * the source of the form.
+	 */
+	public function RemotePopUp(window:Object, bridge:Object)
+	{
+		this.window = window;
+  		this.bridge = bridge;
+	}
+
+	public var window:Object;		// SystemManagerProxy or String id of remote form
+	public var bridge:Object;		// bridge of remote form
+}
+
+import flash.events.EventDispatcher;
+import flash.events.IEventDispatcher;
+import flash.events.Event;
+import flash.events.MouseEvent;
+import mx.events.MarshalMouseEvent;
+import mx.utils.EventUtil;
+import mx.managers.WindowedSystemManager;
+
+/**
+ * An object that marshals events to other sandboxes
+ */
+class EventProxy extends EventDispatcher
+{
+	private var systemManager:WindowedSystemManager;
+
+	public function EventProxy(systemManager:WindowedSystemManager)
+	{
+		this.systemManager = systemManager;
+	}
+
+	public function marshalListener(event:Event):void
+	{
+		if (event is MouseEvent)
+		{
+			var me:MouseEvent = event as MouseEvent;;
+			var mme:MarshalMouseEvent = new MarshalMouseEvent(EventUtil.mouseEventMap[event.type],
+				false, false, me.ctrlKey, me.altKey, me.shiftKey, me.buttonDown);
+			// trace(">>marshalListener", systemManager, mme.type);
+			systemManager.dispatchEventToSandboxes(mme, null, true);
+			// trace("<<marshalListener", systemManager);
+		}
+	}
+
+}
+
+import flash.display.Stage;
+import flash.events.MouseEvent;
+
+/**
+ * An object that filters stage
+ */
+class StageEventProxy
+{
+	private var listener:Function;
+
+	public function StageEventProxy(listener:Function)
+	{
+		this.listener = listener;
+	}
+
+	public function stageListener(event:Event):void
+	{
+		if (event.target is Stage)
+			listener(event);
+	}
+
+}
+
+/**
+ * Simple class to track placeholders for RemotePopups.
+ */
+class PlaceholderData extends Object
+{
+	public function PlaceholderData(id:String, bridge:IEventDispatcher, data:Object)
+	{
+		this.id = id;
+		this.bridge = bridge;
+		this.data = data;
+	}
+
+	public var id:String;				// id of string at this node in the display list
+	public var bridge:IEventDispatcher; // bridge to next child application
+	public var data:Object;				// either a popup or a bridge to the next application
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 119
Author:   shodgson@adobe.com
Date:     2008-01-08T05:22:59.879412Z

Log Message:
-----------
[ private comments below ]

Bugs: 213924 - [NIO Server] Not failing over correctly when using streaming channel and per-session connection limit for user agent is reached.
QA: Yes - Alex has already run a test pass.
Doc: No

Details:
Streaming connections now wait to move their channel to a connected state until after reading an initial 'ack' message of the stream; previously they advanced to connected when the first byte over the connection arrived even if that byte was the beginning of an Http error response. Streaming connections are also now given a server assigned id (returned in the initial ack pushed down to the client) to support improved shutdown/disconnect.

Also, removed a dead private constant from PollingChannel.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as
@@ -146,7 +146,7 @@
     override public function poll():void
     {
 		var message:String = resourceManager.getString(
-			"messaging", "pollingNotSupportedAMF");
+			"messaging", "pollingNotSupportedHTTP");
         throw new Error(message);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20020
Author:   klin@adobe.com
Date:     2011-01-31T21:20:57.777154Z

Log Message:
-----------
Add mx_internal virtualLayoutSupported to layouts. By default, this flag is set to true. In BasicLayout, it is set to false. List checks this flag to prevent setting "useVirtualLayout" when the layout does not support virtualization. Fixes runtime error issues for tools.

QE notes: No
Doc notes: No
Bugs: SDK-25409
Reviewer: Evtim, Hans, Glenn
Tests run: cyclone server, checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1009,7 +1009,7 @@
         if (instance == dataGroup)
         {
             // Not your typical delegation, see 'set useVirtualLayout'
-            if (_useVirtualLayout && dataGroup.layout)
+            if (_useVirtualLayout && dataGroup.layout && dataGroup.layout.virtualLayoutSupported)
                 dataGroup.layout.useVirtualLayout = true;

             dataGroup.addEventListener(


Replaced !isNaN(fillColor) with fillColor <= Infinity

Change-Id: Ia87c3178ae80e910add2680e1fa2b27d4ae1ae1e

--- WeaveUI/src/weave/visualization/plotters/styles/SolidFillStyle.as
+++ WeaveUI/src/weave/visualization/plotters/styles/SolidFillStyle.as
@@ -64,7 +64,7 @@
 				target.endFill();
 				return false;
 			}
-			else if (!isNaN(fillColor)) // if color is defined, use basic Graphics.beginFill() function
+			else if (fillColor <= Infinity) // if color is defined, use basic Graphics.beginFill() function
 			{
 				var fillAlpha:Number = alpha.getValueFromKey(recordKey, Number);
 				target.beginFill(fillColor, fillAlpha);


Transferred from the Adobe Open Source Subversion Repository

Revision: 18641
Author:   chiedozi@adobe.com
Date:     2010-11-17T01:26:13.734827Z

Log Message:
-----------
Updated MobileApplication api names.

MobileApplicationBase
backKeyHandler renamed to backKeyUpHandler
menuKeyHandler renamed to menuKeyUpHandler
sessionCachingEnabled renamed to persistNavigatorState
persistApplicationState() renamed to saveNavigatorState
restoreApplicationSate() renamed to loadNavigatorState
registerPersistenceClassAliases removed
nativeApplication_invokeHandler() renamed to invokeHandler()
nativeApplication_deactivateHandler() renamed to deactivateHandler()

PersistenceManager
flush() renamed to save() and return success boolean
initialize() renamed to load() and return success boolean
The applicationVersion shared object property was renamed to versionNumber.

View
deserializePersistedData() renamed to deserializeData()

ViewNavigatorBase
restoreViewData() renamed loadViewData()

Events
APPLICATION_PERSIST and APPLICATION_RESTORE removed from the framework
APPLICATION_PERSISTING renamed to NAVIGATOR_STATE_SAVING
APPLICATION_RESTORING renamed to NAVIGATOR_STATE_LOADING

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

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/core/managers/IPersistenceManager.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/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.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@1264357 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
@@ -611,9 +611,9 @@
     /**
      *  @private
      */
-    override protected function nativeApplication_invokeHandler(event:InvokeEvent):void
-    {
-        super.nativeApplication_invokeHandler(event);
+    override protected function invokeHandler(event:InvokeEvent):void
+    {
+        super.invokeHandler(event);

         // Set the stage focus to the navigator's active view
         if (systemManager.stage.focus == null && navigator)
@@ -628,35 +628,35 @@
     /**
      *  @private
      */
-    override protected function nativeApplication_deactivateHandler(event:Event):void
+    override protected function deactivateHandler(event:Event):void
     {
         if (navigator && navigator.activeView)
             navigator.activeView.setActive(false);

         // super is called after so that the active view can get the
         // viewDeactive event before the persistence process begins.
-        super.nativeApplication_deactivateHandler(event);
-    }
-
-    /**
-     *  @private
-     */
-    override protected function backKeyHandler(event:KeyboardEvent):void
-    {
-        super.backKeyHandler(event);
+        super.deactivateHandler(event);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function backKeyUpHandler(event:KeyboardEvent):void
+    {
+        super.backKeyUpHandler(event);

         if (viewMenuOpen)
             viewMenuOpen = false;
         else
-            navigator.backKeyHandler();
-    }
-
-    /**
-     *  @private
-     */
-    override protected function persistApplicationState():void
-    {
-        super.persistApplicationState();
+            navigator.backKeyUpHandler();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function saveNavigatorState():void
+    {
+        super.saveNavigatorState();

         // TODO (chiedozi): Rename save to maybe get?
         if (navigator)
@@ -664,31 +664,18 @@
     }

     /**
-     *  @private
-     */
-    override protected function registerPersistenceClassAliases():void
-    {
-        super.registerPersistenceClassAliases();
-
-        // Register aliases for custom classes that will be written to
-        // persistence store by navigator
-        registerClassAlias("ViewDescriptor", ViewDescriptor);
-        registerClassAlias("NavigationStack", NavigationStack);
-    }
-
-    /**
      * @private
      */
-    override protected function restoreApplicationState():void
+    override protected function loadNavigatorState():void
     {
         // TODO (chiedozi): Figure out how to refactor this into base class.  Need navigator
         // to be a part of the base class
-        super.restoreApplicationState();
+        super.loadNavigatorState();

         var savedState:Object = persistenceManager.getProperty("navigatorState");

         if (savedState)
-            navigator.restoreViewData(savedState);
+            navigator.loadViewData(savedState);
     }

     //--------------------------------------------------------------------------
@@ -800,7 +787,6 @@
                 newNavigatorProperties.titleLayout = navigator.titleLayout;

             // Always want to save the navigation stack
-            // TODO (chiedozi): I'm not doing this right...
             newNavigatorProperties.navigationStack = navigator.navigationStack;
             navigatorProperties = newNavigatorProperties;
         }


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

--- frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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: 12754
Author:   jacobg@adobe.com
Date:     2009-12-09T21:48:44.362010Z

Log Message:
-----------
Link to example (MXDataGridItemRendererExample)

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/MXDataGridItemRenderer.as

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

--- frameworks/projects/spark/src/mx/controls/dataGridClasses/MXDataGridItemRenderer.as
+++ frameworks/projects/spark/src/mx/controls/dataGridClasses/MXDataGridItemRenderer.as
@@ -37,6 +37,7 @@
  *  </pre>
  *
  *  @see mx.controls.DataGrid
+ *  @includeExample examples/MXDataGridItemRenderer.mxml
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


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

--- frameworks/projects/spark/src/spark/effects/interpolation/MultiValueInterpolator.as
+++ frameworks/projects/spark/src/spark/effects/interpolation/MultiValueInterpolator.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
 package spark.effects.interpolation


Transferred from the Adobe Open Source Subversion Repository

Revision: 17201
Author:   cframpto@adobe.com
Date:     2010-08-05T14:56:08.412026Z

Log Message:
-----------
Add listStylePosition and listStyleType metadata for TLF's new list element.  Add them both to the list of size invalidating styles.  Add styles to list of styles in ASdoc.

QE notes:  listStylePosition=outside leaks outside our components - known issue which we're working with TLF on
Doc notes:
Bugs: SDK-27254
Reviewer: Corey
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as
+++ frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingTextStyles.as
@@ -48,6 +48,26 @@
  *  @productversion Flex 4
  */
 [Style(name="leadingModel", type="String", enumeration="auto,romanUp,ideographicTopUp,ideographicCenterUp,ideographicTopDown,ideographicCenterDown,ascentDescentUp", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#listStylePosition
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+[Style(name="listStylePosition", type="String", enumeration="inside,outside", inherit="yes")]
+
+/**
+ *  @copy flashx.textLayout.formats.ITextLayoutFormat#listStyleType
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+[Style(name="listStyleType", type="String", enumeration="upperAlpha,lowerAlpha,upperRoman,lowerRoman,none,disc,circle,square,box,check,diamond,hyphen,arabicIndic,bengali,decimal,decimalLeadingZero,devanagari,gujarati,gurmukhi,kannada,persian,thai,urdu,cjkEarthlyBranch,cjkHeavenlyStem,hangul,hangulConstant,hiragana,hiraganaIroha,katakana,katakanaIroha,lowerGreek,lowerLatin,upperGreek,upperLatin", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#paragraphEndIndent


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

--- frameworks/projects/spark/src/spark/styles/metadata/BasicNonInheritingTextStyles.as
+++ frameworks/projects/spark/src/spark/styles/metadata/BasicNonInheritingTextStyles.as
@@ -1,29 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  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.
-//
-////////////////////////////////////////////////////////////////////////////////

-/**
- *  Controls word wrapping within the container.
- *
- *
For the Spark theme, see
- *  flashx.textLayout.formats.ITextLayoutFormat.blockProgression.

- *
- *
For the Mobile theme, this is not supported.

- *
- *  @see flashx.textLayout.formats.ITextLayoutFormat#lineBreak
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
 [Style(name="lineBreak", type="String", enumeration="toFit,explicit", inherit="no")]

 /**


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

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/IconColorStyles.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/IconColorStyles.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  The color for the icon in a skin.
+ *  For example, this style is used by the CheckBoxIcon skin class
+ *  to draw the check mark for a CheckBox control,
+ *  by the ComboBoxSkin class to draw the down arrow of the ComboBox control,
+ *  and by the DateChooserMonthArrowSkin skin class to draw the month arrow
+ *  for the DateChooser control.
+ *
+ *  The default value depends on the component class;
+ *  if it is not overridden by the class, the default value is 0x111111.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="iconColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  The color for the icon in a disabled skin.
+ *  For example, this style is used by the CheckBoxIcon skin class
+ *  to draw the check mark for a disabled CheckBox control,
+ *  by the ComboBoxSkin class to draw the down arrow of a disabled ComboBox control,
+ *  and by the DateChooserMonthArrowSkin skin class to draw the month arrow
+ *  for a disabled DateChooser control.
+ *
+ *  The default value depends on the component class;
+ *  if it is not overridden by the class, the default value is 0x999999.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="disabledIconColor", type="uint", format="Color", inherit="yes")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 16760
Author:   chiedozi@adobe.com
Date:     2010-07-01T03:14:58.835896Z

Log Message:
-----------
Updated SlideViewTransition to fade and slide all content groups.
Reduced the amount of cached images SlideViewTransition uses to increase performance.
Updated FlipViewTransition prototype to support left and right flips.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/IViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/ViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/effects/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as
@@ -80,8 +80,11 @@
                 top += actionBarHeight;
             }

-            contentGroup.setLayoutBoundsPosition(0, top);
-            contentGroup.setLayoutBoundsSize(unscaledWidth, bottom - top);
+			if (contentGroup.includeInLayout)
+			{
+	            contentGroup.setLayoutBoundsPosition(0, top);
+	            contentGroup.setLayoutBoundsSize(unscaledWidth, bottom - top);
+			}
         }
     }
 }


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

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

 package mx.controls.treeClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17073
Author:   hmuller@adobe.com
Date:     2010-07-27T17:55:27.585302Z

Log Message:
-----------
Removed GridContainerBase class.

Corrected Grid/getGridColumn() for column 0 access.

GridItemRenderer rowIndex bindable event is now "rowIndexChanged".

GridLayout/initializeItemRenderer() checks for IGridItemRenderer, not GridItemRenderer.

Grid/isCellVisible columnIndex parameter defaults to -1.

QE notes: changes apply to Spark DataGrid only
Doc notes:
Bugs:
Reviewer: Carol
Tests run: none
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
@@ -21,7 +21,6 @@
 import mx.events.PropertyChangeEvent;

 import spark.components.DataGrid;
-import spark.components.GridContainerBase;
 import spark.components.Grid;

 use namespace mx_internal;


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

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

 package mx.charts.renderers
 {