Transferred from the Adobe Open Source Subversion Repository

Revision: 13210
Author:   gosmith@adobe.com
Date:     2009-12-23T23:59:36.729401Z

Log Message:
-----------
Added ASDoc for the Spark VideoPlayerAccImpl and the MX AccImpl classes, based on the opensource specs. This completes our planned accessibility-ASDoc improvements.

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

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

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

--- frameworks/projects/framework/src/mx/accessibility/AccImpl.as
+++ frameworks/projects/framework/src/mx/accessibility/AccImpl.as
@@ -32,10 +32,178 @@
 [ResourceBundle("controls")]

 /**
- *  The AccImpl class is Flex's base class for implementing accessibility
- *  in UIComponents.
- *  It is a subclass of the Flash Player's AccessibilityImplementation class.
- *
+ *  AccImpl is Flex's base accessibility implementation class
+ *  for MX and Spark components.
+ *
+ *
It is a subclass of the Flash Player's
+ *  AccessibilityImplementation class.

+ *
+ *
When an MX or Spark component is created,
+ *  its accessibilityImplementation property
+ *  is set to an instance of a subclass of this class.
+ *  The Flash Player then uses this object to allow MSAA clients
+ *  such as screen readers to see and manipulate the component.
+ *  See the flash.accessibility.AccessibilityImplementation class
+ *  for additional information about accessibility implementation
+ *  classes and MSAA.

+ *
+ *
Children

+ *
+ *
The Flash Player does not support
+ *  a true hierarchy of accessible objects.
+ *  If a DisplayObject has an accessibilityImplementation object,
+ *  then the accessibilityImplementation objects
+ *  of its children are ignored.
+ *  However, the Player does allow a component's accessibility implementation class
+ *  to expose MSAA information for its internal parts.
+ *  (For example, a List exposes MSAA information about its items.)

+ *
+ *
The number of children (internal parts)
+ *  and the child IDs used to identify them
+ *  are determined by the getChildIDArray() method.
+ *  In the Player's AccessibilityImplementation base class,
+ *  this method simply returns null.
+ *  Flex's AccImpl class overrides it to return an empty array.
+ *  It also provides a protected utility method,
+ *  createChildIDArray() which subclasses with internal parts
+ *  can use in their overrides.

+ *
+ *
Role

+ *
+ *
The MSAA Role of a component and its internal parts
+ *  is determined by the get_accRole() method.
+ *  In the Player's AccessibilityImplementation base class,
+ *  this method throws a runtime error,
+ *  since subclasses are expected to override it.
+ *  Flex's AccImpl class has a protected role property
+ *  which subclasses generally set in their constructor,
+ *  and it overrides get_accRole() to return this property.

+ *
+ *
Name

+ *
+ *
The MSAA Name of a component and its internal parts
+ *  is determined by the get_accName() method.
+ *  In the Player's AccessibilityImplementation base class,
+ *  this method simply returns null.
+ *  Flex's AccImpl class overrides it to construct a name as follows,
+ *  starting with an empty string
+ *  and separating added portions with a single space:
+ *

+ *
If a simple child (e.g., combo or list box item)
+ *    is being requested, only the child's default name is returned.
+ *    The rest of the steps below apply only to the component itself
+ *   (childID 0).

+ *
If the component is inside a Form:
+ *

+ *
If the Form has a FormHeader, the header text is added.
+ *       Developers wishing to avoid this should set the
+ *       accessibilityName of the FormHeader
+ *       to a space (" ").

+ *
If the component is inside a FormItem,
+ *       the FormItem label text is added.
+ *       Developers wishing to avoid this should set the
+ *       accessibilityName of the FormItem
+ *       to a space (" ").

+ *
If the field is required, the locale-dependent string
+ *       "required field" is added.

+ *

+ *
The component's name is then determined thus:
+ *

+ *
If the component's accessibilityName
+ *      (i.e., accessibilityProperties.name) is a space,
+ *      no component name is added.

+ *
Otherwise, if the component's name is specified
+ *      (i.e., is not null and not empty) then it is added.

+ *
Otherwise, a protected getName() method,
+ *      defined by AccImpl and implemented by each subclass,
+ *      is called to provide a default name.
+ *      (For example, ButtonAccImpl implements getName()
+ *      to specify that a Button's default name is the label that it displays.)
+ *      If not empty, the return value of getName() is added.
+ *
Otherwise (if getName() returned empty),
+ *      if the component's toolTip property is set,
+ *      that String is added.

+ *
If the component's errorString property is set,
+ *      that String is added.

+ *

+ *

+ *
+ *
Description

+ *
+ *
The MSAA Description is determined solely by a component's
+ *  accessibilityProperties object and not by its
+ *  accessibilityImplementation object.
+ *  Therefore there is no logic in AccessibilityImplementation or AccImpl
+ *  or any subclasses of AccImpl related to the description.
+ *  The normal way to set the description in Flex is via the
+ *  accessibilityDescription property on UIComponent,
+ *  which simply sets accessibilityProperties.description.

+ *
+ *
State

+ *
+ *
The MSAA State of a component and its internal parts
+ *  is determined by the get_accState() method.
+ *  In the Player's AccessibilityImplementation base class,
+ *  this method throws a runtime error,
+ *  since subclasses are expected to override it.
+ *  Flex's AccImpl class does not override it,
+ *  but provides a protected utility method, getState(),
+ *  for subclasses to use in their overrides.
+ *  The getState() method determines the state
+ *  as a combination of
+ *

+ *
STATE_SYSTEM_UNAVAILABLE
+ *    (when enabled is false on this component or any ancestor)

+ *
STATE_SYSTEM_FOCUSABLE

+ *
STATE_SYSTEM_FOCUSED (when focused)

+ *

+ *  Note that by default all components are assumed to be focusable
+ *  and thus the accessibility implementation classes for non-focusable
+ *  components like Label must clear this state flag.
+ *  When a component has a state of unavailable,
+ *  the focusable state is removed by the accessibility implementation class.

+ *
+ *
Value

+ *
+ *
The MSAA Value of a component and its internal parts
+ *  is determined by the get_accValue() method.
+ *  In the Player's AccessibilityImplementation base class,
+ *  this method simply returns null.
+ *  Flex's AccImpl class does not override it,
+ *  but subclasses for components like TextInput do.

+ *
+ *
Location

+ *
+ *
The MSAA Location for a component's internal parts,
+ *  but not the component itself,
+ *  is determined by the get_accLocation() method.
+ *  This method is never called with a childID of 0;
+ *  instead, the Flash Player determines the MSAA Location of a component
+ *  based on its bounding rectangle as determined by getBounds().
+ *  Flex's AccImpl class does not override this method,
+ *  but subclasses for components with internal parts do.

+ *
+ *
Default Action

+ *
+ *
The MSAA DefaultAction for a component and its internal parts
+ *  is determined by the get_accDefaultAction() method.
+ *  In the Player's AccessibilityImplementation base class,
+ *  this method simply returns null.
+ *  Flex's AccImpl class does not override it,
+ *  but subclasses with default actions do.
+ *  These subclasses also override AccessibilityImplementation's
+ *  accDoDefaultAction() method
+ *  to perform the default action that they advertise.

+ *
+ *
Other

+ *
+ *
The MSAA events EVENT_OBJECT_SHOW and EVENT_OBJECT_HIDE
+ *  are sent when the object is shown or hidden.
+ *  The corresponding states for these are covered by the Flash Player
+ *  which does not render any MSAA components that are hidden.
+ *  When the component is shown the states mentioned for AccImpl
+ *  are used.

+ *
  *  @langversion 3.0
  *  @playerversion Flash 9
  *  @playerversion AIR 1.1


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

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

 package mx.containers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4009
Author:   jimurphy@adobe.com
Date:     2008-11-04T15:10:34.970681Z

Log Message:
-----------
Merged alpha_gumbo revisions 3929,3936-3937,3945,3956,3971,3986,3994,4002,4006 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon_small.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.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/framework/src/mx/effects/IEffect.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/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon_small.png</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -374,18 +374,16 @@
     override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void
     {
-        /* if (!displayObject || !(displayObject is Sprite))
-            return; */
-
-        if (!source)
+        if (!source || !drawnDisplayObject || !(drawnDisplayObject is Sprite))
             return;

