     /**
      * Configure the mask for this object.
      */
-    protected function configureMask (ww :int, hh :int) :void
+    protected function configureMask (rect :Rectangle) :void
     {
         var mask :Shape;
         if (_media.mask != null) {

import flash.events.TextEvent;

import flash.geom.Point;

import flash.text.TextField;
import flash.text.TextFieldAutoSize;

    protected function contentDimensionsUpdated () :void
    {
        // update the mask
        var r :Rectangle = getMaskRectangle();
        if (r != null) {
            configureMask(r);
        }
    }

    /**
     * Get the mask area, or null if no mask is needed.
     */
    protected function getMaskRectangle () :Rectangle
    {
        var maxW :int = getMaxContentWidth();
        var maxH :int = getMaxContentHeight();
        if ((maxW < int.MAX_VALUE) && (maxH < int.MAX_VALUE)) {
            // if we should do masking, then mask to the lesser of maximum and actual size
            return new Rectangle(0, 0, Math.min(maxW, _w), Math.min(maxH, _h));
        }

        return null;
    }

    /**
