remove alpha api class

remove alpha api class

--- src/com/ryanberdeen/echonest/api/v3/alpha/AlphaApi.as
+++ src/com/ryanberdeen/echonest/api/v3/alpha/AlphaApi.as
@@ -1,120 +0,0 @@
-/*
- * Copyright 2010 Ryan Berdeen. All rights reserved.
- * Distributed under the terms of the MIT License.
- * See accompanying file LICENSE.txt
- */
-
-package com.ryanberdeen.echonest.api.v3.alpha {
-    import com.adobe.serialization.json.JSON;
-    import com.ryanberdeen.echonest.api.v3.ApiSupport;
-    import com.ryanberdeen.echonest.api.v3.EchoNestError;
-    import com.ryanberdeen.echonest.api.v3.track.NumberWithConfidence;
-    import com.ryanberdeen.echonest.api.v3.track.Section;
-    import com.ryanberdeen.echonest.api.v3.track.Segment;
-
-    import flash.external.ExternalInterface;
-
-    import flash.net.URLLoader;
-    import flash.net.URLRequest;
-
-    public class AlphaApi extends ApiSupport {
-        override protected function parseRawResponse(data:String):Object {
-            // the alpha api returns xml on some errors, yay.
-            if (data.charAt(0) != '{') {
-                return super.parseRawResponse(data);
-            }
-            var response:Object = JSON.decode(data);
-            checkStatus(response);
-            return response;
-        }
-
-        override public function checkStatus(response:Object):void {
-            if (response.status != 'ok') {
-                // the messages don't have error codes, just messages
-                throw new EchoNestError(-1, response.message);
-            }
-        }
-
-        override public function createRequest(method:String, parameters:Object):URLRequest {
-            return super.createRequest('alpha_' + method, parameters);
-        }
-
-        public function searchTracks(parameters:Object, loaderOptions:Object):URLLoader {
-            var request:URLRequest = createRequest('search_tracks', parameters);
-            var loader:URLLoader = createLoader(loaderOptions, processSearchTracksResponse);
-            loader.load(request);
-            return loader;
-        }
-
-        public function processSearchTracksResponse(response:Object):Object {
-            return response.results;
-        }
-
-        public function getAnalysis(parameters:Object, loaderOptions:Object):URLLoader {
-            var request:URLRequest = createRequest('get_analysis', parameters);
-            var loader:URLLoader = createLoader(loaderOptions, processGetAnalysisResponse);
-            loader.load(request);
-            return loader;
-        }
-
-        public function processGetAnalysisResponse(response:Object):Object {
-            var analysis:Object = response.analysis;
-            var result:Object = {};
-            result.sections = processSections(analysis.sections);
-            result.bars = processSimpleAnalysisList(analysis.bars);
-            result.beats = processSimpleAnalysisList(analysis.beats);
-            result.tatums = processSimpleAnalysisList(analysis.tatums);
-            result.segments = processSegments(analysis.segments);
-            // FIXME
-            result.metadata = {};
-            result.duration = analysis.track.duration;
-            result.endOfFadeIn = analysis.track.end_of_fade_in;
-            result.startOfFadeOut = analysis.track.start_of_fade_out;
-            result.key = new NumberWithConfidence(analysis.track.key, analysis.track.key_confidence);
-            result.loudness = analysis.track.loudness;
-            result.mode = new NumberWithConfidence(analysis.track.mode, analysis.track.mode_confidence);
-            result.tempo = new NumberWithConfidence(analysis.track.tempo, analysis.track.tempo_confidence);
-            result.timeSignature = new NumberWithConfidence(analysis.track.time_signature, analysis.track.time_signature_confidence);
-            return result;
-        }
-
-        private function processSimpleAnalysisList(list:Array):Array {
-            var result:Array = [];
-            for each (var item:Object in list) {
-                result.push(new NumberWithConfidence(item.start, item.confidence));
-            }
-            return result;
-        }
-
-        private function processSections(sections:Array):Array {
-            var result:Array = [];
-            for each (var sectionData:Object in sections) {
-                var section:Section = new Section();
-                section.start = sectionData.start;
-                section.duration = sectionData.duration;
-                result.push(section);
-            }
-            return result;
-        }
-
-        private function processSegments(segments:Array):Array {
-            var result:Array = [];
-            var previousSegment:Segment = new Segment();  // this is never used, but eliminates an if in the loop
-            for each (var segmentData:Object in segments) {
-                var segment:Segment = new Segment();
-                segment.start = segmentData.start;
-                segment.duration = segmentData.duration;
-                segment.startLoudness = segmentData.loudness_start;
-                previousSegment.endLoudness = segment.startLoudness;
-                segment.maxLoudness = segmentData.loudness_max;
-                segment.maxLoudnessTimeOffset = segmentData.loudness_max_time;
-                segment.pitches = segmentData.pitches;
-                segment.timbre = segmentData.timbre;
-                result.push(segment);
-                previousSegment = segment;
-            }
-            previousSegment.endLoudness = segmentData.loudness_end;
-            return result;
-        }
-    }
-}


fix coding style

fix coding style

--- src/aerys/minko/scene/controller/PickingController.as
+++ src/aerys/minko/scene/controller/PickingController.as
@@ -391,11 +391,10 @@
 			var pixelColor : uint = PICKING_MAP.getPixel32(0, 0);

 			_lastMouseOver = _currentMouseOver;
-			if ((pixelColor >>> 24) == 0xFF) {
+			if ((pixelColor >>> 24) == 0xFF)
 				_currentMouseOver = _pickingIdToMesh[pixelColor & 0xFFFFFF];
-			} else {
-				_currentMouseOver = null; // wrong antialiasing color
-			}
+			else
+				_currentMouseOver = null; // wrong antialiasing color or nothing got picked
 		}

 		private function updateMouseCursor() : void


handle source changes

handle source changes

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/binding/SimpleBinding.as
@@ -24,6 +24,7 @@
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IDocument;
+    import org.apache.flex.events.ValueChangeEvent;

     /**
      *  The SimpleBinding class is lightweight data-binding class that
@@ -144,7 +145,15 @@
 			if (destination == null)
                 destination = value;
             if (sourceID != null)
+            {
     			source = document[sourceID] as IEventDispatcher;
+                if (source == null)
+                {
+                    document.addEventListener("valueChange",
+                        sourceChangeHandler);
+                    return;
+                }
+            }
             else
                 source = document as IEventDispatcher;
 			source.addEventListener(eventName, changeHandler);
@@ -168,5 +177,21 @@
 		{
 			destination[destinationPropertyName] = source[sourcePropertyName];
 		}
+
+        private function sourceChangeHandler(event:ValueChangeEvent):void
+        {
+            if (event.propertyName != sourceID)
+                return;
+
+            if (source)
+                source.removeEventListener(eventName, changeHandler);
+
+            source = document[sourceID] as IEventDispatcher;
+            if (source)
+            {
+                source.addEventListener(eventName, changeHandler);
+                destination[destinationPropertyName] = source[sourcePropertyName];
+            }
+        }
 	}
 }


no longer forcing .xml files to be loaded from a *.xml url

--- WeaveClient/src/weave/VisApplication.as
+++ WeaveClient/src/weave/VisApplication.as
@@ -729,9 +729,14 @@
 		public function loadSessionState(fileContent:Object, fileName:String):void
 		{
 			DebugTimer.begin();
-			if (fileName.substr(-4).toLowerCase() == '.xml')
-			{
-				// load .xml file
+			try
+			{
+				var obj:Object = WeaveFile.readFile(ByteArray(fileContent));
+				Weave.history.setSessionState(obj);
+			}
+			catch (e:Error)
+			{
+				// attempt to load .xml file
 				var xml:XML = null;
 				try
 				{
@@ -785,13 +790,6 @@
 				}
 				Weave.history.clearHistory(); // begin with empty history after loading the session state from the xml
 			}
-			else
-			{
-				// load .weave file
-
-				Weave.history.setSessionState(WeaveFile.readFile(ByteArray(fileContent)));
-				//TODO
-			}
 			DebugTimer.end('loadSessionState', fileName);

 			StageUtils.callLater(this,toggleMenuBar,null,false);


Add transition

Add transition

--- krew-framework/krewfw/core/KrewTransition.as
+++ krew-framework/krewfw/core/KrewTransition.as
@@ -11,11 +11,13 @@
         // Already exists in starling
         public static const EASE_IN_QUAD :String = "krew.easeInQuad";  // quadratic
         public static const EASE_OUT_QUAD:String = "krew.easeOutQuad";
+        public static const SWING        :String = "krew.swing";

         //------------------------------------------------------------
         public static function registerExtendedTransitions():void {
             Transitions.register(EASE_IN_QUAD,  _easeInQuad);
             Transitions.register(EASE_OUT_QUAD, _easeOutQuad);
+            Transitions.register(SWING,         _swing);
         }

         private static function _easeInQuad(ratio:Number):Number {
@@ -27,5 +29,17 @@
             return (-invRatio * invRatio) + 1;
         }

+        private static function _swing(ratio:Number):Number {
+            var swing:Number = 1 + (Math.sin(ratio * 8 * Math.PI) * (1 - ratio));
+
+            if (ratio < 0.3) {
+                var initInvRatio:Number = (ratio / 0.3) - 1.0;
+                var initEaseOut:Number  = (-initInvRatio * initInvRatio) + 1;
+                swing *= initEaseOut;
+            }
+
+            return swing;
+        }
+
     }
 }


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

--- frameworks/projects/charts/src/mx/core/Version.as
+++ frameworks/projects/charts/src/mx/core/Version.as
@@ -0,0 +1,18 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+import mx.core.mx_internal;
+
+/**
+ *  @private
+ *  Version string for this class.
+ */
+mx_internal static const VERSION:String = "4.0.0.0";


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -28,7 +28,10 @@

 	public function ItemRenderer()
 	{
+		super();
+
 		percentWidth = 100;  // TODO: Make this a layout property...
+		addHandlers();
 	}

     //--------------------------------------------------------------------------
