Transferred from the Adobe Open Source Subversion Repository

Revision: 17841
Author:   hmuller@adobe.com
Date:     2010-09-24T15:36:59.172298Z

Log Message:
-----------
The ColumnHeaderBar classes have been substantially revised simplified and some of the horizontal scrolling flashing has been eliminated.  I've temporarily removed the column header bar event handling code since we weren't using it.   It will be restored when the column resizing feature is added.

The new versions of ColumnHeaderBar and ColumnHeaderBarLayout only depend on Grid (not GridDimensions or GridLayout).

QE notes: Failing mustella tests (bitmap and geometry changes) have been excluded
Doc notes:
Bugs: SDK-27967
Reviewer: Kevin
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRendererSkin.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowNode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ColumnHeaderBarLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/IGridRowBackground.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ColumnHeaderBar.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DefaultColumnHeaderRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridRowList.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -31,7 +31,6 @@
 import mx.events.PropertyChangeEvent;
 import mx.styles.ISimpleStyleClient;

-import spark.components.ColumnHeaderBar;
 import spark.components.DataGrid;
 import spark.components.Grid;
 import spark.components.Group;
@@ -299,7 +298,7 @@

         super.scrollPositionChanged();  // sets grid.scrollRect

-        // Only invalidate if we're clipping and scrollR extends outside validBounds
+        // Only invalidate if we're clipping and scrollR extends outside visisibleRenderersBounds

         const scrollR:Rectangle = grid.scrollRect;
         if (scrollR && !visibleItemRenderersBounds.containsRect(scrollR))
@@ -419,9 +418,10 @@
         visibleColumnSeparators = layoutLinearElements(grid.columnSeparator, grid.overlayLayer,
             visibleColumnSeparators, oldVisibleColumnIndices, visibleColumnIndices, layoutColumnSeparator, lastColumnIndex);

-        // Tell the ColumnHeaderBar to update its layout.
-
-        layoutColumnHeaderBar();
+        // HACK
+        var dg:DataGrid = grid.gridOwner as DataGrid;
+        if (dg && dg.columnHeaderBar)
+            dg.columnHeaderBar.invalidateDisplayList();

         // Layout the hoverIndicator, caretIndicator, and selectionIndicators

@@ -489,30 +489,6 @@
         return dataProvider.getItemAt(rowIndex);
     }

-    /**
-     *  @private
-     */
-    private function getColumnHeaderBar():ColumnHeaderBar
-    {
-        const dataGrid:DataGrid = grid.gridOwner as DataGrid;
-        if (dataGrid == null)
-            return null;
-
-        return dataGrid.columnHeaderBar;
-    }
-
-    /**
-     *  @private
-     */
-    private function getGridColumnHeader(columnIndex:int):IVisualElement
-    {
-        const headerBar:ColumnHeaderBar = getColumnHeaderBar();
-        if (headerBar == null || headerBar.dataGroup == null)
-            return null;
-
-        return headerBar.dataGroup.getElementAt(columnIndex);
-    }
-
 	//--------------------------------------------------------------------------
 	//
 	//  Updating the GridDimensions' typicalCell sizes and columnWidths
@@ -911,58 +887,6 @@
         visibleColumnIndices = newVisibleColumnIndices;
     }

-    /**
-     *  @private
-     *  ToDo(cframpto): what is the correct way to do this?
-     *
-     *  For now, header width is determined by the grid column width and the
-     *  header height, is the column bar header height if it has been explicitly
-     *  set, otherwise it is the column header bar dataGroup's
-     *  typicalLayoutElement height.
-     */
-    private function layoutColumnHeaderBar():void
-    {
-        const colGap:int = gridDimensions.columnGap;
-
-        const columnHeaderBar:ColumnHeaderBar = getColumnHeaderBar();
-        if (columnHeaderBar)
-        {
-            const layout:ColumnHeaderBarLayout =
-                columnHeaderBar.layout as ColumnHeaderBarLayout;
-            if (layout)
-                layout.updateLayout(this);
-        }
-    }
-
-    /**
-     *  @private
-     *  Callback for the ColumnHeaderBar layout to use to layout the column
-     *  header separators so all the layout code doesn't have to be duplicated.
-     */
-    mx_internal function layoutColumnHeaderSeparators(
-                        oldVisibleColumnIndices:Vector.<int>,
-                        visibleColumnIndices:Vector.<int>,
-                        visibleHeaderSeparators:Vector.<IVisualElement>):Vector.<IVisualElement>
-    {
-        // ToDo(cframpto): the factory and group should come in as args
-
-        const columnHeaderBar:ColumnHeaderBar = getColumnHeaderBar();
-        if (columnHeaderBar)
-        {
-            const factory:IFactory =
-                columnHeaderBar.headerSeparator ?
-                columnHeaderBar.headerSeparator : grid.columnSeparator;
-            const lastColumnIndex:int = gridDimensions.columnCount - 1;
-
-            visibleHeaderSeparators =  layoutLinearElements(factory,
-                columnHeaderBar.overlayLayer, visibleHeaderSeparators,
-                oldVisibleColumnIndices, visibleColumnIndices,
-                layoutHeaderSeparator, lastColumnIndex);
-        }
-
-        return visibleHeaderSeparators;
-    }
-
 	/**
      *  @private
      */
@@ -1017,9 +941,6 @@
     {
         renderer.visible = visible;

-
-        // Initialize the renderer's properties
-
         const gridRenderer:IGridItemRenderer = renderer as IGridItemRenderer;
         const gridColumn:GridColumn = getGridColumn(columnIndex);

@@ -1354,22 +1275,6 @@
         layoutGridElement(separator, x, y, width, height);
     }

-    private function layoutHeaderSeparator(separator:IVisualElement, columnIndex:int):void
-    {
-        var columnHeaderBar:ColumnHeaderBar = getColumnHeaderBar();
-        const width:Number = separator.getPreferredBoundsWidth();
-        const height:Number = columnHeaderBar.height;
-        const columnBounds:Rectangle = gridDimensions.getColumnBounds(columnIndex);
-
-        if (!columnBounds)
-            return;
-
-        // TBD: should center on gap here.
-        const x:Number = columnBounds.right;
-        const y:Number = columnBounds.top;
-        layoutGridElement(separator, x, y, width, height);
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Selection Indicators
@@ -1755,42 +1660,24 @@

     /**
      *  @private
-     *  The elements currently "in use".
-     *
-     *  Maps from an IFactory to a list of the elements allocated by that factory.
-     *  The list is represented by a Vector.<IVisualElement>.
-     */
-    private const allocatedElementMap:Dictionary = new Dictionary();  // TBD: should be weak refs here?
-
-    /**
-     *  @private
      *  The elements available for reuse.
      *
      *  Maps from an IFactory to a list of the elements that have been allocated by that factory
      *  and then freed.   The list is represented by a Vector.<IVisualElement>.
      */
-    private const freeElementMap:Dictionary = new Dictionary();  // and here?
+    private const freeElementMap:Dictionary = new Dictionary();

     /**
      *  @private
      *  Records the IFactory used to allocate a Element so that free(Element)
      *  can find it again.
      */
-    private const elementToFactoryMap:Dictionary = new Dictionary();  // and here?
+    private const elementToFactoryMap:Dictionary = new Dictionary();

     private function createGridElement(factory:IFactory):IVisualElement
     {
         const element:IVisualElement = factory.newInstance() as IVisualElement;
         elementToFactoryMap[element] = factory;
-
-        var elements:Vector.<IVisualElement> = allocatedElementMap[factory];
-        if (!elements)
-        {
-            elements = new Vector.<IVisualElement>();
-            allocatedElementMap[factory] = elements;
-        }
-        elements.push(element);
-
         return element;
     }

@@ -1810,6 +1697,7 @@
     }

     /**
+     *  @private
      *  Move the specified element to the free list after hiding it.  Return true if the
      *  element was added to the free list (freeElements).   Note that we do not actually
      *  remove the element from its parent.
@@ -1831,19 +1719,7 @@
         const factory:IFactory = elementToFactoryMap[element];
         if (!factory)
             return false;
-
-        // Remove the element from allocatedElementMap and then clear it
-
-        const elements:Vector.<IVisualElement> = allocatedElementMap[factory];
-        if (elements)
-        {
-            const index:int = elements.indexOf(element);
-            if (index != -1)
-                elements.splice(index, 1);
-            if (elements.length == 0)
-                delete allocatedElementMap[factory];
-        }
-
+
         // Add the renderer to the freeElementMap

         var freeElements:Vector.<IVisualElement> = freeElementMap[factory];
@@ -1871,8 +1747,8 @@
      *  This is supposed to eliminate problems with (text) components that defer reflow until the next
      *  updateDisplayList() pass.
      *
-     *  Since doing so is rather expensive, we economize when the renderer is a DefaultGridItemRenderer,
-     *  since UITextField reflows synchronously.
+     *  Since doing so is rather expensive, we economize when the renderer is an IUITextField
+     *  since UITextField and UIFTETextField reflow synchronously.
      */
     private function layoutItemRenderer(renderer:IGridItemRenderer, x:Number, y:Number, width:Number, height:Number):void
     {
@@ -2143,9 +2019,9 @@

     /**
      *  If the requested item renderer is visible, returns a reference to
-     *  the item renderer currently displayed at the specified cell.  Once the
-     *  item renderer is no longer visible it is recycled and its properties
-     *  will be reset.
+     *  the item renderer currently displayed at the specified cell.  Note
+     *  that once the returned item renderer is no longer visible it may be
+     *  recycled and its properties reset.
      *
      *  <p>If the requested item renderer is not visible then,
      *  each time this method is called, a new item renderer is created.  The


Transferred from the Adobe Open Source Subversion Repository

Revision: 2725
Author:   rfrishbe@adobe.com
Date:     2008-08-04T18:00:35.464035Z

Log Message:
-----------
When adding the new gumbo Application class in checkin 2382, in SystemManager we added code that called document.children.contains() if Application's not an IRawChildrenContainer.  However document.children doesn't exist; it should just be document.contains() rather than document.children.contains().

Also cleaned up a few imports for IRawChildrenContainer that weren't needed in list classes.

QE: Yes
Doc: No
Bugs: SDK-16274
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>

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

--- frameworks/projects/mx/src/mx/controls/List.as
+++ frameworks/projects/mx/src/mx/controls/List.as
@@ -49,7 +49,6 @@
 import mx.core.IIMESupport;
 import mx.core.IInvalidating;
 import mx.core.IPropertyChangeNotifier;
-import mx.core.IRawChildrenContainer;
 import mx.core.ScrollPolicy;
 import mx.core.UIComponent;
 import mx.core.UIComponentGlobals;


Transferred from the Adobe Open Source Subversion Repository

Revision: 12001
Author:   cframpto@adobe.com
Date:     2009-11-19T19:47:24.957716Z

Log Message:
-----------
Make List itemEditor work with FTETextInput via textInputClass style and remove unused _itemEditor from Tree.

QE notes:
Doc notes:
Bugs: SDK24172
Reviewer: Gordon
Tests run: checkintests, list tests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/MXFTEText.css</path>

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

--- frameworks/projects/mx/src/mx/controls/Tree.as
+++ frameworks/projects/mx/src/mx/controls/Tree.as
@@ -575,11 +575,6 @@

     /**
      *  @private
-     */
-    private var _itemEditor:IFactory = new ClassFactory(TextInput);
-
-    /**
-     *  @private
      *  Used to block giving focus to editor on focusIn
      */
     private var dontEdit:Boolean = false;


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

--- frameworks/projects/automation_dmv/src/mx/core/Version.as
+++ frameworks/projects/automation_dmv/src/mx/core/Version.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.
-//
-////////////////////////////////////////////////////////////////////////////////

 import mx.core.mx_internal;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19882
Author:   klin@adobe.com
Date:     2011-01-21T23:44:21.816516Z

Log Message:
-----------
Add RTE for a runtimeDPIProvider that doesn't subclass RuntimeDPIProvider by trying to coerce the created instance to RuntimeDPIProvider. Also, factor out classifyDPI to an mx_internal method for tooling in RuntimeDPIProvider.

QE notes: No
Doc notes: No
Bugs: SDK-29168
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: Yes, FB

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/DensityUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as</path>

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

--- frameworks/projects/framework/src/mx/utils/DensityUtil.as
+++ frameworks/projects/framework/src/mx/utils/DensityUtil.as
@@ -54,10 +54,7 @@
         if (!runtimeDPIProviderClass)
             runtimeDPIProviderClass = RuntimeDPIProvider;

-        var instance:RuntimeDPIProvider = (new runtimeDPIProviderClass()) as RuntimeDPIProvider;
-        if (!instance)
-            return NaN;
-
+        var instance:RuntimeDPIProvider = RuntimeDPIProvider(new runtimeDPIProviderClass());
         runtimeDPI = instance.runtimeDPI;

         return runtimeDPI;
@@ -90,5 +87,4 @@
         return targetDPI / sourceDPI;
     }
 }
