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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSliderBaseAutomationImpl.as
@@ -0,0 +1,267 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.automation.delegates.components.supportClasses
+{
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.events.IEventDispatcher;
+	import flash.events.KeyboardEvent;
+	import flash.events.MouseEvent;
+	import flash.geom.Point;
+	import flash.ui.Keyboard;
+	import flash.utils.getTimer;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.core.mx_internal;
+
+	import spark.automation.events.SparkValueChangeAutomationEvent;
+	import spark.components.HSlider;
+	import spark.components.VSlider;
+	import spark.components.supportClasses.SliderBase;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  SliderBarBase class.
+	 *
+	 *  @see spark.components.supportClasses.SliderBarBase
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class SparkSliderBaseAutomationImpl extends SparkTrackBaseAutomationImpl
+	{
+		include "../../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.supportClasses.SliderBase, SparkSliderBaseAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj SliderBarBase object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function SparkSliderBaseAutomationImpl(obj:spark.components.supportClasses.SliderBase)
+		{
+			super(obj);
+
+			obj.addEventListener(Event.CHANGE, scrollHandler, false, -1, true);
+		}
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get slider():spark.components.supportClasses.SliderBase
+		{
+			return uiComponent as spark.components.supportClasses.SliderBase;
+		}
+
+
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationValue():Array
+		{
+			return [ slider.value.toString() ];
+		}
+
+		/**
+		 *  @private
+		 *  Replays ScrollEvents.
+		 *  ScrollEvents are replayed by simply setting the
+		 *  verticalScrollPosition or
+		 *  horizontalScrollPosition properties of the instance.
+		 */
+		override public function replayAutomatableEvent(interaction:Event):Boolean
+		{
+			if ( interaction is SparkValueChangeAutomationEvent)
+			{
+				var event:SparkValueChangeAutomationEvent = SparkValueChangeAutomationEvent(interaction);
+				var target:IEventDispatcher = null;
+				var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN);
+
+				var mousePoint:Point = new Point(0,0);
+
+				var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
+				var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
+
+				if(slider is  spark.components.HSlider)
+					mousePoint = hSliderValueToPoint(event.value);
+
+				else if (slider is spark.components.VSlider)
+					mousePoint = vSliderValueToPoint(event.value);
+
+				mouseEvent.localX = mousePoint.x;
+				mouseEvent.localY = mousePoint.y;
+				target = slider.track;
+				if (target)
+				{
+					var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+					help.replayClick(target, mouseEvent);
+				}
+
+				var completeTime:Number = getTimer() + slider.getStyle("slideDuration");
+
+				help.addSynchronization(function():Boolean
+				{
+					return getTimer() >= completeTime;
+				});
+				return true;
+			}
+			else if (interaction is KeyboardEvent)
+			{
+				var help1:IAutomationObjectHelper = Automation.automationObjectHelper;
+				help1.replayKeyboardEvent(slider, interaction as KeyboardEvent);
+			}
+			else
+			{
+				return super.replayAutomatableEvent(interaction);
+			}
+
+			return true;
+		}
+
+		private function  vSliderValueToPoint(value:Number):Point
+		{
+			// we are doing the reverse conversion od the pointToValue  in the VSlider
+			// we even consider the modiifcation done in the mouseDownHanlder for the track in the slider
+			var thumbRange:Number = slider.track.getLayoutBoundsHeight() - slider.thumb.getLayoutBoundsHeight();
+			var range:Number = slider.maximum - slider.minimum;
+			var localY:Number = thumbRange - ( (Number(value -slider.minimum) /  range)*  thumbRange)
+
+			var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
+			var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
+
+
+			var adjustedY:Number = localY + (thumbH / 2);
+			var adjustedX:Number = thumbW/2;
+
+			return new Point(adjustedX,adjustedY);
+		}
+
+
+		private function  hSliderValueToPoint(value:Number):Point
+		{
+			// we are doing the reverse conversion od the pointToValue  in the VSlider
+			// we even consider the modiifcation done in the mouseDownHanlder for the track in the slider
+			var thumbRange:Number = slider.track.getLayoutBoundsWidth() - slider.thumb.getLayoutBoundsWidth();
+			var range:Number = slider.maximum - slider.minimum;
+			var localX:Number = ((value - slider.minimum)/ range)* thumbRange;
+
+
+			var thumbW:Number = (slider.thumb) ? slider.thumb.width : 0;
+			var thumbH:Number = (slider.thumb) ? slider.thumb.height : 0;
+
+
+			var adjustedX:Number = localX + (thumbW / 2);
+			var adjustedY:Number = thumbH/2;
+
+			return new Point(adjustedX,adjustedY);
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Event handlers
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		protected var keyDownHappened:Boolean = false;
+		private function scrollHandler(event:Event):void
+		{
+			if(!keyDownHappened)
+			{
+				// the event does not give the details of the value. So we need to provide this
+				// so that replay can happen accordingly
+				var valueChangeEvent:SparkValueChangeAutomationEvent =
+					new SparkValueChangeAutomationEvent(
+						SparkValueChangeAutomationEvent.CHANGE,false,false,slider.value);
+				recordAutomatableEvent(valueChangeEvent);
+			}
+			else
+			{
+				// let the keyboard event hanlder in the appropriate component take care of the recording
+				keyDownHappened = false;
+			}
+
+
+		}
+
+
+
+		override protected function keyDownHandler(event:KeyboardEvent) : void
+		{
+
+			// we need to inform that when keydown happens the change handler should not be
+			// called and instead we want to record it as the key operation
+			keyDownHappened = true;
+
+			if (event.keyCode == Keyboard.HOME ||
+				event.keyCode == Keyboard.END ||
+				event.keyCode == Keyboard.UP ||
+				event.keyCode == Keyboard.DOWN||
+				event.keyCode == Keyboard.LEFT||
+				event.keyCode == Keyboard.RIGHT)
+			{
+				recordAutomatableEvent(event);
+			}
+
+		}
+
+
+	}
+}


Grr. Emacs doesn't like for each at all.

--- tamarin-central/thane/Thane.as
+++ tamarin-central/thane/Thane.as
@@ -15,12 +15,12 @@
     private static function heartbeat () :void
     {
         for each (var heart :Function in _hearts) {
-                try {
-                    heart();
-                } catch (err :Error) {
-                    trace("Heartbeat error: " + err);
-                }
+            try {
+                heart();
+            } catch (err :Error) {
+                trace("Heartbeat error: " + err);
             }
+        }
     }

     private static var _hearts :Array = new Array();


fix trace

fix trace

