Transferred from the Adobe Open Source Subversion Repository

Revision: 21856
Author:   jasonsj@adobe.com
Date:     2011-08-05T05:24:35.771183Z

Log Message:
-----------
SDK-31042 Track arrow adjustments when position is flipped with arrowDirectionAdjusted
SDK-30852 Set visible=false instead of waiting for close transition to finish
SDK-30918 Change commitProperties() to force validation and positioning while open

QE notes:
Doc notes:
Bugs:
SDK-31042 Callout arrow direction is not restored once a callout is flipped to fit on screen
SDK-30852 android : callout stays visible when the view changes via device's back button
SDK-30918 Callout position is incorrect when changing position(s) while open
Reviewer: betravis
Tests run: checkintests
Is noteworthy for integration:

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/Callout.as
+++ frameworks/projects/mobilecomponents/src/spark/components/Callout.as
@@ -127,8 +127,6 @@
     public function Callout()
     {
         super();
-
-        addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
     }

     //--------------------------------------------------------------------------
@@ -201,7 +199,6 @@

         _horizontalPosition = value;

-        invalidateArrowDirection = true;
         invalidatePosition();
     }

@@ -279,7 +276,6 @@

         _verticalPosition = value;

-        invalidateArrowDirection = true;
         invalidatePosition();
     }

@@ -324,9 +320,13 @@
     //  arrowDirection
     //----------------------------------

-    private var invalidateArrowDirection:Boolean = true;
-
     private var _arrowDirection:String = ArrowDirection.NONE;
+
+    /**
+     *  @private
+     *
+     */
+    private var arrowDirectionAdjusted:Boolean = false;

     /**
      *  A read-only property that indicates the direction from the callout
@@ -353,17 +353,23 @@

     /**
      *  @private
-     *  Dispatch an "arrowDirectionChanged" event when the property is set.
+     *  Invalidate skin when the arrowDirection changes. Dispatches an
+     *  "arrowDirectionChanged" event when the property is set.
      */
     mx_internal function setArrowDirection(value:String):void
     {
-        if (_arrowDirection != value)
-        {
-            _arrowDirection = value;
-
-            if (hasEventListener("arrowDirectionChanged"))
-                dispatchEvent(new Event("arrowDirectionChanged"));
-        }
+        if (_arrowDirection == value)
+            return;
+
+        _arrowDirection = value;
+
+        // Instead of using skin states for each arrowDirection, the
+        // skin must override commitProperties() and account for
+        // arrowDirection on it's own.
+        skin.invalidateProperties();
+
+        if (hasEventListener("arrowDirectionChanged"))
+            dispatchEvent(new Event("arrowDirectionChanged"));
     }

     //----------------------------------
@@ -429,37 +435,41 @@

         commitAutoPosition();

-        if (arrow && invalidateArrowDirection)
-        {
-            // invalidate only when the arrow direction changes
-            var direction:String = determineArrowPosition(actualHorizontalPosition,
-                actualVerticalPosition);
-
-            if (arrowDirection != direction)
-            {
-                setArrowDirection(direction);
+        if (arrow)
+        {
+            // arrowDirection can be set in 2 ways: (1) horizontalPostion/verticalPosition
+            // changes and (2) flipping the axis to fit on screen.
+            if (!arrowDirectionAdjusted)
+            {
+                // Invalidate only when the arrow direction changes
+                var direction:String = determineArrowPosition(actualHorizontalPosition,
+                    actualVerticalPosition);

-                if (arrow)
-                    arrow.visible = (arrowDirection != ArrowDirection.NONE);
-
-                skin.invalidateProperties();
-            }
-
-            // Always reposition the arrow when horizontalPosition or verticalPosition
-            // changes. This will reposition the arrow.
+                if (arrowDirection != direction)
+                {
+                    setArrowDirection(direction);
+
+                    if (arrow)
+                        arrow.visible = (arrowDirection != ArrowDirection.NONE);
+                }
+            }
+
+            // Callout can be respositioned while open
+            if (isOpen && invalidatePositionFlag)
+            {
+                // Callout size may change due to arrowDirection change.
+                // We must revalidate the skin before repositioning the Callout
+                invalidateSize();
+                validateNow();
+
+                // Reposition once the Callout has been resized
+                positionPopUp();
+
+                invalidatePositionFlag = false;
+            }
+
+            // Always reset the arrow position
             invalidateDisplayList();
-
-            invalidateArrowDirection = false;
-        }
-
-        if (isOpen && invalidatePositionFlag)
-        {
-            // reposition while open
-            skin.invalidateProperties();
-            skin.validateNow();
-            positionPopUp();
-
-            invalidatePositionFlag = false;
         }
     }

