Transferred from the Adobe Open Source Subversion Repository

Revision: 20003
Author:   eday@adobe.com
Date:     2011-01-28T18:58:55.975754Z

Log Message:
-----------
Bug fixes in Scroller and SliderBase

- Better handling of device orientation changes and invalid scroll positions
- Drag threshhold values ("slop") are DPI-independent
- Added event thinning to sliders

QE notes:
Doc notes:
Bugs: SDK-29281, SDK-29223, SDK-29213, SDK-29201
Reviewer: Glenn, Ryan
Tests run: checkintests
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -489,31 +489,6 @@

     /**
      *  @private
-     *  Threshold for number of pixels they must move to count as a horizontal scroll
-     */
-    private static const MIN_HORIZONTAL_SLOP:int = 20;
-
-    /**
-     *  @private
-     *  Threshold for number of pixels they must move to count as a vertical scroll
-     */
-    private static const MIN_VERTICAL_SLOP:int = 20;
-
-    /**
-     *  @private
-     *  Threshold for number of pixels they must move to count as a diagonal scroll
-     */
-    private static const MIN_DIAGONAL_SLOP:int = 20;
-
-    /**
-     *  @private
-     *  The amount of deceleration to apply to the velocity for each effect period
-     *  For a faster deceleration, you can switch this to 0.990.
-     */
-    private static const THROW_EFFECT_DECEL_FACTOR:Number = 0.998;
-
-    /**
-     *  @private
      *  The duration of the overshoot effect when a throw "bounces" against the end of the list.
      */
     private static const THROW_OVERSHOOT_TIME:int = 200;
@@ -590,6 +565,34 @@
      *  the vertical scroll bar should be hidden or not)
      */
     mx_internal var verticalScrollInProgress:Boolean = false;
+
+    /**
+     *  @private
+     *  Threshold for screen distance they must move to count as a horizontal scroll
+     *  Based on 20 pixels on a 252ppi device.
+     */
+    mx_internal var minHorizontalSlopInches:Number = 0.079365; // 20.0/252.0
+
+    /**
+     *  @private
+     *  Threshold for screen distance they must move to count as a vertical scroll
+     *  Based on 20 pixels on a 252ppi device.
+     */
+    mx_internal var minVerticalSlopInches:Number = 0.079365; // 20.0/252.0
+
+    /**
+     *  @private
+     *  Threshold for screen distance they must move to count as a diagonal scroll
+     *  Based on 20 pixels on a 252ppi device.
+     */
+    mx_internal var minDiagonalSlopInches:Number = 0.079365; // 20.0/252.0
+
+    /**
+     *  @private
+     *  The amount of deceleration to apply to the velocity for each effect period
+     *  For a faster deceleration, you can switch this to 0.990.
+     */
+    mx_internal var throwEffectDecelFactor:Number = 0.998;

     /**
      *  @private
@@ -725,13 +728,19 @@
      *  the container wrapped by the scroller receives focus,
      *  the Scroller scrolls that component into view if the keyboard is
      *  opening
-     */
+     */
     mx_internal var ensureElementIsVisibleForSoftKeyboard:Boolean = true;
-
+
     /**
      *  @private
      */
     private var lastFocusedElement:IVisualElement;
