 import spark.layouts.supportClasses.LayoutBase;
 import spark.primitives.supportClasses.GraphicElement;
 import spark.skins.spark.DefaultGridItemRenderer;
-import spark.skins.spark.DefaultGridItemRenderer;
 
 use namespace mx_internal;
 

        if (!grid)
            return;
        
        grid.hoverRowIndex = -1;
        grid.hoverColumnIndex = -1;
                
        super.scrollPositionChanged();  // sets grid.scrollRect
        
        // Only invalidate if we're clipping and scrollR extends outside validBounds

    }
    

    private var hoverLocationIsValid:Boolean = true;
    private var mouseXOffset:Number = 0;
    private var mouseYOffset:Number = 0;
    
    /**
     *  @private
     *  In theory it would be enough to just set a flag here and then fixup the 
     *  grid's hoverRow,ColumnIndex properties at updateDisplayList() time, based
     *  on the current mouse position (grid.mouseX,Y).  Unfortunately, the mouseX,Y
     *  DisplayObject properties aren't updated per the scrollRect until after 
     *  the new layout has appeared on screen.  To account for that we accumulate
     *  the deltas for grid.scrollRect.x,y here.   
     */
    private function invalidateHoverLocation(dx:Number, dy:Number):void
    {
        hoverLocationIsValid = false;
        mouseXOffset += dx;
        mouseYOffset += dy;
    }
    
    private function layoutHoverIndicator(container:IVisualElementContainer):void
    {
        if (!hoverLocationIsValid)
        {
            const mouseX:Number = grid.mouseX + mouseXOffset;
            const mouseY:Number = grid.mouseY + mouseYOffset;
            grid.hoverRowIndex = gridDimensions.getRowIndexAt(mouseX, mouseY);
            grid.hoverColumnIndex = gridDimensions.getColumnIndexAt(mouseX, mouseY);
            hoverLocationIsValid = true;
            mouseXOffset = 0;
            mouseYOffset = 0;
        }
        
        const rowIndex:int = grid.hoverRowIndex;
        const columnIndex:int = grid.hoverColumnIndex;
        const factory:IFactory = grid.hoverIndicator;