@@ -507,25 +517,16 @@
      */
     override public function open(owner:DisplayObjectContainer, modal:Boolean=false):void
     {
-        if ((horizontalPosition == CalloutPosition.AUTO) ||
-            (verticalPosition == CalloutPosition.AUTO))
-        {
-            // invalidate the arrow direction before opening
-            // owner position/size changes will affect AUTO positioning
-            invalidateArrowDirection = true;
-            invalidateProperties();
-        }
-
-        // TODO (jasonsj): sizing enhancements?
-        // http://bugs.adobe.com/jira/browse/SDK-30838
-
-        // close the callout when the owner is removed
+        if (isOpen)
+            return;
+
+        // Add to PopUpManager, calls positionPopUp(), and change state
+        super.open(owner, modal);
+
+        // Close the callout when the owner is removed
         owner.addEventListener(Event.REMOVED_FROM_STAGE, owner_removedFromStage);
-
-        // add to PopUpManager, calls positionPopUp(), and change state
-        super.open(owner, modal);
-
-        // re-position the callout when the screen changes
+
+        // Reposition the callout when the screen changes
         var systemManagerParent:SystemManager = this.parent as SystemManager;

         if (systemManagerParent)
@@ -537,6 +538,9 @@
      */
     override public function close(commit:Boolean=false, data:*=null):void
     {
+        if (!isOpen)
+            return;
+
         owner.removeEventListener(Event.REMOVED_FROM_STAGE, owner_removedFromStage);

         var systemManagerParent:SystemManager = this.parent as SystemManager;
@@ -554,7 +558,7 @@
     {
         super.updateDisplayList(unscaledWidth, unscaledHeight);

-        // position the arrow
+        // Position the arrow
         updateSkinDisplayList();
     }

@@ -564,8 +568,13 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     */
     private function invalidatePosition():void
     {
+        arrowDirectionAdjusted = false;
+
         invalidateProperties();

         if (isOpen)
@@ -618,23 +627,23 @@
         var arrowX:Number = 0;
         var arrowY:Number = 0;

-        // max arrow positions
+        // Max arrow positions
         var maxArrowX:Number = calloutWidth - arrowWidth;
         var maxArrowY:Number = calloutHeight - arrowHeight;

-        // find the registration point of the owner
+        // Find the registration point of the owner
         var sandboxRoot:DisplayObject = systemManager.getSandboxRoot();
         var regPoint:Point = owner.localToGlobal(new Point());
         regPoint = sandboxRoot.globalToLocal(regPoint);

         if (isArrowVertical)
         {
-            // vertical arrows need horizontal alignment
+            // Vertical arrows need horizontal alignment
             var ownerX:Number = regPoint.x;
             var ownerVisibleWidth:Number = (ownerVisualElement)
                 ? ownerVisualElement.getLayoutBoundsWidth() : owner.width;

-            // edge cases when start/end of owner is not visible
+            // Edge cases when start/end of owner is not visible
             if ((ownerX < 0) && (ownerVisibleWidth < screen.width))
                 ownerVisibleWidth = Math.max(ownerVisibleWidth + ownerX, 0);
             else if ((ownerX >= 0) && ((ownerX + ownerVisibleWidth) >= screen.width))
@@ -648,10 +657,10 @@
             }
             else // if (calloutWidth > ownerWidth)
             {
-                // center the arrow on the owner
+                // Center the arrow on the owner
                 arrowX = (ownerVisibleWidth - arrowWidth) / 2;

-                // add owner offset
+                // Add owner offset
                 if (ownerX > 0)
                     arrowX += Math.abs(ownerX - getLayoutBoundsX());
             }
@@ -659,18 +668,18 @@
             // arrow should not extend past the callout bounds
             arrowX = Math.max(Math.min(maxArrowX, arrowX), 0);

-            // move the arrow to the bottom of the callout
+            // Move the arrow to the bottom of the callout
             if (isEndOfCallout)
                 arrowY = calloutHeight - arrowHeight;
         }
         else
         {
-            // horizontal arrows need vertical alignment
+            // Horizontal arrows need vertical alignment
             var ownerY:Number = regPoint.y;
             var ownerVisibleHeight:Number = (ownerVisualElement)
                 ? ownerVisualElement.getLayoutBoundsHeight() : owner.height;

-            // edge cases when start/end of owner is not visible
+            // Edge cases when start/end of owner is not visible
             if ((ownerY < 0) && (ownerVisibleHeight < screen.height))
                 ownerVisibleHeight = Math.max(ownerVisibleHeight + ownerY, 0);
             else if ((ownerY >= 0) && ((ownerY + ownerVisibleHeight) >= screen.height))
@@ -684,10 +693,10 @@
             }
             else // if (calloutHeight > ownerHeight)
             {
-                // center the arrow on the owner
+                // Center the arrow on the owner
                 arrowY = (ownerVisibleHeight - arrowHeight) / 2;

-                // add owner offset
+                // Add owner offset
                 if (ownerY > 0)
                     arrowY += Math.abs(ownerY - getLayoutBoundsY());
             }
@@ -695,7 +704,7 @@
             // arrow should not extend past the callout bounds
             arrowY = Math.max(Math.min(maxArrowY, arrowY), 0);

-            // move the arrow to the end of the callout
+            // Move the arrow to the end of the callout
             if (isEndOfCallout)
                 arrowX = calloutWidth - arrowWidth;
         }
@@ -715,13 +724,13 @@
                                                screenStart:Number, screenEnd:Number,
                                                revert:Boolean=false):String
     {
-        // skip all adjustments when using AUTO
+        // Skip all adjustments when using AUTO
         if (!position || (position == CalloutPosition.AUTO))
             return null;

         var adjustedPosition:String = null;

-        // maintain outer/inner positions when flipping to opposite direction
+        // Maintain outer/inner positions when flipping to opposite direction
         switch (position)
         {
             case CalloutPosition.BEFORE:
@@ -741,15 +750,15 @@
                     adjustedPosition = CalloutPosition.END;
                 break;
             // case CalloutPosition.MIDDLE:
-            // nudge instead of flipping
-        }
-
-        // return null to revert the adjusted position
-        // otherwise, return the incoming position
+            // Nudge instead of flipping
+        }
+
+        // Return null to revert the adjusted position
+        // Otherwise, return the incoming position
         if (revert)
             return (adjustedPosition) ? null : position;