@@ -74,10 +77,8 @@
      *  @private
      *  Attach the mouse events.
      */
-	override protected function attachBehaviors():void
+	protected function addHandlers():void
 	{
-		super.attachBehaviors();
-
 		addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
 		addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
 		addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);


Transferred from the Adobe Open Source Subversion Repository

Revision: 10657
Author:   chaase@adobe.com
Date:     2009-09-28T21:03:46.522617Z

Log Message:
-----------
Fixes for 4 unrelated effects bugs.
-	Nested parallel effects were not dealing with targets in children. (CompositeEffect)
-	Composite effects were capturing values for child effects property (need to have child effects only capture values for their targets, not any other targets in the overall effect) (CompositeEffect)
-	3D Transform effects were not correctly dealing with transform centers that were staying in place during the effect. We needed to force the postTranslationX/Y properties to be animated, even though they might be unchanging. (AnimateTransform)
-	Supplying Fade in a trigger for a popupAnchor caused an RTE due to a bad assumption about components vs groups. This fix doesn’t actually made fading work (new effects don’t deal with triggers), but it prevents the crash (EffectManager)

QE notes: None
Doc notes: None
Bugs: SDK-23413, SDK-23381, SDK-23366, SDK-23460
Reviewer: Jason
Tests run: checkintests, Mustella spark/effects, mx/effects
Is noteworthy for integration: Yes (downstream teams asked for 23460 fix)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>

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

--- frameworks/projects/framework/src/mx/effects/EffectManager.as
+++ frameworks/projects/framework/src/mx/effects/EffectManager.as
@@ -36,6 +36,8 @@
 import mx.managers.SystemManager;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
+import mx.core.IVisualElementContainer;
+import mx.core.IVisualElement;

 use namespace mx_internal;

@@ -793,7 +795,10 @@
     {
         suspendEventHandling();
         // Add the child back to the parent so the effect can play upon it
-        parent.addChildAt(target, index);
+        if (parent is IVisualElementContainer && target is IVisualElement)
+            (IVisualElementContainer(parent).addElementAt(target as IVisualElement, index));
+        else
+            parent.addChildAt(target, index);
         resumeEventHandling();
         // Use target because the player assigns the Stage to the currentTarget when we leave the scope of the event handler function
         createAndPlayEffect(eventObj, target);
@@ -842,7 +847,10 @@
                     // Since we added the child back to the parent when the effect began,
                     // we need to remove it once the effect has finished.
                     suspendEventHandling();
-                    parent.removeChild(targ);
+                    if (parent is IVisualElementContainer && targ is IVisualElement)
+                        (IVisualElementContainer(parent).removeElement(targ as IVisualElement));
+                    else
+                        parent.removeChild(targ);
                     resumeEventHandling();
                 }
             }


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

--- frameworks/projects/advancedgrids/src/mx/olap/QueryCubeBuilder.as
+++ frameworks/projects/advancedgrids/src/mx/olap/QueryCubeBuilder.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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: 17973
Author:   dloverin@adobe.com
Date:     2010-09-30T22:28:57.338114Z

Log Message:
-----------
First delivery of DataGrid editor code.

Still a ways to go to get it ready for testing and get the APIs correct.

