             preferredWidth += child.preferred;
         }
 
-        var wPadding:Number =
-            mx_internal::layoutObject.widthPadding(numChildren);
-        var hPadding:Number = mx_internal::layoutObject.heightPadding(0);
+        var wPadding:Number = layoutObject.widthPadding(numChildren);
+        var hPadding:Number = layoutObject.heightPadding(0);
         var rowInfo:GridRowInfo = rowHeights[rowIndex];
 
         measuredMinWidth = minWidth + wPadding;

            var diff:Number = w - child.maxWidth;
            if (diff > 0)
            {
                x += diff * mx_internal::layoutObject.getHorizontalAlignValue();
                w -= diff;
            }
            diff = h - child.maxHeight;

        }

        // Set each child's x-coordinate.
        left = vm.left + spaceToDistribute * layoutObject.getHorizontalAlignValue();
        for (i = 0; i < numChildren; i++)
        {
            columnInfo = columnWidths[i];