-        // adjusted position or null if the callout already fits
+        // Adjusted position or null if the callout already fits
         return adjustedPosition;
     }

@@ -816,7 +825,10 @@
         }

         var oldArrowDirection:String = arrowDirection;
-        var adjustedArrowDirection:String;
+        var actualArrowDirection:String = null;
+
+        // Reset arrowDirectionAdjusted
+        arrowDirectionAdjusted = false;

         // Get the new registration point based on the adjusted position
         if ((adjustedHorizontalPosition != null) || (adjustedVerticalPosition != null))
@@ -827,24 +839,19 @@
             var tempVerticalPosition:String = (adjustedVerticalPosition)
                 ? adjustedVerticalPosition : actualVerticalPosition;

-            // adjust arrow direction after adjusting position
-            adjustedArrowDirection = determineArrowPosition(tempHorizontalPosition,
+            // Adjust arrow direction after adjusting position
+            actualArrowDirection = determineArrowPosition(tempHorizontalPosition,
                 tempVerticalPosition);

-            // invalidate the skin if the arrow direction changed
-            if (arrowDirection != adjustedArrowDirection)
-            {
-                setArrowDirection(adjustedArrowDirection);
-
-                if (arrow)
-                    arrow.visible = (arrowDirection != ArrowDirection.NONE);
-
-                skin.invalidateProperties();
-                skin.validateNow();
-
-                // reposition the arrow
-                updateSkinDisplayList();
-            }
+            // All position flips gaurantee an arrowDirection change
+            setArrowDirection(actualArrowDirection);
+            arrowDirectionAdjusted = true;
+
+            if (arrow)
+                arrow.visible = (arrowDirection != ArrowDirection.NONE);
+
+            // Reposition the arrow
+            updateSkinDisplayList();

             var adjustedBounds:Rectangle = determinePosition(tempHorizontalPosition,
                 tempVerticalPosition, matrix, adjustedRegPoint);
@@ -869,26 +876,24 @@
                 regPoint = adjustedRegPoint;
                 calloutBounds = adjustedBounds;

-                // temporarily set actual positions to reposition the arrow
+                // Temporarily set actual positions to reposition the arrow
                 if (adjustedHorizontalPosition)
                     actualHorizontalPosition = adjustedHorizontalPosition;

                 if (adjustedVerticalPosition)
                     actualVerticalPosition = adjustedVerticalPosition;

-                // reposition the arrow with the new actual position
+                // Reposition the arrow with the new actual position
                 updateSkinDisplayList();
             }
             else
             {
-                // restore previous arrow direction *before* reversing the
+                // Restore previous arrow direction *before* reversing the
                 // adjusted positions
                 setArrowDirection(oldArrowDirection);
-
-                skin.invalidateProperties();
-                skin.validateNow();
-
-                // reposition the arrow to the original position
+                arrowDirectionAdjusted = false;
+
+                // Reposition the arrow to the original position
                 updateSkinDisplayList();
             }
         }