QE notes: Not ready for testing.
Doc notes: None.
Bugs:
Reviewer: Hans, Alex (FocusManager)
Tests run: cyclone server
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemEditor.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/DataGridEditEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/TextGridItemEditor.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.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="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -979,6 +979,9 @@
      */
     private function isParent(p:DisplayObjectContainer, o:DisplayObject):Boolean
     {
+        if (p == o)
+            return false;
+
         if (p is IRawChildrenContainer)
             return IRawChildrenContainer(p).rawChildren.contains(o);


Transferred from the Adobe Open Source Subversion Repository

Revision: 7862
Author:   jszeto@adobe.com
Date:     2009-06-15T22:06:23.250745Z

Log Message:
-----------
GraphicElement PARB Changes

mx.core.AdvancedLayoutFeatures
•	Rename layer -> depth
•	Rename offsets -> postLayoutTransformOffsets

mx.core.IVisualElement
•	Rename layer -> depth

mx.core.UIComponent
•	Rename offsets -> postLayoutTransformOffsets
•	Rename layer -> depth

mx.graphics.GradientBase
•	Remove scaleX

mx.graphics.GradientStroke
•	Add apply(g:Graphics, bounds:Rectangle)

mx.graphics.IStroke
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.LinearGradient
•	Add scaleX

mx.graphics.LinearGradientStroke
•	Add scaleX
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.RadialGradient
•	Add scaleX

mx.graphics.RadialGradientStroke
•	Add scaleX
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.graphics.SolidColorStroke
•	Remove draw
•	Change apply(g:Graphics) -> apply(g:Graphics, bounds:Rectangle)

mx.flash.UIMovieClip
•	Rename offsets -> postLayoutTransformOffsets
•	Rename layer -> depth

spark.components.PopUpAnchor
•	Change popUp type from UIComponent -> IFlexDisplayObject
•	Rename positionPopUp -> calculatePopUpPosition
•	Rename autoSizePopUpWidth -> popUpWidthMatchesAnchorWidth
•	Rename autoSizePopUpHeight -> popUpHeightMatchesAnchorHeight

spark.core.RelativePosition
•	Rename and move spark.core.RelativePosition -> spark.components.PopUpPosition
•	Rename EXACT -> TOP_LEFT (topLeft)

spark.core.SpriteVisualElement
•	Rename layer -> depth
•	Remove computeMatrix

spark.primitives.BitmapImage
•	Change _NORMAL_UINT from protected -> private
•	Change _REPEAT_UINT from protected -> private
•	Change _SCALE_UINT from protected -> private
•	Change resizeModeToUINT from protected -> private
•	Rename drawElement -> draw

spark.primitives.Line
•	Rename skipMeasure -> canSkipMeasurement
•	Rename drawElement -> draw

spark.primitives.Path
•	Change graphicsPath fro protected -> mx_internal
•	Rename skipMeasure -> canSkipMeasurement
•	Rename drawElement -> draw
•	Rename renderGraphicsAtScale -> generateGraphicsPath
•	Change generateGraphicsPath from protected -> mx_internal
•	Rename notifyElementLayerChanged -> invalidateDisplayObjectSharing

spark.primitives.Rect
•	Rename drawElement -> draw

spark.primitives.supportClasses.GraphicElement
•	Rename layer -> depth
•	Rename offsets -> postLayoutTransformOffsets
•	Rename getBitmapData -> captureBitmapData
•	Rename notifyElementLayerChanged -> invalidateDisplayObjectSharing
•	Rename skipMeasure -> canSkipMeasurement
•	Add protected hasComplexLayoutMatrix:Boolean getter
•	Remove target
•	Remove computeMatrix
•	Change DEFAULT_MAX_WIDTH from public -> private
•	Change DEFAULT_MAX_HEIGHT from public -> private
•	Change DEFAULT_MIN_WIDTH from public -> private
•	Change DEFAULT_MIN_HEIGHT from public -> private
•	Change allocateLayoutFeatures from protected -> mx_internal
•	Change invalidateTransform from protected -> private
•	Change captureBitmapData from public -> mx_internal
•	Change applyMaskType from protected -> mx_internal
•	Change dispatchPropertyChangeEvent from protected -> private
•	Change applyComputedTransform from protected -> mx_internal
•	Change filterChangedHandler from protected -> private

spark.supportClasses.StrokedElement
•	Rename drawElement -> draw
•	Remove getStroke()
•	Add getStrokeExtents() override

QE Notes: None
Doc Notes: None
Bugs: N/A
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RadialGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/IStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -2665,21 +2665,21 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function get layer():Number
-    {
-        return (_layoutFeatures == null)? 0:_layoutFeatures.layer;
+    public function get depth():Number
+    {
+        return (_layoutFeatures == null)? 0:_layoutFeatures.depth;
     }

     [Bindable("layerChange")]
     /**
      * @private
      */
-    public function set layer(value:Number):void
-    {
-        if(value == layer)
+    public function set depth(value:Number):void
+    {
+        if(value == depth)
             return;
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();
-        _layoutFeatures.layer = value;
+        _layoutFeatures.depth = value;
         dispatchEvent(new FlexEvent("layerChange"));
         if(parent != null && "invalidateLayering" in parent && parent["invalidateLayering"] is Function)
             parent["invalidateLayering"]();
@@ -2905,7 +2905,7 @@
      *  Defines a set of adjustments that can be applied to the component's transform in a way that is
      *  invisible to the component's parent's layout. For example, if you want a layout to adjust
      *  for a component that will be rotated 90 degrees, you set the component's rotation property.
-     *  If you want the layout to not adjust for the component being rotated, you set its offsets.rotationZ
+     *  If you want the layout to not adjust for the component being rotated, you set its postLayoutTransformOffsets.rotationZ
      *  property.
      *
      *  @langversion 3.0
@@ -2913,24 +2913,24 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function set offsets(value:TransformOffsets):void
+    public function set postLayoutTransformOffsets(value:TransformOffsets):void
     {
         if(_layoutFeatures == null) initAdvancedLayoutFeatures();

-        if(_layoutFeatures.offsets != null)
-            _layoutFeatures.offsets.removeEventListener(Event.CHANGE,transformOffsetsChangedHandler);
-        _layoutFeatures.offsets = value;
-        if(_layoutFeatures.offsets != null)
-            _layoutFeatures.offsets.addEventListener(Event.CHANGE,transformOffsetsChangedHandler);
+        if(_layoutFeatures.postLayoutTransformOffsets != null)
+            _layoutFeatures.postLayoutTransformOffsets.removeEventListener(Event.CHANGE,transformOffsetsChangedHandler);
+        _layoutFeatures.postLayoutTransformOffsets = value;
+        if(_layoutFeatures.postLayoutTransformOffsets != null)
+            _layoutFeatures.postLayoutTransformOffsets.addEventListener(Event.CHANGE,transformOffsetsChangedHandler);
         invalidateTransform();
     }

     /**
      * @private
      */
-    public function get offsets():TransformOffsets
-    {
-        return (_layoutFeatures != null)? _layoutFeatures.offsets:null;
+    public function get postLayoutTransformOffsets():TransformOffsets
+    {
+        return (_layoutFeatures != null)? _layoutFeatures.postLayoutTransformOffsets:null;
     }

     private function transformOffsetsChangedHandler(e:Event):void


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

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

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12913
Author:   smgilson@adobe.com
Date:     2009-12-14T20:23:15.420261Z

Log Message:
-----------
asdoc l10n pass

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

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/AsyncListView.as

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

--- frameworks/projects/framework/src/mx/collections/AsyncListView.as
+++ frameworks/projects/framework/src/mx/collections/AsyncListView.as
@@ -38,24 +38,26 @@
 [Event(name="collectionChange", type="mx.events.CollectionEvent")]

 /**
- *  A wrapper for IList implementations that handles ItemPendingErrors
- *  thrown by getItemAt(), removeItemAt(),
- *  and toArray().
+ *  The AsyncListView class is an implementation of the IList interface
+ *  that handles ItemPendingErrors errors
+ *  thrown by the getItemAt(), removeItemAt(),
+ *  and toArray() methods.
  *
- *
The getItemAt() method handles ItemPendingErrors by returning a provisional
+ *
The getItemAt() method handles ItemPendingErrors by returning a provisional
  *  "pending" item until the underlying request succeeds or fails.  The provisional
- *  item is produced by calling createPendingItemFunction.  If the request
- *  succeeds, the actual item replaces the provisional one, and if it fails
- *  the provisional item is replaced by with the item returned by calling
- *  createFailedItemFunction.

+ *  item is produced by calling the function specified by the createPendingItemFunction
+ *  property. .  If the request
+ *  succeeds, the actual item replaces the provisional one.
+ *  If it fails,  the provisional item is replaced with the item returned by calling
+ *  the function specified by the createFailedItemFunction property.

  *
  *
This class delegates the IList methods and properties to its list.
  *  If a list isn't specified, methods that mutate the collection are no-ops,
- *  and methods that query the collection return an "empty" value like null or zero
+ *  and methods that query the collection return an empty value, such as null or zero
  *  as appropriate.

  *
  *
This class is intended to be used with Spark components based on DataGroup,
- *  like List and ComboBox, which don't provide intrinsic support for
+ *  such as List and ComboBox. The Spark classes do not provide intrinsic support for
  *  ItemPendingError handling.

  *
  *
AsyncListView does not support re-insertion of pending or failed items.  Once
@@ -64,22 +66,36 @@
  *  an ASyncListView that contains pending or failed items, is not supported because
  *  these operations remove and then re-insert list items.

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

+ *
+ *

+ *  <mx:AsyncListView
+ *  Properties
+ *    createFailedItemFunction="null"
+ *    createPendingItemFunction="null"
+ *    list="null"
+ *  />
+ *

+ *
  *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class AsyncListView extends OnDemandEventDispatcher implements IList
 {
     /**
-     *  AsyncListView constructor.
+     *  Constructor.
      *
      *  @param list Initial value of the list property, the IList we're delegating to.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function AsyncListView(list:IList = null)
     {
@@ -103,19 +119,19 @@
     [Bindable("listChanged")]

     /**
-     *  The IList that this collection view "wraps", i.e. the object to which all of
-     *  the IList metods are delegated.
-     *
-     *
If this property is null, the IList mutation methods, like setItemAt(),
-     *  are no-ops and the IList query methods, like getItemAt() return, null
+     *  The IList object that this collection wraps. That means the object to which all of
+     *  the IList methods are delegated.
+     *
+     *
If this property is null, the IList mutation methods, such as setItemAt(),
+     *  are no-ops. The IList query methods, such getItemAt(), return null
      *  or zero (-1 for getItemIndex()), as appropriate.

      *
      *  @default null
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get list():IList
     {
@@ -373,15 +389,18 @@
     }

     /**
-     *   A function that's used to create a provisional item when
-     *   the initial request causes an ItemPendingError to be thrown.
-     *   If the request eventually succeeds, the provisional item is automatically
-     *   replaced by the actual item.  If the request fails, then the item is replaced
-     *   with one created with the createFailedItemFunction.
-     *
-     *
The value of this property must be a function with two parameters, the index
-     *   of the requested dataProvider item, and the ItemPendingError itself.  In most
-     *   cases second parameter can be ignored, e.g.:
+     *  A callback function used to create a provisional item when
+     *  the initial request causes an ItemPendingError to be thrown.
+     *  If the request eventually succeeds, the provisional item is automatically
+     *  replaced by the actual item.  If the request fails, then the item is replaced
+     *  with one created with the callback function specified by the
+     *  createFailedItemFunction property.
+     *
+     *
The value of this property must be a function with two parameters: the index
+     *  of the requested data provider item, and the ItemPendingError itself. In most
+     *  cases, the second parameter can be ignored.
+     *  The following example shows an implementation of the callback function:
+     *
      *

      * function createPendingItem(index:int, ipe:ItemPendingError):Object
      * {
@@ -391,13 +410,18 @@
      *

      *
      *
Setting this property does not affect provisional pending items that were already
-     *  created.  Setting this property to null will prevent provisional pending items
+     *  created.  Setting this property to null prevents provisional pending items
      *  from being created.

      *
      *  @default A function that unconditionally returns null.
-     *  @see #getItemAt
-     *  @see createFailedItemFunction
+     *  @see #getItemAt()
+     *  @see #createFailedItemFunction
      *  @see mx.collections.errors.ItemPendingError
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get createPendingItemFunction():Function
     {
@@ -428,16 +452,18 @@
     }

     /**
-     *  A function that's used to create a substitute item when
+     *  A callback function used to create a substitute item when
      *  a request which had caused an ItemPendingError to be thrown,
      *  subsequently fails.  The existing item, typically a pending item created
-     *  with the value of createPendingItemFunction(), is replaced
-     *  with the failed item.
-     *
-     *
The value of this property must be a function with two parameters, the index
+     *  by the callback function specified by the createPendingItemFunction() property,
+     *  is replaced with the failed item.
+     *
+     *
The value of this property must be a function with two parameters: the index
      *  of the requested item, and the failure "info" object, which is
-     *  passed along from the IResponder fault() method.  In most cases second parameter
-     *  can be ignored, e.g.:

+     *  passed along from the IResponder fault() method.
+     *  In most cases you can ignore the second parameter.
+     *  Shown below is an example implementation of the classback function:

+     *
      *

      * function createFailedItem(index:int, info:Object):Object
      * {
@@ -447,13 +473,18 @@
      *
      *
      *
Setting this property does not affect failed items that were already
-     *  created.  Setting this property to null will prevent failed items from being created.
+     *  created.  Setting this property to null prevents failed items from being created.
      *

      *
      *  @default A function that unconditionally returns null.
-     *  @see #getItemAt
-     *  @see createPendingItemFunction
+     *  @see #getItemAt()
+     *  @see #createPendingItemFunction
      *  @see mx.rpc.IResponder#fault
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get createFailedItemFunction():Function
     {
@@ -551,9 +582,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get length():int
     {
@@ -564,9 +595,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function addItem(item:Object):void
     {
@@ -578,9 +609,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function addItemAt(item:Object, index:int):void
     {
@@ -592,7 +623,7 @@
      *  Returns the value of list.getItemAt(index).
      *
      *
This method catches ItemPendingErrors (IPEs) generated as a consequence of
-     *  calling getItemAt().  If an IPE is thrown, an IResponder is added to
+     *  calling getItemAt().  If an IPE is thrown, an IResponder is added to
      *  the IPE and a provisional "pending" item, created with the
      *  createPendingItemFunction is returned.   If the underlying request
      *  eventually succeeds, the pending item is replaced with the real item.  If it fails,
@@ -600,19 +631,23 @@
      *  createFailedItemFunction.

      *
      *  @param index The list index from which to retrieve the item.
+     *
      *  @param prefetch An int indicating both the direction
      *    and number of items to fetch during the request if the item is not local.
+     *
      *  @throws RangeError if index < 0 or index >= length.
+     *
      *  @return The list item at the specified index.
-     *  @see createPendingItemFunction
-     *  @see createFailedItemFunction
+     *
+     *  @see #createPendingItemFunction
+     *  @see #createFailedItemFunction
      *  @see mx.collections.errors.ItemPendingError
      *  @see mx.rpc.IResponder
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getItemAt(index:int, prefetch:int=0):Object
     {
@@ -648,9 +683,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function getItemIndex(item:Object):int
     {
@@ -668,9 +703,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function itemUpdated(item:Object, property:Object=null, oldValue:Object=null, newValue:Object=null):void
     {
@@ -682,9 +717,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function removeAll():void
     {
@@ -694,22 +729,24 @@

     /**
      *  Removes the actual or pending item at the specified index and returns it.
-     *  All items whose index is greater than the specified index are shifted
-     *  to the left.
-     *
-     *
If there isn't an actual or pending item at the specified index, for
-     *  example because a call to getItemAt(index) hasn't caused the data to be
-     *  paged in, then the underlying list may throw an IPE.  The
-     *  implementation ignores the IPE and returns null.

+     *  All items whose index is greater than the specified index
+     *  have their index reduced by 1.
+     *
+     *
If there is no actual or pending item at the specified index, for
+     *  example because a call to getItemAt(index) hasn't caused the data to be
+     *  paged in, then the underlying list may throw an ItemPendingError.
+     *  The  implementation ignores the ItemPendingError and returns null.

      *
      *  @param index The list index from which to retrieve the item.
+     *
      *  @throws RangeError if index < 0 or index >= length.
+     *
      *  @return The item that was removed or null.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function removeItemAt(index:int):Object
     {
@@ -739,9 +776,9 @@
      *  @inheritDoc
      *
      *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function setItemAt(item:Object, index:int):Object
     {
@@ -759,15 +796,16 @@

     /**
      *  Returns an array with the same elements as this AsyncListView.  The array is initialized
-     *  by retrieving each item with getItemAt(), so pending items will be substituted where actual
-     *  values aren't available yet.   The array will not be updated when the ASyncList replaces
+     *  by retrieving each item with getItemAt(), so pending items are substituted where actual
+     *  values aren't available yet.   The array will not be updated when the AsyncListView replaces
      *  the pending items with actual (or failed) values.
      *
      *  @return an array with the same elements as this AsyncListView.
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function toArray():Array
     {
@@ -783,13 +821,13 @@

     /**
      *  Returns a string that contains the list's length and the number of pending item requests.
-     *  This method does not include the list's items, it will not trigger pending requests.
+     *  It does not trigger pending requests.
      *
      *  @return A brief description of the list.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 1.1
+     *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
     public function toString():String


Transferred from the Adobe Open Source Subversion Repository

Revision: 14197
Author:   hmuller@adobe.com
Date:     2010-02-16T21:52:40.988951Z

Log Message:
-----------
Merge 4.x revision 14151 to trunk.   Second try.

Revised mirroring support for popups in DropDownList and ComboBox.

UIComponent/invalidateLayoutDirection() now assumes that a component without an IVisualElement parent inherits a LTR coordinate system.

PopUpAnchor uses MatrixUtil.getConcatenatedMatrix() - which concatenates UIComponent layoutMatrix - for layout computations and MatrixUtil.getConcatenatedComputedMatrix() to find the stage coordinates of a popup's origin.

Sync'd MX ListBase/validateDisplayList(), which is a copy of UIComponent/validateDisplayList() with validateMatrix() changes made
in the UIComponent version.

QE notes: Full Mustella run was OK (thanks Joan!)
Doc notes:
Bugs:
Reviewer: Jason
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="dir" action="M">/flex/sdk/trunk/frameworks</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/PopUpAnchor.as
+++ frameworks/projects/spark/src/spark/components/PopUpAnchor.as
@@ -355,7 +355,7 @@
     protected function calculatePopUpPosition():Point
     {
         // This implementation doesn't handle rotation
-        var matrix:Matrix = MatrixUtil.getConcatenatedComputedMatrix(this)
+        var matrix:Matrix = MatrixUtil.getConcatenatedMatrix(this);

         var regPoint:Point = new Point();

@@ -453,7 +453,14 @@
         else if (popUpBounds.right > screen.right)
             regPoint.x -= (popUpBounds.right - screen.right) / concatScaleX;

-        return matrix.transformPoint(regPoint);
+        // Compute the stage coordinates of the upper,left corner of the PopUp, taking
+        // the postTransformOffsets - which include mirroring - into account.
+        // If we're mirroring, then the implicit assumption that x=left will fail,
+        // so we compensate here.
+
+        if (layoutDirection == "rtl")
+            regPoint.x += popUpBounds.width;
+        return MatrixUtil.getConcatenatedComputedMatrix(this).transformPoint(regPoint);
     }

     //--------------------------------------------------------------------------
@@ -560,7 +567,7 @@
         if (!popUpIsDisplayed)
             return;

-        var m:Matrix = MatrixUtil.getConcatenatedComputedMatrix(this);
+        var m:Matrix = MatrixUtil.getConcatenatedMatrix(this);

         // Set the dimensions explicitly because UIComponents always set themselves to their
         // measured / explicit dimensions if they are parented by the SystemManager.


Transferred from the Adobe Open Source Subversion Repository

Revision: 2586
Author:   jimurphy@adobe.com
Date:     2008-07-23T15:42:56.370538Z

Log Message:
-----------
Merged 3.0.x rev. [2567,2582,2584] -> trunk

Modified Paths:
--------------
<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/events/ModalWindowRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerAPI.java</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/CrossDomainRSLItem.as</path>

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

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -55,6 +55,8 @@
 import mx.styles.IStyleClient;
 import mx.utils.NameUtil;
 import mx.events.ModalWindowRequest;
+import mx.events.MarshalEvent;
+import mx.core.UIComponent;

 use namespace mx_internal;

@@ -119,6 +121,18 @@
     public function PopUpManagerImpl()
     {
         super();
+
+        // add listeners for requests but only if we are a popup manager
+        // of the sandbox root.
+        var sm:ISystemManager2 = ISystemManager2(SystemManagerGlobals.topLevelSystemManagers[0]);
+        var sbRoot:IEventDispatcher = IEventDispatcher(sm.getSandboxRoot());
+
+        if (sbRoot == sm)
+        {
+            sbRoot.addEventListener(ModalWindowRequest.CREATE, createModalWindowRequestHandler);
+            sbRoot.addEventListener(ModalWindowRequest.SHOW, showModalWindowRequest);
+            sbRoot.addEventListener(ModalWindowRequest.HIDE, hideModalWindowRequest);
+        }
     }

     //--------------------------------------------------------------------------
@@ -139,13 +153,6 @@
      */
     private var popupInfo:Array;

-	// VERSION_SKEW
-	private var lastPopupInfo:PopUpData;
-	private var systemManagerModal:Boolean;
-
-	private var excludeRect:Rectangle;
-	private var systemManagerPopped:Boolean;
-
     //--------------------------------------------------------------------------
     //
     //  Methods
@@ -285,8 +292,6 @@
 			}
 			else
 				smp = sm;		// host w/o system manager proxy.
-
-			systemManagerPopped = true;
 		}

         if (window is IUIComponent)
@@ -323,7 +328,7 @@

 		// add a placeholder for an untrusted popup if this system manager
 		// is hosting the popup.
-		if (sbRoot && sm == sbRoot)
+		if (!ISystemManager2(sm).isTopLevelRoot() && sbRoot && sm == sbRoot)
 		{
 			request = new PopUpRequest(PopUpRequest.ADD_PLACEHOLDER, DisplayObject(window),
 									   sm.sandboxBridgeGroup.parentBridge);
@@ -350,16 +355,16 @@
         if (modal)
         {
             // create a modal window shield which blocks input and sets up mouseDownOutside logic
-            createModalWindowForPopup(parent, o, children, visibleFlag, smp);
+            createModalWindow(parent, o, children, visibleFlag, smp, sbRoot);
         }
         else
         {
             o._mouseDownOutsideHandler  = nonmodalMouseDownOutsideHandler;
             o._mouseWheelOutsideHandler = nonmodalMouseWheelOutsideHandler;

-			// VERSION_SKEW
             sm.addEventListener(MouseEvent.MOUSE_DOWN,  o.mouseDownOutsideHandler);
             sm.addEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
+
 //            SystemManager(smp).addEventListenerToStage(MouseEvent.MOUSE_DOWN,  o.mouseDownOutsideHandler);
 //            SystemManager(smp).addEventListenerToStage(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);

@@ -467,7 +472,6 @@
                     sm.popUpChildren.removeChild(DisplayObject(popUp));
                 else
                     sm.removeChild(DisplayObject(popUp));
-
             }
         }
     }
@@ -498,19 +502,24 @@

     /**
      *  @private
-     *  Create the modal window.
-     */
-    private function createModalWindowForPopup(parentReference:DisplayObject,
+     *
+     *  Create the modal window.
+     *  This is called in two different cases.
+     *      1. Create a modal window for a local pop up.
+     *      2. Create a modal window for a remote pop up. In this case o.owner will be null.
+     */
+    private function createModalWindow(parentReference:DisplayObject,
                                        o:PopUpData,
                                        childrenList:IChildList,
                                        visibleFlag:Boolean,
-                                       sm:ISystemManager2):void
+                                       sm:ISystemManager2,
+                                       sbRoot:DisplayObject):void
     {
         const popup:IFlexDisplayObject = IFlexDisplayObject(o.owner);

         const popupStyleClient:IStyleClient = popup as IStyleClient;
         var duration:Number = 0;
-
+
         // Create a modalWindow the size of the stage
         // that eats all mouse clicks.
         var modalWindow:Sprite;
@@ -524,7 +533,7 @@
             modalWindow.name = "modalWindow";
         }

-    	if (!sm)
+    	if (!sm && parentReference)
 	        sm = ISystemManager2(IUIComponent(parentReference).systemManager);

 		var smp:SystemManagerProxy;
@@ -534,32 +543,32 @@
     	sm.numModalWindows++;

         // Add it to the collection just below the popup
-        childrenList.addChildAt(modalWindow,
-            childrenList.getChildIndex(DisplayObject(popup)));
+        if (popup)
+            childrenList.addChildAt(modalWindow,
+                childrenList.getChildIndex(DisplayObject(popup)));
+        else
+            childrenList.addChild(modalWindow);

         // force into the automation hierarchy
         if (popup is IAutomationObject)
             IAutomationObject(popup).showInAutomationHierarchy = true;

         // set alpha of the popup and get it out of the focus loop
-        if (popupStyleClient)
+        if (!isNaN(o.modalTransparency))
+            modalWindow.alpha = o.modalTransparency;
+        else if (popupStyleClient)
             modalWindow.alpha = popupStyleClient.getStyle("modalTransparency");
 		else
 			modalWindow.alpha = 0;
+
+		o.modalTransparency = modalWindow.alpha;

         modalWindow.tabEnabled = false;

         const s:Rectangle = sm.screen;
         const g:Graphics = modalWindow.graphics;

-        if (sm.isTopLevel() && systemManagerModal)
-        {
-        	// trace("createModalWindowForPopup: toplevel and using systemManagerModal mode");
-        	s.width = DisplayObject(SystemManager(sm).application).width;
-        	s.height = DisplayObject(SystemManager(sm).application).height;
-
-        }
-        else if (smp)
+        if (smp)
         {
 			var sandboxScreen:Rectangle = ISystemManager2(smp.systemManager).screen;
 			s.width = sandboxScreen.width;
@@ -571,16 +580,31 @@
         	s.height = SystemManager(sm).height;
         }
         var c:Number = 0xFFFFFF;
-        if (popupStyleClient)
+        if (!isNaN(o.modalTransparencyColor))
+            c = o.modalTransparencyColor;
+        else if (popupStyleClient)
+        {
             c = popupStyleClient.getStyle("modalTransparencyColor");
-
-        // trace("createModalWindowForPopup: drawing modal " + s);
+            o.modalTransparencyColor = c;
+        }
+
+        // trace("createModalWindow: drawing modal " + s);
         g.clear();
         g.beginFill(c, 100);
         g.drawRect(s.x, s.y, s.width, s.height);
         g.endFill();

         o.modalWindow = modalWindow;
+
+        if (o.exclude)
+        {
+            o.modalMask = new Sprite();
+            updateModalMask(smp ? smp.systemManager : sm,
+                            modalWindow, o.exclude, o.modalMask);
+            modalWindow.mask = o.modalMask;
+            childrenList.addChild(o.modalMask);
+        }
+

         // a modal mousedownoutside handler just dispatches the event
         o._mouseDownOutsideHandler  = dispatchMouseDownOutsideEvent;
@@ -598,79 +622,113 @@
 		else
         	sm.addEventListener(Event.RESIZE, o.resizeHandler);

-        // Listen for show so we know to show the modal window
-        popup.addEventListener(FlexEvent.SHOW, popupShowHandler);
-
-        // Listen for hide so we know to hide the modal window
-        popup.addEventListener(FlexEvent.HIDE, popupHideHandler);
+        if (popup)
+        {
+            // Listen for show so we know to show the modal window
+            popup.addEventListener(FlexEvent.SHOW, popupShowHandler);
+
+            // Listen for hide so we know to hide the modal window
+            popup.addEventListener(FlexEvent.HIDE, popupHideHandler);
+        }

         if (visibleFlag)
-            showModalWindow(o, sm);
+            showModalWindow(o, sm, false);
         else
             popup.visible = visibleFlag;
-
-    }
-
-    /**
-    * TODODJL: not currently used. May be useful down the road.
-    */
-    private function createModalWindow(systemManager:ISystemManager,
-    								   parent:DisplayObject,
-    								   childrenList:IChildList,
-    								   popup:DisplayObject,
-    								   alpha:Number,
-    								   transparencyColor:Number = 0xFFFFFF):Sprite
-    {
-        // Create a modalWindow the size of the stage
-        // that eats all mouse clicks.
-        var modalWindow:Sprite;
-        if (modalWindowClass)
-        {
-            modalWindow = new modalWindowClass();
-        }
-        else
-        {
-            modalWindow = new FlexSprite();
-            modalWindow.name = "modalWindow";
-        }
-
-        const sm:ISystemManager = systemManager;
-        sm.numModalWindows++;
-
-        // Add it to the collection just below the popup
-        if (popup)
-        {
-	        childrenList.addChildAt(modalWindow,
-    		        childrenList.getChildIndex(DisplayObject(popup)));
-        }
-		else
-		{
-			childrenList.addChild(modalWindow);
-		}
-
-        // force into the automation hierarchy
-        if (popup is IAutomationObject)
-            IAutomationObject(popup).showInAutomationHierarchy = true;
-
-        // set alpha of the popup and get it out of the focus loop
-        modalWindow.alpha = alpha
-
-        modalWindow.tabEnabled = false;
-
-        const s:Rectangle = sm.screen;
-        const g:Graphics = modalWindow.graphics;
-
-        var c:Number = transparencyColor;

-        g.clear();
-        g.beginFill(c, 100);
-        g.drawRect(s.x, s.y, SystemManager(sm).width, SystemManager(sm).height);
-        g.endFill();
-
-		return modalWindow;
-    }
-
-
+        // Send request to display a modal window in other sandboxes
+        // If we are the sandbox root, then send the request to our parent.
+        // If we are not the sandbox root, then send the request to our parent.
+        var target:IEventDispatcher;
+        if (smp)
+            sm = SystemManagerProxy(smp).systemManager;
+
+        if (sm.useBridge())
+        {
+            if (sm == sbRoot)
+                target = sm.sandboxBridgeGroup.parentBridge;
+            else
+                target = sbRoot;
+
+            if (popupStyleClient)
+            {
+                o.modalTransparencyDuration = popupStyleClient.getStyle("modalTransparencyDuration");
+                o.modalTransparencyBlur = popupStyleClient.getStyle("modalTransparencyBlur");
+            }
+
+            // make sure this ApplicationDomain has an instance of pop up manager.
+            if (sm != sbRoot)
+                target.dispatchEvent(new MarshalEvent(MarshalEvent.INIT_MANAGER, false, false,
+                                     "mx.managers::IPopUpManager"));
+
+            var modalRequest:ModalWindowRequest = new ModalWindowRequest(ModalWindowRequest.CREATE,
+                                                                     !o.isRemoteModalWindow && sm != sbRoot,
+                                                                     visibleFlag,
+                                                                     false,
+                                                                     o.modalTransparencyDuration,
+                                                                     o.modalTransparency,
+                                                                     o.modalTransparencyColor,
+                                                                     o.modalTransparencyBlur);
+            var bridge:IEventDispatcher = sm.sandboxBridgeGroup.parentBridge;;
+            modalRequest.requestor = bridge;
+            target.dispatchEvent(modalRequest);
+        }
+    }
+
+    /**
+     *  @private
+     *
+     *  Update a mask to exclude the area of the exclude parameter from the area
+     *  of the modal window parameter.
+     *
+     *  @param sm The system manager that hosts the modal window
+     *  @param modalWindow The base area of the mask
+     *  @param exclude The area to exlude from the mask, may be null.
+     *  @param mask A non-null sprite. The mask is rewritten for each call.
+     *
+     */
+    mx_internal static function updateModalMask(sm:ISystemManager2,
+                                     modalWindow:DisplayObject,
+                                     exclude:IUIComponent,
+                                     mask:Sprite):void
+    {
+        var modalBounds:Rectangle = modalWindow.getBounds(DisplayObject(sm));
+        var excludeBounds:Rectangle;
+
+        if (exclude is UIComponent)
+            excludeBounds = UIComponent(exclude).getVisibleRect(DisplayObject(sm));
+        else
+            excludeBounds = DisplayObject(exclude).getBounds(DisplayObject(sm));
+
+        mask.graphics.clear();
+        mask.graphics.beginFill(0x000000);
+
+        // Fill the mask in three logical rows
+        // 1. Above the exclude bounds
+        if (excludeBounds.y > modalBounds.y)
+            mask.graphics.drawRect(modalBounds.x, modalBounds.y,
+                                   modalBounds.width, excludeBounds.y - modalBounds.y);
+
+        // 2. Left and right of the exclude bounds
+        if (modalBounds.x < excludeBounds.x)
+            mask.graphics.drawRect(modalBounds.x, excludeBounds.y,
+                                   excludeBounds.x - modalBounds.x, excludeBounds.height);
+
+        if ((modalBounds.x + modalBounds.width) > (excludeBounds.x + excludeBounds.width))
+            mask.graphics.drawRect(excludeBounds.x + excludeBounds.width,
+                                   excludeBounds.y,
+                                   modalBounds.x + modalBounds.width - excludeBounds.x - excludeBounds.width,
+                                   excludeBounds.height);
+
+        // 3. Below the exclude bounds
+        if ((excludeBounds.y + excludeBounds.height) < (modalBounds.y + modalBounds.height))
+            mask.graphics.drawRect(modalBounds.x, excludeBounds.y + excludeBounds.height,
+                                   modalBounds.width,
+                                   modalBounds.y + modalBounds.height - excludeBounds.y - excludeBounds.height);
+        mask.graphics.endFill();
+
+    }
+
     /**
      *  @private
      *  Set by PopUpManager on modal windows so they show when the parent shows
@@ -711,30 +769,76 @@
         }
     }

-    mx_internal function showModalWindow(o:PopUpData, sm:ISystemManager):void
+    private function showModalWindow(o:PopUpData, sm:ISystemManager2, sendRequest:Boolean = true):void
     {
     	const popUpStyleClient:IStyleClient = o.owner as IStyleClient;
         var duration:Number = 0;
         var alpha:Number = 0;

-        if (popUpStyleClient)
+        if (!isNaN(o.modalTransparencyDuration))
+            duration = o.modalTransparencyDuration;
+        else if (popUpStyleClient)
+        {
             duration = popUpStyleClient.getStyle("modalTransparencyDuration");
-
-        if (popUpStyleClient)
+            o.modalTransparencyDuration = duration;
+        }
+
+        if (!isNaN(o.modalTransparency))
+            alpha = o.modalTransparency;
+        else if (popUpStyleClient)
+        {
             alpha = popUpStyleClient.getStyle("modalTransparency");
-
+            o.modalTransparency = alpha;
+        }
+
 		o.modalWindow.alpha = alpha;

 	    var blurAmount:Number = 0;

-	    if (popUpStyleClient)
+        if (!isNaN(o.modalTransparencyBlur))
+            blurAmount = o.modalTransparencyBlur;
+	    else if (popUpStyleClient)
+	    {
 	    	blurAmount = popUpStyleClient.getStyle("modalTransparencyBlur");
+	    	o.modalTransparencyBlur = blurAmount;
+	    }

 		var transparencyColor:Number = 0xFFFFFF;
-	    if (popUpStyleClient)
+        if (!isNaN(o.modalTransparencyColor))
+            transparencyColor = o.modalTransparencyColor;
+	    else if (popUpStyleClient)
+	    {
 	    	transparencyColor = popUpStyleClient.getStyle("modalTransparencyColor");
+	    	o.modalTransparencyColor = transparencyColor;
+	    }

-    	showModalWindowInternal(o, duration, alpha, transparencyColor, blurAmount, sm);
+        if (sm is SystemManagerProxy)
+            sm = SystemManagerProxy(sm).systemManager;
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        showModalWindowInternal(o, duration, alpha, transparencyColor, blurAmount, sm, sbRoot);
+
+        if (sendRequest && sm.useBridge())
+        {
+            var target:IEventDispatcher;
+            var modalRequest:ModalWindowRequest = new ModalWindowRequest(ModalWindowRequest.SHOW,
+                                                                         !o.isRemoteModalWindow && sm != sbRoot,
+                                                                         false,
+                                                                         false,
+                                                                         o.modalTransparencyDuration,
+                                                                         o.modalTransparency,
+                                                                         o.modalTransparencyColor,
+                                                                         o.modalTransparencyBlur);
+            var bridge:IEventDispatcher = sm.sandboxBridgeGroup.parentBridge;
+            modalRequest.requestor = bridge;
+
+            if (sm == sbRoot)
+                target = sm.sandboxBridgeGroup.parentBridge;
+            else
+                target = sbRoot;
+
+            target.dispatchEvent(modalRequest);
+        }
     }

     /**
@@ -746,7 +850,8 @@
     										 transparency:Number,
     										 transparencyColor:Number,
     										 transparencyBlur:Number,
-    										 sm:ISystemManager):void
+    										 sm:ISystemManager2,
+    										 sbRoot:DisplayObject):void
     {
         // NO POPUP Data
         // End any effects that are currently playing for this popup.
@@ -765,7 +870,9 @@
             o.modalWindow.alpha = 0;
             o.modalWindow.visible = true;
             o.fade = fade;
-            IUIComponent(o.owner).setVisible(false, true);
+
+            if (o.owner)
+                IUIComponent(o.owner).setVisible(false, true);

             fade.play();

@@ -775,9 +882,24 @@
             if (blurAmount)
             {
                 // Ensure we blur the appropriate top level document.
-                var parentApp:Object = ("parentApplication" in o.owner) ?
-                    (Object(o.owner).parentApplication) : null;
-                const blur:Blur = new Blur(parentApp ? parentApp : ApplicationGlobals.application);
+                // Get the application document of the sandbox root.
+                // Use a request to get the document so APIs may change
+                // between Flex versions.
+                var sbRootApp:Object;   // sbRoot.application;
+
+                if (sm != sbRoot)
+                {
+                    var applicationRequest:MarshalEvent = new MarshalEvent(MarshalEvent.SYSTEM_MANAGER,
+                                                                       false, false,
+                                                                       "application",
+                                                                       sbRootApp);
+                    sbRoot.dispatchEvent(applicationRequest);
+                    o.blurTarget = applicationRequest.value;
+                }
+                else
+                    o.blurTarget = ApplicationGlobals.application;
+
+                const blur:Blur = new Blur(o.blurTarget);
                 blur.blurXFrom = blur.blurYFrom = 0;
                 blur.blurXTo = blur.blurYTo = blurAmount;
                 blur.duration = transparencyDuration;
@@ -789,7 +911,8 @@
         }
         else
         {
-            IUIComponent(o.owner).setVisible(true, true);
+            if (o.owner)
+                IUIComponent(o.owner).setVisible(true, true);
             o.modalWindow.visible = true;
         }
     }
@@ -797,6 +920,7 @@
     /**
      *  @private
      *  Hide the modal transparency blocker, playing effects if needed.
+     *
      */
     private function hideModalWindow(o:PopUpData, destroy:Boolean = false):void
     {
@@ -829,11 +953,7 @@

             if (blurAmount)
             {
-                // Ensure we blur the appropriate top level document.
-                var parentApp:Object = ("parentApplication" in o.owner) ?
-                    (Object(o.owner).parentApplication) : null;
-
-                const blur:Blur = new Blur(parentApp ? parentApp : ApplicationGlobals.application);
+                const blur:Blur = new Blur(o.blurTarget);
                 blur.blurXFrom = blur.blurYFrom = blurAmount;
                 blur.blurXTo = blur.blurYTo = 0;
                 blur.duration = duration;
@@ -847,6 +967,27 @@
         {
             o.modalWindow.visible = false;
         }
+
+        var sm:ISystemManager2 = ISystemManager2(ApplicationGlobals.application.systemManager);
+        if (sm.useBridge())
+        {
+            var sbRoot:DisplayObject = sm.getSandboxRoot();
+            var modalRequest:ModalWindowRequest = new ModalWindowRequest(ModalWindowRequest.HIDE,
+                                                                         !o.isRemoteModalWindow && sm != sbRoot,
+                                                                         destroy);
+            var bridge:IEventDispatcher = sm.sandboxBridgeGroup.parentBridge;
+            var target:IEventDispatcher;
+
+            modalRequest.requestor = bridge;
+
+            if (sm == sbRoot)
+                target = sm.sandboxBridgeGroup.parentBridge;
+            else
+                target = sbRoot;
+
+            target.dispatchEvent(modalRequest);
+        }
+
     }

     /**
@@ -864,6 +1005,61 @@
         }
         return null;
     }
+
+    /**
+     *  @private
+     *  Returns the PopUpData for the highest remote modal window on display.
+     */
+    private function findHighestRemoteModalPopupInfo():PopUpData
+    {
+        const n:int = popupInfo.length - 1;
+        for (var i:int = n; i >= 0; i--)
+        {
+            var o:PopUpData = popupInfo[i];
+            if (o.isRemoteModalWindow)
+                return o;
+        }
+        return null;
+    }
+
+
+    /**
+     *   @private
+     *
+     *   @return true if the message should be processed, false if it has
+     *           been forwarded and 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)
+        {
+            request.requestor = sm.sandboxBridgeGroup.parentBridge;
+            request.skip = false;
+            sbRoot.dispatchEvent(request);
+            return false;
+        }
+
+        return true;
+    }

     //--------------------------------------------------------------------------
     //
@@ -871,64 +1067,127 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 * 	@private
-	 *
-	 * 	Display a modal dialog over this popup manager.
-	 *
-	 */
-	 private function showModalWindowRequestHandler(event:Event):void
-	 {
-	 	var eObj:Object = Object(event);
-        var sm:ISystemManager = getTopLevelSystemManager(DisplayObject(ApplicationGlobals.application));
-
-	 	// trace("showModalWindowRequestHandler for " + sm.loaderInfo.url);
-	 }
-
-	 	/**
-	 * @private
-	 *
-	 * Handle request to add a popup placeholder.
-	 * The placeholder represents an untrusted form that is hosted
-	 * elsewhere.
-	 */
-	 private function addModalPopupRequestHandler(event:Event):void
-	 {
-	 	var request:PopUpRequest = PopUpRequest.marshal(event);
-		var bridgeOwner:DisplayObject;
-		var sm:ISystemManager2 = ISystemManager2(ApplicationGlobals.application.systemManager);
-
-		// get the bridgeOwner which is the swfloader that loaded the application.
-		if (request.bridge)
-			bridgeOwner = sm.sandboxBridgeGroup.getChildBridgeOwner(request.bridge);
-		else
-			bridgeOwner = request.window;
-
-		// display modal
-
-//		if (!forwardPlaceholderRequest(eObj, true))
-//		{
-//			// Create a RemotePopUp and add it.
-//			var remoteForm:RemotePopUp = new RemotePopUp(eObj.placeholderId, eObj.bridge);
-//			forms.push(remoteForm);
-//		}
-//
-	 }
-
-	/**
-	 * @private
-	 *
-	 * Handle request to add a popup placeholder.
-	 * The placeholder represents an untrusted form that is hosted
-	 * elsewhere.
-	 */
-	 private function removeModalPopupRequestHandler(event:Event):void
-	 {
-	 	var eObj:Object = Object(event);
-
-	 }
-
-
+    /**
+     *  @private
+     *
+     *  Create a modal window and optionally show it.
+     */
+    private function createModalWindowRequestHandler(event:Event):void
+    {
+        var request:ModalWindowRequest;
+
+        if (event is ModalWindowRequest)
+            request = ModalWindowRequest(event);
+        else
+            request = ModalWindowRequest.marshal(event);
+
+        var sm:ISystemManager2 = getTopLevelSystemManager(DisplayObject(ApplicationGlobals.application));
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        if (!preProcessModalWindowRequest(request, sm, sbRoot))
+            return;
+
+        // process the message
+        var popUpData:PopUpData = new PopUpData();
+        popUpData.isRemoteModalWindow = true;
+        popUpData.systemManager = sm;
+        popUpData.modalTransparency = request.transparency;
+
+        // disable blur because we can mask the application and blur is not
+        // working if we blur the modalWindow.
+        popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
+        popUpData.modalTransparencyColor = request.transparencyColor;
+        popUpData.modalTransparencyDuration = request.transparencyDuration;
+
+        // get the SWFLoader to exclude
+        popUpData.exclude = sm.sandboxBridgeGroup.getChildBridgeOwner(request.requestor) as IUIComponent;
+
+        if (!popupInfo)
+            popupInfo = [];
+
+        popupInfo.push(popUpData);
+
+        createModalWindow(null, popUpData, sm.popUpChildren, request.show, sm, sbRoot);
+    }
+
+    /**
+     *  @private
+     *
+     *  Show a modal window.
+     */
+    private function showModalWindowRequest(event:Event):void
+    {
+        var request:ModalWindowRequest = ModalWindowRequest.marshal(event);
+
+        if (event is ModalWindowRequest)
+            request = ModalWindowRequest(event);
+        else
+            request = ModalWindowRequest.marshal(event);
+
+        var sm:ISystemManager2 = getTopLevelSystemManager(DisplayObject(ApplicationGlobals.application));
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        if (!preProcessModalWindowRequest(request, sm, sbRoot))
+            return;
+
+        // the highest popUpData in the list is the most recent modal window.
+        // sanity check that the popupdata is really a modal window with a null
+        // parent and popup window.
+        var popUpData:PopUpData = findHighestRemoteModalPopupInfo();
+        popUpData.modalTransparency = request.transparency;
+
+        // disable blur because we can mask the application and blur is not
+        // working if we blur the modalWindow.
+        popUpData.modalTransparencyBlur = 0; //request.transparencyBlur;
+        popUpData.modalTransparencyColor = request.transparencyColor;
+        popUpData.modalTransparencyDuration = request.transparencyDuration;
+
+        if (popUpData.owner || popUpData.parent)
+            throw new Error();              // not popUpData for a modal window
+
+        showModalWindow(popUpData, sm);
+    }
+
+    /**
+     *  @private
+     *
+     *  Hide a modal window and optionally remove it.
+     */
+    private function hideModalWindowRequest(event:Event):void
+    {
+        var request:ModalWindowRequest;
+
+        // If the event is redispatched from the SystemManger it will be
+        // marshalled. If the PopUpManager dispatches the event using
+        // the sandbox root it will come here directly.
+        if (event is ModalWindowRequest)
+            request = ModalWindowRequest(event);
+        else
+            request = ModalWindowRequest.marshal(event);
+
+        var sm:ISystemManager2 = getTopLevelSystemManager(DisplayObject(ApplicationGlobals.application));
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        if (!preProcessModalWindowRequest(request, sm, sbRoot))
+            return;
+
+        // the highest popUpData in the list is the most recent modal window.
+        // sanity check that the popupdata is really a modal window with a null
+        // parent and popup window.
+        var popUpData:PopUpData = findHighestRemoteModalPopupInfo();
+        if (!popUpData || popUpData.owner || popUpData.parent)
+            throw new Error();              // not popUpData for a modal window
+
+        hideModalWindow(popUpData, request.remove);
+
+        // handle removing popup window
+        if (request.remove)
+        {
+            popupInfo.splice(popupInfo.indexOf(popUpData), 1);
+            sm.numModalWindows--;
+        }
+    }
+
     /**
      *  @private
      *  Set by PopUpManager on modal windows to monitor when the parent window gets killed.
@@ -1006,7 +1265,6 @@
                     sm.removeEventListener(MouseEvent.MOUSE_WHEEL, o.mouseWheelOutsideHandler, true);
                 }

-                lastPopupInfo = popupInfo[i];
                 popupInfo.splice(i, 1);
                 break;
             }
@@ -1026,7 +1284,7 @@
         for (var i:int = 0; i < n; i++)
         {
             var o:PopUpData = popupInfo[i];
-            if (o.modalWindow == event.effectInstance.target)
+            if (o.owner && o.modalWindow == event.effectInstance.target)
             {
                 IUIComponent(o.owner).setVisible(true, true);
                 break;
@@ -1041,40 +1299,31 @@
     private function fadeOutDestroyEffectEndHandler(event:EffectEvent):void
     {
         effectEndHandler(event);
+
         const obj:DisplayObject = DisplayObject(event.effectInstance.target);

-		// VERSION_SKEW
- 		try
- 		{
-	        if (obj.parent is ISystemManager)
-	        {
-	            const sm:ISystemManager = ISystemManager(obj.parent)
-	            if (sm.popUpChildren.contains(obj))
-	                sm.popUpChildren.removeChild(obj);
-	            else
-	                sm.removeChild(obj);
-	        }
-	        else
-			{
-				if (obj.parent)	// Mustella can already take you off stage
-					obj.parent.removeChild(obj);
-			}
- 		}
- 		catch (e:SecurityError)
- 		{
- 			// VERSION_SKEW
- 			// parent is in another sandbox. Tell the sandbox to remove the modal window.
- 			if (lastPopupInfo)
- 			{
- 				if (lastPopupInfo.parentBridge)
-				{
-					var request:ModalWindowRequest = new ModalWindowRequest(ModalWindowRequest.REMOVE);
-					lastPopupInfo.parentBridge.dispatchEvent(request);
-				}
- 			}
- 		}
-
- 		lastPopupInfo = null;
+        var modalMask:DisplayObject = obj.mask;
+        if (modalMask)
+        {
+            // modal mask is always added to the popupChildren list.
+            obj.mask = null;
+            sm.popUpChildren.removeChild(modalMask);
+        }
+
+        if (obj.parent is ISystemManager)
+        {
+            const sm:ISystemManager = ISystemManager(obj.parent)
+            if (sm.popUpChildren.contains(obj))
+                sm.popUpChildren.removeChild(obj);
+            else
+                sm.removeChild(obj);
+        }
+        else
+		{
+			if (obj.parent)	// Mustella can already take you off stage
+				obj.parent.removeChild(obj);
+		}
+
     }

     /**
@@ -1111,6 +1360,10 @@
      */
     private static function nonmodalMouseDownOutsideHandler(owner:DisplayObject, evt:MouseEvent):void
     {
+        // TODODJL: handle mouse outsides
+        if (!owner)
+            return;
+
         // shapeFlag is false here for performance reasons
         if (owner.hitTestPoint(evt.stageX, evt.stageY, true))
 		{
@@ -1131,6 +1384,10 @@
      */
     private static function nonmodalMouseWheelOutsideHandler(owner:DisplayObject, evt:MouseEvent):void
     {
+        // TODODJL: handle mouse outsides
+        if (!owner)
+            return;
+
         // shapeFlag is false here for performance reasons
         if (owner.hitTestPoint(evt.stageX, evt.stageY, true))
         {
@@ -1151,6 +1408,9 @@
      */
     private static function dispatchMouseWheelOutsideEvent(owner:DisplayObject, evt:MouseEvent):void
     {
+        if (!owner)
+            return;
+
         const event:MouseEvent = new FlexMouseEvent(FlexMouseEvent.MOUSE_WHEEL_OUTSIDE);
         const pt:Point = owner.globalToLocal(new Point(evt.stageX, evt.stageY));
         event.localX = pt.x;
@@ -1170,6 +1430,9 @@
      */
     private static function dispatchMouseDownOutsideEvent(owner:DisplayObject, evt:MouseEvent):void
     {
+        if (!owner)
+            return;
+
         const event:MouseEvent = new FlexMouseEvent(FlexMouseEvent.MOUSE_DOWN_OUTSIDE);
         const pt:Point = owner.globalToLocal(new Point(evt.stageX, evt.stageY));
         event.localX = pt.x;
@@ -1188,16 +1451,20 @@
 }

 import flash.display.DisplayObject;
+import flash.display.Sprite;
 import flash.geom.Rectangle;
 import flash.events.Event;
 import flash.events.IEventDispatcher;
 import flash.events.MouseEvent;
+import flash.display.Stage;
+import flash.geom.Point;
+
 import mx.core.IUIComponent;
+import mx.core.mx_internal;
 import mx.effects.Effect;
 import mx.managers.ISystemManager;
-import flash.display.Stage;
 import mx.managers.ISystemManager2;
-import flash.geom.Point;
+import mx.managers.PopUpManagerImpl;

 ////////////////////////////////////////////////////////////////////////////////
 //
@@ -1271,16 +1538,65 @@
     public var blur:Effect;

     /**
-    * 	@private
-    */
-    public var parentBridge:IEventDispatcher;
-
-    /**
-    *   @private
-    */
+     *  @private
+     *
+     */
+    public var blurTarget:Object;
+
+    /**
+     *   @private
+     *
+     *   The host of the modal dialog.
+     */
     public var systemManager:ISystemManager2;

-
+    //--------------------------------------
+    //  fields only for remote modal windows
+    //--------------------------------------
+
+    /**
+     *   @private
+     *
+     *   Is this popup just a modal window for a popup
+     *   in an untrusted sandbox?
+     */
+    public var isRemoteModalWindow:Boolean;
+
+    /**
+     *   @private
+     */
+    public var modalTransparencyDuration:Number;
+
+    /**
+     *   @private
+     */
+    public var modalTransparency:Number;
+
+    /**
+     *   @private
+     */
+    public var modalTransparencyBlur:Number;
+
+    /**
+     *   @private
+     */
+    public var modalTransparencyColor:Number;
+
+    /**
+     *   @private
+     *
+     *   Object to exclude from the modal dialog. The area of the
+     *   display object will be excluded from the modal dialog.
+     */
+    public var exclude:IUIComponent;
+
+    /**
+     *   @private
+     *
+     *   Mask created from the modalWindow and exclude fields.
+     */
+    public var modalMask:Sprite;
+
     //--------------------------------------------------------------------------
     //
     //  Event handlers
@@ -1311,12 +1627,19 @@
     {
         var s:Rectangle = ISystemManager(event.target).screen;

-        if (modalWindow && owner.stage == DisplayObject(event.target).stage)
+        // Resize the modal window if either the popup or the modal window are on the
+        // same stage as the resize event target.
+        // A modal window may have no popup in the case where the popup originated
+        // from an untrusted application.
+        if ((owner && owner.stage == DisplayObject(event.target).stage) ||
+            (modalWindow && modalWindow.stage == DisplayObject(event.target).stage))
         {
             modalWindow.width = s.width;
             modalWindow.height = s.height;
             modalWindow.x = s.x;
             modalWindow.y = s.y;
+            if (modalMask)
+                PopUpManagerImpl.mx_internal::updateModalMask(systemManager, modalWindow, exclude, modalMask);
         }
     }
 }


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

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