             
          return new Point(dx, dy);
      }
-     
-    /**
-     *  Called when the verticalScrollPosition or horizontalScrollPosition 
-     *  properties change.
-     * 
-     *  Resets the target's scrollRect property by calling
-     *  <code>updateScrollRect()</code>.
-     * 
-     *  Subclasses can override this method to compute other values that are
-     *  based on the current scrollPosition or scrollRect.
-     * 
-     *  @see updateScrollRect
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */  
-    protected function scrollPositionChanged():void
-    {
-        var g:GroupBase = target;
-        if (!g)
-            return;
-
-        updateScrollRect(g.width, g.height);
-    }
-    
-    /**
-     *  If clipAndEnableScrolling is true, sets the origin of the scrollRect to 
-     *  verticalScrollPosition,horizontalScrollPosition and its width
-     *  width,height to w,h (the target's unscaled width,height).
-     * 
-     *  If clipAndEnableScrolling is false, sets the scrollRect to null.
-     *  
-     *  @param w The target's unscaled width.
-     *  @param h The target's unscaled height.
-     * 
-     *  @see target
-     *  @see flash.display.DisplayObject#scrollRect
-     *  @see updateDisplayList
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */ 
-    public function updateScrollRect(w:Number, h:Number):void
-    {
-        var g:GroupBase = target;
-        if (!g)
-            return;
-            
-        if (clipAndEnableScrolling)
-        {
-            var hsp:Number = horizontalScrollPosition;
-            var vsp:Number = verticalScrollPosition;
-            g.scrollRect = new Rectangle(hsp, vsp, w, h);
-        }
-        else
-            g.scrollRect = null;
-    } 
-    
-    /**
-     *  Convenience function for subclasses that invalidates the
-     *  target's size and displayList if the target is non-null.
-     * 
-     *  @see mx.core.UIComponent#invalidateSize
-     *  @see mx.core.UIComponent#invalidateDisplayList
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function invalidateTargetSizeAndDisplayList():void
-    {
-        var g:GroupBase = target;
-        if (!g)
-            return;
-
-        g.invalidateSize();
-        g.invalidateDisplayList();
-    }
-    
-    /**
-     *  Convenience function for subclasses that invalidates the
-     *  target's displayList if the target is non-null.
-     * 
-     *  @see mx.core.UIComponent#invalidateDisplayList
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function invalidateTargetDisplayList():void
-    {
-        var g:GroupBase = target;
-        if (!g)
-            return;
-
-        g.invalidateDisplayList();
-    }
-    
-    /**
-     *  @copy mx.core.UIComponent#measure
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function measure():void
-    {
-    }
-    
-    /**
-     *  @copy mx.core.UIComponent#updateDisplayList
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-    {
-    }          
 }
-
 }

import mx.core.ILayoutElement;
import mx.utils.OnDemandEventDispatcher;


public class LayoutBase extends OnDemandEventDispatcher
{
    //--------------------------------------------------------------------------
    //
    //  Class methods
    //
    //--------------------------------------------------------------------------

    internal static function hasPercentWidth(layoutElement:ILayoutElement):Boolean
    {
        return !isNaN(layoutElement.percentWidth);
    }
    
    internal static function hasPercentHeight(layoutElement:ILayoutElement):Boolean
    {
        return !isNaN(layoutElement.percentHeight);
    }

    //--------------------------------------------------------------------------
    //
    //  Constructor

        return new Rectangle(hsp, vsp, g.width, g.height);
    }

    /**
     *  Returns the bounds of the first layout element that either spans or
     *  is to the left of the scrollRect's left edge.
     * 
     *  <p>This is a convenience method that is used by the default
     *  implementation of the <code>getHorizontalScrollPositionDelta()</code> method.
     *  Subclasses that rely on the default implementation of
     *  <code>getHorizontalScrollPositionDelta()</code> should override this method to
     *  provide an accurate bounding rectangle that has valid <code>left</code> and 
     *  <code>right</code> properties.</p>
     * 
     *  By default this method returns a Rectangle with width=1, height=0, 
     *  whose left edge is one less than the scrollRect's left edge, 
     *  and top=0.
     * 
     *  @param scrollRect The target's scrollRect.
     *  @return Returns the bounds of the first element that spans or is to