@@ -899,7 +904,6 @@

         // If the callout still doesn't fit, then nudge it
         // so it is completely on the screen. Make sure to include scale.
-
         regPoint.y += nudgeToFit(calloutBounds.top, calloutBounds.bottom,
             screen.top + margin, screen.bottom - margin, concatScaleY);

@@ -952,7 +956,7 @@
         if (!screen || ((horizontalPosition != CalloutPosition.AUTO) &&
             (verticalPosition != CalloutPosition.AUTO)))
         {
-            // use explicit positions instead of AUTO
+            // Use explicit positions instead of AUTO
             actualHorizontalPosition = null;
             actualVerticalPosition = null;

@@ -961,7 +965,7 @@

         var ownerBounds:Rectangle = owner.getBounds(systemManager.getSandboxRoot());

-        // use aspect ratio to determine vertical/horizontal preference
+        // Use aspect ratio to determine vertical/horizontal preference
         var isLandscape:Boolean = (screen.width > screen.height);

         var spaceLeft:Number = ownerBounds.left;
@@ -972,7 +976,7 @@
         var calloutWidth:Number = getLayoutBoundsWidth();
         var calloutHeight:Number = getLayoutBoundsHeight();

-        // can the popUp fit in each direction?
+        // Can the popUp fit in each direction?
         spaceLeft -= calloutWidth;
         spaceRight -= calloutWidth;
         spaceTop -= calloutHeight;
@@ -983,7 +987,7 @@

         if (verticalPosition != CalloutPosition.AUTO)
         {
-            // horizontal auto only
+            // Horizontal auto only
             switch (verticalPosition)
             {
                 case CalloutPosition.START:
@@ -1004,7 +1008,7 @@
         }
         else if (horizontalPosition != CalloutPosition.AUTO)
         {
-            // vertical auto only
+            // Vertical auto only
             switch (horizontalPosition)
             {
                 case CalloutPosition.START:
@@ -1029,7 +1033,7 @@

             if (!canFitHorizontal && !canFitVertical)
             {
-                // edge case where callout doesn't fit in any direction
+                // Edge case where callout doesn't fit in any direction
                 var horizontalSpace:Number = (spaceLeft > spaceRight) ? spaceLeft : spaceRight;
                 var verticalSpace:Number = (spaceTop > spaceBottom) ? spaceTop : spaceBottom;

@@ -1037,12 +1041,12 @@
             }
             else if (isLandscape)
             {
-                // favor horizontal before/after in landscape
+                // Favor horizontal before/after in landscape
                 useVertical = !canFitHorizontal;
             }
             else
             {
-                // favor vertical before/after in portrait
+                // Favor vertical before/after in portrait
                 useVertical = canFitVertical;
             }

@@ -1057,8 +1061,6 @@
                 actualVerticalPosition = CalloutPosition.MIDDLE;
             }
         }
-
-        invalidateArrowDirection = true;
     }

     /**
@@ -1066,8 +1068,8 @@
      */
     mx_internal function determineArrowPosition(horizontalPos:String, verticalPos:String):String
     {
-        // determine arrow direction, outer positions get priority
-        // corner positions and center show no arrow
+        // Determine arrow direction, outer positions get priority.
+        // Corner positions and center show no arrow
         var direction:String = ArrowDirection.NONE;

         if (horizontalPos == CalloutPosition.BEFORE)
@@ -1235,29 +1237,25 @@

     /**
      *  @private
-     *  Redraw whenever added to the stage to ensure the calculations
-     *  in updateSkinDisplayList() are correct.
-     */
-    private function addedToStageHandler(event:Event):void
+     */
+    private function arrow_resizeHandler(event:Event):void
     {
         updateSkinDisplayList();
     }
-
-    /**
-     *  @private
-     */
-    private function arrow_resizeHandler(event:Event):void
-    {
-        updateSkinDisplayList();
-    }

     /**
      *  @private
      */
     private function owner_removedFromStage(event:Event):void
     {
-        if (isOpen)
-            close();
+        if (!isOpen)
+            return;
+
+        // Hide the callout immediately instead of waiting for the skin
+        // state to transition to "closed"
+        visible = false;
+
+        close();
     }

     /**
@@ -1265,11 +1263,8 @@
      */
     private function systemManager_resizeHandler(event:Event):void
     {
-        // screen resize might require a new arrow direction and callout position
+        // Screen resize might require a new arrow direction and callout position
         invalidatePosition();
-
-        // force a redraw to call positionPopUp()
-        invalidateDisplayList();
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12982
Author:   hhillen@paciellogroup.com
Date:     2009-12-16T04:44:23.337323Z

Log Message:
-----------
Fix for issue with exposing accessible names for combobox list items
QE notes: none
Doc notes: none
Bugs: n/a
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>

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

--- frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as
+++ frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as
@@ -299,26 +299,6 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  @private
-     *  Method for returning the name of the ListItem/ComboBox
-     *  which is spoken out by the screen reader.
-     *
-     *  @param childID uint
-     *
-     *  @return Name String
-     */
-    override protected function getName(childID:uint):String
-    {
-        if (childID == 0)
-            return "";
-        var comboBox:ComboBox = ComboBox(master);
-        if (childID < 0 || childID > comboBox.dataProvider.length)
-            return "";
-        else
-            return comboBox.dataProvider.getItemAt(childID - 1).toString();
-
-    }

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


Added back two missing [test] tags

Added back two missing [test] tags

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

--- FlexUnit4Test/src/flexUnitTests/flexUnit4/suites/frameworkSuite/cases/TestAssert.as
+++ FlexUnit4Test/src/flexUnitTests/flexUnit4/suites/frameworkSuite/cases/TestAssert.as
@@ -54,6 +54,7 @@
 	    }

 	//------------------------------------------------------------------------------
+		[Test]
 	    public function testAssertEquals():void
 	    {
 	        var  o : Object = new Object();
@@ -62,7 +63,7 @@
 	    }

 	//------------------------------------------------------------------------------
-
+		[Test]
 	    public function testAssertEqualsNull():void
 	    {
 	        Assert.assertEquals( null, null );


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/automation_air/src/mx/automation/delegates/containers/WindowedApplicationAutomationImpl.as
+++ frameworks/projects/automation_air/src/mx/automation/delegates/containers/WindowedApplicationAutomationImpl.as
@@ -0,0 +1,199 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.containers
+{
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationObject;
+	import mx.core.WindowedApplication;
+	import mx.core.mx_internal;
+	import mx.events.WindowExistenceEvent;
+	import mx.automation.IAutomationObjectHelper;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines the methods and properties required to perform instrumentation for the
+	 *  Canvas class.
+	 *
+	 *  @see mx.containers.Canvas
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 4
+	 */
+	public class WindowedApplicationAutomationImpl extends  ApplicationAutomationImpl
+	{
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(WindowedApplication, WindowedApplicationAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj Canvas object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function WindowedApplicationAutomationImpl(obj:WindowedApplication)
+		{
+			super(obj);
+			obj.showInAutomationHierarchy = true;
+
+			//if(obj.menu != null) // a menu already exists for this windowedApplication
+			//	menuChangeHandler(null);
+
+			obj.addEventListener(WindowExistenceEvent.WINDOW_CREATE,newWindowHandler);
+			obj.addEventListener(WindowExistenceEvent.WINDOW_CREATING,newWindowCreatingHandler);
+			obj.addEventListener("menuChanged", menuChangeHandler);
+			recordClick = true;
+		}
+
+
+		/**
+		 * @private
+		 */
+		private function menuChangeHandler(event:Event):void
+		{
+			Automation.automationManager2.registerNewFlexNativeMenu(windowedApplication.menu, windowedApplication.systemManager as DisplayObject);
+
+		}
+
+		/**
+		 *  @private
+		 */
+		private function newWindowHandler(event:WindowExistenceEvent):void
+		{
+			newIncompleteWindowCount --;
+			Automation.automationManager2.registerNewWindow(event.window as DisplayObject);
+		}
+
+		/**
+		 *  @private
+		 */
+		private var newIncompleteWindowCount:int = 0;
+
+		/**
+		 *  @private
+		 */
+		private function newWindowCreatingHandler(event:WindowExistenceEvent):void
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			newIncompleteWindowCount ++;
+			help.addSynchronization(function():Boolean
+			{
+				return newIncompleteWindowCount==0;
+			});
+		}
+
+		/**
+		 *  @private
+		 */
+		public function get windowedApplication():WindowedApplication
+		{
+			return  uiComponent as WindowedApplication;
+		}
+
+		/**
+		 * @private
+		 */
+		override public function get numAutomationChildren():int
+		{
+			//FlexNativeMenu can also be child of WindowedApplication.
+			//So this is added if it exists. We are doing this only for Window and
+			//WindowedApplication because at present we receive menuChanged
+			//event only on these 2 controls if a FlexNativeMenu is there
+			var count:int = super.numAutomationChildren;
+			if (windowedApplication.menu)
+				return(count + 1);
+			else
+				return count;
+		}
+
+
+		override public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			//FlexNativeMenu can also be child of WindowedApplication.
+			//So if it exists, it is considered to be the first child.
+			// We are doing this only for Window and
+			//WindowedApplication because at present we receive menuChanged
+			//event only on these 2 controls if a FlexNativeMenu is there
+			if (windowedApplication.menu)
+			{
+				if (index == 0)
+					return windowedApplication.menu as IAutomationObject;
+				index = index - 1;
+			}
+			return super.getAutomationChildAt(index);
+		}
+
+
+		/**
+		 * @private
+		 */
+		override public function getAutomationChildren():Array
+		{
+			var childList:Array = new Array();
+
+			// add the menu as the first element
+			if(windowedApplication.menu)
+				childList.push(windowedApplication.menu as IAutomationObject);
+
+			var tempList:Array = super.getAutomationChildren();
+			if (tempList)
+			{
+				var n:int  = tempList.length;
+				for(var i:int=0; i<n; i++)
+				{
+					childList.push(tempList[i] as IAutomationObject);
+				}
+			}
+
+			return childList;
+		}
+
+
+	}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19684
Author:   mcho@adobe.com
Date:     2011-01-10T23:28:35.118753Z

Log Message:
-----------
Allow the "alternatingItemColors" style accept a single color

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Tree.as
+++ frameworks/projects/mx/src/mx/controls/Tree.as
@@ -1442,7 +1442,10 @@
         }
         else
         {
-            colors = getStyle("alternatingItemColors");
+			var colorsStyle:Object = getStyle("alternatingItemColors");
+
+			if (colorsStyle)
+				colors = (colorsStyle is Array) ? (colorsStyle as Array) : [colorsStyle];
         }
         color = getStyle("backgroundColor");
         if (color === undefined)


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

--- frameworks/projects/mx/src/mx/containers/GridRow.as
+++ frameworks/projects/mx/src/mx/containers/GridRow.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


code clean

code clean

--- collect-flex/collect-flex-client/src/generated/flex/org/openforis/collect/metamodel/proxy/EntityDefinitionProxy.as
+++ collect-flex/collect-flex-client/src/generated/flex/org/openforis/collect/metamodel/proxy/EntityDefinitionProxy.as
@@ -31,6 +31,7 @@
 			}
 			return list;
 		}