--- frameworks/projects/Core/as/src/org/apache/flex/utils/Language.as
+++ frameworks/projects/Core/as/src/org/apache/flex/utils/Language.as
@@ -26,10 +26,12 @@
     COMPILE::JS
     {
         import goog.bind;
+        import goog.global;
     }

     /**
      * @flexjsignoreimport goog.bind
+     * @flexjsignoreimport goog.global
      */
     COMPILE::JS
 	public class Language
@@ -294,7 +296,7 @@
 				msg += rest[i];
 			}

-			theConsole = window["goog"]["global"]["console"];
+			theConsole = goog.global.console;

 			if (theConsole === undefined && windowConsole !== undefined)
 				theConsole = windowConsole;


Transferred from the Adobe Open Source Subversion Repository

Revision: 12570
Author:   egeorgie@adobe.com
Date:     2009-12-05T00:37:35.278281Z

Log Message:
-----------
Fix http://bugs.adobe.com/jira/browse/SDK-23746 Side-effecting the x/y properties on a component and invalidating the properties causes parent display list invalidation and http://bugs.adobe.com/jira/browse/SDK-23986 make UIComponent.transformAround so it OPTIONALLY invalidates parent displayList

Problem: We are invalidating parent based on checks of x & y against oldX & oldY in validateProperties.
Fix: Move the checks to the x & y setters. Additionally add the optional parameter "invalidateLayout" to ILayoutElement.transformAround method.

QE notes: None
Doc notes: None
Bugs: SDK-2374, SDK-23986
Reviewer: Deepa
Tests run: checkintests, mustella gumbo/layout, gumbo/core/Group
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.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/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -3380,8 +3380,18 @@
                                     translation:Vector3D = null,
                                     postLayoutScale:Vector3D = null,
                                     postLayoutRotation:Vector3D = null,
-                                    postLayoutTranslation:Vector3D = null):void
-    {
+                                    postLayoutTranslation:Vector3D = null,
+                                    invalidateLayout:Boolean = true):void
+    {
+        // Make sure that no transform setters will trigger parent invalidation.
+        // Reset the flag at the end of the method.
+        var oldIncludeInLayout:Boolean;
+        if (!invalidateLayout)
+        {
+            oldIncludeInLayout = _includeInLayout;
+            _includeInLayout = false;
+        }
+
         if (_layoutFeatures == null)
         {
             // TODO (chaase): should provide a way to return to having no
@@ -3407,6 +3417,9 @@
                 translation, postLayoutScale, postLayoutRotation,
                 postLayoutTranslation);
             invalidateTransform();
+
+            // Will not invalidate parent if we have set _includeInLayout to false
+            // in the beginning of the method
             invalidateParentSizeAndDisplayList();
         }
         else
@@ -3448,6 +3461,9 @@
                 }
             }
         }
+
+        if (!invalidateLayout)
+            _includeInLayout = oldIncludeInLayout;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 11329
Author:   hmuller@adobe.com
Date:     2009-10-30T21:23:59.020805Z

Log Message:
-----------
Fix a rather bad typo in AsyncListView/itemUpdated().