-
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18809
Author:   egeorgie@adobe.com
Date:     2010-11-24T02:39:54.532608Z

Log Message:
-----------
Density Scaling

- Add authorDensity property to the Applicaiton
- Add DensityUtil class and DeviceDensity enum

QE notes:
Doc notes:
Bugs:
Reviewer: Glenn
Tests run: checkintests, cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/DensityUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeviceDensity.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/framework/src/mx/utils/DensityUtil.as
+++ frameworks/projects/framework/src/mx/utils/DensityUtil.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.utils
+{
+import mx.core.DeviceDensity;
+
+/**
+ *  The DensityUtil class is an all-static class with methods for working with
+ *  density within Flex.
+ *
+ *  Flex uses this class to calculate the scaling factor when automatic density
+ *  scaling is enabled for the Application.
+ *
+ *  @see mx.core.DeviceDensity
+ *  @see spark.components.Appliction#authorDensity
+ *  @see mx.core.ISystemManager#densityScale
+ */
+public class DensityUtil
+{
+    /**
+     *  Matches the specified DPI to DeviceDensity value.
+     *
+     *  Flex uses this method to calculate the current density value when an Application
+     *  authored for a specific density is adapted to the current one through scaling.
+     *
+     *  A number of devices can have slightly different DPI values and Flex maps these
+     *  into the several density buckets.
+     *
+     *  Flex uses the flash.system.Capabilities.screenDPI to calculate the
+     *  current device density.
+     *
+     *  @param dpi The DPI value.
+     *  @return The corresponding DeviceDensity value.
+     *
+     *  @see #getDensityScale
+     *  @see mx.core.DeviceDensity
+     *  @see spark.components.Appliction#authorDensity
+     *  @see mx.core.ISystemManager#densityScale
+     */
+    public static function screenDPIToDeviceDensity(dpi:Number):String
+    {
+        if (dpi < 200)
+            return DeviceDensity.PPI_160;
+
+        if (dpi <= 280)
+            return DeviceDensity.PPI_240;
+
+        return DeviceDensity.PPI_320;
+    }
+
+    /**
+     *  Calculates a scale factor to be used when element authored for
+     *  sourceDensity is rendered at targetDensity.
+     *
+     *  @param sourceDensity The DeviceDensity value for which a
+     *  resource is optimized.
+     *
+     *  @param targetDensity The DeviceDensity density value at
+     *  which a resource is rendered.
+     *
+     *  @return The scale factor to be applied to the resource at render time.
+     *
+     *  @see #screenDPIToDeviceDensity
+     *  @see mx.core.DeviceDensity
+     *  @see spark.components.Appliction#authorDensity
+     *  @see mx.core.ISystemManager#densityScale
+     */
+    public static function getDensityScale(sourceDensity:String, targetDensity:String):Number
+    {
+        // Unknown density returns NaN
+        if ((sourceDensity != DeviceDensity.PPI_160 && sourceDensity != DeviceDensity.PPI_240 && sourceDensity != DeviceDensity.PPI_320) ||
+            (targetDensity != DeviceDensity.PPI_160 && targetDensity != DeviceDensity.PPI_240 && targetDensity != DeviceDensity.PPI_320))
+        {
+            return NaN;
+        }
+
+        var density2Index:Function = function (density:String):int
+        {
+            return (density == DeviceDensity.PPI_160) ? 0 :
+                   (density == DeviceDensity.PPI_240) ? 1 : 2;
+        }
+
+        var sourceIndex:int = density2Index(sourceDensity);
+        var targetIndex:int = density2Index(targetDensity);
+
+        var scale:Number = scaleTable[ sourceIndex ][ targetIndex ];
+        return scale;
+    }
+
+    /**
+     *  @private
+     *  Scale table for the getDensityScale() method
+     */
+    private static const scaleTable:Array = [[ 160 / 160 /* 160 -> 160 */, 240 / 160 /* 160 -> 240*/, 320 / 160 /* 160 -> 320*/],
+                                             [ 160 / 240 /* 240 -> 160 */, 240 / 240 /* 240 -> 240*/, 320 / 240 /* 240 -> 320*/],
+                                             [ 160 / 320 /* 320 -> 160 */, 240 / 320 /* 320 -> 240*/, 320 / 320 /* 320 -> 320*/]];
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19289
Author:   klin@adobe.com
Date:     2010-12-10T21:55:23.388428Z

Log Message:
-----------
Fix TileLayout navigation for columns. If we're on the last column, make sure to update the row as well when navigating up.

QE notes: No
Doc notes: No
Bugs: SDK-25759
Reviewer: Carol
Tests run: cyclone server, checkintests
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/layouts/TileLayout.as
+++ frameworks/projects/spark/src/spark/layouts/TileLayout.as
@@ -1962,16 +1962,19 @@
         {
             // Make sure we don't return an index for an empty space in the last column.
             // newColumn is guaranteed to be greater than zero:
-
-            // Step 1: We can end up at the empty space in the last column if we moved down from
-            // the last item.
-            if (currentIndex == maxIndex && newRow > currentRow)
-                newRow = currentRow;
-
-            // Step 2: We can end up at the empty space in the last column if we moved right from
-            // the previous column.
-            if (newColumn == columnCount - 1 && newRow > maxIndex - rowCount * (columnCount - 1))
-                newColumn--;
+
+            if (newColumn == columnCount - 1)
+            {
+                // Step 1: We can end up at the empty space in the last column if we moved down from
+                // the last item.
+                if (currentIndex == maxIndex && newRow > currentRow)
+                    newRow = currentRow;
+
+                // Step 2: We can end up at the empty space in the last column if we moved right from
+                // the previous column.
+                if (newRow > maxIndex - rowCount * (columnCount - 1))
+                    newColumn--;
+            }

             return newColumn * rowCount + newRow;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 16702
Author:   klin@adobe.com
Date:     2010-06-28T19:29:10.048003Z

Log Message:
-----------
The following changes apply to Spark DataGrid only.   Code reviews have been deferred until the implementation is closer to completion.

-Add getRowIndexAt() to Grid and GridLayout.
-Added support in FindNearestNode() for using the most recently found node

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridRowList.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridRowList.as
@@ -193,6 +193,7 @@
         {
             _head = new GridRowNode(numColumns, index);
             _tail = _head;
+            _length++;
             return _head;
         }

@@ -278,7 +279,11 @@
         }

         // Uses last searched node if its closest to the target.
-        if (recentNode && temp < lastToIndex && temp < index)
+        if (lastToIndex < 0)
+        {
+            return null;
+        }
+        else if (recentNode && temp < lastToIndex && temp < index)
         {
             if (indexToRecent > 0)
                 result = findBefore(index, recentNode);
@@ -294,7 +299,8 @@
             result = findAfter(index, _head);
         }

-        recentNode = result;
+        if (result)
+            recentNode = result;

         return result;
     }
@@ -359,14 +365,35 @@
             return null;

         var indexToRecent:int;
+        var temp:int;
         var lastToIndex:int = _tail.rowIndex - index;
         var result:GridRowNode = null;

+        if (recentNode)
+        {
+            if (recentNode.rowIndex == index)
+                return recentNode;
+
+            indexToRecent = recentNode.rowIndex - index;
+            temp = Math.abs(indexToRecent);
+        }
+
+        if (index < _head.rowIndex)
+        {
+            result = null;
+        }
         // Uses last searched node if its closest to the target.
-        if (lastToIndex < 0)
+        else if (lastToIndex < 0)
         {
             result = _tail;
         }
+        else if (recentNode && temp < lastToIndex && temp < index)
+        {
+            if (indexToRecent > 0)
+                result = findNearestBefore(index, recentNode);
+            else
+                result = findNearestAfter(index, recentNode);
+        }
         else if (lastToIndex < index)
         {
             result = findNearestBefore(index, _tail);
@@ -375,6 +402,8 @@
         {
             result = findNearestAfter(index, _head);
         }
+
+        recentNode = result;

         return result;
     }


Fix incorrect name on particle removed event

--- src/org/flintparticles/common/events/ParticleEvent.as
+++ src/org/flintparticles/common/events/ParticleEvent.as
@@ -57,7 +57,7 @@
 		/**
 		 * The event dispatched by an emitter when a particle is removed from it (but doesn't die).
 		 */
-		public static var PARTICLE_REMOVED:String = "particleAdded";
+		public static var PARTICLE_REMOVED:String = "particleRemoved";

 		/**
 		 * The event dispatched by an emitter when a particle collides with another particle.


OPEN - issue REPRISE-42: add support for text-transform: capitalize to Label
http://j.fork.de:8080/browse/REPRISE-42

	- fixed and tested

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

--- src/reprise/controls/Label.as
+++ src/reprise/controls/Label.as
@@ -11,6 +11,7 @@

 package reprise.controls
 {
+	import reprise.utils.StringUtil;
 	import reprise.core.reprise;
 	import reprise.css.CSS;
 	import reprise.css.CSSDeclaration;
@@ -608,6 +609,11 @@
 					text = text.toLowerCase();
 					break;
 				}
+				case 'capitalize':
+				{
+					text = StringUtil.toTitleCase(text);
+					break;
+				}
 			}
 			return text;
 		}


Improved lattice positioning (now it stays attached to the left side of the screen)

--- springgraph/src/com/adobe/flex/extras/controls/springgraph/SpringGraph.as
+++ springgraph/src/com/adobe/flex/extras/controls/springgraph/SpringGraph.as
@@ -797,7 +797,11 @@
  			}
 			var scrollX: int = 0;
 			var scrollY: int = 0;
-
+			//for lattice to stick to the left side
+			if((itemBounds.left > 5)  && (creationComplete==true)) {
+				scrollLattice(-itemBounds.left/7, 0);
+				refresh();
+			}
  			if((itemBounds.left < 5) || (itemBounds.top < 5) && (creationComplete==true)) {
 				// some items are off the screen. Let's auto-scroll the display.
 				scrollX = 0;


Added follow path function. RecalculatePath()is no longer used but kept anyway.

--- Bin/Data/Scripts/15_Navigation.as
+++ Bin/Data/Scripts/15_Navigation.as
@@ -4,6 +4,8 @@
 //     - Performing path queries to the navigation mesh
 //     - Rebuilding the navigation mesh partially when adding or removing objects
 //     - Visualizing custom debug geometry
+//     - Raycasting drawable components
+//     - Make a node follow the Detour path

 #include "Scripts/Utilities/Sample.as"

@@ -17,6 +19,7 @@
 bool drawDebug = false;
 bool startPosDefined = false;
 bool endPosDefined = false;
+Node@ Jack;

 void Start()
 {
@@ -92,7 +95,14 @@
         if (size >= 3.0f)
             boxObject.occluder = true;
     }
-
+
+    // Create Jack node that will follow the path
+    Jack = scene_.CreateChild("Jack");
+    Jack.position = Vector3(-5.0f, 0.0f, 20.0f);
+    modelObject.model = cache.GetResource("Model", "Models/Jack.mdl");
+    modelObject.material = cache.GetResource("Material", "Materials/Jack.xml");
+    modelObject.castShadows = true;
+
     // Create a NavigationMesh component to the scene root
     NavigationMesh@ navMesh = scene_.CreateComponent("NavigationMesh");
     // Create a Navigable component to the scene root. This tags all of the geometry in the scene as being part of the
@@ -213,22 +223,25 @@
 {
     Vector3 hitPos;
     Drawable@ hitDrawable;
+    NavigationMesh@ navMesh = scene_.GetComponent("NavigationMesh");

     if (Raycast(250.0f, hitPos, hitDrawable))
     {
         bool setStart = input.qualifierDown[QUAL_SHIFT];
         if (setStart)
         {
-            startPos = hitPos;
+            startPos = navMesh.FindNearestPoint(hitPos, Vector3(1.0f, 1.0f, 1.0f));
             startPosDefined = true;
         }
         else
         {
-            endPos = hitPos;
+            endPos = navMesh.FindNearestPoint(hitPos, Vector3(1.0f, 1.0f, 1.0f));
             endPosDefined = true;
         }

-        RecalculatePath();
+        //RecalculatePath();
+        if (startPosDefined)
+            Jack.position = startPos; // Reset Jack position to start
     }
 }

@@ -260,7 +273,7 @@
         // Rebuild part of the navigation mesh, then recalculate path if applicable
         NavigationMesh@ navMesh = scene_.GetComponent("NavigationMesh");
         navMesh.Build(updateBox);
-        RecalculatePath();
+        //RecalculatePath();
     }
 }

@@ -311,6 +324,25 @@
     return false;
 }

+void followPath(float timeStep)
+{
+    if (startPosDefined && endPosDefined)
+    {
+        // Get next waypoint to reach
+        NavigationMesh@ navMesh = scene_.GetComponent("NavigationMesh");
+		currentPath = navMesh.FindPath(Jack.position, endPos);
+		if (currentPath.length < 2)
+		    return;
+		Vector3 nextWaypoint = currentPath[1]; // NB: currentPath[0] is the starting position
+        if (Floor(Jack.position.x) ==  Floor(endPos.x) && Floor(Jack.position.z) ==  Floor(endPos.z))
+            return;
+
+        // Rotate Jack toward next waypoint to reach and move
+        Jack.LookAt(nextWaypoint, Vector3(0.0f, 1.0f, 0.0f));
+        Jack.TranslateRelative(Vector3(0.0f, 0.0f, 1.0f) * 5 * timeStep);
+    }
+}
+
 void HandleUpdate(StringHash eventType, VariantMap& eventData)
 {
     // Take the frame time step, which is stored as a float
@@ -318,6 +350,9 @@

     // Move the camera, scale movement with time step
     MoveCamera(timeStep);
+
+    // Make Jack follow the Detour path
+    followPath(timeStep);
 }

 void HandlePostRenderUpdate(StringHash eventType, VariantMap& eventData)


Transferred from the Adobe Open Source Subversion Repository

Revision: 13200
Author:   cframpto@adobe.com
Date:     2009-12-23T19:58:35.410402Z

Log Message:
-----------
If you insertText() into the middle of formatted text, the format wasn’t being extended to the inserted text.

QE notes:
Doc notes:
Bugs: SDK-24481
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
@@ -369,26 +369,19 @@
         var textFlow:TextFlow = getTextFlowWithComposer();

         var operationState:SelectionState =
-            new SelectionState(textFlow, anchorPosition, activePosition);
+            new SelectionState(textFlow, anchorPosition, activePosition);
+
+        // On point selection remember pendling formats for next char typed.
+        operationState.selectionManagerOperationState = true;

         var op:ApplyFormatOperation =
             new ApplyFormatOperation(
                 operationState, leafFormat, paragraphFormat, containerFormat);
-
-        //ToDo: remove generations if not needed
-
-        //var beforeGeneration:uint = textFlow.generation;
-        //op.setGenerations(beforeGeneration, 0);
-
+
         var success:Boolean = op.doOperation();
         if (success)
         {
             textFlow.normalize();
-
-            // This has to be done after the normalize, because normalize
-            // increments the generation number.
-            //op.setGenerations(beforeGeneration, textFlow.generation);
-
             textFlow.flowComposer.updateAllControllers();
         }

@@ -524,8 +517,17 @@
         var absoluteStart:int = getAbsoluteStart(anchorPosition, activePosition);
         var absoluteEnd:int = getAbsoluteEnd(anchorPosition, activePosition);

+        // Need to get the format of the insertion point so that the inserted
+        // text will have this format.
+        var pointFormat:ITextLayoutFormat =
+            getCommonCharacterFormat(absoluteStart, absoluteStart);
+
         var operationState:SelectionState =
-            new SelectionState(textFlow, absoluteStart, absoluteEnd);
+            new SelectionState(textFlow, absoluteStart, absoluteEnd, pointFormat);
+
+        // If there is an interaction manager, this keeps it in sync with
+        // the results of this operation.
+        operationState.selectionManagerOperationState = true;

         var op:InsertTextOperation =
             new InsertTextOperation(operationState, insertText);
@@ -547,17 +549,6 @@
             // No point format.
             var selectionState:SelectionState =
                 new SelectionState(textFlow, insertPt, insertPt);
-
-            // If there is a selection manager, keep the selection in
-            // sync and clear the point format as the EditManager insertText
-            // operation does.
-            if (textFlow.interactionManager)
-            {
-                var selectionManager:SelectionManager =
-                    SelectionManager(textFlow.interactionManager);
-
-                selectionManager.setSelectionState(selectionState);
-            }

             var selectionEvent:SelectionEvent =
                 new SelectionEvent(SelectionEvent.SELECTION_CHANGE,


Transferred from the Adobe Open Source Subversion Repository

Revision: 7763
Author:   dsubrama@adobe.com
Date:     2009-06-11T22:45:36.057890Z

Log Message:
-----------
Simple null-check to fix SDK-21677.
Cleanup ASDoc entries for ArrayList for sub-task SDK-21591

QA: yes
Docs: no
Checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>

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

--- frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -395,7 +395,7 @@
     }

     /**
-     *  @copy mx.collections.ListCollectionView#addAll
+     *  @copy mx.collections.ListCollectionView#addAll()
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -408,7 +408,7 @@
     }

     /**
-     *  @copy mx.collections.ListCollectionView#addAllAt
+     *  @copy mx.collections.ListCollectionView#addAllAt()
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 4210
Author:   egreenfi@adobe.com
Date:     2008-12-01T23:35:46.830908Z

Log Message:
-----------
Enabled 3D effects support for Halo list based components.

Added ArrayList to the MXML manifest, with source as defaultProperty, so it can be used from MXML.

Review: Glenn
QA: None.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/collections/ArrayList.as
+++ frameworks/projects/framework/src/mx/collections/ArrayList.as
@@ -52,6 +52,7 @@

 [ResourceBundle("collections")]

+[DefaultProperty("source")]
 /**
  *  @private
  *  A simple implementation of IList that uses a backing Array.


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

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

 package mx.filters
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17274
Author:   rfrishbe@adobe.com
Date:     2010-08-11T18:08:34.293087Z

Log Message:
-----------
A lot of changes, most involving touch scrolling.

UIComponent: remove keepControlOfMouseDown, which was checked in accidentally

FocusManager: move a check for event.isPreventDefauled() from the mouseDown handler to the mouseFocusHandler.  It was probably accidentally added in the mouseDown handler in the first place since mousedown events were not prevent defaultable (they are now, though)

SystemManager: Make MouseDown events prevent defaultable.  We do this for mouseWheel handlers already.  This allows our components to communicate a little with regards to who's handling this event.  Currently only ButtonBase and ItemRenderer check for this.

Split up IconItemRenderer in to MobileItemRenderer and MobileIconItemRenderer.  MobileItemRenderer is still based on UIComponent and is in charge of drawing the background and has a single text component.  MobileIconItemRenderer will be a more complex item renderer that developers can use. I'm also moving both of these classes in to the mobilecomponents project and mapping them in the spark manifest so that developers can now use them.

ButtonBase and List: Clean up code around how we deal with touch scrolling and adding a delay to button.  We also make sure that if the Button was clicked quickly before the delay fires that we show the button in the down state for some minimum amount of time.

Scroller: clean up a lot of the touch scrolling code

QE notes: None
Doc notes: None
Bugs: SDK-27263, SDK-27173, SDK-27157, SDK-27016
Reviewer: Jason SJ for MobileItemRenderer/MobileIconItemRenderer, Hans for the rest (he's still working through it though)
Tests run: checkintests, all mustella (some mustella failed for me locally but also in a clean sandbox)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.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/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.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="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TouchScrollingEasing.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/IconItemRenderer.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/IconItemRenderer.as" copyfrom-rev="17121" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/PaddingStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/GapStyles.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -1874,6 +1874,9 @@
     {
         // trace("FocusManager: mouseFocusChangeHandler  in  = " + this._form.systemManager.loaderInfo.url);
     	// trace("FocusManager: mouseFocusChangeHandler " + event);
+
+        if (event.isDefaultPrevented())
+            return;

         // If relatedObject is null because we don't have access to the
         // object getting focus then allow the Player to set focus
@@ -2078,9 +2081,6 @@
         // trace("FocusManager mouseDownHandler in  = " + this._form.systemManager.loaderInfo.url);
         // trace("FocusManager mouseDownHandler target " + event.target);

-        if (event.isDefaultPrevented())
-            return;
-
 		// if the target is in a bridged application, let it handle the click.
 		var sm:ISystemManager = form.systemManager;
         var o:DisplayObject = getTopLevelFocusTarget(


Transferred from the Adobe Open Source Subversion Repository

Revision: 7537
Author:   rfrishbe@adobe.com
Date:     2009-06-03T20:25:36.987268Z

Log Message:
-----------
VideoPlayer fixes, including focus fixes and some other fixes.

For Focus:

SkinnableComponent:
- Now check the drawFocusAnyway flag before checking for focusManager.getFocus() != this because in the case of the video player volume bar, we don’t actually have a focusManager

TrackBase:
- Override of focusIn/OutHandler wasn’t calling super.focusIn/OutHandler().

Slider:
- Now instead of overriding setFocus() and calling stage.focus = thumb, we just override drawFocus() and tell the thumb to drawFocus().  This means we keep the focus ourselves and handle the keyDown events on ourself rather than on the thumb.

FocusSkin:
- Change the exit-early logic so that we don’t exit if we have no focusManager...we only exit if we don’t have a focusObject (and we sometimes rely on the focusManager for this focusObject).  FocusObject actually gets slammed in via SkinnableComponent, so this should be fine.

VideoPlayerVolumeBar:
- On focus in, open the drop down, validate it, and draw the focus on thumb.

VideoPlayer:
- set tabChildren = true so we can tab into the components

Skins (VideoPlayerSkin.mxml only):
- Change the layer of focused components with: focusIn="event.target.layer=1" focusOut="event.target.layer=0"

Other Changes:

TrackBase:
- Add official CHANGING event.  Work still needs to be done on dispatching it in all cases correctly.
- Remove the check for (!enabled) in the thumb_mouseDownHandler...this shouldn’t be needed thanks to Jason’s change.  We do this in Scroller as well, and I’ve got a local change for that which will come later as part of the Change/Changing ARB issue fix.

PopUpAnchor:
- Needs to take into account the fullScreenRect to get the popup to display correctly in those cases.

FlexEvent:
- Adding CHANGING event.

VideoPlayerScrubBar:
- Changed bufferedValue to an Array to handle a Range.

VideoPlayerVolumeBar/VideoPlayerVolumeBarEvent:
- “rollOverOpenDelay“: Change the “behavior property” to a style per the ARB decision.  I intentionally left it as a private static const before to make this change easier.
- Advertise a new event, mutedChange to go along with a new property muted, rather than rely on mutedButtonClick.

VideoPlayer:
- Add symbolColor metadata (this was already working...just no metadata for it).  Do I add color here?
- Add fullScreenHideControlDelay as part of ARB behavioral property decision
- Changes around volume bar and muted property and muteButtonChanged event.
- Fiex the full screen case...need to make sure to use globalToLocal() and localToGlobal() when positioning the object since fulLScreenRect is in global coordinates.  Also need to call LayoutManager.getInstance().validateNow() rather than just validateNow() because I need everythignt o be validated since not including the compoennt in a layout may change the coordinates of the parent component.
- In scrubBar_changeHandler, if scrubbing to the end of a video, don’t do it when streaming and you’ve called play() because the source is a String...there’s a bug in the FLVPlayback that doesn’t look like it’ll get fixed :-)
- Fixed a few other bugs..nothing too big

Defaults.css:
Set the behavioral properties in here

Skins:
- Set the height explicitly on the ThumbSkin..this is the exact pattern we use for Hslider/Vslider now
- Fix up the baseColor so it gets cleared in the full screen case
- Fix up the text styles so we are explicitly setting them in the fullScreen case.  They can now be styled via CSS in the non-fullScreen case and the color style should work.

QE Notes: -
Doc Notes: -
Bugs: SDK-21505, SDK-21352, SDK-21504, SDK-21503, SDK-21486, SDK-21485
Reviewer: Alex, Glenn
tests: checkintests, mustella tests for Scroller, ScrollBar, Slider

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerScrubBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/VideoPlayerVolumeBarEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/VideoPlayer.as
+++ frameworks/projects/spark/src/spark/components/VideoPlayer.as
@@ -23,21 +23,28 @@
 import flash.events.MouseEvent;
 import flash.events.ProgressEvent;
 import flash.events.TimerEvent;
+import flash.geom.Point;
 import flash.geom.Rectangle;
 import flash.utils.Timer;

+import mx.core.ContainerGlobals;
+import mx.core.IFlexDisplayObject;
 import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.events.SandboxMouseEvent;
+import mx.managers.IFocusManagerContainer;
+import mx.managers.LayoutManager;
 import mx.utils.BitFlagUtil;

 import spark.components.supportClasses.ButtonBase;
 import spark.components.supportClasses.Range;
 import spark.components.supportClasses.SkinnableComponent;
+import spark.components.supportClasses.StreamingVideoSource;
 import spark.components.supportClasses.ToggleButtonBase;
 import spark.events.TrackBaseEvent;
 import spark.events.VideoEvent;
+import spark.events.VideoPlayerVolumeBarEvent;
 import spark.primitives.VideoElement;
 import spark.primitives.supportClasses.TextGraphicElement;

@@ -141,6 +148,35 @@
 [Event(name="ready", type="spark.events.VideoEvent")]

 //--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../styles/metadata/BasicTextLayoutFormatStyles.as";
+
+/**
+ *  The time, in milli-seconds, to wait in fullscreen mode with no user-interaction
+ *  before hiding the video playback controls.
+ *
+ *  @default 3000
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="fullScreenHideControlsDelay", type="Number", inherit="no")]
+
+/**
+ *  @copy spark.components.supportClasses.GroupBase#style:symbolColor
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark")]
+
+//--------------------------------------
 //  SkinStates
 //--------------------------------------

@@ -294,6 +330,7 @@
  */
 public class VideoPlayer extends SkinnableComponent
 {
+
     //--------------------------------------------------------------------------
     //
     //  Class constants
@@ -330,15 +367,6 @@
      */
     private static const VOLUME_PROPERTY_FLAG:uint = 1 << 5;

-    /**
-     *  @private
-     *  The default value that we wait in fullscreen mode with no user-interaction
-     *  before the play controls go away.
-     *
-     *  @default 3000
-     */
-    private static const FULL_SCREEN_HIDE_CONTROLS_DELAY:Number = 3000;
-
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -356,6 +384,8 @@
     public function VideoPlayer()
     {
         super();
+
+        tabChildren = true;
     }

     //--------------------------------------------------------------------------
@@ -774,6 +804,9 @@
         {
             videoElementProperties = {muted: value};
         }
+
+        if (volumeBar)
+            volumeBar.muted = value;
     }

     //----------------------------------
@@ -1020,7 +1053,7 @@
         if (instance == videoElement)
         {
             videoElement.addEventListener(spark.events.VideoEvent.CLOSE, dispatchEvent);
-            videoElement.addEventListener(spark.events.VideoEvent.COMPLETE, dispatchEvent);
+            videoElement.addEventListener(spark.events.VideoEvent.COMPLETE, videoElement_completeHandler);
             videoElement.addEventListener(spark.events.VideoEvent.METADATA_RECEIVED, videoElement_metaDataReceivedHandler);
             videoElement.addEventListener(spark.events.VideoEvent.PLAYHEAD_UPDATE, videoElement_playHeadUpdateHandler);
             videoElement.addEventListener(ProgressEvent.PROGRESS, videoElement_progressHandler);
@@ -1088,7 +1121,10 @@
             videoElement.enabled = enabled;

             if (volumeBar)
-                volumeBar.value = volume;
+            {
+                volumeBar.value = videoElement.volume;
+                volumeBar.muted = videoElement.muted;
+            }

             if (scrubBar)
                 updateScrubBar();
@@ -1120,28 +1156,33 @@
         }
         else if (instance == muteButton)
         {
-            muteButton.selected = muted;
+            if (videoElement)
+                muteButton.selected = muted;
+
             muteButton.addEventListener(MouseEvent.CLICK, muteButton_clickHandler);
         }
         else if (instance == volumeBar)
         {
-            volumeBar.addEventListener(Event.CHANGE, volumeBar_changeHandler);
-            // TODO (rfrishbe): Need this to be a real event
-            volumeBar.addEventListener("muteButtonClick", muteButton_clickHandler);
             volumeBar.minimum = 0;
             volumeBar.maximum = 1;
             if (videoElement)
+            {
                 volumeBar.value = volume;
+                volumeBar.muted = muted;
+            }
+
+            volumeBar.addEventListener(Event.CHANGE, volumeBar_changeHandler);
+            volumeBar.addEventListener(VideoPlayerVolumeBarEvent.MUTED_CHANGE, volumeBar_mutedChangeHandler);
         }
         else if (instance == scrubBar)
         {
-            if (scrubBar)
+            if (videoElement)
                 updateScrubBar();

             scrubBar.addEventListener(TrackBaseEvent.THUMB_PRESS, scrubBar_thumbPressHandler);
             scrubBar.addEventListener(TrackBaseEvent.THUMB_RELEASE, scrubBar_thumbReleaseHandler);
             scrubBar.addEventListener(Event.CHANGE, scrubBar_changeHandler);
-            scrubBar.addEventListener("changing", scrubBar_changingHandler);
+            scrubBar.addEventListener(FlexEvent.CHANGING, scrubBar_changingHandler);
         }
         else if (instance == fullScreenButton)
         {
@@ -1154,7 +1195,7 @@
         }
         else if (instance == totalTimeLabel)
         {
-            if (totalTimeLabel)
+            if (videoElement)
                 updateTotalTime();
         }
     }