+
 	}

 }


Bug fix

Bug fix

--- src/com/leeburrows/encoders/AsyncBMPEncoder.as
+++ src/com/leeburrows/encoders/AsyncBMPEncoder.as
@@ -129,7 +129,7 @@
 			//and a bit wasteful to check clock after every pixel.
 			for (var i:uint=0;i<sourceWidth;i++)
 			{
-				_encodedBytes.writeUnsignedInt(sourceBitmapData.getPixel(i, sourceHeight-currentY));
+				_encodedBytes.writeUnsignedInt(sourceBitmapData.getPixel(i, sourceHeight-1-currentY));
 			}
 			completedPixels += sourceWidth;
 			currentY++;


remove useless =

remove useless =

--- src/aerys/minko/scene/controller/light/DirectionalLightController.as
+++ src/aerys/minko/scene/controller/light/DirectionalLightController.as
@@ -91,7 +91,7 @@
 			localToWorld.getTranslation(_worldPosition);

 			// compute direction
-			_worldDirection	= localToWorld.deltaTransformVector(Vector4.Z_AXIS, _worldDirection);
+			localToWorld.deltaTransformVector(Vector4.Z_AXIS, _worldDirection);
 			_worldDirection.normalize();

 			// update world to screen/uv


Update fileHandler to account for missing key data

--- HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPStreamingMP2TSFileHandler.as
+++ HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPStreamingMP2TSFileHandler.as
@@ -95,7 +95,9 @@
 									break;
 								}
 							} else {
-								decryptToBuffer(input, 16);
+								if (!decryptToBuffer(input, 16)) {
+									break;
+								}
 							}
 							if (_decryptBuffer.readByte() == 0x47) {
 								_syncFound = true;
@@ -123,9 +125,13 @@
 							} else {
 								var bytesLeft:uint = input.bytesAvailable - 176;
 								if (bytesLeft > 0 && bytesLeft < 15) {
-									decryptToBuffer(input, input.bytesAvailable);
+									if (!decryptToBuffer(input, input.bytesAvailable)) {
+										break;
+									}
 								} else {
-									decryptToBuffer(input, 176);
+									if (!decryptToBuffer(input, 176)) {
+										break;
+									}
 								}
 							}
 							_decryptBuffer.readBytes(packet, 0, 187);
@@ -157,13 +163,14 @@
 			return output.length === 0 ? null : output;
 		}

-		private function decryptToBuffer(input:IDataInput, blockSize:int):void{
+		private function decryptToBuffer(input:IDataInput, blockSize:int):Boolean{
 			if (_key) {
 				// Clear buffer
 				if (_decryptBuffer.bytesAvailable == 0) {
 					_decryptBuffer.clear();
 				}
-				if (_key.type == "AES-128" && blockSize % 16 == 0) {
+
+				if (_key.type == "AES-128" && blockSize % 16 == 0 && _key.key) {
 					// Save buffer position
 					var currentPosition:uint = _decryptBuffer.position;
 					_decryptBuffer.position += _decryptBuffer.bytesAvailable;
@@ -188,8 +195,12 @@
 					_decryptBuffer.position = currentPosition;
 					// Update iv
 					_iv = newIv;
-				}
-			}
+
+					return true;
+				}
+			}
+
+			return false;
 		}

 		override public function endProcessFile(input:IDataInput):ByteArray