QE notes: none
Doc notes: none
Bugs: sdk-23909
Reviewer: Alex
Tests run:
Is noteworthy for integration: no

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

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

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

 /**
- *  A "wrapper" for IList implementations that handles ItemPendingErrors
- *  thrown by getItemAt().
+ *  A wrapper for IList implementations that handles ItemPendingErrors
+ *  thrown by getItemAt(), removeItemAt(),
+ *  and toArray().
  *
  *
The getItemAt() method handles ItemPendingErrors by returning a provisional
  *  "pending" item until the underlying request succeeds or fails.  The provisional
@@ -55,7 +56,6 @@
  *  like List and ComboBox, which don't provide intrinsic support for
  *  ItemPendingError handling.

  *
- *
  *  @langversion 3.0
  *  @playerversion Flash 9
  *  @playerversion AIR 1.1
@@ -599,7 +599,7 @@
     public function itemUpdated(item:Object, property:Object=null, oldValue:Object=null, newValue:Object=null):void
     {
         if (list)
-            itemUpdated(item, property, oldValue, newValue);
+            list.itemUpdated(item, property, oldValue, newValue);
     }

     /**


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

--- frameworks/projects/framework/src/mx/core/MovieClipLoaderAsset.as
+++ frameworks/projects/framework/src/mx/core/MovieClipLoaderAsset.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-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.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 4593
Author:   jimurphy@adobe.com
Date:     2009-01-20T14:40:09.728921Z

Log Message:
-----------
Merged 3.x revisions 4591

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/controls/ColorPicker.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/controls/SWFLoader.as</path>

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

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -437,7 +437,11 @@
             IInvalidating(popUp).validateNow();

         const o:PopUpData = findPopupInfoByOwner(popUp);
-        if (o && o.parent)
+
+        // If we don't find the pop owner or if the owner's parent is not specified or is not on the
+        // stage, then center based on the popUp's current parent.
+        var popUpParent:DisplayObject = (o && o.parent && o.parent.stage) ? o.parent : popUp.parent;
+        if (popUpParent)
         {
             var systemManager:ISystemManager = o.systemManager;
             var x:Number;
@@ -494,10 +498,10 @@

             // If parent is a UIComponent, check for clipping between
             // the object and its SystemManager
-            if (o.parent is UIComponent)
+            if (popUpParent is UIComponent)
             {
-                rect = UIComponent(o.parent).getVisibleRect();
-                var offset:Point = o.parent.globalToLocal(rect.topLeft);
+                rect = UIComponent(popUpParent).getVisibleRect();
+                var offset:Point = popUpParent.globalToLocal(rect.topLeft);
                 clippingOffset.x += offset.x;
                 clippingOffset.y += offset.y;
                 parentWidth = rect.width;
@@ -505,8 +509,8 @@
             }
             else
             {
-                parentWidth = o.parent.width;
-                parentHeight = o.parent.height;
+                parentWidth = popUpParent.width;
+                parentHeight = popUpParent.height;
             }

             // The appWidth may smaller than parentWidth if the application is
@@ -515,7 +519,7 @@
             y = Math.max(0, (Math.min(appHeight, parentHeight) - popUp.height) / 2);

             pt = new Point(clippingOffset.x, clippingOffset.y);
-            pt = o.parent.localToGlobal(pt);
+            pt = popUpParent.localToGlobal(pt);
             pt = popUp.parent.globalToLocal(pt);
             popUp.move(Math.round(x) + pt.x, Math.round(y) + pt.y);
         }


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

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

 package spark.validators
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6609
Author:   gruehle@adobe.com
Date:     2009-05-04T22:47:31.285324Z

Log Message:
-----------
Add theme attribute to theme-specific style metadata.

Example of a halo-specific style:
[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo")]

Example of a spark-specific style:
[Style(name="baseColor", type="uint", format="Color", inherit="yes", theme="spark")]

Style metadata without a theme attribute is theme-agnostic, and works with either spark or halo.

Bugs: SDK-20606

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/FillStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BarColorStyle.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/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/IconColorStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SelectedFillColorsStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ProgressBar.as
+++ frameworks/projects/mx/src/mx/controls/ProgressBar.as
@@ -118,7 +118,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="borderColor", type="uint", format="Color", inherit="no")]
+[Style(name="borderColor", type="uint", format="Color", inherit="no", theme="halo")]

 /**
  *  The number of pixels to move the indeterminate progress bar for each indeterminate loop.
@@ -184,7 +184,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="themeColor", type="uint", format="Color", inherit="yes")]
+[Style(name="themeColor", type="uint", format="Color", inherit="yes", theme="halo")]

 /**
  *  The colors of the track, as an array of two colors.
@@ -197,7 +197,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="trackColors", type="Array", arrayType="uint", format="Color", inherit="no")]
+[Style(name="trackColors", type="Array", arrayType="uint", format="Color", inherit="no", theme="halo")]

 /**
  *  The height of the track in pixels. If the value is NaN, then


Transferred from the Adobe Open Source Subversion Repository

Revision: 17181
Author:   cframpto@adobe.com
Date:     2010-08-04T14:18:11.541530Z

Log Message:
-----------
Add metadata for TLF's new list and li tags.  http://blogs.adobe.com/tlf/Lists.pdf has examples of how to use the new tags.
TLF related cleanup now that we've integrated with TLF2.
SDK-25322 - remove workaround for a TLF mouse wheel handler bug that has been fixed
SDK-27043 -some format code moved to TLF at my request so our code didn't have to know about tlf internals - now just call their methods

QE notes:
Doc notes:
Bugs: SDK-25322, SDK-27043
Reviewer:
Tests run: checkintests, TextArea, basic list test program I wrote to make sure tags worked
Is noteworthy for integration: yes - new list and li tags

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>

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

--- frameworks/projects/spark/src/spark/utils/TextUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextUtil.as
@@ -12,13 +12,14 @@
 package spark.utils
 {

+import flash.text.engine.ElementFormat;
+import flash.text.engine.FontLookup;
+
 import flashx.textLayout.compose.ISWFContext;
 import flashx.textLayout.elements.FlowLeafElement;
 import flashx.textLayout.elements.ParagraphElement;
 import flashx.textLayout.elements.SpanElement;
 import flashx.textLayout.elements.TextFlow;
-import flash.text.engine.ElementFormat;
-import flash.text.engine.FontLookup;
 import flashx.textLayout.formats.ITextLayoutFormat;

 import mx.core.EmbeddedFont;
@@ -172,7 +173,8 @@
         // If the font isn't embedded as advertised, first fall back to
         // corresponding device font and, only if that fails, fail back to the
         // player's default font.
-        if (swfContext && format.fontLookup == FontLookup.EMBEDDED_CFF)
+        if (swfContext as IFlexModuleFactory &&
+            format.fontLookup == FontLookup.EMBEDDED_CFF)
         {
             var name:String = format.fontFamily;
             var bold:Boolean = format.fontWeight == "bold";


Transferred from the Adobe Open Source Subversion Repository

Revision: 10633
Author:   dloverin@adobe.com
Date:     2009-09-28T13:24:30.559033Z

Log Message:
-----------
Use styleManager instance instead of StyleManager singleton (framework and compiler generated code)

Modified compiler generated style code for the FlexInit class. The style related changes are only available with the -keep option. AST generation is coming later.

Only the framework project is changed here. The other projects are will be changed soon.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex and Paul
Tests run: checkintests, all Mustella tests(no new failures)
Is noteworthy for integration: no.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonBarButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.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/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserMonthArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</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/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TitleBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperDownSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TabSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/textClasses/TextRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/CheckBoxIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperUpSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/RadioButtonIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ComboBoxArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.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/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/MenuBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressBarSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DataGridHeaderBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SetStyleActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>

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

--- frameworks/projects/framework/src/mx/controls/SWFLoader.as
+++ frameworks/projects/framework/src/mx/controls/SWFLoader.as
@@ -1486,101 +1486,9 @@
     {
         if (url)
             _source = url;
-
-        if (contentHolder)
-        {
-            if (isContentLoaded)
-            {
-                // can get rid of bitmap data if it's an image on unload
-                // this helps with garbage collection (SDK-9533)
-                var imageData:Bitmap;
-
-                if (contentHolder is Loader)
-                {
-                    try
-                    {
-                        if (Loader(contentHolder).content is Bitmap)
-                        {
-                            imageData = Bitmap(Loader(contentHolder).content);
-                            if (imageData.bitmapData)
-                                imageData.bitmapData = null;
-                        }
-                    }
-                    catch(error:Error)
-                    {
-                        // Ignore any errors trying to access the Bitmap
-                        // b/c we may cause a security violation trying to do it
-                    }
-
-                    if (_swfBridge)
-                    {
-                        var request:SWFBridgeEvent = new SWFBridgeEvent(
-                                                        SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING,
-                                                        false, false,
-                                                        _swfBridge);
-                         _swfBridge.dispatchEvent(request);
-                    }
-
-                    // try the new "unloadAndStop" in FP10. If not available
-                    // then call unload.
-                    if (useUnloadAndStop && "unloadAndStop" in contentHolder)
-                        contentHolder["unloadAndStop"](unloadAndStopGC);
-                    else
-                        Loader(contentHolder).unload();
-
-                    if (!explicitLoaderContext)
-                        _loaderContext = null;
-                }
-                else
-                {
-                    if (contentHolder is Bitmap)
-                    {
-                        imageData = Bitmap(contentHolder);
-                        if (imageData.bitmapData)
-                            imageData.bitmapData = null;
-                    }
-                }
-            }
-            else
-            {
-                if (contentHolder is Loader)
-                {
-                    try
-                    {
-                        Loader(contentHolder).close();
-                    }
-                    catch(error:Error)
-                    {
-                        // Ignore any errors thrown by close()
-                    }
-                }
-            }
-
-            // when SWFLoader/Image is used with renderer
-            // recycling and the content is a DisplayObject instance
-            // the instance can be stolen from us while
-            // we're on the free list
-            try
-            {
-                if (contentHolder.parent == this)
-                    removeChild(contentHolder);
-            }
-            catch(error:Error)
-            {
-                try
-                {
-                    // just try to remove it anyway
-                    removeChild(contentHolder);
-                }
-                catch(error1:Error)
-                {
-                    // Ignore any errors thrown by removeChild()
-                }
-            }
-
-            contentHolder = null;
-        }
-
+
+        unloadContent();
+
         isContentLoaded = false;
         brokenImage = false;
         useUnloadAndStop = false;
@@ -1659,6 +1567,119 @@
         return rect;
     }

+
+    /**
+     *  @private
+     *
+     *  Unload any existing content.
+     */
+    private function unloadContent():void
+    {
+        if (contentHolder)
+        {
+            if (isContentLoaded)
+            {
+                // can get rid of bitmap data if it's an image on unload
+                // this helps with garbage collection (SDK-9533)
+                var imageData:Bitmap;
+
+                if (contentHolder is Loader)
+                {
+                    var contentLoader:Loader = Loader(contentHolder);
+
+                    try
+                    {
+                        if (contentLoader.content is Bitmap)
+                        {
+                            imageData = Bitmap(contentLoader.content);
+                            if (imageData.bitmapData)
+                                imageData.bitmapData = null;
+                        }
+                    }
+                    catch(error:Error)
+                    {
+                        // Ignore any errors trying to access the Bitmap
+                        // b/c we may cause a security violation trying to do it
+                    }
+
+                    if (_swfBridge)
+                    {
+                        var request:SWFBridgeEvent = new SWFBridgeEvent(
+                            SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING,
+                            false, false,
+                            _swfBridge);
+                        _swfBridge.dispatchEvent(request);
+                    }
+
+                    if (contentLoader.contentLoaderInfo.contentType == "application/x-shockwave-flash" &&
+                        contentLoader.contentLoaderInfo.parentAllowsChild &&
+                        contentLoader.contentLoaderInfo.childAllowsParent &&
+                        contentLoader.content)
+                    {
+                        contentLoader.content.removeEventListener(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST,
+                            loader_content_getFlexModuleFactoryRequestHandler);
+                    }
+
+                    if (useUnloadAndStop)
+                        contentLoader.unloadAndStop(unloadAndStopGC);
+                    else
+                        contentLoader.unload();
+
+                    if (!explicitLoaderContext)
+                        _loaderContext = null;
+                }
+                else
+                {
+                    if (contentHolder is Bitmap)
+                    {
+                        imageData = Bitmap(contentHolder);
+                        if (imageData.bitmapData)
+                            imageData.bitmapData = null;
+                    }
+                }
+            }
+            else
+            {
+                if (contentHolder is Loader)
+                {
+                    try
+                    {
+                        Loader(contentHolder).close();
+                    }
+                    catch(error:Error)
+                    {
+                        // Ignore any errors thrown by close()
+                    }
+                }
+            }
+
+            // when SWFLoader/Image is used with renderer
+            // recycling and the content is a DisplayObject instance
+            // the instance can be stolen from us while
+            // we're on the free list
+            try
+            {
+                if (contentHolder.parent == this)
+                    removeChild(contentHolder);
+            }
+            catch(error:Error)
+            {
+                try
+                {
+                    // just try to remove it anyway
+                    removeChild(contentHolder);
+                }
+                catch(error1:Error)
+                {
+                    // Ignore any errors thrown by removeChild()
+                }
+            }
+
+            contentHolder = null;
+        }
+
+    }
+
     /**
      *  @private
      *  If changes are made to this method, make sure to look at
@@ -2246,13 +2267,14 @@
         var loaderInfo:LoaderInfo = LoaderInfo(event.target);
         addInitSystemManagerCompleteListener(loaderInfo.loader.contentLoaderInfo);

-//        Comment out for Beta2. Part of Per-Module Styles feature.
-//        if (loaderInfo.parentAllowsChild && loaderInfo.childAllowsParent
-//            && loaderInfo.content)
-//        {
-//            loaderInfo.content.addEventListener(Request.GET_FLEX_MODULE_FACTORY_REQUEST,
-//                                            loader_content_getFlexModuleFactoryRequestHandler);
-//        }
+        // Listen for requests to get the flex module factory.
+        if (loaderInfo.contentType == "application/x-shockwave-flash" &&
+            loaderInfo.parentAllowsChild && loaderInfo.childAllowsParent &&
+            loaderInfo.content)
+        {
+            loaderInfo.content.addEventListener(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST,
+                                            loader_content_getFlexModuleFactoryRequestHandler);
+        }

     }

@@ -2393,14 +2415,6 @@
         {
             var contentLoaderInfo:LoaderInfo = Loader(contentHolder).contentLoaderInfo
             removeInitSystemManagerCompleteListener(contentLoaderInfo);
-
-//            Comment out for Beta2. Part of Per-Module Styles feature.
-//            if (contentLoaderInfo.content && contentLoaderInfo.parentAllowsChild &&
-//                contentLoaderInfo.childAllowsParent)
-//            {
-//                contentLoaderInfo.content.removeEventListener(Request.GET_FLEX_MODULE_FACTORY_REQUEST,
-//                    loader_content_getFlexModuleFactoryRequestHandler);
-//            }
         }

     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 11163
Author:   dloverin@adobe.com
Date:     2009-10-26T20:35:33.260693Z

Log Message:
-----------
Changes to turn on the per-module style feature by default.

The feature can be turned off by compiling with -isolateStyles=false.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex, Paul
Tests run: checkintests, all mustella
Is noteworthy for integration: Yes.

Summary of changes:

frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as
Propagate the module factory in setFlexContent.

frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
Implement IFlexModule

frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as
Move getting style declaration from the constructor to the override of the module factory setter.

frameworks/projects/framework/src/mx/controls/Alert.as
Set moduleFactory to parent if parent is an IFlexModuleFactory.

frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/framework/src/mx/controls/RadioButton.as
Move getting style declaration from the constructor to the override of the module factory setter.

frameworks/projects/framework/src/mx/controls/SWFLoader.as
Handle the “get parent module factory” request from an embedded swf.

frameworks/projects/framework/src/mx/core/Container.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/framework/src/mx/core/UIComponent.as
Defer setting styles until a module factory is set.

frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as
Set the module factory of an added child.

frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as
Set the module factory of the tooltip to be the same as the target.

frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
Rename parameter based on PARB feedback.

frameworks/projects/framework/src/mx/styles/IStyleModule.as
Add setStyleDeclarations per spec.

frameworks/projects/framework/src/mx/styles/StyleManager.as
Deprecate old static StyleManager API.

frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as
Use IStyleModule.setStyleDeclarations.

frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
A fix to get the correct style manager and pass styleManager in CSSStyleDeclaration.

frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as
Pass styleManager in CSSStyleDeclaration.

frameworks/projects/spark/src/spark/components/Group.as
Propagate moduleFactory in elementAdded().

modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java
Rename –create-style-manager option to –isloateStyles. The option has been changed from hidden to advanced.

modules/compiler/src/java/flex2/compiler/css/StyleDef.vm
Fix bug to not add a default factory that is not needed.

modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDef.vm
Initialize styles in a module factory setter override.

modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm
Changed emitComponentInitializers_1 to not emit style related code if the document implements IFlexModule. Created emitComponentStyleInitializers to emit those styles.

modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
Generate code to match ClassDef.vm and ClassDefLib.vm changes.

modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
Add IFlexModuleFactory to standard imports.

modules/compiler/src/java/flex2/configuration_en.properties
Rename –create-style-manager option to –isloateStyles.

modules/compiler/src/java/flex2/tools/PreLink.java
Rename –create-style-manager option to –isloateStyles.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.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/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.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/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/framework/src/mx/controls/SWFLoader.as
+++ frameworks/projects/framework/src/mx/controls/SWFLoader.as
@@ -38,6 +38,7 @@
 import mx.core.FlexGlobals;
 import mx.core.FlexLoader;
 import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
 import mx.core.ISWFLoader;
 import mx.core.IUIComponent;
 import mx.core.UIComponent;
@@ -1617,9 +1618,11 @@
                         contentLoader.content)
                     {
                         contentLoader.content.removeEventListener(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST,
-                            loader_content_getFlexModuleFactoryRequestHandler);
+                            contentHolder_getFlexModuleFactoryRequestHandler);
                     }

+                    contentHolder.removeEventListener(Event.ADDED, contentHolder_addedHandler);
+
                     if (useUnloadAndStop)
                         contentLoader.unloadAndStop(unloadAndStopGC);
                     else
@@ -1727,15 +1730,19 @@
         if (cls)
         {
             contentHolder = child = new cls();
+            contentHolder.addEventListener(Event.ADDED, contentHolder_addedHandler, false, 0, true);
             addChild(child);
             contentLoaded();
-
         }
         else if (classOrString is DisplayObject)
         {
             contentHolder = child = DisplayObject(classOrString);
             addChild(child);
             contentLoaded();
+
+            // Listen for requests to get the flex module factory.
+            contentHolder.addEventListener(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST,
+                                   contentHolder_getFlexModuleFactoryRequestHandler);
         }
         else if (byteArray)
         {
@@ -2273,7 +2280,7 @@
             loaderInfo.content)
         {
             loaderInfo.content.addEventListener(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST,
-                                            loader_content_getFlexModuleFactoryRequestHandler);
+                                            contentHolder_getFlexModuleFactoryRequestHandler);
         }

     }
@@ -2425,12 +2432,37 @@
      *  @param request Use type Event instead of Request because the event may be send from
      *  another ApplicationDomain (A.2).
      */