@@ -1248,7 +1289,7 @@
         else if (instance == volumeBar)
         {
             volumeBar.removeEventListener(Event.CHANGE, volumeBar_changeHandler);
-            volumeBar.removeEventListener("muteButtonClick", muteButton_clickHandler);
+            volumeBar.removeEventListener(VideoPlayerVolumeBarEvent.MUTED_CHANGE, volumeBar_mutedChangeHandler);
         }
         else if (instance == scrubBar)
         {
@@ -1348,8 +1389,7 @@
             scrubBar.value = isNaN(videoElement.playheadTime) ? 0 : videoElement.playheadTime;
         }

-        if (scrubBar is VideoPlayerScrubBar)
-            VideoPlayerScrubBar(scrubBar).bufferedValue = videoElement.mx_internal::videoPlayer.bytesLoaded/videoElement.mx_internal::videoPlayer.bytesTotal * videoElement.totalTime;
+        scrubBar.bufferedRange = [0, videoElement.mx_internal::videoPlayer.bytesLoaded/videoElement.mx_internal::videoPlayer.bytesTotal * videoElement.totalTime];
     }

    /**
@@ -1440,7 +1480,8 @@
      */
     private function videoElement_playHeadChangedHandler(event:Event):void
     {
-        updateScrubBar();
+        if (scrubBar)
+            updateScrubBar();

         if (playheadTimeLabel)
             updatePlayheadTime();
@@ -1454,7 +1495,8 @@
      */
     private function videoElement_totalTimeChangedHandler(event:Event):void
     {
-        updateScrubBar();
+        if (scrubBar)
+            updateScrubBar();

         if (totalTimeLabel)
             updateTotalTime();
@@ -1468,7 +1510,8 @@
      */
     private function videoElement_playHeadUpdateHandler(event:spark.events.VideoEvent):void
     {
-        updateScrubBar();
+        if (scrubBar)
+            updateScrubBar();

         if (playheadTimeLabel)
             updatePlayheadTime();
@@ -1567,9 +1610,11 @@
             beforeFullScreenY = this.y;
             includeInLayout = false;
             setLayoutBoundsSize(stage.fullScreenWidth, stage.fullScreenHeight);
-            this.validateNow();
-            this.x = -(2*width);
-            this.y = -(2*height);
+            LayoutManager.getInstance().validateNow();
+
+            var newLocation:Point = parent.globalToLocal(new Point((-2*width), (-2*height)));
+            this.x = newLocation.x;
+            this.y = newLocation.y;

             // this is for video performance reasons
             videoElement.mx_internal::videoPlayer.smoothing = false;
@@ -1578,11 +1623,13 @@
             // now into full screen we go
             // TODO: what if we're sandboxed...can we get the stage?
             stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenEventHandler);
-            stage.fullScreenSourceRect = new Rectangle(x, y, width, height);
+
+            var realPoint:Point = parent.localToGlobal(new Point(x, y));
+            stage.fullScreenSourceRect = new Rectangle(realPoint.x, realPoint.y, width, height);
             stage.displayState = StageDisplayState.FULL_SCREEN;

             // start timer for detecting for mouse movements/clicks to hide the controls
-            fullScreenHideControlTimer = new Timer(FULL_SCREEN_HIDE_CONTROLS_DELAY, 1);
+            fullScreenHideControlTimer = new Timer(getStyle("fullScreenHideControlsDelay"), 1);
             fullScreenHideControlTimer.addEventListener(TimerEvent.TIMER_COMPLETE,
                 fullScreenHideControlTimer_timerCompleteHandler, false, 0, true);

@@ -1627,7 +1674,7 @@
         }
         else
         {
-            fullScreenHideControlTimer = new Timer(FULL_SCREEN_HIDE_CONTROLS_DELAY, 1);
+            fullScreenHideControlTimer = new Timer(getStyle("fullScreenHideControlsDelay"), 1);
             fullScreenHideControlTimer.addEventListener(TimerEvent.TIMER_COMPLETE,
                 fullScreenHideControlTimer_timerCompleteHandler, false, 0, true);
         }
@@ -1726,6 +1773,14 @@

     /**
      *  @private
+     */
+    private function volumeBar_mutedChangeHandler(event:VideoPlayerVolumeBarEvent):void
+    {
+        muted = event.muted;
+    }
+
+    /**
+     *  @private
      *  When someone is holding the scrubBar, we don't want to update the
      *  range's value--for this time period, we'll let the user completely
      *  control the range.
@@ -1787,13 +1842,23 @@
         if (scrubBarMouseCaptured)
         {
             videoElement.mx_internal::videoPlayer.flvplayback_internal::flushQueuedCmds();
+
+            // check if streaming and play()...then don't seek to last value
+            if (videoElement.mx_internal::videoPlayer.isRTMP && !(source is StreamingVideoSource) && scrubBar.value == totalTime)
+            {
+                seek(Math.max(0, scrubBar.value-0.5));
+            }
+            else
+            {
+                seek(scrubBar.value);
+            }
+        }
+        else
+        {
             seek(scrubBar.value);
         }
-        else
-        {
-            scrubBarChanging = false;
-            seek(scrubBar.value);
-        }
+
+        scrubBarChanging = false;
     }
 }
 }


When we add a chat display, we must remove it once we're done.

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

--- src/as/com/threerings/ezgame/client/GameControlBackend.as
+++ src/as/com/threerings/ezgame/client/GameControlBackend.as
@@ -127,6 +127,7 @@
     public function shutdown () :void
     {
         _ezObj.removeListener(this);
+        _ctx.getChatDirector().removeChatDisplay(this);
         _ctx.getClient().getClientObject().removeListener(_userListener);

         _userFuncs = null; // disconnect


Fixed number of expected ISOs shown in the "Generate ISOs" dialog (reported in #566).

--- src/com/cenix/louice/shared/model/vos/IsoRequestMember.as
+++ src/com/cenix/louice/shared/model/vos/IsoRequestMember.as
@@ -35,7 +35,7 @@
         }

         public function set number_aliquots(number_aliquots:uint):void {
-            _expected_number_isos = number_aliquots;
+            _number_aliquots = number_aliquots;
         }

         public function get expected_number_isos():* {


Signal.addCallback() returns false on duplicate callback adding

--- src/ru/whitered/kote/Signal.as
+++ src/ru/whitered/kote/Signal.as
@@ -43,17 +43,18 @@
 		 *
 		 * @param callback
 		 */
-		public function addCallback(callback:Function):void
+		public function addCallback(callback:Function):Boolean
 		{
 			if(callbacks)
 			{
-				if(callbacks.indexOf(callback) >= 0) throw new Error("The listener is already registered");
+				if(callbacks.indexOf(callback) >= 0) return false;
 				callbacks[callbacks.length] = callback;
 			}
 			else
 			{
 				callbacks = Vector.<Function>([callback]);
 			}
+			return true;
 		}


fixed lost mapmarker functions

fixed lost mapmarker functions

--- src/eu/stefaner/elasticlists/ui/DefaultGraphicsFactory.as
+++ src/eu/stefaner/elasticlists/ui/DefaultGraphicsFactory.as
@@ -114,5 +114,21 @@
 		public static function getButton(p : DisplayObjectContainer, x : Number = 0, y : Number = 0, label : String = "", handler : Function = null) : PushButton {
 			return new PushButton(p, x, y, label, handler);
 		}
+
+		public static function getMapMarkerBackground() : Sprite {
+			var s : Sprite = new Sprite();
+			s.graphics.beginFill(0x333333);
+			//s.graphics.lineStyle(0, 0xCCCCCC, 1);
+			s.graphics.drawCircle(0, 0, 1);
+			return s;
+		}
+
+		public static function getMapMarkerSelectionMarker() : Sprite {
+			var s : Sprite = new Sprite();
+			s.graphics.beginFill(0xDDFF99);
+			//s.graphics.lineStyle(0, 0xCCCCCC, 1);
+			s.graphics.drawCircle(0, 0, 1);
+			return s;
+		}
 	}
 }