PTS/DTS timestamp unwrapping logic.

PTS/DTS timestamp unwrapping logic.

--- HLSPlugin/src/com/kaltura/hls/m2ts/PESProcessor.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/PESProcessor.as
@@ -38,6 +38,19 @@
         protected var pendingBuffers:Vector.<Object> = new Vector.<Object>();
         protected var pendingLastConvertedIndex:int = 0;

+        public var lastPTS:Number = 0, lastDTS:Number = 0;
+
+        /**
+         * Given a MPEG timestamp we've seen previously, determine if the new timestamp
+         * has wrapped and correct it to follow the old timestamp.
+         */
+        static function handleMpegTimestampWrap(newTime:Number, oldTime:Number):Number
+        {
+            while (!isNaN(oldTime) && (Math.abs(newTime - oldTime) > 4294967296))
+                newTime += (oldTime < newTime) ? -8589934592 : 8589934592;
+
+            return newTime;
+        }

         public function logStreams():void
         {
@@ -302,12 +315,12 @@
                 }
             }

-            // Handle partially overflowed PTS/DTS values.
-            //if (pts < (1<<31) && dts > 3*(1<<31))
-            //    dts -= 1<<33;
-
-            //if (dts < (1<<31) && pts > 3*(1<<31))
-            //    pts -= 1<<33;
+            // Condition PTS and DTS.
+            pts = handleMpegTimestampWrap(pts, lastPTS);
+            lastPTS = pts;
+
+            dts = handleMpegTimestampWrap(dts, lastDTS);
+            lastDTS = dts;

             packet.pts = pts;
             packet.dts = dts;


