 import flash.geom.Rectangle;
 
 import mx.components.baseClasses.GroupBase;
-import mx.layout.ILayoutItem;
+import mx.layout.ILayoutElement;
 import mx.layout.LayoutBase;
 
 /**

        if (!layoutTarget)
            return;

        var count:int = layoutTarget.numLayoutItems;
        var maxX:Number = 0;
        var maxY:Number = 0;
        for (var i:int = 0; i < count; i++)
        {
            var layoutItem:ILayoutItem = layoutTarget.getLayoutItemAt(i);
            if (!layoutItem || !layoutItem.includeInLayout)
                continue;

            var hCenter:Number = LayoutItemHelper.parseConstraintValue(layoutItem.horizontalCenter);
            var vCenter:Number = LayoutItemHelper.parseConstraintValue(layoutItem.verticalCenter);
            var left:Number    = LayoutItemHelper.parseConstraintValue(layoutItem.left);
            var right:Number   = LayoutItemHelper.parseConstraintValue(layoutItem.right);
            var top:Number     = LayoutItemHelper.parseConstraintValue(layoutItem.top);
            var bottom:Number  = LayoutItemHelper.parseConstraintValue(layoutItem.bottom);
            var itemMinSize:Point = layoutItem.minSize;
            var itemMaxSize:Point = layoutItem.maxSize.clone(); // Since we may update it below

            // Remember child position before setting actualSize, since changing the size may
            // change the position.
            var childX:Number = layoutItem.actualPosition.x;
            var childY:Number = layoutItem.actualPosition.y;

            // Calculate size
            var childWidth:Number = NaN;

            {
                childWidth = unscaledWidth - right - left;
            }
            else if (!isNaN(layoutElement.percentWidth))
            {
                childWidth = unscaledWidth * Math.min(layoutElement.percentWidth * 0.01, 1);
                elementMaxWidth = Math.min(elementMaxWidth,
                    maxSizeToFitIn(unscaledWidth, hCenter, left, right, childX));
            }