-    public function loader_content_getFlexModuleFactoryRequestHandler(request:Event):void
+    private function contentHolder_getFlexModuleFactoryRequestHandler(request:Event):void
     {
         if ("value" in request)
             request["value"] = moduleFactory;
     }

+    /**
+     *  @private
+     *
+     *  Used when we are loading a class. If the embedded class is a SWF, then wait for
+     *  the added event where the target is a IFlexModuleFactory. This will be message after
+     *  the event for the class being added.
+     *
+     *  All this is done to support the module factory parent request when loading an
+     *  embedded swf.
+     */
+    private function contentHolder_addedHandler(event:Event):void
+    {
+        if (event.target == contentHolder)
+            return;  // wait for next message
+
+        if (event.target is IFlexModuleFactory)
+        {
+            // Listen for requests to get the flex module factory.
+            event.target.addEventListener(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST,
+                                          contentHolder_getFlexModuleFactoryRequestHandler);
+        }
+
+        contentHolder.removeEventListener(Event.ADDED, contentHolder_addedHandler);
+    }
+
     /**
      *      @private
      *


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

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

 package mx.utils
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/mx/src/mx/effects/RemoveChildAction.as
+++ frameworks/projects/mx/src/mx/effects/RemoveChildAction.as
@@ -23,6 +23,8 @@
 //--------------------------------------

 [Exclude(name="duration", kind="property")]
+
+[Alternative(replacement="spark.effects.RemoveAction", since="4.0")]

 /**
  *  The RemoveChildAction class defines an action effect that corresponds


Transferred from the Adobe Open Source Subversion Repository

Revision: 16796
Author:   tkraikit@adobe.com
Date:     2010-07-02T17:25:28.540380Z

Log Message:
-----------
Fix for bug 26734: ComboBox does not require a TextInput to be present, but a number of references in the code assume existence of one. Added null checks.

QE notes: none
Doc notes: none
Bugs: SDK-26734
Reviewer: jszeto
Tests run: checkintests mustella
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as

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

--- frameworks/projects/spark/src/spark/components/ComboBox.as
+++ frameworks/projects/spark/src/spark/components/ComboBox.as
@@ -586,8 +586,9 @@
         {
             setSelectedIndex(actualProposedSelectedIndex, true);
         }
-
-        textInput.selectRange(-1, -1);
+
+		if (textInput)
+			textInput.selectRange(-1, -1);

         userTypedIntoText = false;
     }
@@ -729,9 +730,9 @@
         if (newIndex >= 0)
         {
             var item:Object = dataProvider ? dataProvider.getItemAt(newIndex) : undefined;
-            if (item)
+            if (item && textInput)
             {
-                var itemString:String = itemToLabel(item);
+                var itemString:String = itemToLabel(item);
                 textInput.selectAll();
                 textInput.insertText(itemString);
                 textInput.selectAll();
@@ -786,7 +787,8 @@
         else if (event.keyCode == Keyboard.ESCAPE)
         {
             // Restore the previous selectedItem
-            textInput.text = itemToLabel(selectedItem);
+			if (textInput)
+				textInput.text = itemToLabel(selectedItem);
             changeHighlightedSelection(selectedIndex);
         }
     }
@@ -796,7 +798,7 @@
      */
     override public function setFocus():void
     {
-        if (stage)
+        if (stage && textInput)
         {
             stage.focus = textInput.textDisplay;
         }
@@ -807,6 +809,9 @@
      */
     override protected function isOurFocus(target:DisplayObject):Boolean
     {
+		if (!textInput)
+			return false;
+
         return target == textInput.textDisplay;
     }

@@ -837,7 +842,8 @@
         // always commit the selection if we focus out
         if (!isDropDownOpen)
         {
-            if (textInput.text != itemToLabel(selectedItem))
+            if (textInput &&
+				textInput.text != itemToLabel(selectedItem))
                 applySelection();
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18962
Author:   smgilson@adobe.com
Date:     2010-12-02T17:25:41.181545Z

Log Message:
-----------
ASDoc updates for DataGrid.as

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -62,10 +62,17 @@

 /**
  *  Used to initialize the DataGrid's rowBackground skin part.
- *  If defined, the alternatingRowColorsBackground
- *  skin part is used to render row backgrounds whose
- *  fill color is defined by successive entries
- *  in the array value of this style.
+ *  If the alternatingRowColors style is specified,
+ *  then use the alternatingRowColorsBackground skin part
+ *  as the value of the rowBackground skin part.
+ *  The alternating colors for the grid rows are defined by
+ *  successive entries in the Array value of this style.
+ *
+ *
If you want to change how this style is rendered,
+ *  replace the alternatingRowColorsBackground skin part
+ *  in the DataGridSkin class.
+ *  If you want to specify the background for each row, then
+ *  initialize the rowBackground skin part directly.

  *
  *  @default undefined
  *
@@ -248,6 +255,9 @@
  *  Dispatched by the grid skin part when the caret position, size, or
  *  visibility has changed due to user interaction or being programmatically set.
  *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

+ *
  *  @eventType spark.events.GridCaretEvent.CARET_CHANGE
  *
  *  @langversion 3.0
@@ -260,6 +270,9 @@
 /**
  *  Dispatched by the grid skin part when the mouse button
  *  is pressed over a grid cell.
+ *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

  *
  *  @eventType spark.events.GridEvent.GRID_MOUSE_DOWN
  *
@@ -274,6 +287,9 @@
  *  Dispatched by the grid skin part after a gridMouseDown event
  *  if the mouse moves before the button is released.
  *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

+ *
  *  @eventType spark.events.GridEvent.GRID_MOUSE_DRAG
  *
  *  @langversion 3.0
@@ -286,6 +302,9 @@
 /**
  *  Dispatched by the grid skin part after a gridMouseDown event
  *  when the mouse button is released, even if the mouse is no longer within the grid.
+ *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

  *
  *  @eventType spark.events.GridEvent.GRID_MOUSE_UP
  *
@@ -299,6 +318,9 @@
 /**
  *  Dispatched by the grid skin part when the mouse enters a grid cell.
  *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

+ *
  *  @eventType spark.events.GridEvent.GRID_ROLL_OVER
  *
  *  @langversion 3.0
@@ -310,6 +332,9 @@

 /**
  *  Dispatched by the grid skin part when the mouse leaves a grid cell.
+ *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

  *
  *  @eventType spark.events.GridEvent.GRID_ROLL_OUT
  *
@@ -321,7 +346,10 @@
 [Event(name="gridRollOut", type="spark.events.GridEvent")]

 /**
- *  Dispatched by the grid skin part when the mouse is clicked over a cell
+ *  Dispatched by the grid skin part when the mouse is clicked over a cell.
+ *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

  *
  *  @eventType spark.events.GridEvent.GRID_CLICK
  *
@@ -333,7 +361,10 @@
 [Event(name="gridClick", type="spark.events.GridEvent")]

 /**
- *  Dispatched by the grid skin part when the mouse is double-clicked over a cell
+ *  Dispatched by the grid skin part when the mouse is double-clicked over a cell.
+ *
+ *
To handle this event, assign an event handler to the grid skin part
+ *  of the DataGrid control.

  *
  *  @eventType spark.events.GridEvent.GRID_DOUBLE_CLICK
  *
@@ -1249,7 +1280,7 @@
      *  A flag that indicates whether the IME should
      *  be enabled when the component receives focus.
      *
-     *  If the editor is up, it sets this property
+     *  If the item editor is open, it sets this property
      *  accordingly.
      *
      *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

Revision: 4211
Author:   jszeto@adobe.com
Date:     2008-12-02T00:51:56.799456Z

Log Message:
-----------
GraphicElement re-layering optimization and removal of change events

SDK-18055 Optimize invalidation of layering for GraphicElements

For the properties that affect whether GraphicElement needs a displayObject, in their setters we add checks to see if we need to recalculate layering.

SDK-18054  Remove non-critical change events from GraphicElement

Removed a bunch of change events from properties that only get set programmatically.

QE Notes: Most change events from GraphicElement and its subclasses have been removed
Doc Notes:
Bugs: SDK-18054, SDK-18055
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -333,9 +333,7 @@
             mx_internal::_text = null;
             textChanged = false;

-            var oldValue:Object = _content;
             _content = value;
-            dispatchPropertyChangeEvent("content", oldValue, value);

             invalidateTextLines("content");
             invalidateSize();


Transferred from the Adobe Open Source Subversion Repository

Revision: 3441
Author:   hmuller@adobe.com
Date:     2008-10-01T18:07:00.685329Z

Log Message:
-----------
Fixed bug 17125

Restored break statements that had gone missing in a refactoring
of VerticalLayout::verticalScrollPositionDelta() and in
HozitonalLayout::horizontalScrollPositionDelta().

QE: No
Doc: No
Checkintests: Pass
Reviewer: Evtim
Bugs:
  SDK-17125 - RTE when scrolling DataGroup using keyboard

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

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -584,6 +584,7 @@
                 if (inView(firstIndex) >= 1)
                    firstIndex = Math.max(0, firstIndex -1);
                 itemR = itemScan(g, firstIndex, -1);
+                break;
             }

             // Compute the bounds of the rightmost item that's not
@@ -598,6 +599,7 @@
                 if (inView(lastIndex) >= 1)
                    lastIndex = Math.min(maxIndex, lastIndex + 1);
                 itemR = itemScan(g, lastIndex, +1);
+                break;
             }
         }


Fixed compiler bug introduced in recent commit.

Change-Id: I06e3ab173b678ea65012183047b98a8e17dd3b87

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -834,15 +834,10 @@
 			var rightBracket:String;
 			while (true)
 			{
-				// find first closing bracket
+				// find first closing bracket or '.' or '..'
 				for (close = 0; close < tokens.length; close++)
-					if ('])}'.indexOf(tokens[close]) >= 0)
+					if ('..])}'.indexOf(tokens[close]) >= 0)
 						break;
-				// if no closing bracket found, find first '.' or '..'
-				if (close == tokens.length)
-					for (close = 0; close < tokens.length; close++)
-						if ('..'.indexOf(tokens[close]) >= 0)
-							break;
 				if (close == tokens.length || close == 0)
 					break; // possible error, or no operator found

@@ -873,9 +868,17 @@
 				}

 				// handle access and descendants operators
-				if (tokens[open] == '.' || tokens[open] == '..')
+				if ('..'.indexOf(tokens[open]) == 0)
 				{
 					var propertyToken:String = tokens[open + 1] as String;
+
+					// special case for lone operator
+					if (open > 0 && token == OPERATOR_PREFIX && propertyToken == OPERATOR_SUFFIX)
+					{
+						tokens.splice(open - 1, 3, new CompiledConstant(OPERATOR_PREFIX + tokens[open] + OPERATOR_SUFFIX, operators[tokens[open]]));
+						continue;
+					}
+
 					if (!token || !propertyToken || operators.hasOwnProperty(propertyToken))
 						break; // error


Added function getQKeys which accepts an array of generic objects and
returns an array of IQualifiedKey obejcts.

Change-Id: I1d4c858b7d038259d010ffd5b417bb388a88ccc2

--- WeaveData/src/weave/utils/ColumnUtils.as
+++ WeaveData/src/weave/utils/ColumnUtils.as
@@ -133,9 +133,61 @@
 		}

 		/**
+		 * Gets an array of QKey objects from column which meet the criteria
+		 * min <= getNumber(column, key) <= max, where key is a QKey
+		 * in column.
+		 * @param min The minimum value for the keys
+		 * @param max The maximum value for the keys
+		 * @param inclusiveRange A boolean specifying whether the range includes the min and max values.
+		 * Default value is true.
+		 * @return An array QKey objects.
+		 */
+		public static function getQKeysInNumericRange(column:IAttributeColumn, min:Number, max:Number, inclusiveRange:Boolean = true):Array
+		{
+			var result:Array = [];
+			var keys:Array = column.keys;
+			for each (var qkey:IQualifiedKey in keys)
+			{
+				var number:Number = getNumber(column, qkey);
+				var isInRange:Boolean = false;
+				if (inclusiveRange)
+					isInRange = min <= number && number <= max;
+				else
+					isInRange = min < number && number < max;
+
+				if (isInRange)
+					result.push(qkey);
+			}
+
+			return result;
+		}
+
+		/**
+		 * This is mostly a convenience function to call through Javascript. For example,
+		 * a user could invoke 'KeySet.replaceKeys( getQKeys(keyObjects) )' where keyObjects
+		 * is an array of generic objects in Javascript.
+		 * @param genericObjects An array of generic objects with keyType
+		 * and localName properties.
+		 * @return An array of IQualifiedKey objects.
+		 *
+		 */
+		public static function getQKeys(genericObjects:Array):Array
+		{
+			var result:Array = [];
+
+			for each (var key:Object in genericObjects)
+			{
+				var qkey:IQualifiedKey = getQKey(key);
+				result.push(qkey);
+			}
+
+			return result;
+		}
+
+		/**
 		 * Get the QKey corresponding to object.keyType
 		 * and object.localName.
-		 *
+		 *
 		 * @param object An object with properties keyType
 		 * and localName.
 		 * @return An IQualifiedKey object.


Why didn't I join these lines?

Why didn't I join these lines?

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5231 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/crowd/data/OccupantInfo.as
+++ src/as/com/threerings/crowd/data/OccupantInfo.as
@@ -100,8 +100,7 @@
      */
     public function clone () :Object
     {
-        var that :OccupantInfo =
-            ClassUtil.newInstance(this) as OccupantInfo;
+        var that :OccupantInfo = ClassUtil.newInstance(this) as OccupantInfo;
         that.bodyOid = this.bodyOid;
         that.username = this.username;
         that.status = this.status;


Fix call super test case.

Fix call super test case.

--- src/avm2/tests/regress/correctness/callsuper7.as
+++ src/avm2/tests/regress/correctness/callsuper7.as
@@ -51,11 +51,5 @@
     }
   }

-  // var c = new ClassC();
-  // var e = new ClassE();
-
-  class X {
-    protected var
-  }
   trace("--");
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4487
Author:   gauravj@adobe.com
Date:     2009-01-12T19:14:21.035257Z

Log Message:
-----------
Fix build.. it didn't like the @Embed in the asdoc comment so changing @ to &64;

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateShaderTransitionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateShaderTransition.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as
@@ -91,9 +91,9 @@
      *   shaderEffect.shaderCode = ShaderCodeClass;
      *   shaderEffect.shaderProperties = {direction : 1};</listing>
      * or in MXML code, this:<listing version="3.0">
-     *   <FxAnimateShaderTransition
-     *       shaderCode="@Embed(source="MyShader.pbj", mimeType="application/octet-stream")"
-     *       shaderProperties="{{direction : 1}}}"/>
+     *   <FxAnimateShaderTransition
+     *       shaderCode="&64;Embed(source="MyShader.pbj", mimeType="application/octet-stream")"
+     *       shaderProperties="{{direction : 1}}}"/>
      * </listing>
      *
      * @see flash.display.Shader


Fixed displaying tooltips while deploying module

--- src/LevelStates/LevelState.as
+++ src/LevelStates/LevelState.as
@@ -562,7 +562,7 @@
 				return null;

 			for each (var dModule:DModule in displayModules)
-				if (dModule.module.exists && dModule.overlapsPoint(U.mouseFlxLoc))
+				if (dModule.module.exists && dModule.module.deployed && dModule.overlapsPoint(U.mouseFlxLoc))
 					return dModule.module;
 			return null;
 		}