Fixed bug where hierarchy would constantly be requested after failure.

--- WeaveData/src/weave/data/DataSources/AbstractDataSource.as
+++ WeaveData/src/weave/data/DataSources/AbstractDataSource.as
@@ -30,13 +30,14 @@
 	import weave.api.data.IAttributeHierarchy;
 	import weave.api.data.IColumnReference;
 	import weave.api.data.IDataSource;
+	import weave.api.detectLinkableObjectChange;
 	import weave.api.getCallbackCollection;
 	import weave.api.newDisposableChild;
 	import weave.api.newLinkableChild;
 	import weave.api.reportError;
 	import weave.core.ClassUtils;
 	import weave.data.AttributeColumns.ProxyColumn;
-	import weave.primitives.AttributeHierarchy;
+	import weave.primitives.AttributeHierarchy;

 	/**
 	 * This is a base class to make it easier to develope a new class that implements IDataSource.
@@ -161,12 +162,13 @@
 			// TODO: check each column previously provided by getAttributeColumn()

 			// initialize hierarchy if it is null
-			if (_attributeHierarchy.value == null)
+			if (_attributeHierarchy.value == null && detectLinkableObjectChange(_requestedHierarchySubtreeStringMap, _attributeHierarchy))
 			{
 				// Clear the list of requested hierarchy subtrees.
 				// This will allow the hierarchy to be filled in automatically
 				// if its contents were cleared with that intention.
-				_requestedHierarchySubtreeStringMap = new Object();
+				_requestedHierarchySubtreeStringMap = {};
+				detectLinkableObjectChange(_requestedHierarchySubtreeStringMap, _attributeHierarchy);
 				initializeHierarchySubtree(null);
 			}


Fix missing Windows menubar?

Fix missing Windows menubar?

--- exporter/src/main/as/flump/export/ProjectController.as
+++ exporter/src/main/as/flump/export/ProjectController.as
@@ -194,6 +194,8 @@
             // If we're on a Mac, the menus will be set up at the application level.
             return;
         }
+
+        _win.nativeWindow.menu = new NativeMenu();

         var fileMenuItem  :NativeMenuItem =
             _win.nativeWindow.menu.addSubmenu(new NativeMenu(), "File");