-        if (displayObject is Sprite)
-            Sprite(displayObject).graphics.clear();
-        else if (displayObject is Shape)
-            Shape(displayObject).graphics.clear();
-
-        var g:Graphics = Sprite(drawnDisplayObject).graphics;
+       	var g:Graphics = Sprite(drawnDisplayObject).graphics;
+
+        // We only clear if we have a displayObject. This handles the case of having our own displayObject and the
+		// case when we have a mask and have created a _drawnDisplayObject. We don't want to clear if we are
+		// sharing a display object.
+		if (displayObject)
+			g.clear();

         g.lineStyle();
         _fill.offsetX = drawX;


qnd: 7447 fix seek in widevine flavor

qnd: 7447 fix seek in widevine flavor

--- plugins/wvPlugin/src/WvMediator.as
+++ plugins/wvPlugin/src/WvMediator.as
@@ -28,8 +28,7 @@
 		public var _wvPluginInfo:WVPluginInfo;

 		override public function listNotificationInterests():Array {
-			return [NotificationType.PLAYER_SEEK_END,
-					NotificationType.DO_SEEK,
+			return [NotificationType.DO_SEEK,
 					NotificationType.MEDIA_ELEMENT_READY];
 		}

@@ -41,9 +40,6 @@
 			{
 				case NotificationType.DO_SEEK:
 						_seekTo = note.getBody() as Number;
-					break;
-
-				case NotificationType.PLAYER_SEEK_END:
 						if(_seekTo && _wvPluginInfo && _wvPluginInfo.wvMediaElement && _wvPluginInfo.wvMediaElement.netStream)
 							_wvPluginInfo.wvMediaElement.netStream.seek(_seekTo);
 						_seekTo = NaN;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/formatters/SwitchSymbolFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/SwitchSymbolFormatter.as
@@ -49,6 +49,11 @@
  *
  *  @see mx.formatters.PhoneFormatter
  *  @access private
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class SwitchSymbolFormatter
 {
@@ -64,6 +69,11 @@
 	 *  Constructor.
 	 *
 	 *  @param numberSymbol Character to use as the pattern character.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function SwitchSymbolFormatter(numberSymbol:String = "#")
 	{
@@ -105,6 +115,11 @@
 	 *  (alpha characters are allowed if needed).
 	 *
 	 *  @returns Formatted String.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function formatValue(format:String, source:Object):String
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 17668
Author:   hmuller@adobe.com
Date:     2010-09-10T22:52:09.156291Z

Log Message:
-----------
Grid layers are now defined as type GridLayer (a private class), instead of Group.

GridLayer type no longer extends Group, it's now an object that has Group valued root property.   This makes the type's API relatively tiny - only two methods - and makes it possible for GridLayer to encapsulate the Grid itself as a layer (the item renderer layer).

Grid item renders are now consistently typed as IGridItemRenderer, rather than IVisualElement.

DefaultGridItemRenderer is now a UIFTETextField subclass and no longer supports the "textFieldClass" style.  A new UITextField based item renderer has been added, it's UITextFieldGridItemRenderer.

Support for the module implications of embedded fonts is now GridColumn's responsiblity.  GridColumn/itemToRenderer() now wraps item renderer ClassFactory item renders with a local ClassFactory subclass that delegates the newInstance() operation to the grid's moduleFactory.

QE notes:
Doc notes:
Bugs:
Reviewer: Carol, 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="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/UITextFieldGridItemRenderer.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/supportClasses/GridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayer.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/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/IGridItemRendererOwner.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/DefaultGridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -17,11 +17,14 @@

 import mx.collections.IList;
 import mx.core.IFactory;
+import mx.core.IFlexDisplayObject;
 import mx.core.IInvalidating;
 import mx.core.IUIComponent;
+import mx.core.IUITextField;
 import mx.core.IVisualElement;
 import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;
+import mx.core.Singleton;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.PropertyChangeEvent;
@@ -33,8 +36,11 @@
 import spark.components.Group;
 import spark.components.IGridItemRenderer;
 import spark.components.IGridRowBackground;
+import spark.components.supportClasses.GridLayer;
 import spark.layouts.supportClasses.LayoutBase;
 import spark.skins.spark.DefaultGridItemRenderer;
+import spark.skins.spark.DefaultGridItemRenderer;
+import spark.skins.spark.UITextFieldGridItemRenderer;

 use namespace mx_internal;

@@ -52,7 +58,68 @@
     // out how to migrate data from the old GLC to the new one.
     // Note also: if this was going to be shared, it should arrive as a constructor parameter.
     public var gridDimensions:GridDimensions;
-
+
+    /**
+     *  @private
+     *  The following variables define the visible part of the grid, where each item
+     *  renderer typically displays dataProvider[rowIndex][columns[columnIndex]].dataField.
+     *  The index vectors are sorted in increasing order but their items may not be
+     *  sequential.
+     */
+    private var visibleRowIndices:Vector.<int> = new Vector.<int>(0);
+    private var visibleColumnIndices:Vector.<int> = new Vector.<int>(0);
+
+    /**
+     *  @private
+     *  The previous values of the corresponding variables.   Set by layoutItemRenderers()
+     *  and only valid during updateDisplayList().
+     */
+    private var oldVisibleRowIndices:Vector.<int> = new Vector.<int>(0);
+    private var oldVisibleColumnIndices:Vector.<int> = new Vector.<int>(0);
+
+    /**
+     *  TBD: how do these vectors relate to visibleRow,ColumnIndices
+     */
+    private var visibleRowBackgrounds:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);
+    private var visibleRowSeparators:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);
+    private var visibleColumnSeparators:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);
+    private var visibleItemRenderers:Vector.<IGridItemRenderer> = new Vector.<IGridItemRenderer>(0);
+
+    /**
+     *  TBD
+     */
+    private var hoverIndicator:IVisualElement = null;
+    private var caretIndicator:IVisualElement = null;
+
+    /**
+     *  @private
+     *  The bounding rectangle for all of the visible item renderers.  Note that this
+     *  rectangle may be larger than the scrollRect, since the first/last rows/columns
+     *  of item renderers may only be partially visible.   See scrollPositionChanged().
+     */
+    private const visibleItemRenderersBounds:Rectangle = new Rectangle();
+
+    /**
+     *  @private
+     *  The viewport's bounding rectangle; often smaller then visibleItemRenderersBounds.
+     *  Initialized by updateDisplayList with the current scrollPosition, and grid.width,Height.
+     */
+    private const visibleGridBounds:Rectangle = new Rectangle();
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.4
+     *  @productversion Flex 4.5
+     */
     public function GridLayout()
     {
         super();
@@ -77,7 +144,8 @@
      *  @playerversion Flash 10
      *  @playerversion AIR 2.0
      *  @productversion Flex 4.5
-     */
+     */
+
     override public function get useVirtualLayout():Boolean
     {
         return true;
@@ -90,13 +158,11 @@
     {
     }

-
     //--------------------------------------------------------------------------
     //
     //  Method Overrides
     //
     //--------------------------------------------------------------------------
-

     /**
      *  @private
@@ -108,7 +174,6 @@
         freeGridElements(visibleRowSeparators);
         visibleRowIndices.length = 0;

-        freeGridElements(visibleColumnBackgrounds);
         freeGridElements(visibleColumnSeparators);
         visibleColumnIndices.length = 0;

@@ -281,7 +346,7 @@
         // Layout the columns and item renderers

 		layoutColumns(scrollX, scrollY, unscaledWidth);
-        layoutItemRenderers(grid.itemRendererGroup, scrollX, scrollY, unscaledWidth, unscaledHeight);
+        layoutItemRenderers(grid.rendererLayer, scrollX, scrollY, unscaledWidth, unscaledHeight);

         // Update the content size.  Make sure that if the content spans partially
         // over a pixel to the right/bottom, the content size includes the whole pixel.
@@ -305,19 +370,18 @@

         // Layout the row backgrounds

-        visibleRowBackgrounds = layoutLinearElements(grid.rowBackground, grid.backgroundGroup,
+        visibleRowBackgrounds = layoutLinearElements(grid.rowBackground, grid.backgroundLayer,
             visibleRowBackgrounds, oldVisibleRowIndices, visibleRowIndices, layoutRowBackground);

         // Layout the row and column separators.

         const lastRowIndex:int = paddedRowCount - 1;
         const lastColumnIndex:int = gridDimensions.columnCount - 1;
-        const overlayGroup:Group = grid.overlayGroup
-
-        visibleRowSeparators = layoutLinearElements(grid.rowSeparator, overlayGroup,
+
+        visibleRowSeparators = layoutLinearElements(grid.rowSeparator, grid.overlayLayer,
             visibleRowSeparators, oldVisibleRowIndices, visibleRowIndices, layoutRowSeparator, lastRowIndex);

-        visibleColumnSeparators = layoutLinearElements(grid.columnSeparator, overlayGroup,
+        visibleColumnSeparators = layoutLinearElements(grid.columnSeparator, grid.overlayLayer,
             visibleColumnSeparators, oldVisibleColumnIndices, visibleColumnIndices, layoutColumnSeparator, lastColumnIndex);

         // Tell the ColumnHeaderBar to update its layout.
@@ -326,15 +390,15 @@

         // Layout the hoverIndicator, caretIndicator, and selectionIndicators

-        layoutHoverIndicator(grid.backgroundGroup);
-        layoutSelectionIndicators(grid.selectionGroup);
-        layoutCaretIndicator(grid.overlayGroup);
+        layoutHoverIndicator(grid.backgroundLayer);
+        layoutSelectionIndicators(grid.selectionLayer);
+        layoutCaretIndicator(grid.overlayLayer);

         // To avoid flashing, force all of the layers to render now

-        grid.backgroundGroup.validateNow();
-        grid.selectionGroup.validateNow();
-        grid.overlayGroup.validateNow();
+        grid.backgroundLayer.root.validateNow();
+        grid.selectionLayer.root.validateNow();
+        grid.overlayLayer.root.validateNow();

         // The old visible row,column indices are no longer needed

@@ -414,10 +478,6 @@
         return headerBar.dataGroup.getElementAt(columnIndex);
     }

-    // TBD(hmuller): need a change notification scheme for the factory properties
-    // when one changes (which is unlikely to happen very often), need to make sure
-    // that the old ones aren't reused.
-
 	//--------------------------------------------------------------------------
 	//
 	//  Updating the GridDimensions' typicalCell sizes and columnWidths
@@ -430,7 +490,7 @@
 	 *  item renderer.   The returned item renderer must be freed, with freeGridElement(),
 	 *  after it's used.
 	 */
-	private function createTypicalItemRenderer(columnIndex:int):IVisualElement
+	private function createTypicalItemRenderer(columnIndex:int):IGridItemRenderer
 	{
 		var typicalItem:Object = grid.typicalItem;
 		if (typicalItem == null)
@@ -438,9 +498,9 @@

 		const column:GridColumn = getGridColumn(columnIndex);
 		const factory:IFactory = column.itemToRenderer(typicalItem);
-		const renderer:IVisualElement = allocateGridElement(factory) as IVisualElement;
+		const renderer:IGridItemRenderer = allocateGridElement(factory) as IGridItemRenderer;

-		grid.itemRendererGroup.addElement(renderer);
+		grid.rendererLayer.addGridElement(renderer);

 		initializeItemRenderer(renderer, 0 /* rowIndex */, columnIndex, grid.typicalItem, false);

@@ -458,7 +518,8 @@

         layoutItemRenderer(renderer, 0, 0, columnWidth, NaN);

-		grid.itemRendererGroup.removeElement(renderer);
+		grid.rendererLayer.removeGridElement(renderer);
+
 		return renderer;
 	}

@@ -510,7 +571,7 @@

             if (isNaN(cellWidth) || isNaN(cellHeight))
             {
-                var renderer:IVisualElement = createTypicalItemRenderer(columnIndex);
+                var renderer:IGridItemRenderer = createTypicalItemRenderer(columnIndex);
                 if (isNaN(cellWidth))
                 {
                     cellWidth = renderer.getPreferredBoundsWidth();
@@ -646,41 +707,8 @@
     //  Item Renderer Management and Layout
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  The following variables define the visible part of the grid, where each item
-     *  renderer displays dataProvider[rowIndex][columns[columnIndex].dataField].
-     *  The index vectors are sorted in increasing order but their items may not be
-     *  sequential.  The item renderers are stored in row major order.
-     */
-    private var visibleRowIndices:Vector.<int> = new Vector.<int>(0);
-    private var visibleColumnIndices:Vector.<int> = new Vector.<int>(0);
-    private var visibleItemRenderers:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);
-
-    /**
-     *  @private
-     *  The previous values of the corresponding variables.   Set by layoutItemRenderers()
-     *  and only valid during updateDisplayList().
-     */
-    private var oldVisibleRowIndices:Vector.<int> = new Vector.<int>(0);
-    private var oldVisibleColumnIndices:Vector.<int> = new Vector.<int>(0);
-
-    /**
-     *  @private
-     *  The bounding rectangle for all of the visible item renderers.  Note that this
-     *  rectangle may be larger than the scrollRect, since the first/last rows/columns
-     *  of item renderers may only be partially visible.   See scrollPositionChanged().
-     */
-    private const visibleItemRenderersBounds:Rectangle = new Rectangle();
-
-    /**
-     *  Initialized by updateDisplayList with the current scrollPosition, and grid.width,Height.
-     */
-    private const visibleGridBounds:Rectangle = new Rectangle();
-
-
-    private function layoutItemRenderers(itemRendererGroup:Group, scrollX:Number, scrollY:Number, width:Number, height:Number):void
+
+    private function layoutItemRenderers(rendererLayer:GridLayer, scrollX:Number, scrollY:Number, width:Number, height:Number):void
     {
         var rowIndex:int;
         var colIndex:int;
@@ -716,7 +744,7 @@
         // compute newVisibleRowIndices, newVisibleItemRenderers, layout item renderers

         const newVisibleRowIndices:Vector.<int> = new Vector.<int>();
-        const newVisibleItemRenderers:Vector.<IVisualElement> = new Vector.<IVisualElement>();
+        const newVisibleItemRenderers:Vector.<IGridItemRenderer> = new Vector.<IGridItemRenderer>();

         var cellX:Number = startCellX;
         var cellY:Number = startCellY;
@@ -729,17 +757,16 @@
             var rowHeight:Number = gridDimensions.getRowHeight(rowIndex);
             for each (colIndex in newVisibleColumnIndices)
             {
-                var renderer:IVisualElement = takeVisibleItemRenderer(rowIndex, colIndex);
+                var renderer:IGridItemRenderer = takeVisibleItemRenderer(rowIndex, colIndex);
                 if (!renderer)
                 {
                     var dataItem:Object = getDataProviderItem(rowIndex);
                     var column:GridColumn = getGridColumn(colIndex);
                     var factory:IFactory = column.itemToRenderer(dataItem);
-                    renderer = allocateGridElement(factory) as IVisualElement;
+                    renderer = allocateGridElement(factory) as IGridItemRenderer;
                 }

-                if (renderer.parent != itemRendererGroup)
-                    itemRendererGroup.addElement(renderer);
+                rendererLayer.addGridElement(renderer);

                 newVisibleItemRenderers.push(renderer);
                 initializeItemRenderer(renderer, rowIndex, colIndex);
@@ -760,12 +787,18 @@
                 rowHeight = finalRowHeight;
                 for each (colIndex in newVisibleColumnIndices)
                 {
-                    const rowOffset:int = newVisibleRowIndices.indexOf(rowIndex);
-                    const colOffset:int = newVisibleColumnIndices.indexOf(colIndex);
-                    const index:int = (rowOffset * visibleColumnsLength) + colOffset;
-
+                    var rowOffset:int = newVisibleRowIndices.indexOf(rowIndex);
+                    var colOffset:int = newVisibleColumnIndices.indexOf(colIndex);
+                    var index:int = (rowOffset * visibleColumnsLength) + colOffset;
                     renderer = newVisibleItemRenderers[index];
-                    layoutItemRenderer(renderer, renderer.x, renderer.y, renderer.width, rowHeight);
+
+                    // We're using layoutBoundsX,Y,Width instead of x,y.width because
+                    // the IUITextField item renderers pad their x,y,width,height properties
+                    var rendererX:Number = renderer.getLayoutBoundsX();
+                    var rendererY:Number = renderer.getLayoutBoundsY();
+                    var rendererWidth:Number = renderer.getLayoutBoundsWidth();
+
+                    layoutItemRenderer(renderer, rendererX, rendererY, rendererWidth, rowHeight);
                     gridDimensions.setCellHeight(rowIndex, colIndex, renderer.getPreferredBoundsHeight());
                 }
             }
@@ -781,7 +814,7 @@

         // Free renderers that aren't in use

-        for each (var oldRenderer:IVisualElement in visibleItemRenderers)
+        for each (var oldRenderer:IGridItemRenderer in visibleItemRenderers)
             freeItemRenderer(oldRenderer);

         // Update visibleItemRenderersBounds
@@ -857,7 +890,7 @@
             const lastColumnIndex:int = gridDimensions.columnCount - 1;

             visibleHeaderSeparators =  layoutLinearElements(factory,
-                columnHeaderBar.overlayGroup, visibleHeaderSeparators,
+                columnHeaderBar.overlayLayer, visibleHeaderSeparators,
                 oldVisibleColumnIndices, visibleColumnIndices,
                 layoutHeaderSeparator, lastColumnIndex);
         }
@@ -897,13 +930,13 @@
     /**
      *  @private
      */
-    private function takeVisibleItemRenderer(rowIndex:int, columnIndex:int):IVisualElement
+    private function takeVisibleItemRenderer(rowIndex:int, columnIndex:int):IGridItemRenderer
     {
         const index:int = getVisibleItemRendererIndex(rowIndex, columnIndex);
         if (index == -1 || index >= visibleItemRenderers.length)
             return null;

-        const renderer:IVisualElement = visibleItemRenderers[index];
+        const renderer:IGridItemRenderer = visibleItemRenderers[index];
         visibleItemRenderers[index] = null;
         return renderer;
     }
@@ -911,17 +944,16 @@
     /**
      *  @private
      */
-    private function initializeItemRenderer(renderer:IVisualElement,
-                                            rowIndex:int, columnIndex:int,
-                                            dataItem:Object=null,
-                                            visible:Boolean=true):void
+    private function initializeItemRenderer(
+        renderer:IGridItemRenderer,
+        rowIndex:int, columnIndex:int,
+        dataItem:Object=null,
+        visible:Boolean=true):void
     {
         renderer.visible = visible;

-        // If this renderer has not specified a styleName then use the DataGrid's styles
-        const rendererStyleClient:ISimpleStyleClient = renderer as ISimpleStyleClient;
-        if (rendererStyleClient && !rendererStyleClient.styleName)
-            rendererStyleClient.styleName = grid.gridOwner;
+
+        // Initialize the renderer's properties

         const gridRenderer:IGridItemRenderer = renderer as IGridItemRenderer;
         const gridColumn:GridColumn = getGridColumn(columnIndex);
@@ -954,13 +986,13 @@
         }
     }

-    private function uninitializeItemRenderer(renderer:IVisualElement):void
+    private function uninitializeItemRenderer(renderer:IGridItemRenderer):void
     {
         if (grid.gridOwner)
             grid.gridOwner.discardItemRenderer(renderer, true);
     }

-    private function freeItemRenderer(renderer:IVisualElement):void
+    private function freeItemRenderer(renderer:IGridItemRenderer):void
     {
         if (!renderer)
             return;
@@ -970,9 +1002,9 @@
             uninitializeItemRenderer(renderer);
     }

-    private function freeItemRenderers(renderers:Vector.<IVisualElement>):void
-    {
-        for each (var renderer:IVisualElement in renderers)
+    private function freeItemRenderers(renderers:Vector.<IGridItemRenderer>):void
+    {
+        for each (var renderer:IGridItemRenderer in renderers)
             freeItemRenderer(renderer);
         renderers.length = 0;
     }
@@ -982,12 +1014,6 @@
     //  Linear elements: row,column separators, backgrounds
     //
     //--------------------------------------------------------------------------
-
-    private var visibleRowBackgrounds:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);
-    private var visibleColumnBackgrounds:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);
-
-    private var visibleRowSeparators:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);
-    private var visibleColumnSeparators:Vector.<IVisualElement> = new Vector.<IVisualElement>(0);

     /**
      *  @private
@@ -1000,7 +1026,7 @@
      */
     private function layoutLinearElements (
         factory:IFactory,
-        container:IVisualElementContainer,
+        layer:GridLayer, // container:IVisualElementContainer,
         oldVisibleElements:Vector.<IVisualElement>,
         oldVisibleIndices:Vector.<int>,
         newVisibleIndices:Vector.<int>,
@@ -1012,11 +1038,8 @@
         if (factory == null)
         {
             for each (var oldElt:IVisualElement in oldVisibleElements)
-            {
-                removeGridElement(oldElt);
-                if (oldElt.parent == container)
-                    container.removeElement(oldElt);
-            }
+                layer.removeGridElement(oldElt);
+
             return new Vector.<IVisualElement>(0);
         }

@@ -1049,8 +1072,8 @@

             newVisibleElements[index] = elt;

-            if (elt.parent != container)
-                container.addElement(elt);
+            layer.addGridElement(elt);
+
             elt.visible = true;

             layoutFunction(elt, newEltIndex);
@@ -1061,7 +1084,7 @@

     private function layoutCellElements (
         factory:IFactory,
-        container:IVisualElementContainer,
+        layer:GridLayer,
         oldVisibleElements:Vector.<IVisualElement>,
         oldVisibleRowIndices:Vector.<int>, oldVisibleColumnIndices:Vector.<int>,
         newVisibleRowIndices:Vector.<int>, newVisibleColumnIndices:Vector.<int>,
@@ -1072,19 +1095,15 @@
         if (factory == null)
         {
             for each (var oldElt:IVisualElement in oldVisibleElements)
-            {
-                removeGridElement(oldElt);
-                if (oldElt.parent == container)
-                    container.removeElement(oldElt);
-            }
+                layer.removeGridElement(oldElt);
+
             return new Vector.<IVisualElement>(0);
         }

         // Create, layout, and return newVisibleElements

         const newVisibleElementCount:uint = newVisibleRowIndices.length;
-        const newVisibleElements:Vector.<IVisualElement> =
-            new Vector.<IVisualElement>(newVisibleElementCount);
+        const newVisibleElements:Vector.<IVisualElement> = new Vector.<IVisualElement>(newVisibleElementCount);

         // Free and clear oldVisibleElements that are no long visible.

@@ -1109,8 +1128,8 @@
                 newVisibleElements[index] = elt;
             }

-            if (elt.parent != container)
-                container.addElement(elt);
+            layer.addGridElement(elt);
+
             elt.visible = true;

             layoutFunction(elt, newEltRowIndex, newEltColumnIndex);
@@ -1310,7 +1329,7 @@
                 mode == GridSelectionMode.MULTIPLE_CELLS;
     }

-    private function layoutSelectionIndicators(container:IVisualElementContainer):void
+    private function layoutSelectionIndicators(layer:GridLayer):void
     {
         const selectionIndicatorFactory:IFactory = grid.selectionIndicator;

@@ -1346,7 +1365,7 @@
             // Display the row selections.
             visibleSelectionIndicators = layoutLinearElements(
                 selectionIndicatorFactory,
-                container,
+                layer,
                 visibleSelectionIndicators,
                 oldVisibleRowSelectionIndices,
                 visibleRowSelectionIndices,
@@ -1387,7 +1406,7 @@
             // Display the cell selections.
             visibleSelectionIndicators = layoutCellElements(
                 selectionIndicatorFactory,
-                container,
+                layer,
                 visibleSelectionIndicators,
                 oldVisibleRowSelectionIndices, oldVisibleColumnSelectionIndices,
                 visibleRowSelectionIndices, visibleColumnSelectionIndices,
@@ -1429,11 +1448,8 @@
     //
     //--------------------------------------------------------------------------

-    private var hoverIndicator:IVisualElement = null;
-    private var caretIndicator:IVisualElement = null;
-
     private function layoutIndicator(
-        container:IVisualElementContainer,
+        layer:GridLayer,
         indicatorFactory:IFactory,
         indicator:IVisualElement,
         rowIndex:int,
@@ -1458,35 +1474,35 @@

         if (indicator)
         {
-            var bounds:Rectangle = isRowSelectionMode() ?
+            const bounds:Rectangle = isRowSelectionMode() ?
                 gridDimensions.getRowBounds(rowIndex) :
                 gridDimensions.getCellBounds(rowIndex, columnIndex);
-                layoutGridElementR(indicator, bounds);
-                container.addElement(indicator);  // add or move to the top
-                indicator.visible = true;
+
+            layoutGridElementR(indicator, bounds);
+            layer.addGridElement(indicator);
+            indicator.visible = true;
         }

         return indicator;
     }
-

     private var mouseXOffset:Number = 0;
     private var mouseYOffset:Number = 0;

-    private function layoutHoverIndicator(container:IVisualElementContainer):void
+    private function layoutHoverIndicator(layer:GridLayer):void
     {
         const rowIndex:int = grid.hoverRowIndex;
         const columnIndex:int = grid.hoverColumnIndex;
         const factory:IFactory = grid.hoverIndicator;
-        hoverIndicator = layoutIndicator(container, factory, hoverIndicator, rowIndex, columnIndex);
-    }
-
-    private function layoutCaretIndicator(container:IVisualElementContainer):void
+        hoverIndicator = layoutIndicator(layer, factory, hoverIndicator, rowIndex, columnIndex);
+    }
+
+    private function layoutCaretIndicator(layer:GridLayer):void
     {
         const rowIndex:int = grid.caretRowIndex;
         const colIndex:int = grid.caretColumnIndex;
         const factory:IFactory = grid.caretIndicator;
-        caretIndicator = layoutIndicator(container, factory, caretIndicator, rowIndex, colIndex);
+        caretIndicator = layoutIndicator(layer, factory, caretIndicator, rowIndex, colIndex);
     }

     //--------------------------------------------------------------------------
@@ -1719,7 +1735,8 @@

     /**
      *  Move the specified element to the free list after hiding it.  Return true if the
-     *  element was added to the free list (freeElements).
+     *  element was added to the free list (freeElements).   Note that we do not actually
+     *  remove the element from its parent.
      */
     private function freeGridElement(element:IVisualElement):Boolean
     {
@@ -1770,11 +1787,6 @@
             freeGridElement(elt);
         elements.length = 0;
     }
-
-    private function removeGridElement(element:IVisualElement):void
-    {
-        // TBD
-    }

     /**
      *  @private
@@ -1786,32 +1798,33 @@
      *  Since doing so is rather expensive, we economize when the renderer is a DefaultGridItemRenderer,
      *  since UITextField reflows synchronously.
      */
-    private function layoutItemRenderer(elt:IVisualElement, x:Number, y:Number, width:Number, height:Number):void
+    private function layoutItemRenderer(renderer:IGridItemRenderer, x:Number, y:Number, width:Number, height:Number):void
     {
         var startTime:Number;
         if (enablePerformanceStatistics)
             startTime = getTimer();

-        if (elt is DefaultGridItemRenderer)
+        const validatingElt:IInvalidating = renderer as IInvalidating;
+        if (renderer is IUITextField)  // TBD(hmuller) distinguish this special case differently
         {
             if (!isNaN(width) || !isNaN(height))
-                elt.setLayoutBoundsSize(width, height);
-            DefaultGridItemRenderer(elt).validateNow();
+                renderer.setLayoutBoundsSize(width, height);
+            if (validatingElt)
+                validatingElt.validateNow();
         }
         else
         {
-            const validatingElt:IInvalidating = elt as IInvalidating;
             if (!isNaN(width) || !isNaN(height))
             {
                 if (validatingElt)
                     validatingElt.validateNow();
-                elt.setLayoutBoundsSize(width, height);
+                renderer.setLayoutBoundsSize(width, height);
             }
-            if (validatingElt)
-                validatingElt.validateNow();
-        }
-
-        elt.setLayoutBoundsPosition(x, y);
+            if (validatingElt)
+                validatingElt.validateNow();
+        }
+
+        renderer.setLayoutBoundsPosition(x, y);

         if (enablePerformanceStatistics)
         {
@@ -2098,9 +2111,9 @@
             return null;

         const factory:IFactory = column.itemToRenderer(dataItem);
-        const renderer:IVisualElement = factory.newInstance() as IVisualElement;
-
-        grid.itemRendererGroup.addElement(renderer);
+        const renderer:IGridItemRenderer = factory.newInstance() as IGridItemRenderer;
+
+        grid.rendererLayer.addGridElement(renderer);

         initializeItemRenderer(renderer, rowIndex, columnIndex, dataItem, false);

@@ -2108,7 +2121,7 @@
         var bounds:Rectangle = gridDimensions.getCellBounds(rowIndex, columnIndex);
         layoutItemRenderer(renderer, bounds.x, bounds.y, bounds.width, bounds.height);

-        grid.itemRendererGroup.removeElement(renderer);
+        grid.rendererLayer.removeGridElement(renderer);
         renderer.visible = false;

         return renderer;


Array of button states and method to toggle state of a given index.


Add URI tests to the asunit test suite

Add URI tests to the asunit test suite

--- test/unit/Suite.as
+++ test/unit/Suite.as
@@ -5,6 +5,7 @@
     public function Suite() {
       super();
       addTest(new PlayerTest("testPass"));
+      addTest(new UriTest("test_isSafe"));
     }
   }
 }


Comment tweak.

Comment tweak.

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

--- src/as/com/threerings/flex/CommandCheckBox.as
+++ src/as/com/threerings/flex/CommandCheckBox.as
@@ -33,15 +33,15 @@
 public class CommandCheckBox extends CheckBox
 {
     /**
-     * Create a command button.
+     * Create a command checkbox.
      *
-     * @param label the label text for the button.
+     * @param label the label text for the checkbox.
      * @param cmdOrFn either a String, which will be the CommandEvent command to dispatch,
      *        or a function, which will be called when clicked.
      * @param arg the argument for the CommentEvent or the function. If the arg is an Array
      *        then those parameters are used for calling the function.
      * Note that if arg is null, the actual argument passed will be the 'selected' state of the
-     * button. If you really want to call a method with no args, specify arg as an emtpy Array.
+     * checkbox. If you really want to call a method with no args, specify arg as an emtpy Array.
      */
     public function CommandCheckBox (label :String = null, cmdOrFn :* = null, arg :Object = null)
     {


MultiDataSource now reports busy status correctly.

--- WeaveData/src/weave/data/DataSources/MultiDataSource.as
+++ WeaveData/src/weave/data/DataSources/MultiDataSource.as
@@ -20,7 +20,6 @@
 package weave.data.DataSources
 {
 	import weave.api.WeaveAPI;
-	import weave.api.core.IDisposableObject;
 	import weave.api.core.ILinkableHashMap;
 	import weave.api.core.ILinkableObject;
 	import weave.api.data.ColumnMetadata;
@@ -30,6 +29,7 @@
 	import weave.api.data.IDataSource;
 	import weave.api.getCallbackCollection;
 	import weave.api.newLinkableChild;
+	import weave.api.registerLinkableChild;
 	import weave.data.AttributeColumns.CSVColumn;
 	import weave.data.AttributeColumns.EquationColumn;
 	import weave.data.AttributeColumns.ProxyColumn;
@@ -38,12 +38,11 @@
 	import weave.utils.HierarchyUtils;

 	/**
-	 * MultiDataSource
 	 * This is a class to keep an updated list of all the available data sources
 	 *
 	 * @author skolman
 	*/
-	public class MultiDataSource implements IDataSource, IDisposableObject
+	public class MultiDataSource implements IDataSource
 	{
 		public function MultiDataSource()
 		{
@@ -71,7 +70,6 @@
 		private var _root:ILinkableHashMap = WeaveAPI.globalHashMap;

 		/**
-		 * attributeHierarchy
 		 * @return An AttributeHierarchy object that will be updated when new pieces of the hierarchy are filled in.
 		 */
 		private const _attributeHierarchy:AttributeHierarchy = newLinkableChild(this, AttributeHierarchy);
@@ -86,8 +84,13 @@
 			// add callback to new IDataSource or IAttributeColumn so we refresh the hierarchy when it changes
 			var newObj:ILinkableObject = _root.childListCallbacks.lastObjectAdded;
 			if (!(newObj is MultiDataSource))
+			{
 				if (newObj is IDataSource || newObj is IAttributeColumn)
+				{
+					registerLinkableChild(this, newObj);
 					getCallbackCollection(newObj).addImmediateCallback(this, handleHierarchyChange);
+				}
+			}

 			handleHierarchyChange();
 		}
@@ -132,7 +135,6 @@

 		/**
-		 * initializeHierarchySubtree
 		 * @param subtreeNode A node in the hierarchy representing the root of the subtree to initialize, or null to initialize the root of the hierarchy.
 		 */
 		public function initializeHierarchySubtree(subtreeNode:XML = null):void
@@ -184,12 +186,5 @@

 			return WeaveAPI.AttributeColumnCache.getColumn(columnReference);
 		}
-
-		/**
-		 * This function is called when the object is no longer needed.
-		 */
-		public function dispose():void
-		{
-		}
 	}
 }


Revert "[FragmentLoader] Fix edge case for LOADING_IN_PROGRESS"

This reverts commit 7a50ed721566a25d0a9ab5a599da7e5aca9c80b6.

--- src/com/pivotshare/hls/loader/FragmentLoader.as
+++ src/com/pivotshare/hls/loader/FragmentLoader.as
@@ -401,7 +401,7 @@
                  * loading to determine if we should stay at current bitrate.
                  */
                 case LOADING_IN_PROGRESS:
-                     if(_hls.autoLevel && _fragCurrent.level && _fragmentFirstLoaded) {
+                     if(_hls.autoLevel && _fragCurrent.level) {

                         // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate
                         var requestDelay : int = getTimer() - _metrics.loading_request_time;


Flash: Help ExternalInterface to escape strings properly, as suggested in #88. Closes #88.

--- src/flash/plupload/src/com/plupload/Plupload.as
+++ src/flash/plupload/src/com/plupload/Plupload.as
@@ -171,7 +171,7 @@

 					fireEvent("IOError", {
 						id : file.id,
-						message : e.text
+						message : e.text.replace(/\\/g, "\\\\")
 					});
 				});

@@ -181,7 +181,7 @@

 					fireEvent("SecurityError", {
 						id : file.id,
-						message : e.text
+						message : e.text.replace(/\\/g, "\\\\")
 					});
 				});

@@ -191,7 +191,7 @@

 					fireEvent("UploadComplete", {
 						id : file.id,
-						text : e.text
+						text : e.text.replace(/\\/g, "\\\\")
 					});
 				});

@@ -201,7 +201,7 @@

 					fireEvent("UploadChunkComplete", {
 						id : file.id,
-						text : e.text,
+						text : e.text.replace(/\\/g, "\\\\"),
 						chunk : e.chunk,
 						chunks : e.chunks
 					});