+
+    /**
+     *  @private
+     *  Used to detect when the device orientation (landscape/portrait) has changed
+     */
+    private var aspectRatio:String;

     /**
      *  @private
@@ -1049,7 +1058,7 @@

     /**
      *  @private
-     *  Helper function for checkScrollPositionsOnUpdateComplete.
+     *  Helper function for checkScrollPosition.
      */
     private function getMotionPathCurrentVelocity(mp:MotionPath,currentTime:Number,totalTime:Number):Number
     {
@@ -1071,10 +1080,14 @@
     /**
      *  @private
      */
-    private function checkScrollPositionsOnUpdateComplete(event:FlexEvent):void
-    {
-        viewport.removeEventListener(FlexEvent.UPDATE_COMPLETE,
-            checkScrollPositionsOnUpdateComplete);
+    private function checkScrollPosition():void
+    {
+        // Determine whether there's been a device orientation change
+        // Note:  the first time this code runs it may falsely appear as though an orientation
+        // change has occurred (aspectRatio is null).  This is okay since there will be no
+        // throw animation playing, so orientationChange will not be acted upon.
+        var orientationChange:Boolean = aspectRatio != FlexGlobals.topLevelApplication.aspectRatio;
+        aspectRatio = FlexGlobals.topLevelApplication.aspectRatio;

         var curVelocity:Point;

@@ -1092,48 +1105,83 @@
         if (throwEffect && throwEffect.isPlaying && (didNotThrowFarEnough || threwTooFar))
         {
             // There's currently a throw animation playing, and it's throwing to a
-            // now-incorrect position.  We're going to stop the animation and start
-            // a better one to continue the throw.
-
-            var velX:Number = 0;
-            var velY:Number = 0;
-
-            // Get the current position of the existing throw animation
-            var effectTime:Number = throwEffect.playheadTime;
-
-            // It's possible for playheadTime to not be set if we're getting it
-            // before the first animation timer call.
-            if (isNaN(effectTime))
-                effectTime = 0;
-
-            var effectDuration:Number = throwEffect.duration;
-
-            // Now get the current effective velocity for each motionpath in the animation.
-            for (var t:int = 0; t < throwEffect.motionPaths.length; t++)
+            // now-incorrect position.
+            if (orientationChange)
             {
-                var vel:Number = getMotionPathCurrentVelocity(throwEffect.motionPaths[t], effectTime, effectDuration);
-
-                // The property can only either be horizontalScrollPosition or verticalScrollPosition
-                if (throwEffect.motionPaths[t].property == "horizontalScrollPosition")
-                    velX = vel;
-                else
-                    velY = vel;
+                // The throw end position became invalid because the device
+                // orientation changed.  In this case, we just want to stop
+                // the throw animation and snap to valid positions.  We don't
+                // want to animate to the final position because this may
+                // require changing directions relative to the current throw,
+                // which looks strange.
+                throwEffect.stop();
+                if (viewport.verticalScrollPosition > maxVSP)
+                    viewport.verticalScrollPosition = maxVSP;
+                if (viewport.horizontalScrollPosition > maxHSP)
+                    viewport.horizontalScrollPosition = maxHSP;
             }
-
-            // Stop the existing throw animation now that we've determined its current velocities.
-            stoppedPreemptively = true;
-            throwEffect.stop();
-
-            // Now perform a new throw to get us to the right position.
-            performThrow(-velX, -velY);
+            else
+            {
+                // The size of the content may have changed during the throw.
+                // In this case, we'll stop the current animation and start
+                // a new one that gets us to the correct position.
+
+                var velX:Number = 0;
+                var velY:Number = 0;
+
+                // Get the current position of the existing throw animation
+                var effectTime:Number = throwEffect.playheadTime;
+
+                // It's possible for playheadTime to not be set if we're getting it
+                // before the first animation timer call.
+                if (isNaN(effectTime))
+                    effectTime = 0;
+
+                var effectDuration:Number = throwEffect.duration;
+
+                // Now get the current effective velocity for each motionpath in the animation.
+                for (var t:int = 0; t < throwEffect.motionPaths.length; t++)
+                {
+                    var vel:Number = getMotionPathCurrentVelocity(throwEffect.motionPaths[t], effectTime, effectDuration);
+
+                    // The property can only either be horizontalScrollPosition or verticalScrollPosition
+                    if (throwEffect.motionPaths[t].property == "horizontalScrollPosition")
+                        velX = vel;
+                    else
+                        velY = vel;
+                }
+
+                // Stop the existing throw animation now that we've determined its current velocities.
+                stoppedPreemptively = true;
+                throwEffect.stop();
+
+                // Now perform a new throw to get us to the right position.
+                performThrow(-velX, -velY);
+            }
         }
         else if (!inTouchInteraction)
         {
             // No touch interaction is in effect, but the content may be sitting at
-            // a scroll position that is now invalid.  Note that performThrow will
-            // only actually perform a throw if the positions actually are invalid.
-            performThrow(0, 0);
-        }
+            // a scroll position that is now invalid.  If so, snap the content to
+            // a valid position.  The most likely reason we get here is that the
+            // device orientation changed while the content is stationary (i.e. not
+            // in an animated throw)
+            if (viewport.verticalScrollPosition > maxVSP)
+                viewport.verticalScrollPosition = maxVSP;
+            if (viewport.horizontalScrollPosition > maxHSP)
+                viewport.horizontalScrollPosition = maxHSP;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function checkScrollPositionsOnUpdateComplete(event:FlexEvent):void
+    {
+        viewport.removeEventListener(FlexEvent.UPDATE_COMPLETE,
+            checkScrollPositionsOnUpdateComplete);
+
+        checkScrollPosition();
     }

     /**
@@ -1165,7 +1213,7 @@
     override protected function focusInHandler(event:FocusEvent):void
     {
         super.focusInHandler(event);
-
+
         // When we gain focus, make sure the focused element is visible
         if (viewport && ensureElementIsVisibleForSoftKeyboard)
         {
@@ -1176,9 +1224,9 @@

     /**
      *  @private
-     */
+     */
     override protected function focusOutHandler(event:FocusEvent):void
-    {
+        {
         super.focusOutHandler(event);
         lastFocusedElement = null;
     }
@@ -1191,11 +1239,8 @@
         if (getStyle("interactionMode") == InteractionMode.TOUCH)
         {
             // When the orientation (landscape/portrait) changes, then the valid
-            // scroll position ranges may have changed.  In this case, we need to
-            // schedule an updateComplete handler to check and potentially correct
-            // the scroll positions.
-            viewport.addEventListener(FlexEvent.UPDATE_COMPLETE,
-                checkScrollPositionsOnUpdateComplete);
+            // scroll position ranges may have changed.
+            checkScrollPosition();
         }
     }

@@ -1430,7 +1475,7 @@
     //  Touch scrolling methods
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  @private
      *  Add touch listeners
@@ -1477,8 +1522,8 @@
             // We want to solve for "time" in this equasion: velocity*(decel^time)-0.01 = 0.
             // Note that we are only calculating an effect duration here.  The actual curve of our throw velocity is determined by
             // the exponential easing function we use between animation keyframes.
-            var throwTimeX:int = velocityX == 0 ? 0 : (Math.log(0.01 / (Math.abs(velocityX)))) / Math.log(THROW_EFFECT_DECEL_FACTOR);
-            var throwTimeY:int = velocityY == 0 ? 0 : (Math.log(0.01 / (Math.abs(velocityY)))) / Math.log(THROW_EFFECT_DECEL_FACTOR);
+            var throwTimeX:int = velocityX == 0 ? 0 : (Math.log(0.01 / (Math.abs(velocityX)))) / Math.log(throwEffectDecelFactor);
+            var throwTimeY:int = velocityY == 0 ? 0 : (Math.log(0.01 / (Math.abs(velocityY)))) / Math.log(throwEffectDecelFactor);

             if (scrollerLayout.canScrollHorizontally && scrollerLayout.canScrollVertically)
             {
@@ -1826,9 +1871,10 @@
                 if (!touchScrollHelper)
                 {
                     touchScrollHelper = new TouchScrollHelper(this);
-                    touchScrollHelper.horizontalSlop = MIN_HORIZONTAL_SLOP;
-                    touchScrollHelper.verticalSlop = MIN_VERTICAL_SLOP;
-                    touchScrollHelper.diagonalSlop = MIN_DIAGONAL_SLOP;
+                    var dpi:Number = flash.system.Capabilities.screenDPI;
+                    touchScrollHelper.horizontalSlop = minHorizontalSlopInches * dpi;
+                    touchScrollHelper.verticalSlop = minVerticalSlopInches * dpi;
+                    touchScrollHelper.diagonalSlop = minDiagonalSlopInches * dpi;
                 }
             }
             else
@@ -2232,7 +2278,7 @@

         touchScrollHelper.startScrollWatch(event);
     }
-
+
     /**
      *  @private
      */
@@ -2240,7 +2286,7 @@
     {
         var xMove:int = 0;
         var yMove:int = 0;
-
+
         if (scrollerLayout && scrollerLayout.canScrollHorizontally)
             xMove = dragX;

@@ -2276,7 +2322,7 @@
         // clamp the values here
         newHSP = Math.min(Math.max(newHSP, -viewportWidth), maxWidth+viewportWidth);
         newVSP = Math.min(Math.max(newVSP, -viewportHeight), maxHeight+viewportHeight);
-
+
         viewport.horizontalScrollPosition = newHSP;
         viewport.verticalScrollPosition = newVSP;
     }
@@ -2343,141 +2389,141 @@
         // scrollbars in overlay mode
         skin.invalidateDisplayList();
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Text selection auto scroll
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  When true, use the text selection scroll behavior instead of the
-     *  typical "throw" behavior. This is only used when interactionMode="touch"
-     */
-    mx_internal var textSelectionAutoScrollEnabled:Boolean = false;
-    private var textSelectionAutoScrollTimer:Timer;
-    private var minTextSelectionVScrollPos:int = 0;
-    private var maxTextSelectionVScrollPos:int = -1;
-    private var minTextSelectionHScrollPos:int = 0;
-    private var maxTextSelectionHScrollPos:int = -1;
-    private static const TEXT_SELECTION_AUTO_SCROLL_FPS:int = 10;
-
-    /**
-     *  @private
-     *  Change scroll behavior when selecting text.
-     */
-    mx_internal function enableTextSelectionAutoScroll(enable:Boolean,
-                       minHScrollPosition:int = 0, maxHScrollPosition:int = -1,
-                       minVScrollPosition:int = 0, maxVScrollPosition:int = -1):void
-    {
-        if (getStyle("interactionMode") == InteractionMode.TOUCH)
-        {
-            this.textSelectionAutoScrollEnabled = enable;
-            this.minTextSelectionHScrollPos = minHScrollPosition;
-            this.maxTextSelectionHScrollPos = maxHScrollPosition;
-            this.minTextSelectionVScrollPos = minVScrollPosition;
-            this.maxTextSelectionVScrollPos = maxVScrollPosition;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    mx_internal function setUpTextSelectionAutoScroll():void
-    {
-        if (!textSelectionAutoScrollTimer)
-        {
-            textSelectionAutoScrollTimer = new Timer(1000 / TEXT_SELECTION_AUTO_SCROLL_FPS);
-            textSelectionAutoScrollTimer.addEventListener(TimerEvent.TIMER,
-                textSelectionAutoScrollTimerHandler);
-
-            textSelectionAutoScrollTimer.start();
-        }
-    }
-
-    /**
-     *  @private
-     */
-    mx_internal function stopTextSelectionAutoScroll():void
-    {
-        if (textSelectionAutoScrollTimer)
-        {
-            textSelectionAutoScrollTimer.stop();
-            textSelectionAutoScrollTimer.removeEventListener(TimerEvent.TIMER,
-                textSelectionAutoScrollTimerHandler);
-            textSelectionAutoScrollTimer = null;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    private function textSelectionAutoScrollTimerHandler(event:TimerEvent):void
-    {
-        const SLOW_SCROLL_THRESHOLD:int = 12;       // Distance from edge to trigger a slow scroll
-        const SLOW_SCROLL_SPEED:int = 20;           // Pixels per timer callback to scroll
-        const FAST_SCROLL_THRESHOLD:int = 3;        // Distance from edge to trigger a fast scroll
-        const FAST_SCROLL_DELTA:int = 30;           // Added to SLOW_SCROLL_SPEED to determine fast speed
-
-        var newVSP:Number = viewport.verticalScrollPosition;
-        var newHSP:Number = viewport.horizontalScrollPosition;
-
-        if (scrollerLayout.canScrollHorizontally)
-        {
-            if (mouseX > width - SLOW_SCROLL_THRESHOLD)
-            {
-                newHSP += SLOW_SCROLL_SPEED;
-
-                if (mouseX > width - FAST_SCROLL_THRESHOLD)
-                    newHSP += FAST_SCROLL_DELTA;
-
-                if (maxTextSelectionHScrollPos != -1 && newHSP > maxTextSelectionHScrollPos)
-                    newHSP = maxTextSelectionHScrollPos;
-            }
-
-            if (mouseX < SLOW_SCROLL_THRESHOLD)
-            {
-                newHSP -= SLOW_SCROLL_SPEED;
-
-                if (mouseX < FAST_SCROLL_THRESHOLD)
-                    newHSP -= FAST_SCROLL_DELTA;
-
-                if (newHSP < minTextSelectionHScrollPos)
-                    newHSP = minTextSelectionHScrollPos;
-            }
-        }
-
-        if (scrollerLayout.canScrollVertically)
-        {
-            if (mouseY > height - SLOW_SCROLL_THRESHOLD)
-            {
-                newVSP += SLOW_SCROLL_SPEED;
-
-                if (mouseY > height - FAST_SCROLL_THRESHOLD)
-                    newVSP += FAST_SCROLL_DELTA;
-
-                if (maxTextSelectionVScrollPos != -1 && newVSP > maxTextSelectionVScrollPos)
-                    newVSP = maxTextSelectionVScrollPos;
-            }
-
-            if (mouseY < SLOW_SCROLL_THRESHOLD)
-            {
-                newVSP -= SLOW_SCROLL_SPEED;
-
-                if (mouseY < FAST_SCROLL_THRESHOLD)
-                    newVSP -= FAST_SCROLL_DELTA;
-
-                if (newVSP < minTextSelectionVScrollPos)
-                    newVSP = minTextSelectionVScrollPos;
-            }
-        }
-
-        if (newHSP != viewport.horizontalScrollPosition)
-            viewport.horizontalScrollPosition = newHSP;
-        if (newVSP != viewport.verticalScrollPosition)
-            viewport.verticalScrollPosition = newVSP;
-    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Text selection auto scroll
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  When true, use the text selection scroll behavior instead of the
+	 *  typical "throw" behavior. This is only used when interactionMode="touch"
+	 */
+	mx_internal var textSelectionAutoScrollEnabled:Boolean = false;
+	private var textSelectionAutoScrollTimer:Timer;
+	private var minTextSelectionVScrollPos:int = 0;
+	private var maxTextSelectionVScrollPos:int = -1;
+	private var minTextSelectionHScrollPos:int = 0;
+	private var maxTextSelectionHScrollPos:int = -1;
+	private static const TEXT_SELECTION_AUTO_SCROLL_FPS:int = 10;
+
+	/**
+	 *  @private
+	 *  Change scroll behavior when selecting text.
+	 */
+	mx_internal function enableTextSelectionAutoScroll(enable:Boolean,
+					   minHScrollPosition:int = 0, maxHScrollPosition:int = -1,
+					   minVScrollPosition:int = 0, maxVScrollPosition:int = -1):void
+	{
+		if (getStyle("interactionMode") == InteractionMode.TOUCH)
+		{
+			this.textSelectionAutoScrollEnabled = enable;
+			this.minTextSelectionHScrollPos = minHScrollPosition;
+			this.maxTextSelectionHScrollPos = maxHScrollPosition;
+			this.minTextSelectionVScrollPos = minVScrollPosition;
+			this.maxTextSelectionVScrollPos = maxVScrollPosition;
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function setUpTextSelectionAutoScroll():void
+	{
+		if (!textSelectionAutoScrollTimer)
+		{
+			textSelectionAutoScrollTimer = new Timer(1000 / TEXT_SELECTION_AUTO_SCROLL_FPS);
+			textSelectionAutoScrollTimer.addEventListener(TimerEvent.TIMER,
+				textSelectionAutoScrollTimerHandler);
+
+			textSelectionAutoScrollTimer.start();
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	mx_internal function stopTextSelectionAutoScroll():void
+	{
+		if (textSelectionAutoScrollTimer)
+		{
+			textSelectionAutoScrollTimer.stop();
+			textSelectionAutoScrollTimer.removeEventListener(TimerEvent.TIMER,
+				textSelectionAutoScrollTimerHandler);
+			textSelectionAutoScrollTimer = null;
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	private function textSelectionAutoScrollTimerHandler(event:TimerEvent):void
+	{
+		const SLOW_SCROLL_THRESHOLD:int = 12;		// Distance from edge to trigger a slow scroll
+		const SLOW_SCROLL_SPEED:int = 20;			// Pixels per timer callback to scroll
+		const FAST_SCROLL_THRESHOLD:int = 3;		// Distance from edge to trigger a fast scroll
+		const FAST_SCROLL_DELTA:int = 30; 			// Added to SLOW_SCROLL_SPEED to determine fast speed
+
+		var newVSP:Number = viewport.verticalScrollPosition;
+		var newHSP:Number = viewport.horizontalScrollPosition;
+
+		if (scrollerLayout.canScrollHorizontally)
+		{
+			if (mouseX > width - SLOW_SCROLL_THRESHOLD)
+			{
+				newHSP += SLOW_SCROLL_SPEED;
+
+				if (mouseX > width - FAST_SCROLL_THRESHOLD)
+					newHSP += FAST_SCROLL_DELTA;
+
+				if (maxTextSelectionHScrollPos != -1 && newHSP > maxTextSelectionHScrollPos)
+					newHSP = maxTextSelectionHScrollPos;
+			}
+
+			if (mouseX < SLOW_SCROLL_THRESHOLD)
+			{
+				newHSP -= SLOW_SCROLL_SPEED;
+
+				if (mouseX < FAST_SCROLL_THRESHOLD)
+					newHSP -= FAST_SCROLL_DELTA;
+
+				if (newHSP < minTextSelectionHScrollPos)
+					newHSP = minTextSelectionHScrollPos;
+    		}
+		}
+
+		if (scrollerLayout.canScrollVertically)
+		{
+			if (mouseY > height - SLOW_SCROLL_THRESHOLD)
+			{
+				newVSP += SLOW_SCROLL_SPEED;
+
+				if (mouseY > height - FAST_SCROLL_THRESHOLD)
+					newVSP += FAST_SCROLL_DELTA;
+
+				if (maxTextSelectionVScrollPos != -1 && newVSP > maxTextSelectionVScrollPos)
+					newVSP = maxTextSelectionVScrollPos;
+			}
+
+			if (mouseY < SLOW_SCROLL_THRESHOLD)
+			{
+				newVSP -= SLOW_SCROLL_SPEED;
+
+				if (mouseY < FAST_SCROLL_THRESHOLD)
+					newVSP -= FAST_SCROLL_DELTA;
+
+				if (newVSP < minTextSelectionVScrollPos)
+					newVSP = minTextSelectionVScrollPos;
+			}
+		}
+
+		if (newHSP != viewport.horizontalScrollPosition)
+			viewport.horizontalScrollPosition = newHSP;
+		if (newVSP != viewport.verticalScrollPosition)
+			viewport.verticalScrollPosition = newVSP;
+	}

     //--------------------------------------------------------------------------
     //
@@ -2532,7 +2578,7 @@
      *  application to resize itself and fix the scroll position if necessary
      */
     private function softKeyboardDeactivateHandler(event:SoftKeyboardEvent):void
-    {
+    {
         // Adjust the scroll position after the application's size is restored.
         adjustScrollPositionAfterSoftKeyboardDeactivate();
         oldSoftKeyboardHeight = NaN;
@@ -2543,7 +2589,7 @@
      *  @private
      */
     mx_internal function adjustScrollPositionAfterSoftKeyboardDeactivate():void
-    {
+    {
         // If the throw animation is still playing, stop it. Otherwise, fix the
         // scroll position.
         if (throwEffect && throwEffect.isPlaying)
@@ -2947,7 +2993,7 @@
                 var scrollStartEvent:TouchInteractionEvent = new TouchInteractionEvent(TouchInteractionEvent.TOUCH_INTERACTION_START, true, true);
                 scrollStartEvent.relatedObject = scroller;
                 scrollStartEvent.reason = TouchInteractionReason.SCROLL;
-                dispatchBubblingEventOnMouseDownedDisplayObject(scrollStartEvent);
+				dispatchBubblingEventOnMouseDownedDisplayObject(scrollStartEvent);

                 isScrolling = true;

@@ -3004,11 +3050,11 @@
         // if we are scrolling (even if we just started scrolling)
         if (isScrolling)
         {
-            if (scroller.textSelectionAutoScrollEnabled)
-            {
-                scroller.setUpTextSelectionAutoScroll();
-                return;
-            }
+			if (scroller.textSelectionAutoScrollEnabled)
+			{
+				scroller.setUpTextSelectionAutoScroll();
+				return;
+			}

             // calculate the delta
             var dx:Number = event.stageX - scrollGestureAnchorPoint.x;
@@ -3034,13 +3080,13 @@
                 // move event will continue to be handled right in this function.
                 if (Scroller.dragEventThinning)
                 {
-                // Start the periodic timer that will do subsequent drag
-                // scrolling if necessary.
-                dragTimer.start();
-
-                // No additional mouse events received yet, so no scrolling pending.
-                dragScrollPending = false;
-            }
+                    // Start the periodic timer that will do subsequent drag
+                    // scrolling if necessary.
+                    dragTimer.start();
+
+                    // No additional mouse events received yet, so no scrolling pending.
+                    dragScrollPending = false;
+                }
             }
             else
             {
@@ -3094,14 +3140,14 @@
         if (!isScrolling)
             return;

-        // Don't throw if we're doing a text selection auto scroll
-        if (scroller.textSelectionAutoScrollEnabled)
-        {
-            scroller.stopTextSelectionAutoScroll();
-            endTouchScroll();
-            return;
-        }
-
+		// Don't throw if we're doing a text selection auto scroll
+		if (scroller.textSelectionAutoScrollEnabled)
+		{
+			scroller.stopTextSelectionAutoScroll();
+			endTouchScroll();
+			return;
+		}
+
         if (dragTimer)
         {
             if (dragScrollPending)
@@ -3159,13 +3205,13 @@
         }
         averageDt /= len-1;

-        // if off screen for some reason, let's end scrolling:
-        if (!scroller.stage)
-        {
+		// if off screen for some reason, let's end scrolling:
+		if (!scroller.stage)
+		{
             endTouchScroll();
-            return;
-        }
-
+			return;
+		}
+
         var lastMouseEventPoint:Point = mouseEventCoordinatesHistory[endIndex];

         // calculate the last velocity and make sure there was no pause that occurred
@@ -3187,9 +3233,8 @@
             throwVelocity.y = 0;
         }

-        // FIXME (rfrishbe): should be minXVelocity, minYVelocity, minDiagonalVelocity
-        // FIXME (rfrishbe): this should be parameterized better and the heuristic should
-        // be documented better
+        // If the gesture appears to have slowed or stopped prior to the mouse up,
+        // then force the velocity to zero.
         if ( (lastDt >= 3*averageDt) &&
             (lastVelocity.length <= minVelocityPixels))
         {
@@ -3261,40 +3306,40 @@

         return new Point(velX,velY);
     }
-
-    /**
-     *  @private
-     *  Helper method to dispatch bubbling events on mouseDownDisplayObject.  Since this
-     *  object can be off the display list, this may be tricky.  Technically, we should
-     *  grab all the live objects at the time of mouseDown and dispatch events to them
-     *  manually, but instead, we just use this heuristic, which is dispatch it to
-     *  mouseDownedDisplayObject.  If it's not inside of scroller and off the display list,
-     *  then dispatch to scroller as well.
-     *
-     *  <p>If you absolutely need to know the touch event ended, add event listeners
-     *  to the mouseDownedDisplayObject directly and don't rely on event
-     *  bubbling.</p>
-     */
-    private function dispatchBubblingEventOnMouseDownedDisplayObject(event:Event):Boolean
-    {
-        var eventAccepted:Boolean = true;
-        if (mouseDownedDisplayObject)
-        {
-            eventAccepted = eventAccepted && mouseDownedDisplayObject.dispatchEvent(event);
-            if (!mouseDownedDisplayObject.stage)
-            {
-                if (scroller && !scroller.contains(mouseDownedDisplayObject))
-                    eventAccepted = eventAccepted && scroller.dispatchEvent(event);
-            }
-        }
-        else
-        {
-            eventAccepted = eventAccepted && scroller.dispatchEvent(event);
-        }
-
-        return eventAccepted;
-    }
-
+
+	/**
+	 *  @private
+	 *  Helper method to dispatch bubbling events on mouseDownDisplayObject.  Since this
+	 *  object can be off the display list, this may be tricky.  Technically, we should
+	 *  grab all the live objects at the time of mouseDown and dispatch events to them
+	 *  manually, but instead, we just use this heuristic, which is dispatch it to
+	 *  mouseDownedDisplayObject.  If it's not inside of scroller and off the display list,
+	 *  then dispatch to scroller as well.
+	 *
+	 *  <p>If you absolutely need to know the touch event ended, add event listeners
+	 *  to the mouseDownedDisplayObject directly and don't rely on event
+	 *  bubbling.</p>
+	 */
+	private function dispatchBubblingEventOnMouseDownedDisplayObject(event:Event):Boolean
+	{
+		var eventAccepted:Boolean = true;
+		if (mouseDownedDisplayObject)
+		{
+			eventAccepted = eventAccepted && mouseDownedDisplayObject.dispatchEvent(event);
+			if (!mouseDownedDisplayObject.stage)
+			{
+				if (scroller && !scroller.contains(mouseDownedDisplayObject))
+					eventAccepted = eventAccepted && scroller.dispatchEvent(event);
+			}
+		}
+		else
+		{
+			eventAccepted = eventAccepted && scroller.dispatchEvent(event);
+		}
+
+		return eventAccepted;
+	}
+
     /**
      *  @private
      *  When the touchScrollThrow is over, we should dispatch a touchInteractionEnd.


Made event listener safer

Made event listener safer

--- src/com/zehfernando/input/binding/KeyActionBinder.as
+++ src/com/zehfernando/input/binding/KeyActionBinder.as
@@ -420,9 +420,8 @@

 			// Find the re-mapped control id
 			var deviceIndex:int = gameInputDevices.indexOf(control.device);
-			var deviceControlInfo:AutoGamepadControlInfo = gameInputDeviceDefinitions[deviceIndex].controls.hasOwnProperty(control.id) ? gameInputDeviceDefinitions[deviceIndex].controls[control.id] as AutoGamepadControlInfo : null;
-
-			if (deviceControlInfo != null) {
+			if (deviceIndex > -1 && gameInputDeviceDefinitions[deviceIndex].controls.hasOwnProperty(control.id)) {
+				var deviceControlInfo:AutoGamepadControlInfo = gameInputDeviceDefinitions[deviceIndex].controls[control.id];
 				interpretGameInputControlChanges(deviceControlInfo.id, map(control.value, control.minValue, control.maxValue, deviceControlInfo.min, deviceControlInfo.max, true), deviceControlInfo.min, deviceControlInfo.max, deviceIndex);
 			}
 		}


update shader to use DiffuseShaderPart.getDiffuseColor() instead of DiffuseShaderPart.getDiffuse()

--- src/aerys/minko/render/material/basic/BasicShader.as
+++ src/aerys/minko/render/material/basic/BasicShader.as
@@ -213,7 +213,7 @@
 		 */
 		override protected function getPixelColor() : SFloat
 		{
-			var diffuse	: SFloat = _diffuseShaderPart.getDiffuse();
+			var diffuse	: SFloat = _diffuseShaderPart.getDiffuseColor();

 			if (meshBindings.propertyExists(BasicProperties.ALPHA_THRESHOLD))
 			{


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

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

 package mx.automation.delegates.controls
 {


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

--- frameworks/projects/charts/src/mx/charts/series/items/LineSeriesItem.as
+++ frameworks/projects/charts/src/mx/charts/series/items/LineSeriesItem.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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: 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@1259548 13f79535-47bb-0310-9956-ffa450edef68

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17518
Author:   jasonsj@adobe.com
Date:     2010-08-30T20:14:19.054795Z

Log Message:
-----------
Gradient height off by one in previous fix for SDK-27572.

QE notes:
Doc notes:
Bugs:
SDK-27572 ActionBar highlight interferes with branded color
Reviewer: gruehle
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -271,7 +271,7 @@
         colors[2] = ColorUtil.adjustBrightness2(chromeColor, -20);

         graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix);
-        graphics.drawRect(0, 1, unscaledWidth, unscaledHeight - 1);
+        graphics.drawRect(0, 1, unscaledWidth, unscaledHeight);
         graphics.endFill();
     }
 }


Fix for FXU-33

Fix for FXU-33

git-svn-id: 9278a788294a4258aac04586390fc35fb4a5f335@7348 a9308255-753e-0410-a2e9-80b3fbc4fff6

--- FlexUnit4/src/org/flexunit/runners/model/TestClass.as
+++ FlexUnit4/src/org/flexunit/runners/model/TestClass.as
@@ -87,7 +87,20 @@
 						entry = metaDataDictionary[ metaTag ]
 					}

-					entry.push( testMethod );
+					var found:Boolean = false;
+					//Before we push this onto the stack, we take a quick pass to ensure it is not already there
+					//this covers the case where someone double flags a test with a piece of metadata
+					//bugID="FXU-33")
+ 					for ( var j:int=0; j<entry.length; j++ ) {
+						if ( ( entry[ j ] as FrameworkMethod ).method === testMethod.method ) {
+							found = true;
+							break;
+						}
+					}
+
+					if ( !found ) {
+						entry.push( testMethod );
+					}
 				}
 			}
 		}


- and yet more existence checking for delay in CSSPropertyTransition

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@143 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/css/transitions/CSSPropertyTransition.as
+++ src/reprise/css/transitions/CSSPropertyTransition.as
@@ -110,15 +110,16 @@
 				{
 					//add new delay minus the delay already spent
 					var spentDelay : int = getTimer() - oldStartTime;
-					if (delay.specifiedValue() > spentDelay)
+					var delayValue : int = (delay && delay.specifiedValue()) || 0;
+					if (delayValue > spentDelay)
 					{
 						this.startTime -= spentDelay;
 					}
 					else
 					{
-						this.startTime -= delay.specifiedValue();
+						this.startTime -= delayValue;
 					}
-					this.startTime -=  spentDelay - delay.specifiedValue();
+					this.startTime -=  spentDelay - delayValue;
 				}
 				else
 				{


use string literals for texture formats to avoid compatibility issues

--- src/aerys/minko/render/resource/texture/TextureResource.as
+++ src/aerys/minko/render/resource/texture/TextureResource.as
@@ -4,7 +4,6 @@
 	import aerys.minko.type.enum.SamplerFormat;

 	import flash.display.BitmapData;
-	import flash.display3D.Context3DTextureFormat;
 	import flash.display3D.textures.Texture;
 	import flash.display3D.textures.TextureBase;
 	import flash.geom.Matrix;
@@ -19,9 +18,9 @@
 	{
 		private static const MAX_SIZE					: uint		= 2048;
 		private static const TMP_MATRIX					: Matrix	= new Matrix();
-		private static const FORMAT_BGRA				: String	= Context3DTextureFormat.BGRA
-		private static const FORMAT_COMPRESSED			: String	= Context3DTextureFormat.COMPRESSED;
-		private static const FORMAT_COMPRESSED_ALPHA 	: String 	= Context3DTextureFormat.COMPRESSED_ALPHA;
+		private static const FORMAT_BGRA				: String	= 'bgra';
+		private static const FORMAT_COMPRESSED			: String	= 'compressed';
+		private static const FORMAT_COMPRESSED_ALPHA 	: String 	= 'compressedAlpha';

 		private static const TEXTURE_FORMAT_TO_SAMPLER	: Array 	= []
 		{
@@ -30,18 +29,18 @@
 			TEXTURE_FORMAT_TO_SAMPLER[FORMAT_COMPRESSED_ALPHA] 	= SamplerFormat.COMPRESSED_ALPHA;
 		}

-		private var _texture		: Texture		= null;
-		private var _mipmap			: Boolean		= false;
-
-		private var _bitmapData		: BitmapData	= null;
-		private var _atf			: ByteArray		= null;
-		private var _atfFormat		: uint			= 0;
-		private var _format 		: String 		= FORMAT_BGRA;
-
-		private var _width			: Number		= 0;
-		private var _height			: Number		= 0;
-
-		private var _update			: Boolean		= false;
+		private var _texture		: Texture;
+		private var _mipmap			: Boolean;
+
+		private var _bitmapData		: BitmapData;
+		private var _atf			: ByteArray;
+		private var _atfFormat		: uint;
+		private var _format 		: String;
+
+		private var _width			: Number;
+		private var _height			: Number;
+
+		private var _update			: Boolean;

 		public function get format() : uint
 		{
@@ -68,6 +67,7 @@
 		{
             _width = width;
             _height = height;
+			_format = FORMAT_BGRA;
 		}

 		public function setContentFromBitmapData(bitmapData	: BitmapData,
@@ -110,7 +110,8 @@
 			}

 			if (_texture
-				&& (mipmap != _mipmap
+				&& (_format	!= FORMAT_BGRA
+					|| mipmap != _mipmap
 					|| bitmapData.width != _width
 					|| bitmapData.height != _height))
 			{
@@ -120,6 +121,7 @@

 			_width = _bitmapData.width;
 			_height = _bitmapData.height;
+			_format = FORMAT_BGRA;

 			_mipmap	= mipmap;
 			_update	= true;
@@ -134,6 +136,7 @@
 			var oldWidth	: Number = _width;
 			var oldHeight	: Number = _height;
 			var oldMipmap	: Boolean = _mipmap;
+			var oldFormat	: String = _format;

 			atf.position 	= 6;

@@ -150,9 +153,12 @@
 				_format = FORMAT_COMPRESSED_ALPHA;
 			else if (_atfFormat == 3)
 				_format = FORMAT_COMPRESSED;
+			else
+				_format = FORMAT_BGRA;

 			if (_texture
-				&& (oldMipmap != _mipmap
+				&& (oldFormat != _format
+					|| oldMipmap != _mipmap
 					|| oldWidth != _width
 					|| oldHeight != _height))
 			{


Documentation, love, and clarifications.

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

--- src/as/com/threerings/util/Log.as
+++ src/as/com/threerings/util/Log.as
@@ -25,6 +25,17 @@

 /**
  * A simple logging mechanism.
+ *
+ * Log instances are created for modules, and the logging level can be configured per
+ * module in a hierarchical fashion.
+ *
+ * Typically, you should create a module name based on the full path to a class:
+ * calling getLog() and passing an object or Class will do this. Alternattely, you
+ * may create a Log to share in several classes in a package, in which case the
+ * module name can be like "com.foocorp.games.bunnywar". Finally, you can just
+ * create made-up module names like "mygame" or "util", but this is not recommended.
+ * You really should name things based on your packages, and your packages should be
+ * named according to Sun's recommendations for Java packages.
  *
  * Typical usage for creating a Log to be used by the entire class would be:
  * public class MyClass
@@ -49,15 +60,16 @@
     // if you add to this, update LEVEL_NAMES at the bottom...

     /**
-     * Retrieve a Log for the specififed class.
-     *
-     * @param spec can be any Object or Class specifier.
-     */
-    public static function getLog (spec :*) :Log
-    {
-        // let's just use the full classname
-        var path :String = getQualifiedClassName(spec).replace("::", ".");
-        return new Log(path);
+     * Retrieve a Log for the specified module.
+     *
+     * @param moduleSpec can be a String of the module name, or any Object or Class to
+     * have the module name be the full package and name of the class (recommended).
+     */
+    public static function getLog (moduleSpec :*) :Log
+    {
+        const module :String = (moduleSpec is String) ? String(moduleSpec)
+            : getQualifiedClassName(moduleSpec).replace("::", ".");
+        return new Log(module);
     }

     /**
@@ -99,17 +111,17 @@
     }

     /**
-     * Set the log level for the specified package/file.
-     *
-     * @param spec The smallest prefix desired to configure a log level.
+     * Set the log level for the specified module.
+     *
+     * @param module The smallest prefix desired to configure a log level.
      * For example, you can set the global level with Log.setLevel("", Log.INFO);
      * Then you can Log.setLevel("com.foo.game", Log.DEBUG). Now, everything
-     * logs at INFO level except for classes within com.foo.game, which is at DEBUG.
-     */
-    public static function setLevel (spec :String, level :int) :void
-    {
-        _setLevels[spec] = level;
-        resetLevels();
+     * logs at INFO level except for modules within com.foo.game, which is at DEBUG.
+     */
+    public static function setLevel (module :String, level :int) :void
+    {
+        _setLevels[module] = level;
+        _levels = {}; // reset cached levels
     }

     /**
@@ -124,18 +136,18 @@
             var setting :Array = module.split(":");
             _setLevels[setting[0]] = stringToLevel(String(setting[1]));
         }
-        resetLevels();
-    }
-
-    /**
+        _levels = {}; // reset cached levels
+    }
+
+    /**
+     * Use Log.getLog();
+     *
      * @private
      */
-    public function Log (spec :String)
-    {
-        if (spec == null) { // what!?
-            spec = "";
-        }
-        _spec = spec;
+    public function Log (module :String)
+    {
+        if (module == null) module = "";
+        _module = module;
     }

     /**
@@ -172,10 +184,10 @@

     protected function doLog (level :int, messages :Array) :void
     {
-        if (level < getLevel(_spec)) {
+        if (level < getLevel(_module)) {
             return; // we don't want to log it!
         }
-        messages.unshift(getTimeStamp(), LEVEL_NAMES[level], _spec);
+        messages.unshift(getTimeStamp(), LEVEL_NAMES[level], _module);
         trace.apply(null, messages);

         // possibly also dispatch to any other log targets.
@@ -203,40 +215,28 @@
     }

     /**
-     * Get the logging level for the specified spec.
-     */
-    protected static function getLevel (spec :String) :int
-    {
-        // we probably already have the level cached for this spec
-        var obj :Object = _levels[spec];
-        if (obj == null) {
-            // cache miss- copy some parent spec's level...
-            var modSpec :String = spec;
+     * Get the logging level for the specified module.
+     */
+    protected static function getLevel (module :String) :int
+    {
+        // we probably already have the level cached for this module
+        var lev :Object = _levels[module];
+        if (lev == null) {
+            // cache miss- copy some parent module's level...
+            var ancestor :String = module;
             while (true) {
-                obj = _setLevels[modSpec];
-                if (obj != null || modSpec == "") {
+                lev = _setLevels[ancestor];
+                if (lev != null || ancestor == "") {
                     // bail if we found a setting or get to the top level,
                     // but always save the level from _setLevels into _levels
-                    _levels[spec] = int(obj); // if obj was null, this will become 0 (DEBUG)
+                    _levels[module] = int(lev); // if lev was null, this will become 0 (DEBUG)
                     break;
                 }
-                var dex :int = modSpec.lastIndexOf(".");
-                if (dex == -1) {
-                    modSpec = "";
-                } else {
-                    modSpec = modSpec.substring(0, dex);
-                }
+                var dex :int = ancestor.lastIndexOf(".");
+                ancestor = (dex == -1) ? "" : ancestor.substring(0, dex);
             }
         }
-        return int(obj);
-    }
-
-    /**
-     * Reset (clear) the log level cache.
-     */
-    protected static function resetLevels () :void
-    {
-        _levels = {};
+        return int(lev);
     }

     protected static function stringToLevel (s :String) :int
@@ -250,9 +250,10 @@
         }
     }

-    /** Our log specification. */
-    protected var _spec :String;
-
+    /** The module to which this log instance applies. */
+    protected var _module :String;
+
+    /** Other registered LogTargets, besides the trace log. */
     protected static var _targets :Array = [];

     /** A cache of log levels, copied from _setLevels. */


Adjust watermark logic to be typesafe for wrapping.

--- HLSPlugin/src/com/kaltura/hls/m2ts/M2TSFileHandler.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/M2TSFileHandler.as
@@ -45,11 +45,10 @@
 		public var isBestEffort:Boolean = false;

 		private var _parser:TSPacketParser;
-		private var _curTimeOffset:uint;
 		private var _buffer:ByteArray;
 		private var _fragReadBuffer:ByteArray;
 		private var _encryptedDataBuffer:ByteArray;
-		private var _timeOrigin:uint;
+		private var _timeOrigin:Number;
 		private var _timeOriginNeeded:Boolean;
 		private var _segmentBeginSeconds:Number;
 		private var _segmentLastSeconds:Number;
@@ -407,24 +406,24 @@
 			return basicProcessFileSegment(input || new ByteArray(), true);
 		}

-		public var flvLowWaterAudio:uint = 0;
-		public var flvLowWaterVideo:uint = 0;
+		public var flvLowWaterAudio:int = int.MIN_VALUE;
+		public var flvLowWaterVideo:int = int.MIN_VALUE;
 		public var flvRecoveringIFrame:Boolean = false;
-		public const filterThresholdMs:uint = 64;
+		public const filterThresholdMs:int = 64;

 		private function clearFLVWaterMarkFilter():void
 		{
-			flvLowWaterAudio = 0;
-			flvLowWaterVideo = 0;
+			flvLowWaterAudio = int.MIN_VALUE;
+			flvLowWaterVideo = int.MIN_VALUE;
 			flvRecoveringIFrame = false;
 		}

-		private function handleFLVMessage(timestamp:uint, message:ByteArray, duration:uint):void
+		private function handleFLVMessage(timestamp:int, message:ByteArray, duration:int):void
 		{
 			var timestampSeconds:Number = timestamp / 1000.0;
 			var endTimestampSeconds:Number = (timestamp + duration) / 1000.0;

-			if(_segmentBeginSeconds < 0)
+			if(timestampSeconds < _segmentBeginSeconds)
 			{
 				_segmentBeginSeconds = timestampSeconds;

@@ -493,7 +492,7 @@
 				{
 					CONFIG::LOGGING
 					{
-						logger.debug("SKIPPING TOO LOW FLV VID TS @ " + timestamp);
+						logger.debug("SKIPPING TOO LOW FLV VID TS @ " + timestamp + " flvLowWaterVideo=" + flvLowWaterVideo);
 					}

 					if(SEND_LOGS)
@@ -543,9 +542,9 @@
 				_timeOrigin = timestamp;

 			// Encode the timestamp.
+			message[4] = (timestamp >> 16) & 0xff;
+			message[5] = (timestamp >>  8) & 0xff;
 			message[6] = (timestamp      ) & 0xff;
-			message[5] = (timestamp >>  8) & 0xff;
-			message[4] = (timestamp >> 16) & 0xff;
 			message[7] = (timestamp >> 24) & 0xff;

 			// If timer was reset due to seek, reset last subtitle time


Added centerRectInRect(), minor optimization for fitRectInRect().

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@450 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/DisplayUtil.as
+++ src/as/com/threerings/flash/DisplayUtil.as
@@ -71,6 +71,17 @@
     }

     /**
+     * Center the specified rectangle within the specified bounds. If the bounds are too
+     * small then the rectangle will be pinned to the upper-left.
+     */
+    public static function centerRectInRect (rect :Rectangle, bounds :Rectangle) :Point
+    {
+        return new Point(
+            bounds.x + Math.max(0, (bounds.width - rect.width) / 2),
+            bounds.y + Math.max(0, (bounds.height - rect.height) / 2));
+    }
+
+    /**
      * Returns the most reasonable position for the specified rectangle to
      * be placed at so as to maximize its containment by the specified
      * bounding rectangle while still placing it as near its original
@@ -79,15 +90,13 @@
      * @param rect the rectangle to be positioned.
      * @param bounds the containing rectangle.
      */
-    public static function fitRectInRect (
-            rect :Rectangle , bounds :Rectangle) :Point
+    public static function fitRectInRect (rect :Rectangle, bounds :Rectangle) :Point
     {
         // Guarantee that the right and bottom edges will be contained
         // and do our best for the top and left edges.
-        var br :Point = bounds.bottomRight;
         return new Point(
-            Math.min(br.x - rect.width, Math.max(rect.x, bounds.x)),
-            Math.min(br.y - rect.height, Math.max(rect.y, bounds.y)));
+            Math.min(bounds.right - rect.width, Math.max(rect.x, bounds.x)),
+            Math.min(bounds.bottom - rect.height, Math.max(rect.y, bounds.y)));
     }

     /**


ConsoleItemRenderer: anonymous function small fix

--- src/justpinegames/Logi/ConsoleItemRenderer.as
+++ src/justpinegames/Logi/ConsoleItemRenderer.as
@@ -33,21 +33,21 @@
             };

             var labelTextFormat:BitmapFontTextFormat = new BitmapFontTextFormat(new BitmapFont(), 16, labelColor);
-            var stateToSkinFunction:Function = function(target:Object, state:Object, oldValue:Object = null):Object
+            var itemStateToSkinFunction:Function = function(target:Object, state:Object, oldValue:Object = null):Object
             {
                 return null;
             };

             this.addEventListener(Event.ADDED, function(e:Event):void
             {
-                this.defaultLabelProperties.smoothing = TextureSmoothing.NONE;
-                this.defaultLabelProperties.textFormat = labelTextFormat;
-                this.downLabelProperties.smoothing = TextureSmoothing.NONE;
-                this.downLabelProperties.textFormat = labelTextFormat;
+                defaultLabelProperties.smoothing = TextureSmoothing.NONE;
+                defaultLabelProperties.textFormat = labelTextFormat;
+                downLabelProperties.smoothing = TextureSmoothing.NONE;
+                downLabelProperties.textFormat = labelTextFormat;

-                this.horizontalAlign = HORIZONTAL_ALIGN_LEFT;
+                horizontalAlign = HORIZONTAL_ALIGN_LEFT;

-                this.stateToSkinFunction = stateToSkinFunction;
+                stateToSkinFunction = itemStateToSkinFunction;
             });
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7758
Author:   clucier@adobe.com
Date:     2009-06-11T21:36:28.533211Z

Log Message:
-----------
Misssed a few mx_internal qualifiers.
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as
+++ frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as
@@ -21,6 +21,8 @@
 import mx.core.IUIComponent;
 import mx.core.mx_internal;

+use namespace mx_internal;
+
 [ExcludeClass]

 /**
@@ -55,7 +57,7 @@
         _width = this.width;
         _height = this.height;

-        mx_internal::$scaleX = mx_internal::$scaleY = 1;
+        $scaleX = $scaleY = 1;

         removeEventListener(Event.ADDED, addedHandler);
         removeEventListener(Event.REMOVED, removedHandler);
@@ -309,7 +311,7 @@

                     // set the child's parent to this for now (when initializing styles,
                     // we'll have to do some funky business).
-                    child.mx_internal::_parent = this;
+                    child._parent = this;

                     // Set the nestLevel of the child to be one greater
                     // than the nestLevel of this component.
@@ -319,13 +321,13 @@

                     // Temporarily set the _parent property of the child to the nearest UIComponent
                     // parent. This allows inheriting styles to be picked up correctly.
-                    child.mx_internal::_parent = uicParent;
+                    child._parent = uicParent;
                     child.regenerateStyleCache(true);
                     child.styleChanged(null);
                     child.notifyStyleChangeInChildren(null, true);
-                    child.mx_internal::initThemeColor();
+                    child.initThemeColor();
                     // Reset the _parent property.
-                    child.mx_internal::_parent = this;
+                    child._parent = this;

                     // Inform the component that it's style properties
                     // have been fully initialized. Most components won't care,
@@ -358,8 +360,8 @@
         if (!myParent.scaleContentWhenResized)
         {
             // apply the scale to the width/height
-            containerWidth *= myParent.mx_internal::scaleXDueToSizing;
-            containerHeight *= myParent.mx_internal::scaleYDueToSizing;
+            containerWidth *= myParent.scaleXDueToSizing;
+            containerHeight *= myParent.scaleYDueToSizing;
         }

         // Size the flex content to what they want to be,


Transferred from the Adobe Open Source Subversion Repository

Revision: 8579
Author:   mhorn@adobe.com
Date:     2009-07-15T15:36:16.983550Z

Log Message:
-----------
asdoc fixes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as
+++ frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as
@@ -81,7 +81,7 @@
 	 *  A flag that indicates whether child objects can receive focus
 	 *
 	 *
This is similar to the tabChildren property
-     *  used by the Flash Player.
+     *  used by Flash Player.

 	 *
 	 *
This is usually false because most components
      *  either receive focus themselves or delegate focus to a single


handle padding

handle padding

--- frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
+++ frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/layouts/FlexibleFirstChildHorizontalLayout.as
@@ -88,7 +88,11 @@
 			var maxHeight:Number = 0;
 			var verticalMargins:Array = [];

-			for (var i:int = n - 1; i >= 0; i--)
+            var xx:Number = layoutParent.resizableView.width;
+            var padding:Object = determinePadding();
+            xx -= padding.paddingLeft + padding.paddingRight;
+
+            for (var i:int = n - 1; i >= 0; i--)
 			{
 				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
 				margin = ValuesManager.valuesImpl.getValue(child, "margin");
@@ -149,7 +153,6 @@
 				}
 				child.y = mt;
 				maxHeight = Math.max(maxHeight, ml + child.height + mr);
-				var xx:Number = layoutParent.resizableView.width;
 				if (i == 0)
                 {
                     child.x = ml;
@@ -173,6 +176,62 @@
 				else
 					child.y = obj.marginTop;
 			}
+            layoutParent.resizableView.height = maxHeight;
 		}
-	}
+
+        // TODO (aharui): utility class or base class
+        /**
+         *  Determines the top and left padding values, if any, as set by
+         *  padding style values. This includes "padding" for all padding values
+         *  as well as "padding-left" and "padding-top".
+         *
+         *  Returns an object with paddingLeft and paddingTop properties.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        protected function determinePadding():Object
+        {
+            var paddingLeft:Object;
+            var paddingTop:Object;
+            var paddingRight:Object;
+            var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding");
+            if (typeof(padding) == "Array")
+            {
+                if (padding.length == 1)
+                    paddingLeft = paddingTop = paddingRight = padding[0];
+                else if (padding.length <= 3)
+                {
+                    paddingLeft = padding[1];
+                    paddingTop = padding[0];
+                    paddingRight = padding[1];
+                }
+                else if (padding.length == 4)
+                {
+                    paddingLeft = padding[3];
+                    paddingTop = padding[0];
+                    paddingRight = padding[1];
+                }
+            }
+            else if (padding == null)
+            {
+                paddingLeft = ValuesManager.valuesImpl.getValue(_strand, "padding-left");
+                paddingTop = ValuesManager.valuesImpl.getValue(_strand, "padding-top");
+                paddingRight = ValuesManager.valuesImpl.getValue(_strand, "padding-right");
+            }
+            else
+            {
+                paddingLeft = paddingTop = paddingRight = padding;
+            }
+            var pl:Number = Number(paddingLeft);
+            var pt:Number = Number(paddingTop);
+            var pr:Number = Number(paddingRight);
+
+            return {paddingLeft:pl, paddingTop:pt, paddingRight:pr};
+        }
+
+    }
+
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 13208
Author:   chaase@adobe.com
Date:     2009-12-23T21:49:14.524642Z

Log Message:
-----------
Dealt with my FIXMEs in the code. Some went away (no longer issues), some became TODOs (still issues, but nothing that we have to solve in this release), a couple were actually resolved in this change (like the bug filed/fixed: 24848).

QE notes: 10 failures in Mustella of tests that need to be changed. They're excluded for now and QE has local fixes.
Doc notes: None
Bugs: SDK-24848
Reviewer: Jason
Tests run: checkintests, Mustella (spark/effects, mx/effects)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.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/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/RemoveAction.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Move3D.as
+++ frameworks/projects/spark/src/spark/effects/Move3D.as
@@ -87,12 +87,12 @@
         ["translationX", "translationY", "translationZ",
          "postLayoutTranslationX","postLayoutTranslationY","postLayoutTranslationZ",
          "left", "right", "top", "bottom",
-         "horizontalCenter", "verticalCenter",
+         "horizontalCenter", "verticalCenter", "baseline",
          "width", "height"];

     private static var RELEVANT_STYLES:Array =
         ["left", "right", "top", "bottom",
-         "horizontalCenter", "verticalCenter"];
+         "horizontalCenter", "verticalCenter", "baseline"];

     //--------------------------------------------------------------------------
     //
@@ -310,6 +310,11 @@
         return AFFECTED_PROPERTIES;
     }

+    // TODO (chaase): Should try to remove this override. At a minimum, we could
+    // put the motionPaths creation at the start of initInstance(). Ideally, we'd
+    // remove that logic entirely, but there's a need to create motionPaths fresh
+    // for every call to create/initInstance() or else multi-instance effects
+    // will inherit the one motionPaths object created elsewhere.
     /**
      * @private
      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 5762
Author:   jimurphy@adobe.com
Date:     2009-03-30T19:25:21.583080Z

Log Message:
-----------
airframework update:
mx.core.FxWindowApplication -> spark.components.windowClasses.WindowedApplication
should have been:
mx.core.FxWindowApplication -> spark.components.WindowedApplication

add back classes to spark-manifest.xml that got nixed during the manifest merge and update related effects classes that were not being compiled because of this omission.

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk/frameworks</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/default/WindowedApplicationSkin.mxml</path>
<path kind="dir" action="M">/flex/sdk/trunk/frameworks/projects/flex4</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/effectClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/spark-air-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/AIRFrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate3D.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/WindowedApplication.as" copyfrom-rev="5757" action="A">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="dir" action="M">/flex/sdk/trunk/frameworks/projects/framework</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Rotate.as
+++ frameworks/projects/spark/src/spark/effects/Rotate.as
@@ -28,7 +28,7 @@
  */
 public class AnimateTransformRotate extends AnimateTransform
 {
-    include "../../spark.core.Version.as";
+    include "../core/Version.as";

     //--------------------------------------------------------------------------
     //


Fixed requested change.

Fixed requested change.


SliderMax.as edited online with Bitbucket

--- src/SliderMax.as
+++ src/SliderMax.as
@@ -31,7 +31,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * @author <Andriy Oblivantsev> eslider@gmail.com
- *
+ * мой комментарий
  */
 package
 {


rm unused

rm unused

--- src/org/mangui/hls/loader/FragmentLoader.as
+++ src/org/mangui/hls/loader/FragmentLoader.as
@@ -28,7 +28,6 @@
     import flash.net.*;
     import flash.utils.ByteArray;
     import flash.utils.Timer;
-    import flash.utils.setTimeout;
     import flash.external.ExternalInterface;
     import org.hola.ZExternalInterface;


Unraveled a great mystery

Unraveled a great mystery

--- src/Testing/Tests/Test.as
+++ src/Testing/Tests/Test.as
@@ -446,7 +446,7 @@
 			loop.push(branchInstr);

 			//final cleanup
-			registers[destRegister] = base; //TODO: figure out why this isn't setting to INT_NULL, and change it or comment
+			registers[destRegister] = base; //the value at the start of the loop

 			for each (var instruction:Instruction in loop)
 				instructions.push(instruction);


Added log output when http client gets status events

--- src/com/axis/httpclient/HTTPClient.as
+++ src/com/axis/httpclient/HTTPClient.as
@@ -79,6 +79,7 @@
     }

     private function onConnectionStatus(event:NetStatusEvent):void {
+      Logger.log('HTTPClient: connection status:', event.info.code);
       if ('NetConnection.Connect.Closed' === event.info.code && this.currentState !== 'stopped') {
         this.currentState = 'stopped';
         dispatchEvent(new ClientEvent(ClientEvent.STOPPED));


FLEX34324: accept patch from Chris Martin

--- frameworks/projects/rpc/src/mx/rpc/http/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/http/Operation.as
@@ -354,6 +354,7 @@
             if (params is Array && argumentNames != null)
             {
                 args = params as Array;
+				params = new Object();
                 if (args.length != argumentNames.length)
                 {
                     throw new ArgumentError("HTTPMultiService operation called with " + argumentNames.length + " argumentNames and " + args.length + " number of parameters.  When argumentNames is specified, it must match the number of arguments passed to the invocation");


Transferred from the Adobe Open Source Subversion Repository

Revision: 1218
Author:   jimurphy@adobe.com
Date:     2008-04-15T16:09:32.174552Z

Log Message:
-----------
merge 3.0.x[1069:1202] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/PNGEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/JPEGEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaTypeRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/IImageEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPFault.as</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloColors.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/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RoundedRectangle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLBinding.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/soap/SOAPFault.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/SOAPFault.as
@@ -21,6 +21,19 @@
  */
 public class SOAPFault extends Fault
 {
+    /**
+     * Constructs a new SOAPFault.
+     *
+     * @param faultCode The fully qualified name of the fault code.
+     *
+     * @param faultString The description of the fault.
+     *
+     * @param detail Any extra details of the fault.
+     *
+     * @param element The raw XML of the SOAP fault.
+     *
+     * @param faultactor Information about who caused the SOAP fault.
+     */
     public function SOAPFault(faultCode:QName,
                        faultString:String,
                        detail:String = null,
@@ -106,6 +119,13 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     * Returns the String "SOAPFault" plus the faultCode, faultString, and
+     * faultDetail.
+     *
+     * @return Returns the String "SOAPFault" plus the faultCode, faultString, and
+     * faultDetail.
+     */
     override public function toString():String
     {
         return "SOAPFault (" + faultCode + "): " + faultString + " " + faultDetail;


Add comment.

Add comment.

--- dolly-framework/src/main/actionscript/dolly/Cloner.as
+++ dolly-framework/src/main/actionscript/dolly/Cloner.as
@@ -77,6 +77,8 @@

 		const clone:* = new (type.clazz)();

+		// Find all public writable fields in a hierarchy of a source object
+		// and assign their values to a clone object.
 		const fieldsToClone:Vector.<Field> = getCloneableFieldsForType(type);
 		var name:String;
 		for each(var field:Field in fieldsToClone) {


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

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

 package mx.charts
 {


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

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

 package mx.effects
 {


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

 package mx.effects.easing
 {


- bugfix: Regression from Label cleanup

- bugfix: Regression from Label cleanup

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@707 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/controls/CheckBox.as
+++ src/reprise/controls/CheckBox.as
@@ -58,7 +58,6 @@
 		protected override function createChildren() : void
 		{
 			super.createChildren();
-			m_labelDisplay.html = true;
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 22086
Author:   jszeto@adobe.com
Date:     2011-08-19T00:14:47.664747Z

Log Message:
-----------
SpinnerList bug fixes and visual update

Tweaked the SpinnerListContainer visuals based on XD and PM feedback

SDK-31201 - DateSpinner: when setting a big year like 9999 year as selectedDate , no date in Date list in dateAndTime mode .

We were hitting a Player limitation for the x/y values. The solution is to offset the y value if we exceed that maximum number.

SDK-31178 - Application freezes when SpinnerList does not have a dataProvider

Added check to VerticalSpinnerLayout and gave the SpinnerList a minimum height to draw

SDK-31096 - DateSpinner doesn't support text styles like fontWeight and color

Added the text style metadata

SDK-30969 - fontSize style isn't respected by SpinnerList

Moved fontSize style from SpinnerListItemRenderer type selector to SpinnerList type selector. Made sure typicalLayoutElement is remeasured after a text style change

QE notes: none
Doc notes: none
Bugs: listed above
Reviewer: Tom K
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerSelectionIndicator.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile320/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/layouts/VerticalSpinnerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/SpinnerListContainerShadow.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/SpinnerListContainerShadow.fxg</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
+++ frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
@@ -64,6 +64,9 @@
 //--------------------------------------
 //  Styles
 //--------------------------------------
+
+include "../styles/metadata/StyleableTextFieldTextStyles.as"
+
 /**
  *  The locale of the component. Controls how dates are formatted, e.g. in what order the fields
  *  are listed and what additional date-related characters are shown if any. Uses standard locale


Transferred from the Adobe Open Source Subversion Repository

Revision: 3257
Author:   jimurphy@adobe.com
Date:     2008-09-18T18:16:26.838722Z

Log Message:
-----------
-Merged 3.0.X revisions 3232,3236,3238,3244 -> trunk
-integrated:
 Player build d604
 flex-messaging-common.jar 4.0.0.3256

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Install Flash Player 10 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/player/10/playerglobal.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults-2.0.0.css</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults-2.0.1.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/flashplayer.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.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/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/install_flash_player_10_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.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/in/player/10/lnx/libflashplayer.so.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/FlashPlayer.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Flash Player.app.zip</path>

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

--- frameworks/projects/mx/src/mx/controls/DateField.as
+++ frameworks/projects/mx/src/mx/controls/DateField.as
@@ -12,6 +12,7 @@
 package mx.controls
 {

+import flash.display.DisplayObject;
 import flash.events.Event;
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
@@ -37,8 +38,10 @@
 import mx.events.DropdownEvent;
 import mx.events.FlexEvent;
 import mx.events.FlexMouseEvent;
+import mx.events.InterManagerRequest;
 import mx.events.SandboxMouseEvent;
 import mx.managers.IFocusManagerComponent;
+import mx.managers.ISystemManager;
 import mx.managers.PopUpManager;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.StyleManager;
@@ -2128,7 +2131,6 @@
                 _dropdown.displayedMonth = _dropdown.selectedDate.getMonth();
                 _dropdown.displayedYear = _dropdown.selectedDate.getFullYear();
             }
-            point = dd.parent.globalToLocal(point);
             dd.visible = show;
             dd.scaleX = scaleX;
             dd.scaleY = scaleY;
@@ -2140,24 +2142,37 @@
             // A. Bottom Left Placment
             // B. Bottom Right Placement
             // C. Top Right Placement
-            var screen:Rectangle = systemManager.screen;
-
-            if (screen.width > dd.getExplicitOrMeasuredWidth() + point.x &&
-                screen.height < dd.getExplicitOrMeasuredHeight() + point.y)
+            var sm:ISystemManager = systemManager.topLevelSystemManager;
+            var sbRoot:DisplayObject = sm.getSandboxRoot();
+            var screen:Rectangle;
+
+            if (sm != sbRoot)
+            {
+                var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
+                                        false, false,
+                                        "getVisibleApplicationRect");
+                sbRoot.dispatchEvent(request);
+                screen = Rectangle(request.value);
+            }
+            else
+                screen = sm.getVisibleApplicationRect();
+
+            if (screen.right > dd.getExplicitOrMeasuredWidth() + point.x &&
+                screen.bottom < dd.getExplicitOrMeasuredHeight() + point.y)
             {
                 xVal = point.x
                 yVal = point.y - dd.getExplicitOrMeasuredHeight();
                 openPos = 1;
             }
-            else if (screen.width < dd.getExplicitOrMeasuredWidth() + point.x &&
-                     screen.height < dd.getExplicitOrMeasuredHeight() + point.y)
+            else if (screen.right < dd.getExplicitOrMeasuredWidth() + point.x &&
+                     screen.bottom < dd.getExplicitOrMeasuredHeight() + point.y)
             {
                 xVal = point.x - dd.getExplicitOrMeasuredWidth() + downArrowButton.width;
                 yVal = point.y - dd.getExplicitOrMeasuredHeight();
                 openPos = 2;
             }
-            else if (screen.width < dd.getExplicitOrMeasuredWidth() + point.x &&
-                     screen.height > dd.getExplicitOrMeasuredHeight() + point.y)
+            else if (screen.right < dd.getExplicitOrMeasuredWidth() + point.x &&
+                     screen.bottom > dd.getExplicitOrMeasuredHeight() + point.y)
             {
                 xVal = point.x - dd.getExplicitOrMeasuredWidth() + downArrowButton.width;
                 yVal = point.y + unscaledHeight;
@@ -2168,8 +2183,11 @@
                 //downArrowButton.enabled = false;
                 openPos = 0;

+            point.x = xVal;
+            point.y = yVal;
+            point = dd.parent.globalToLocal(point);
             UIComponentGlobals.layoutManager.validateClient(dd, true);
-            dd.move(xVal, yVal);
+            dd.move(point.x, point.y);
             Object(dd).setActualSize(dd.getExplicitOrMeasuredWidth(),dd.getExplicitOrMeasuredHeight());

         }


fixed performance problem with Graphics bug workaround code

--- WeaveUISpark/src/weave/visualization/plotters/WMSPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/WMSPlotter.as
@@ -224,7 +224,8 @@

 			////////////////////////////////////
 			// NOTE: if we don't call lineStyle() with thickness=1 prior to calling beginBitmapFill() and drawTriangles(), it does not always render correctly.
-			newShape.graphics.lineStyle(1, 0, 0); // thickness=1, alpha=0
+			// LineScaleMode.NONE is important for performance.
+			newShape.graphics.lineStyle(1, 0, 0, false, LineScaleMode.NONE); // thickness=1, alpha=0
 			////////////////////////////////////

 			if (debug)


Derived classes that are not in this package need to be able to call
dispatch().

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@414 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/ezgame/BaseControl.as
+++ src/as/com/threerings/ezgame/BaseControl.as
@@ -52,7 +52,7 @@
     /**
      * Secret function to dispatch property changed events.
      */
-    internal function dispatch (event :Event) :void
+    protected function dispatch (event :Event) :void
     {
         try {
             super.dispatchEvent(event);


Extract static method: Cloner.dolly_internal::getWritableFieldsOfType()

--- dolly-framework/src/main/actionscript/dolly/Cloner.as
+++ dolly-framework/src/main/actionscript/dolly/Cloner.as
@@ -26,7 +26,7 @@
 				(skipMetadataChecking || accessor.hasMetadata(MetadataName.CLONEABLE));
 	}

-	dolly_internal static function findAllCloneableFieldsForType(type:Type):Vector.<Field> {
+	dolly_internal static function getWritableFieldsOfType(type:Type):Vector.<Field> {
 		const result:Vector.<Field> = new Vector.<Field>();

 		var variable:Variable;
@@ -42,6 +42,12 @@
 				result.push(accessor);
 			}
 		}
+
+		return result;
+	}
+
+	dolly_internal static function findAllCloneableFieldsForType(type:Type):Vector.<Field> {
+		const result:Vector.<Field> = getWritableFieldsOfType(type);

 		return result;
 	}


Deleting supported nodes bug fixed

Deleting supported nodes bug fixed

--- Arguments/src/Controller/ArgumentController.as
+++ Arguments/src/Controller/ArgumentController.as
@@ -102,7 +102,9 @@

 		//---------------------Creating a New Map-----------------------//
 		public function createMap(mapName:String):void{
+			model.agoraMapModel.reinitializeModel();
 			model.agoraMapModel.createMap(mapName);
+			FlexGlobals.topLevelApplication.map.agoraMap.initializeMapStructures();
 		}

 		protected function onMapCreated(event:AGORAEvent):void{
@@ -270,7 +272,7 @@
 				//add an argument
 				addSupportingArgument(model);
 			}
-			//if reasons Completed
+				//if reasons Completed
 			else if(model.argumentTypeModel.reasonsCompleted){
 			}
 			else{
@@ -301,11 +303,26 @@
 		//--------------------- delete Map -------------------------------//
 		public function deleteNodes(gridPanel:GridPanel):void{
 			var model:StatementModel = (gridPanel as ArgumentPanel).model;
-			if(model.supportingArguments.length == 0 && (model.argumentTypeModel && model.argumentTypeModel.inferenceModel.supportingArguments.length == 0)){
+			if(model.statementFunction == StatementModel.STATEMENT){
+				if(model.supportingArguments.length == 0 && (model.argumentTypeModel && model.argumentTypeModel.inferenceModel.supportingArguments.length == 0)){
+					model.deleteMe();
+				}
+				else{
+					Alert.show("You cannot delete a statement that is supported, a statement whose enabler is supported, or the main claim.");
+				}
+			}
+			else if(model.statementFunction == StatementModel.INFERENCE){
+				if(model.supportingArguments.length > 0){
+					Alert.show("You cannot delete a statement that is supported.");
+					return;
+				}
+				for each(var stmt:StatementModel in model.argumentTypeModel.reasonModels){
+					if(stmt.supportingArguments.length > 0){
+						Alert.show("One of the reasons among the reasons, together with this enabler, that support the claim is supported by further arguments. Therefore, you cannot delete this enabler because it requires the supported reason to be deleted. No supported statement could be deleted.");
+						return;
+					}
+				}
 				model.deleteMe();
-			}
-			else{
-				Alert.show("You cannot delete a statement that is supported, a statement whose enabler is supported, or the main claim");
 			}

 		}