final documentation update today

final documentation update today

--- source/classes/potato/core/config/YAMLConfig.as
+++ source/classes/potato/core/config/YAMLConfig.as
@@ -9,48 +9,60 @@
 import potato.core.dsl.ConditionalParser;

 /**
+ *  Dispatched when the YAML file has finished loading and has been parsed.
+ *
+ *  @eventType flash.events.Event.INIT
+ */
+[Event(name="init", type="flash.events.Event")]
+
+/**
+ * Configuration based on YAML files
  *
  * @langversion ActionScript 3
- * @playerversion Flash 9.0.0
+ * @playerversion Flash 10.0.0
  *
- * @author Lucas Dupin
+ * @author Lucas Dupin, Fernando França
  * @since  15.06.2010
  */
 public class YAMLConfig extends ObjectConfig implements IConfig
 {
-	//JSON URL
+	/**
+	 * URL for the YAML file
+	 * @private
+	 */
 	protected var _url:String;

+	/**
+	 * @param	url	 The URL of the YAML configuration file
+	 * @constructor
+	 */
 	public function YAMLConfig(url:String)
 	{
 		_url = url;
 	}

 	/**
-	 * Starts to load the JSON
+	 * Starts loading the YAML file
 	 */
 	override public function init():void
 	{
-		//Loading our file!
-		var l:URLLoader = new URLLoader(new URLRequest(_url));
-		l.addEventListener(Event.COMPLETE, onConfigLoaded);
+		var urlLoader:URLLoader = new URLLoader(new URLRequest(_url));
+		urlLoader.addEventListener(Event.COMPLETE, onConfigLoaded);
 	}

 	/**
+	 * Parses the YAML file after it has been loaded and dispatches the INIT event
 	 * @private
 	 */
-	public function onConfigLoaded(e:Event):void
+	protected function onConfigLoaded(e:Event):void
 	{
-		//Removing listener, so that we won't have memory leaks
+		// Removing listener, so that we won't have memory leaks
 		e.target.removeEventListener(Event.COMPLETE, onConfigLoaded);

-		//var unpaserdConfig:Object = YAML.decode(e.target.data);
-
+		// Decode YAML
 		_config = YAML.decode(e.target.data);

-		//Continue from where we left
-		//_config = unpaserdConfig;
-
+		// Notify
 		dispatchEvent(new Event(Event.INIT));
 	}


- bugfix: Fixed horizontal centering for absolutely positioned elements

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

--- src/reprise/ui/layoutmanagers/CSSBoxModelLayoutManager.as
+++ src/reprise/ui/layoutmanagers/CSSBoxModelLayoutManager.as
@@ -11,8 +11,8 @@

 package reprise.ui.layoutmanagers
 {
-	import reprise.css.ComputedStyles;
 	import reprise.core.reprise;
+	import reprise.css.ComputedStyles;
 	import reprise.ui.UIComponent;

 	import flash.display.DisplayObject;
@@ -137,15 +137,25 @@
 					}
 				}
 				else if (child.positionInFlow ||
-					(child.autoFlags.left && child.autoFlags.right))
+					child.autoFlags.marginLeft && child.autoFlags.marginRight &&
+					!child.autoFlags.left && !child.autoFlags.right)
 				{
 					if (child.autoFlags.marginLeft)
 					{
 						if (child.autoFlags.marginRight)
 						{
 							//center horizontally
-							child.x = elementStyle.paddingLeft +
-								Math.round(totalAvailableWidth / 2 - child.outerWidth / 2);
+							var offset : int = elementStyle.paddingLeft;
+							var availableWidth : int = totalAvailableWidth;
+							//for absolutely positioned elements, add 'left' and 'right' to the
+							//calculation
+							if (!child.positionInFlow)
+							{
+								offset += childStyle.left;
+								availableWidth -= childStyle.left + childStyle.right;
+							}
+							child.x = offset +
+								Math.round(availableWidth / 2 - child.outerWidth / 2);
 						}
 						else
 						{


F Indentation

F Indentation

--- src/aerys/minko/render/effect/basic/BasicShader.as
+++ src/aerys/minko/render/effect/basic/BasicShader.as
@@ -111,12 +111,12 @@
 		 * @param priority Default value is 0.
 		 * @param target Default value is null.
 		 */
-		public function BasicShader(priority	: Number		= 0,
-								  target	: RenderTarget	= null)
+		public function BasicShader(target		: RenderTarget	= null,
+									priority	: Number		= 0.)
 		{
 			// save priority and target
-			_priority				= priority;
-			_target					= target;
+			_target	= target;
+			_priority = priority;

 			// init shader parts
 			_vertexAnimationPart	= new VertexAnimationShaderPart(this);


Cruft removal.

Cruft removal.

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

--- src/as/com/threerings/crowd/client/OccupantDirector.as
+++ src/as/com/threerings/crowd/client/OccupantDirector.as
@@ -21,7 +21,6 @@

 package com.threerings.crowd.client {

-import com.threerings.util.Iterator;
 import com.threerings.util.ObserverList;
 import com.threerings.util.Name;


Improve test app

Improve test app

Modularized the different tests, so it's easier to test specific
features.

--- test/src/FRESteamWorksTest.as
+++ test/src/FRESteamWorksTest.as
@@ -27,68 +27,44 @@
 	{
 		public var Steamworks:FRESteamWorks = new FRESteamWorks();
 		public var tf:TextField;
+
+		private var _buttonPos:int = 5;
+
 		public function FRESteamWorksTest()
 		{
 			tf = new TextField();
-			tf.width = stage.stageWidth;
+			tf.x = 160;
+			tf.width = stage.stageWidth - tf.x;
 			tf.height = stage.stageHeight;
 			addChild(tf);

-			tf.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
+			addButton("Check stats/achievements", checkAchievements);
+			addButton("Toggle achievement", toggleAchievement);
+			addButton("Toggle cloud enabled", toggleCloudEnabled);
+			addButton("Toggle file", toggleFile);
+			addButton("Publish file", publishFile);

 			Steamworks.addEventListener(SteamEvent.STEAM_RESPONSE, onSteamResponse);
 			NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExit);
 			try {
 				Steamworks.useCrashHandler(480, "1.0", "Feb 20 2013", "21:42:20");
 				if(!Steamworks.init()){
-					tf.appendText("STEAMWORKS API is NOT available\n");
+					log("STEAMWORKS API is NOT available");
 					return;
 				}

 				log("STEAMWORKS API is available\n");
 				log("User ID: " + Steamworks.getUserID());
 				log("Persona name: " + Steamworks.getPersonaName());
-
-				//comment.. current stats and achievement ids are from steam example app which is provided with their SDK
-				log("isAchievement('ACH_WIN_ONE_GAME') == "+Steamworks.isAchievement("ACH_WIN_ONE_GAME"));
-				log("isAchievement('ACH_TRAVEL_FAR_SINGLE') == "+Steamworks.isAchievement("ACH_TRAVEL_FAR_SINGLE"));
-				log("setStatFloat('FeetTraveled') == "+Steamworks.setStatFloat('FeetTraveled', 21.3));
-				log("setStatInt('NumGames', 2) == "+Steamworks.setStatInt('NumGames', 2));
-				Steamworks.storeStats();
-				log("getStatInt('NumGames') == "+Steamworks.getStatInt('NumGames'));
-				log("getStatFloat('FeetTraveled') == "+Steamworks.getStatFloat('FeetTraveled'));
-
-				log("setCloudEnabledForApp(false) == "+Steamworks.setCloudEnabledForApp(false) );
-				log("setCloudEnabledForApp(true) == "+Steamworks.setCloudEnabledForApp(true) );
 				log("isCloudEnabledForApp() == "+Steamworks.isCloudEnabledForApp() );
 				log("getFileCount() == "+Steamworks.getFileCount() );
 				log("fileExists('test.txt') == "+Steamworks.fileExists('test.txt') );

-				/*
-				if(Steamworks.fileExists('SAVE_SLOT_1.dfq')) {
-					var str:String = readFileFromCloud('SAVE_SLOT_1.dfq');
-					log("readFileFromCloud('test.txt') == "+ str.length + " - " + str);
-					log("Xml? " + XML(str).children().length());
-				}
-				*/
-
-				//comment.. writing to app with id 480 is somehow not working, but works with our real appId
-				log("writeFileToCloud('test.txt','hello steam') == "+writeFileToCloud('test.txt','hello steam'));
-				log("readFileFromCloud('test.txt') == "+readFileFromCloud('test.txt') );
-				//-----------
-
-				// UGC / workshop stuff
-				var res:Boolean = Steamworks.publishWorkshopFile("test.txt", null, 480,
-					"Test.txt", "Test.txt", WorkshopConstants.VISIBILITY_Private,
-					WorkshopConstants.FILETYPE_Community);
-				log("publishWorkshopFile('test.txt' ...) == " + res);
-
-				//Steamworks.requestStats();
 				Steamworks.resetAllStats(true);
 			} catch(e:Error) {
-				tf.appendText("*** ERROR ***");
-				tf.appendText(e.message + "\n");
-				tf.appendText(e.getStackTrace() + "\n");
+				log("*** ERROR ***");
+				log(e.message);
+				log(e.getStackTrace());
 			}

 		}
@@ -96,6 +72,7 @@
 			tf.appendText(value+"\n");
 			tf.scrollV = tf.maxScrollV;
 		}
+
 		public function writeFileToCloud(fileName:String, data:String):Boolean {
 			var dataOut:ByteArray = new ByteArray();
 			dataOut.writeUTFBytes(data);
@@ -114,26 +91,58 @@
 			return result;
 		}

-		public function onClick(e:MouseEvent):void{
-			log("--click--");
-			if(!Steamworks.isReady){
-				log("not able to set achievement\n");
-				return;
-			}
+		private function checkAchievements(e:Event = null):void {
+			if(!Steamworks.isReady) return;

-			if(!Steamworks.isAchievement("ACH_WIN_ONE_GAME")) {
+			// current stats and achievement ids are from steam example app
+			log("isAchievement('ACH_WIN_ONE_GAME') == "+Steamworks.isAchievement("ACH_WIN_ONE_GAME"));
+			log("isAchievement('ACH_TRAVEL_FAR_SINGLE') == "+Steamworks.isAchievement("ACH_TRAVEL_FAR_SINGLE"));
+			log("setStatFloat('FeetTraveled') == "+Steamworks.setStatFloat('FeetTraveled', 21.3));
+			log("setStatInt('NumGames', 2) == "+Steamworks.setStatInt('NumGames', 2));
+			Steamworks.storeStats();
+			log("getStatInt('NumGames') == "+Steamworks.getStatInt('NumGames'));
+			log("getStatFloat('FeetTraveled') == "+Steamworks.getStatFloat('FeetTraveled'));
+		}
+
+		private function toggleAchievement(e:Event = null):void{
+			if(!Steamworks.isReady) return;
+
+			var result:Boolean = Steamworks.isAchievement("ACH_WIN_ONE_GAME");
+			log("isAchievement('ACH_WIN_ONE_GAME') == " + result);
+			if(!result) {
 				log("setAchievement('ACH_WIN_ONE_GAME') == "+Steamworks.setAchievement("ACH_WIN_ONE_GAME"));
 			} else {
 				log("clearAchievement('ACH_WIN_ONE_GAME') == "+Steamworks.clearAchievement("ACH_WIN_ONE_GAME"));
 			}
+		}

-			if(Steamworks.fileExists('test.txt')){
+		private function toggleCloudEnabled(e:Event = null):void {
+			if(!Steamworks.isReady) return;
+
+			var enabled:Boolean = Steamworks.isCloudEnabledForApp();
+			log("isCloudEnabledForApp() == " + enabled);
+			log("setCloudEnabledForApp(" + !enabled + ") == " + Steamworks.setCloudEnabledForApp(!enabled));
+			log("isCloudEnabledForApp() == " + Steamworks.isCloudEnabledForApp());
+		}
+
+		private function toggleFile(e:Event = null):void {
+			if(!Steamworks.isReady) return;
+
+			var result:Boolean = Steamworks.fileExists('test.txt');
+			log("fileExists('test.txt') == " + result);
+			if(result){
 				log("readFileFromCloud('test.txt') == "+readFileFromCloud('test.txt') );
-				log("Steamworks.fileDelete('test.txt') == "+Steamworks.fileDelete('test.txt'));
+				log("fileDelete('test.txt') == "+Steamworks.fileDelete('test.txt'));
 			} else {
 				log("writeFileToCloud('test.txt','click') == "+writeFileToCloud('test.txt','click'));
 			}
-			//Steamworks.storeStats();
+		}
+
+		private function publishFile(e:Event = null):void {
+			var res:Boolean = Steamworks.publishWorkshopFile("test.txt", "", 480,
+				"Test.txt", "Test.txt", WorkshopConstants.VISIBILITY_Private,
+				["TestTag"], WorkshopConstants.FILETYPE_Community);
+			log("publishWorkshopFile('test.txt' ...) == " + res);
 		}

 		public function onSteamResponse(e:SteamEvent):void{
@@ -156,5 +165,29 @@
 			log("Exiting application, cleaning up");
 			Steamworks.dispose();
 		}
+
+		private function addButton(label:String, callback:Function):void {
+			var button:Sprite = new Sprite();
+			button.graphics.beginFill(0xaaaaaa);
+			button.graphics.drawRoundRect(0, 0, 150, 30, 5, 5);
+			button.graphics.endFill();
+			button.buttonMode = true;
+			button.useHandCursor = true;
+			button.addEventListener(MouseEvent.CLICK, callback);
+			button.x = 5;
+			button.y = _buttonPos;
+			_buttonPos += button.height + 5;
+
+			var text:TextField = new TextField();
+			text.text = label;
+			text.width = 140;
+			text.height = 25;
+			text.x = 5;
+			text.y = 5;
+			text.mouseEnabled = false;
+
+			button.addChild(text);
+			addChild(button);
+		}
 	}
 }


TextFieldHelper: another autoSize bug fix

--- src/ras3r/reaction_view/helpers/TextFieldHelper.as
+++ src/ras3r/reaction_view/helpers/TextFieldHelper.as
@@ -61,7 +61,6 @@
 		{
 			_autoSize = s;
 			setProperty('autoSize', s);
-			reset_text_size();
 		}

 		/**
@@ -87,7 +86,6 @@
 			// apply new text format
 			this.defaultTextFormat = tf;
 			this.setTextFormat(tf);
-			reset_text_size();
 		}

 		/**
@@ -125,6 +123,7 @@
 		{
 			proxied_object ||= display_object;
 			super(proxied_object);
+			proxied_object.addEventListener('render', after_textfield_render);
 		}

 		/**
@@ -149,28 +148,32 @@
 			this.htmlText = e.newValue;
 		}

+		private function after_textfield_render (e:Object) :void
+		{
+			reset_text_size();
+		}
+
+
 		private function reset_text_size () :void
 		{
 			// if autoSizing, work around scroll bug with this height hack
 			if (_autoSize != 'none')
 			{
+				proxied_object.autoSize = _autoSize;
 				with (proxied_object)
 				{
 					autoSize = _autoSize;
-					var h:Number = textHeight;
+					var h:Number = height;
 					autoSize = 'none';
-					height = h + getTextFormat().leading;
+					height = h + getTextFormat().leading + 4;
 				}
 			}
 		}

 		private function set_text_property (p:String, t:String) :void
 		{
-			// if autoSizing, work around scroll bug with this height hack
-			if (_autoSize != 'none') proxied_object.autoSize = _autoSize;
 			t ||= '';
 			setProperty(p, t);
-			reset_text_size();
 		}
 	}
 }


Added read and write UTF to BinaryData

Added read and write UTF to BinaryData

--- frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
+++ frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
@@ -387,5 +387,191 @@
             }
         }
 	}
+
+    /**
+     *  Reads a UTF-8 string from the byte stream.
+     *  The string is assumed to be prefixed with an unsigned short indicating the length in bytes.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.7.0
+     */
+    public function readUTF():String
+    {
+        COMPILE::SWF
+        {
+            return ba.readUTF();
+        }
+        // no need to do anything in AS
+        COMPILE::JS
+        {
+            //TODO Doing nothing about the length for now
+            return this.readUTFBytes(ba.byteLength);
+        }
+    }
+
+    /**
+     *  Reads a sequence of UTF-8 bytes specified by the length parameter from the byte stream and returns a string.
+     *
+     *  @param An unsigned short indicating the length of the UTF-8 bytes.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.7.0
+     */
+    public function readUTFBytes(length:uint):String
+    {
+        COMPILE::SWF
+        {
+            return ba.readUTFBytes(length);
+        }
+
+        COMPILE::JS
+        {
+            // Code taken from GC
+            // Use native implementations if/when available
+            var bytes:Uint8Array = new Uint8Array(ba,_position,length);
+            if('TextDecoder' in window)
+            {
+                var decoder:TextDecoder = new TextDecoder('utf-8');
+                return decoder.decode(bytes);
+            }
+
+            var out:Array = [];
+            var pos:int = 0;
+            var c:int = 0;
+            var c1:int;
+            var c2:int;
+            var c3:int;
+            var c4:int;
+            while (pos < bytes.length)
+            {
+                c1 = bytes[pos++];
+                if (c1 < 128) {
+                    out[c++] = String.fromCharCode(c1);
+                }
+                else if (c1 > 191 && c1 < 224)
+                {
+                    c2 = bytes[pos++];
+                    out[c++] = String.fromCharCode((c1 & 31) << 6 | c2 & 63);
+                }
+                else if (c1 > 239 && c1 < 365)
+                {
+                    // Surrogate Pair
+                    c2 = bytes[pos++];
+                    c3 = bytes[pos++];
+                    c4 = bytes[pos++];
+                    var u:int = ((c1 & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63) - 0x10000;
+                    out[c++] = String.fromCharCode(0xD800 + (u >> 10));
+                    out[c++] = String.fromCharCode(0xDC00 + (u & 1023));
+                }
+                else
+                {
+                    c2 = bytes[pos++];
+                    c3 = bytes[pos++];
+                    out[c++] = String.fromCharCode((c1 & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
+                }
+            }
+            return out.join('');
+        }
+    }
+
+
+    /**
+     *  Writes a UTF-8 string to the byte stream.
+     *  The length of the UTF-8 string in bytes is written first, as a 16-bit integer,
+     *  followed by the bytes representing the characters of the string.
+     *
+     *  @param The string value to be written.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.7.0
+     */
+    public function writeUTF(value:String):void
+    {
+        COMPILE::SWF
+        {
+            return ba.writeUTF(value);
+        }
+
+        COMPILE::JS
+        {
+            //TODO Doing nothing about the length for now
+            return this.writeUTFBytes(value);
+        }
+    }
+
+    /**
+     *  Writes a UTF-8 string to the byte stream. Similar to the writeUTF() method,
+     *  but writeUTFBytes() does not prefix the string with a 16-bit length word.
+     *
+     *  @param The string value to be written.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.7.0
+     */
+    public function writeUTFBytes(str:String):void
+    {
+        COMPILE::SWF
+        {
+            ba.writeUTFBytes(str);
+        }
+
+        COMPILE::JS
+        {
+            // Code taken from GC
+            // Use native implementations if/when available
+            var bytes:Uint8Array;
+            if('TextEncoder' in window)
+            {
+                var encoder:TextEncoder = new TextEncoder('utf-8');
+                bytes = encoder.encode(str);
+                ba = bytes.buffer;
+                return;
+            }
+
+            var out:Array = [];
+            var p:int = 0;
+            var c:int;
+            for (var i:int = 0; i < str.length; i++)
+            {
+                c = str.charCodeAt(i);
+                if (c < 128)
+                {
+                    out[p++] = c;
+                }
+                else if (c < 2048)
+                {
+                    out[p++] = (c >> 6) | 192;
+                    out[p++] = (c & 63) | 128;
+                }
+                else if (((c & 0xFC00) == 0xD800) && (i + 1) < str.length &&
+                    ((str.charCodeAt(i + 1) & 0xFC00) == 0xDC00))
+                {
+                    // Surrogate Pair
+                    c = 0x10000 + ((c & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF);
+                    out[p++] = (c >> 18) | 240;
+                    out[p++] = ((c >> 12) & 63) | 128;
+                    out[p++] = ((c >> 6) & 63) | 128;
+                    out[p++] = (c & 63) | 128;
+                }
+                else
+                {
+                    out[p++] = (c >> 12) | 224;
+                    out[p++] = ((c >> 6) & 63) | 128;
+                    out[p++] = (c & 63) | 128;
+                }
+            }
+            bytes = new Uint8Array(out);
+            ba = bytes.buffer;
+
+        }
+    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3537
Author:   smgilson@adobe.com
Date:     2008-10-09T15:35:43.652315Z

Log Message:
-----------
ASDoc edits

Checkin Test Passed: Yes
QA: No
Bug:
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/IGraphicElementHost.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -384,7 +384,7 @@
     [Bindable]

     /**
-     *  @copy mx.core.IViewport#verticalScrollPosition
+     *  @inheritDoc
      */
     public function get verticalScrollPosition():Number
     {
@@ -405,7 +405,7 @@
     //----------------------------------

     /**
-     *  @copy mx.core.IViewport#horizontalScrollPositionDelta
+     *  @inheritDoc
      */
     public function horizontalScrollPositionDelta(unit:uint):Number
     {
@@ -413,7 +413,7 @@
     }

     /**
-     *  @copy mx.core.IViewport#verticalScrollPositionDelta()
+     *  @inheritDoc
      */
     public function verticalScrollPositionDelta(unit:uint):Number
     {
@@ -743,9 +743,7 @@
     }

     /**
-     *  Adds a mask to a particular GraphicElement.
-     *  This is needed because the
-     *  Group is managing the GraphicElement's DisplayObject.
+     *  @inheritDoc
      */
     public function addMaskElement(mask:DisplayObject, target:IGraphicElement):void
     {
@@ -753,8 +751,7 @@
     }

     /**
-     *  Removes a mask to a particular GraphicElement.  This is needed because the
-     *  Group is managing the GraphicElement's DisplayObject.
+     *  @inheritDoc
      */
     public function removeMaskElement(mask:DisplayObject, target:IGraphicElement):void
     {


Blur shader made even more subclassing friendly

--- extension/src/starling/shaders/FastGaussianBlurShader.as
+++ extension/src/starling/shaders/FastGaussianBlurShader.as
@@ -22,22 +22,24 @@

     protected static const TEXTURE_FLAGS:Array = [TextureFlag.TYPE_2D, TextureFlag.MODE_CLAMP, TextureFlag.FILTER_LINEAR, TextureFlag.MIP_NO];

-    private static var _verticalOffsets:Vector.<Number>     = new <Number>[0.0, 1.3846153846, 0.0, 3.2307692308];
-    private static var _horizontalOffsets:Vector.<Number>   = new <Number>[1.3846153846, 0.0, 3.2307692308, 0.0];
-    private static var _weights:Vector.<Number>             = new <Number>[0.2270270270, 0.3162162162, 0.0702702703, 0];
+    protected static var _verticalOffsets:Vector.<Number>     = new <Number>[0.0, 1.3846153846, 0.0, 3.2307692308];
+    protected static var _horizontalOffsets:Vector.<Number>   = new <Number>[1.3846153846, 0.0, 3.2307692308, 0.0];
+    protected static var _weights:Vector.<Number>             = new <Number>[0.2270270270, 0.3162162162, 0.0702702703, 0];

     private var _type:String                    = HORIZONTAL;
     private var _pass:int                       = 0;
     private var _strength:Number                = Number.NaN;
     private var _firstPassStrength:Number       = DEFAULT_FIRST_PASS_STRENGTH;
     private var _strengthIncreaseRatio:Number   = DEFAULT_STRENGTH_INCREASE_PER_PASS_RATIO;
-    private var _paramsDirty:Boolean            = true;
-    private var _strengthsDirty:Boolean         = true;
-
-    protected var _strengths:Vector.<Number>    = new <Number>[];
-    private var _offsets:Vector.<Number>        = new <Number>[0, 0, 0, 0];
+
     private var _uv:Vector.<Number>             = new <Number>[0, 1, 0, 1];
     private var _pixelSize:Vector.<Number>      = new <Number>[Number.NaN, Number.NaN, Number.NaN, Number.NaN];
+
+    protected var _offsetsDirty:Boolean         = true;
+    protected var _strengthsDirty:Boolean       = true;
+
+    protected var _offsets:Vector.<Number>      = new <Number>[0, 0, 0, 0];
+    protected var _strengths:Vector.<Number>    = new <Number>[];

     // shader constants
     protected var uvCenter:IRegister            = VARYING[0];
@@ -59,7 +61,7 @@
             return;

         _type = value;
-        _paramsDirty = true;
+        _offsetsDirty = true;
     }

     public function get strength():Number { return _strength; }
@@ -68,7 +70,7 @@
             return;

         _strength = value;
-        _paramsDirty = true;
+        _offsetsDirty = true;
         _strengthsDirty = true;
     }

@@ -78,7 +80,7 @@
             return;

         _firstPassStrength = value;
-        _paramsDirty = true;
+        _offsetsDirty = true;
         _strengthsDirty = true;
     }

@@ -88,7 +90,7 @@
             return;

         _strengthIncreaseRatio = value;
-        _paramsDirty = true;
+        _offsetsDirty = true;
         _strengthsDirty = true;
     }

@@ -98,7 +100,7 @@
             return;

         _pass = value;
-        _paramsDirty = true;
+        _offsetsDirty = true;
     }

     public function get pixelWidth():Number { return _pixelSize[0]; }
@@ -108,7 +110,7 @@

         _pixelSize[0] = value;
         _pixelSize[2] = value / 2;
-        _paramsDirty = true;
+        _offsetsDirty = true;
     }

     public function get pixelHeight():Number { return _pixelSize[1]; }
@@ -118,7 +120,7 @@

         _pixelSize[1] = value;
         _pixelSize[3] = value / 2;
-        _paramsDirty = true;
+        _offsetsDirty = true;
     }

     public function get passesNeeded():int {
@@ -144,8 +146,8 @@
         if(_strengthsDirty)
             updateStrengths();

-        if(_paramsDirty)
-            updateParameters();
+        if(_offsetsDirty)
+            updateOffsets();

         context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 0, _weights);
         context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 1, _offsets);
@@ -199,7 +201,30 @@
         multiply(sampledColor, sampledColor, colorWeight);
     }

-    private function updateParameters():void {
+    protected function updateStrengths():void {
+        _strengthsDirty = false;
+
+        _strengths.length   = 0;
+        var str:Number      = Math.min(_firstPassStrength, _strength);
+        var sum:Number      = 0;
+
+        while(sum + str < _strength) {
+            _strengths[_strengths.length] = str;
+            sum += str;
+            str *= _strengthIncreaseRatio;
+        }
+
+        var diff:Number = _strength - sum;
+
+        if(diff > 0 || _strengths.length == 0)
+            _strengths[_strengths.length] = diff;
+
+        _strengths.sort(function (a:Number, b:Number):Number { return b - a; });
+
+        //trace("strengths: [" + _strengths + "], total: " + _strength);
+    }
+
+    protected function updateOffsets():void {
         // algorithm described here:
         // http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/
         //
@@ -207,7 +232,7 @@
         // shader. By making use of linear texture sampling, we can produce similar output
         // to what would be 9 lookups.

-        _paramsDirty = false;
+        _offsetsDirty = false;

         var multiplier:Number, str:Number = _strengths[_pass];
         var i:int, count:int = 4;
@@ -227,28 +252,5 @@

         //trace("str: " + str);
     }
-
-    private function updateStrengths():void {
-        _strengthsDirty = false;
-
-        _strengths.length   = 0;
-        var str:Number      = Math.min(_firstPassStrength, _strength);
-        var sum:Number      = 0;
-
-        while(sum + str < _strength) {
-            _strengths[_strengths.length] = str;
-            sum += str;
-            str *= _strengthIncreaseRatio;
-        }
-
-        var diff:Number = _strength - sum;
-
-        if(diff > 0 || _strengths.length == 0)
-            _strengths[_strengths.length] = diff;
-
-        _strengths.sort(function (a:Number, b:Number):Number { return b - a; });
-
-        //trace("strengths: [" + _strengths + "], total: " + _strength);
-    }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20920
Author:   build@adobe.com
Date:     2011-03-18T19:54:14.958635Z

Log Message:
-----------
Version update to 4.5.1

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/flex-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark_dmv/src/spark/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/core/Version.as</path>

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

--- frameworks/projects/advancedgrids/src/mx/core/Version.as
+++ frameworks/projects/advancedgrids/src/mx/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.5.0.0";
+mx_internal static const VERSION:String = "4.5.1.0";