Fixed test UI not scrolling, cancel not wokring

--- src/LevelStates/LevelState.as
+++ src/LevelStates/LevelState.as
@@ -59,6 +59,7 @@
 		protected var displayDelay:DDelay;
 		protected var preserveModule:Boolean;
 		protected var testText:FlxText;
+		protected var testBG:FlxSprite;
 		protected var lastRunTime:Number;
 		protected var runningDisplayTest:Boolean;

@@ -1159,13 +1160,20 @@
 		}

 		protected function checkTestControls():void {
-			if (FlxG.mouse.justPressed() || ControlSet.CANCEL_KEY.justPressed())
+			if (FlxG.mouse.justPressed() || ControlSet.CANCEL_KEY.justPressed()) {
 				level.goal.endRun();
+				time.reset();
+			}
 		}

 		protected function drawTestText():void {
-			if (!testText)
+			if (!testText) {
 				testText = U.LABEL_FONT.configureFlxText(new FlxText(0, FlxG.height / 2, FlxG.width, " "), 0x000000, 'center');
+				testText.scrollFactor.x = testText.scrollFactor.y = 0;
+				testBG = new FlxSprite().makeGraphic(FlxG.width, FlxG.height, 0x80000000);
+				testBG.scrollFactor.x = testBG.scrollFactor.y = 0;
+			}
+			testBG.draw();
 			testText.text = "TESTING" + level.goal.getProgress() + "\nClick or " + ControlSet.CANCEL_KEY.key + " to cancel";
 			testText.y = FlxG.height / 2 - testText.height / 2;
 			testText.draw();


Transferred from the Adobe Open Source Subversion Repository

Revision: 22054
Author:   jasonsj@adobe.com
Date:     2011-08-17T18:31:43.331814Z

Log Message:
-----------
Adding new BitmapScaleMode.ZOOM scaling option for BitmapImage primitive and Image component. scaleMode="zoom" will fit the bitmap by scaling the smaller dimension ratio up or down such that one dimension fits the component dimension while the other is cropped based on horizontalAlign and verticalAlign values.

QE notes:
Doc notes:
Bugs: SDK-30046
Reviewer: jszeto
Tests run: checkintests, mustella BitmapImage and Image
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>

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

--- frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as
@@ -43,6 +43,18 @@
      *  @productversion Flex 4.5
      */
     public static const LETTERBOX:String = "letterbox";
+
+    /**
+     *  The bitmap fill is scaled and cropped such that the aspect
+     *  ratio of the original content is maintained and no letterbox
+     *  or pillar box is displayed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 11
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public static const ZOOM:String = "zoom";
 }

 }


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

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

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8207
Author:   smgilson@adobe.com
Date:     2009-06-24T22:55:28.494485Z

Log Message:
-----------
Fix ASDoc version tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/DropDownEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TrackBaseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/NumericStepper.as
+++ frameworks/projects/spark/src/spark/components/NumericStepper.as
@@ -347,9 +347,9 @@
      *  @default 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 get imeMode():String
     {
@@ -671,8 +671,8 @@
      */
     override protected function focusInHandler(event:FocusEvent):void
     {
-    	super.focusInHandler(event);
-    	addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
+        super.focusInHandler(event);
+        addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
     }

     /**
@@ -680,8 +680,8 @@
      */
     override protected function focusOutHandler(event:FocusEvent):void
     {
-    	super.focusOutHandler(event);
-    	removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
+        super.focusOutHandler(event);
+        removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
     }


Added override to set value to ensure it is not set to NaN

--- frameworks/projects/spark/src/spark/components/NumericStepper.as
+++ frameworks/projects/spark/src/spark/components/NumericStepper.as
@@ -740,6 +740,17 @@
     /**
      *  @private
      */
+    override public function set value(newValue:Number):void
+    {
+    	if(isNaN(newValue))
+    		newValue = 0;
+
+    	super.value = newValue;
+    }
+
+    /**
+     *  @private
+     */
     override protected function setValue(newValue:Number):void
     {
         super.setValue(newValue);


Added limits to custommodule size

Added limits to custommodule size

--- src/Modules/CustomModule.as
+++ src/Modules/CustomModule.as
@@ -212,7 +212,13 @@
 					}
 				}
 			}
-			return new CustomModule(clones);
+
+			var customModule:CustomModule = new CustomModule(clones);
+			if (customModule.outputs.length > 16 || customModule.inputs.length > 16 || customModule.controls.length > 16)
+				return null;
+			if (Math.max(customModule.outputs.length, customModule.inputs.length) * customModule.controls.length > 64)
+				return null;
+			return customModule;
 		}

 		private static function escapeModuleString(s:String):String {


def: 5769 if loop, don't clean media on PLAYER_PLAY_END

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@90256 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -599,8 +599,10 @@
 					break;

 				case NotificationType.PLAYER_PLAY_END:
-					cleanMedia();
-					kMediaPlayer.showThumbnail();
+					if (!player.loop) {
+						cleanMedia();
+						kMediaPlayer.showThumbnail();
+					}
 					break;
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17993
Author:   tkraikit@adobe.com
Date:     2010-10-01T21:23:33.939694Z

Log Message:
-----------
Fix for bugs 27924 and 27927: internals reworked to handle autostop when content is loaded via @Embed or from SWC

QE notes: n/a
Doc notes: n/a
Bugs: SDK-27924 and SDK-27927
Reviewer: Corey, Alex
Tests run: checkintests, mustella via cyclone server
Is noteworthy for integration: n/a

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/MovieClipSWFLoader.as</path>

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

--- frameworks/projects/framework/src/mx/controls/MovieClipSWFLoader.as
+++ frameworks/projects/framework/src/mx/controls/MovieClipSWFLoader.as
@@ -32,13 +32,13 @@
 public class MovieClipSWFLoader extends SWFLoader
 {
     include "../core/Version.as";
-
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  Constructor
      *
@@ -50,8 +50,6 @@
     public function MovieClipSWFLoader()
     {
         super();
-
-        addEventListener(Event.COMPLETE, handleComplete);
     }

     //--------------------------------------------------------------------------
@@ -92,7 +90,7 @@

         if (content is MovieClipLoaderAsset)
         {
-            // Get child MovieClip from Loader
+            // Obtain child MovieClip
             if (DisplayObjectContainer(content).numChildren > 0)
                 content =
                     Loader(DisplayObjectContainer(content).getChildAt(0)).content;
@@ -271,26 +269,56 @@
             movieClip.prevScene();
     }

-    //-----------------------------------
-    //  internal functions
-    //-----------------------------------
-
-
-    /**
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
      *  On completion of SWF loading, explicitly stop the SWF
      *  (i.e. prevent auto-play) if autoStop is true.
-     *
-     *  @private
-     *
-     *  @param event
-     *
-     */
-    private function handleComplete(event:Event):void
-    {
+     */
+    override protected function contentLoaded():void
+    {
+        super.contentLoaded();
         if (autoStop)
             stop();
-    }
-
-
+
+        // Special case for embeds where our embed class loader
+        // may not be complete just yet.
+        if (content is MovieClipLoaderAsset)
+        {
+            if (DisplayObjectContainer(content).numChildren > 0)
+            {
+                var childContent:DisplayObject = DisplayObjectContainer(content).getChildAt(0);
+                if (childContent is Loader && Loader(childContent).content == null)
+                    content.addEventListener(Event.ADDED, content_addedHandler, false, 0, true);
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event Handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Helper method used to auto-stop embedded SWF content that may not
+     *  have been fully loaded at the time contentLoaded() was invoked.
+     */
+    private function content_addedHandler(event:Event):void
+    {
+        if (event.target == content)
+            return;
+
+        if (autoStop)
+            stop();
+
+        content.removeEventListener(Event.ADDED, content_addedHandler);
+    }
 }
 }