Something else is going on there.  If you click on the 'Add New Address' button 
and then cancel, it clears things up.  So, somehow parts of the new address 
panel is showing up when it shouldn't.  And were those button assets always 
clipped?

On 2011-03-17, at 14:20, Max Carlson wrote:

> I think there are still some issues with text and clipping in DHTML - see the 
> attached image from the checkout tab of amazon.
> 
> On 3/14/11 9:36 AM, [email protected] wrote:
>> Author: ptw
>> Date: 2011-03-14 09:36:30 -0700 (Mon, 14 Mar 2011)
>> New Revision: 18864
>> 
>> Modified:
>>    openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
>>    openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
>>    openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
>> Log:
>> Change ptw-20110314-mHC by [email protected] on 2011-03-14 08:33:32 EDT
>>     in /Users/ptw/OpenLaszlo/trunk-devo
>>     for http://svn.openlaszlo.org/openlaszlo/trunk
>> 
>> Summary: Straighten out borders and shadows vs. clipping
>> 
>> Bugs Fixed: LPP-9667 Shadows can't display if 'clip=true'
>> 
>> Technical Reviewer: [email protected] (pending) [email protected] 
>> (Message-ID:<[email protected]>)
>> QA Reviewer: [email protected] (pending)
>> 
>> Overview:
>>     Both DHTML and SWF10 incorrectly clipped any border or shadow on a
>>     view if the view was set to clip.  These decorations should be
>>     outside the view, only the view children should be clipped.
>> 
>> Details:
>> 
>>     LzSprite.js:  The clipping rectangle we want is exactly what HTML
>>     divs implement if you say `overflow: hidden`.  There's no need to
>>     use the CSS rect.  When we clip a view, we only want to clip the
>>     corresponding clickdiv (not the clickcontainerdiv), this solves
>>     LPP-9177's issue with clickdivs in a more straightforward fashion.
>> 
>>     LzTextSprite.as: No need to override updateShadow.
>> 
>>     LzSprite.as: Use Shape rather than Sprite for decorations (border,
>>     shadow, background).  Give border and shadow their own separate
>>     shapes that sit just behind the view's sprite in the parent
>>     display list, so they will not be clipped if clipping is enabled.
>>     Break out the drawing of the border and shadow, only draw them if
>>     they hav a dimension>  0.  Make a single call to draw all
>>     decorations.  setIndex is a common subroutine that knows how to
>>     move the view sprite and corresponding decoration shapes together
>>     in the parent display list -- used by all the ordering API's.
>> 
>> Tests:
>>     Test case from bug, component-sampler, demos/house
>> 
>> 
>> 
>> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
>> ===================================================================
>> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js        
>> 2011-03-14 13:10:02 UTC (rev 18863)
>> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js        
>> 2011-03-14 16:36:30 UTC (rev 18864)
>> @@ -633,8 +633,6 @@
>>      ,textmeasurementalphastring: false
>>      // See LPP-9101
>>      ,textlinksneedmouseevents:false
>> -    // See LPP-9177
>> -    ,dont_clip_clickdivs:false
>>      // See LPP-9202
>>      ,explicitly_set_border_radius:false
>>      // See LzTextSprite.setSelectable()
>> @@ -905,8 +903,6 @@
>>                  defaultStyles.lzswftext.wordWrap = 'normal';
>>                  defaultStyles.lzswfinputtext.wordWrap = 'normal';
>>                  defaultStyles.lzswfinputtextmultiline.wordWrap = 'normal';
>> -                // Opera can't deal with clipped clickdivs, see LPP-9177
>> -                quirks['dont_clip_clickdivs'] = true;
>>                  // See LPP-9469, clipping was not working in Opera 10.6
>>                  quirks['container_divs_require_overflow'] = true;
>>              }
>> @@ -2601,28 +2597,29 @@
>>      if (this.isroot&&  this.quirks.canvas_div_cannot_be_clipped) return;
>>      // default
>>      var clipcss = '';
>> -    if (this.clip&&  this.width != null&&  this.width>= 0&&  this.height != 
>> null&&  this.height>= 0) {
>> +    if (this.clip&&  this.width != null&&  this.width>  0&&  this.height != 
>> null&&  this.height>  0) {
>>          // have clip, set it
>> -        clipcss = 'rect(0px ' + this._w + ' ' + this._h + ' 0px)';
>> +        clipcss = 'hidden';
>>      } else if (this._clip) {
>>          // had clip, clear it
>> -        clipcss = quirks.fix_ie_css_syntax ? 'rect(auto auto auto auto)' : 
>> '';
>> +        clipcss = 'visible';
>>      }
>>      if (clipcss !== this._clip) {
>>          this._clip = clipcss;
>> -        this.__LZdiv.style.clip = clipcss
>> +        this.__LZdiv.style.overflow = clipcss
>>      } else {
>>          // return so we don't set the containers
>>          return;
>>      }
>> 
>> -    if (quirks.fix_clickable&&  quirks.dont_clip_clickdivs != true) {
>> -        if (this.__LZclickcontainerdiv) {
>> -            this.__LZclickcontainerdiv.style.clip = clipcss;
>> -        }
>> +    if (quirks.fix_clickable&&  this.__LZclickcontainerdiv&&  
>> this.__LZclick) {
>> +        // Only clip the clickdiv, not the container (the container is
>> +        // for positioning, the clickdiv receives the mouse events
>> +        this.__LZclick.style.overflow = clipcss;
>>      }
>> -    if (quirks.fix_contextmenu&&  this.__LZcontextcontainerdiv) {
>> -        this.__LZcontextcontainerdiv.style.clip = clipcss;
>> +    if (quirks.fix_contextmenu&&  this.__LZcontextcontainerdiv&&  
>> this.__LZcontext) {
>> +        // Ditto
>> +        this.__LZcontext.style.overflow = clipcss;
>>      }
>>  }
>> 
>> @@ -3188,10 +3185,6 @@
>>      var propname = '__LZ' + typestring + 'containerdiv';
>>      var copyclip = true;
>> 
>> -    if (this.quirks.dont_clip_clickdivs&&  typestring == 'click') {
>> -        copyclip = false;
>> -    }
>> -
>>      if (this[propname]) {
>>          //console.warn(this, 'already has a', propname, this[propname]);
>>          // we already have one...
>> @@ -3212,15 +3205,14 @@
>>          newdiv.className = sprite instanceof LzTextSprite ? 
>> 'lztextcontainer' : 'lzdiv';
>> 
>>          // Append to parent container div when possible.  Sprites can be 
>> created
>> -        // and attached into their parent later.  See addChildSprite() which
>> +        // and attached into their parent later.  See addChildSprite() which
>>          // ensures there is a valid parent container div.
>>          var parentcontainer = sprite.__parent&&  sprite.__parent[propname];
>>          if (parentcontainer) {
>>              parentcontainer.appendChild(newdiv);
>>          }
>> 
>> -
>> -        this.__copystyles(sprite.__LZdiv, newdiv, copyclip);
>> +        this.__copystyles(sprite.__LZdiv, newdiv);
>> 
>>          // set id, if we have one...
>>          if (sprite._id&&  !newdiv.id) {
>> @@ -3241,8 +3233,7 @@
>>    * Copies relevant styles from one div to another, e.g. a container div
>>    * @access private
>>    */
>> -LzSprite.prototype.__copystyles = function(from, to, copyclip) {
>> -    copyclip = copyclip == null ? true : copyclip;
>> +LzSprite.prototype.__copystyles = function(from, to) {
>>      var sprite = from.owner;
>>      var left = sprite._x;
>>      if (left) {
>> @@ -3257,14 +3248,13 @@
>>          to.style.display = display;
>>      }
>>      to.style.zIndex = sprite._z || from.style.zIndex;
>> -    if (copyclip&&  sprite._clip) {
>> -        to.style.clip = sprite._clip;
>> -    }
>>      if (sprite._transform) {
>>          // copy transform
>>          var stylename = LzSprite.__styleNames.transform;
>>          to.style[stylename] = sprite._transform;
>>      }
>> +    // TODO: Don't we need to copy margin/padding/border, so our
>> +    // children clickcontainers are correctly positioned?
>>  }
>> 
>>  /**
>> 
>> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
>> ===================================================================
>> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2011-03-14 
>> 13:10:02 UTC (rev 18863)
>> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2011-03-14 
>> 16:36:30 UTC (rev 18864)
>> @@ -23,6 +23,7 @@
>>    import flash.display.LoaderInfo;
>>    import flash.display.MovieClip;
>>    import flash.display.SimpleButton;
>> +  import flash.display.Shape;
>>    import flash.display.Sprite;
>>    import flash.display.SWFVersion;
>>    import flash.errors.IOError;
>> @@ -63,7 +64,9 @@
>>      public var clickregion:Sprite = null;
>>      public var clickregionwidth:Number;
>>      public var clickregionheight:Number;
>> -    public var masksprite:Sprite = null;
>> +    // This only needs to be a Shape, not a Sprite, but the name is
>> +    // apparently a public API?
>> +    public var masksprite:Shape = null;
>>      public var resource:String = null;
>>      public var clip:Boolean = false;
>>      public var resourcewidth:Number = 0;
>> @@ -219,7 +222,7 @@
>>      }
>> 
>>      /**
>> -     * @access private
>> +     * @access private ONLY CALLED BY CANVAS
>>       */
>>      public var initted = false;
>>      public function init (v:Boolean = true):void {
>> @@ -252,7 +255,6 @@
>>      */
>>      public function addChildSprite(sprite:LzSprite):void {
>>          addChild(sprite);
>> -        sprite.mask = this.masksprite;
>>          this.mouseChildren = true;
>>          //trace('addChildSprite ', sprite, 'added to ' ,this.owner);
>>      }
>> @@ -263,84 +265,146 @@
>> 
>>      // Holds onto backgroundrepeat bitmap when needed
>>      private var __repeatbitmap:BitmapData = null;
>> -    public function drawBackground():void {
>> -        var context = this.graphics;
>> +    private function drawDecoration():void {
>> +      var context:Graphics = graphics;
>>          context.clear();
>> -        // ensures context menus work with compiled resources by covering 
>> them with a
>> +        // ensures context menus work with compiled resources by covering 
>> them with a
>>          // clickable bitmap in the display list - see LPP-8815
>> -        if (this.__bgcolorhidden&&  this.clickable != true&&  
>> this.__isinternalresource) {
>> -            if (this.__bgsprite == null) {
>> -                this.__bgsprite = new Sprite()
>> -                this.addChild(this.__bgsprite);
>> +        if (__bgcolorhidden&&  clickable != true&&  __isinternalresource) {
>> +            if (__bgshape == null) {
>> +              __bgshape = new Shape();
>> +              addChild(__bgshape);
>>              }
>> -            context = this.__bgsprite.graphics;
>> +            context = __bgshape.graphics;
>>              context.clear();
>> -        } else if (this.__bgsprite != null) {
>> -            this.removeChild(this.__bgsprite);
>> -            this.__bgsprite = null;
>> +        } else if (__bgshape != null) {
>> +            removeChild(__bgshape);
>> +            __bgshape = null;
>>          }
>> 
>> -        var alpha:Number = this.__bgcolorhidden ? 0 : 1;
>> -        if (this.__repeatbitmap) this.__repeatbitmap.dispose();
>> -        if (this.backgroundrepeat&&  this.resourcewidth&&  
>> this.resourceheight) {
>> -            var bmp = copyBitmap(this, this.resourcewidth, 
>> this.resourceheight);
>> +        var alpha:Number = __bgcolorhidden ? 0 : 1;
>> +        if (__repeatbitmap) __repeatbitmap.dispose();
>> +        if (backgroundrepeat&&  resourcewidth&&  resourceheight) {
>> +            var bmp = copyBitmap(this, resourcewidth, resourceheight);
>>              if (bmp) {
>>                  context.beginBitmapFill(bmp);
>> -                var height = this.repeaty ? this.lzheight : 
>> this.resourceheight;
>> -                var width = this.repeatx ? this.lzwidth : 
>> this.resourcewidth;
>> -                LzKernelUtils.rect(context, 0 - this.paddingLeft, 0 - 
>> this.paddingTop, width + (this.paddingLeft + this.paddingRight), height + 
>> (this.paddingTop + this.paddingBottom), cornerradius[0], cornerradius[1], 
>> cornerradius[2], cornerradius[3]);
>> +                // See drawBackgroundRect, which this is a
>> +                // customization of to take into account of a
>> +                // non-repeating resource that will not fill the
>> +                // entire background
>> +                var height = (lzheight + (paddingTop + paddingBottom));
>> +                if ((! repeaty)&&  (resourceheight<  height)) { height = 
>> resourceheight; }
>> +                var width = (lzwidth + (paddingLeft + paddingRight));
>> +                if ((! repeatx)&&  (resourcewidth<  width)) { width = 
>> resourcewidth; }
>> +                LzKernelUtils.rect(context, 0 - paddingLeft, 0 - 
>> paddingTop, width, height,
>> +                                   cornerradius[0], cornerradius[1], 
>> cornerradius[2], cornerradius[3]);
>>                  context.endFill();
>>                  // disposing here messes with the fill - store to dispose 
>> later
>> -                this.__repeatbitmap = bmp;
>> +                __repeatbitmap = bmp;
>>              }
>>          }
>> -        if (this.borderColor&&  (this.borderTopWidth || 
>> this.borderRightWidth || this.borderBottomWidth || this.borderLeftWidth)) {
>> -            var cu = LzColorUtils;
>> -            var color_alpha = 
>> cu.coloralphafrominternal(cu.internalfromcss(this.borderColor));
>> -            context.beginFill(color_alpha[0], color_alpha[1]);
>> -            this.drawBorder(context);
>> -            // clip out the background
>> -            this.drawBackgroundFill(context);
>> -            // fill the intersection
>> -            context.endFill();
>> -        }
>> +
>>          if (bgcolor != null) {
>>              context.beginFill(bgcolor, alpha);
>> -            this.drawBackgroundFill(context);
>> +            drawBackgroundRect(context);
>>              context.endFill();
>>          }
>> +
>> +        if (bordershape || shadowshape) {
>> +          drawBorder();
>> +        }
>>      }
>> 
>>      public function drawMask():void {
>> -        if (this.masksprite) {
>> -            var context = this.masksprite.graphics;
>> +        if (masksprite) {
>> +            var context:Graphics = masksprite.graphics;
>>              context.clear();
>>              // This is just a mask, it does not want to display, hence
>>              // alpha = 0
>>              context.beginFill(0xffffff, 0);
>>              // Clip to the background:  i.e., inside the border, but
>>              // not inside the padding
>> -            this.drawBackgroundFill(context);
>> +            drawBackgroundRect(context);
>>              context.endFill();
>>          }
>>      }
>> 
>> -    private function drawBorder(context:Graphics):void {
>> +    private function drawBackgroundRect(context:Graphics):void {
>>          LzKernelUtils.rect(context,
>> -                           0 - (this.paddingLeft + this.borderLeftWidth),
>> -                           0 - (this.paddingTop + this.borderTopWidth),
>> -                           this.lzwidth + (this.paddingLeft + 
>> this.borderLeftWidth + this.borderRightWidth + this.paddingRight),
>> -                           this.lzheight + (this.paddingTop + 
>> this.borderTopWidth + this.borderBottomWidth + this.paddingBottom),
>> +                           0 - paddingLeft,
>> +                           0 - paddingTop,
>> +                           lzwidth + (paddingLeft + paddingRight),
>> +                           lzheight + (paddingTop + paddingBottom),
>>                             cornerradius[0], cornerradius[1], 
>> cornerradius[2], cornerradius[3]);
>>      }
>> 
>> -    private function drawBackgroundFill(context:Graphics):void {
>> -        LzKernelUtils.rect(context,
>> -                           0 - this.paddingLeft,
>> -                           0 - this.paddingTop,
>> -                           this.lzwidth + (this.paddingLeft + 
>> this.paddingRight),
>> -                           this.lzheight + (this.paddingTop + 
>> this.paddingBottom),
>> -                           cornerradius[0], cornerradius[1], 
>> cornerradius[2], cornerradius[3]);
>> +    var shadowfilter:DropShadowFilter = null;
>> +
>> +    private function drawBorder():void {
>> +      if (bordershape) {
>> +        var context:Graphics = bordershape.graphics;
>> +        context.clear();
>> +
>> +        if (borderTopWidth || borderRightWidth || borderBottomWidth || 
>> borderLeftWidth) {
>> +          var cu = LzColorUtils;
>> +          var color_alpha = 
>> cu.coloralphafrominternal(cu.internalfromcss(borderColor));
>> +          context.beginFill(color_alpha[0], color_alpha[1]);
>> +          // The border shape is in the parent display list, at our
>> +          // x/y
>> +          LzKernelUtils.rect(context,
>> +                             0 - (borderLeftWidth + paddingLeft),
>> +                             0 - (borderTopWidth + paddingTop),
>> +                             lzwidth + (borderLeftWidth + paddingLeft + 
>> paddingRight + borderRightWidth),
>> +                             lzheight + (borderTopWidth + paddingTop + 
>> paddingBottom + borderBottomWidth),
>> +                             cornerradius[0], cornerradius[1], 
>> cornerradius[2], cornerradius[3]);
>> +          // clip out the background, so only the intersection is
>> +          // filled -- the backround of the sprite may be transparent,
>> +          // hence we must be too
>> +          drawBackgroundRect(context);
>> +          context.endFill();
>> +        }
>> +      }
>> +      // Shadow has to have its own shape because we have to draw a
>> +      // 'knockout' that is solid, not just the border, so the shadow
>> +      // does not show through a transparent background
>> +      if (shadowshape) {
>> +        var context:Graphics = shadowshape.graphics;
>> +        context.clear();
>> +        if (shadowblurradius) {
>> +          context.beginFill(0xff0000, 1);
>> +          // The border shape is in the parent display list, at our
>> +          // x/y
>> +          LzKernelUtils.rect(context,
>> +                             0 - (borderLeftWidth + paddingLeft),
>> +                             0 - (borderTopWidth + paddingTop),
>> +                             lzwidth + (borderLeftWidth + paddingLeft + 
>> paddingRight + borderRightWidth),
>> +                             lzheight + (borderTopWidth + paddingTop + 
>> paddingBottom + borderBottomWidth),
>> +                             cornerradius[0], cornerradius[1], 
>> cornerradius[2], cornerradius[3]);
>> +          context.endFill();
>> +          if (shadowfilter == null) {
>> +            shadowfilter = new DropShadowFilter();
>> +          }
>> +          if (shadowblurradius<  0) {
>> +            // Flip the distance (inner uses a positive value)
>> +            shadowfilter.blurX = (- shadowblurradius);
>> +            shadowfilter.blurY = (- shadowblurradius);
>> +            shadowfilter.inner = true;
>> +          } else {
>> +            shadowfilter.blurX = shadowblurradius;
>> +            shadowfilter.blurY = shadowblurradius;
>> +            shadowfilter.inner = false;
>> +          }
>> +          shadowfilter.angle = shadowangle;
>> +          shadowfilter.distance = shadowdistance;
>> +          var color_alpha = 
>> LzColorUtils.coloralphafrominternal(shadowcolor);
>> +          shadowfilter.color = color_alpha[0];
>> +          shadowfilter.alpha = color_alpha[1];
>> +          shadowfilter.knockout = true;
>> +          shadowshape.filters = [shadowfilter];
>> +        } else {
>> +          shadowshape.filters = [];
>> +        }
>> +      }
>>      }
>> 
>>      private var _frame:int = 1;
>> @@ -652,7 +716,7 @@
>>          } catch (error:Error) {
>>              if ($debug) Debug.warn("loaderEventHandler(%w): %w", event, 
>> error);
>>          }
>> -        this.drawBackground();
>> +        this.drawDecoration();
>>      }
>> 
>>      /**
>> @@ -1063,8 +1127,7 @@
>>              this.drawMask();
>>          }
>> 
>> -        drawBackground();
>> -        if (shadowsprite != null) { updateShadow(_shadowcolor, 
>> _shadowdistance, _shadowangle, _shadowblurradius); }
>> +        drawDecoration();
>>      }
>> 
>> 
>> @@ -1084,8 +1147,7 @@
>>          if (this.masksprite) {
>>              this.drawMask();
>>          }
>> -        drawBackground();
>> -        if (shadowsprite != null) { updateShadow(_shadowcolor, 
>> _shadowdistance, _shadowangle, _shadowblurradius); }
>> +        drawDecoration();
>>      }
>> 
>>      /** @field Number rotation: The rotation value for the view (in degrees)
>> @@ -1176,7 +1238,7 @@
>>              this.__bgcolorhidden = true;
>>              this.bgcolor = 0xffffff;
>>          }
>> -        drawBackground();
>> +        drawDecoration();
>>      }
>> 
>> 
>> @@ -1272,7 +1334,7 @@
>>              // This shouldn't happen - but it does, on roll over
>>              //Debug.write('unhandled stop', fn, rel);
>>          }
>> -        if (this.backgroundrepeat) this.drawBackground();
>> +        if (this.backgroundrepeat) this.drawDecoration();
>>      }
>> 
>>      /** Used to update the frame number for internal resources.  Called by 
>> stop() and __incrementFrame() */
>> @@ -1419,21 +1481,15 @@
>>          }
>>      }
>> 
>> -    // Create a Flash Sprite to use as the clipping mask.
>> +    // Create a Flash Shape to use as the clipping mask.
>>      public function applyMask():void {
>>          if (masksprite == null) {
>> -            masksprite = new Sprite();
>> +            masksprite = new Shape();
>>              addChildAt(masksprite, 0);
>> -            this.drawMask();
>>          }
>> -        for (var i = numChildren - 1; i>=0; i--) {
>> -            var child:DisplayObject = getChildAt(i);
>> -            // Only mask the children that represent nodes, not the
>> -            // shadow/border/background artefacts
>> -            if (child is LzSprite) {
>> -                (child cast LzSprite).mask = masksprite;
>> -            }
>> -        }
>> +        // Ensure mask shape is up-to-date
>> +        this.drawMask();
>> +        mask = masksprite;
>>      }
>> 
>>      public function removeMask():void {
>> @@ -1441,14 +1497,7 @@
>>              this.removeChild(masksprite);
>>              masksprite = null;
>>          }
>> -        for (var i = numChildren - 1; i>=0; i--) {
>> -            var child:DisplayObject = getChildAt(i);
>> -            // Only mask the children that represent nodes, not the
>> -            // shadow/border/background artefacts
>> -            if (child is LzSprite) {
>> -                (child cast LzSprite).mask = null;
>> -            }
>> -        }
>> +        mask = null;
>>      }
>> 
>> 
>> @@ -1505,7 +1554,7 @@
>>              parent.removeChild(this);
>>          }
>>          if (this.__repeatbitmap) this.__repeatbitmap.dispose();
>> -        if (this.mask != null) {
>> +        if (this.masksprite != null) {
>>              this.removeMask();
>>          }
>>      }
>> @@ -1534,13 +1583,21 @@
>>      }
>> 
>> 
>> +  private function setIndex(index:int) {
>> +    // Our border and shadw sit just behind us in our parent's display
>> +    // list (so they are not clipped by our mask)
>> +    parent.setChildIndex(this, index);
>> +    if (bordershape != null) { parent.setChildIndex(bordershape, index); }
>> +    if (shadowshape != null) { parent.setChildIndex(shadowshape, index); }
>> +  }
>> +
>>      /** bringToFront()
>>          o Brings this sprite to the front of its siblings
>>      */
>>      public function bringToFront ():void {
>>  //PBR
>>          if (!this.isroot&&  parent) {
>> -            parent.setChildIndex(this, parent.numChildren-1);
>> +          setIndex(parent.numChildren-1);
>>          }
>>      }
>> 
>> @@ -1553,7 +1610,7 @@
>>              var pos:int = 0;
>>              // skip all non-LzSprites (clickbutton, resourceContainer, etc.)
>>              for (; ! (parent.getChildAt(pos) is LzSprite); ++pos) {}
>> -            parent.setChildIndex(this, pos);
>> +            setIndex(pos);
>>          }
>>      }
>> 
>> @@ -1570,7 +1627,7 @@
>>                  //>  all children in between will INCREASE by 1 for their 
>> index reference.
>>                  var myDepth:int = parent.getChildIndex(this);
>>                  var targetDepth:int = parent.getChildIndex(targetSprite);
>> -                parent.setChildIndex(this, myDepth<  targetDepth ? 
>> targetDepth : targetDepth + 1);
>> +                setIndex(myDepth<  targetDepth ? targetDepth : targetDepth 
>> + 1);
>>              } catch (e:Error) {
>>                  // if targetSprite isn't a child of the 
>> DisplayObjectContainer
>>              }
>> @@ -1590,7 +1647,7 @@
>>                  //>  all children in between will DECREASE by 1 for their 
>> index reference.
>>                  var myDepth:int = parent.getChildIndex(this);
>>                  var targetDepth:int = parent.getChildIndex(targetSprite);
>> -                parent.setChildIndex(this, myDepth>  targetDepth ? 
>> targetDepth : targetDepth - 1);
>> +                setIndex(myDepth>  targetDepth ? targetDepth : targetDepth 
>> - 1);
>>              } catch (e:Error) {
>>                  // if targetSprite isn't a child of the 
>> DisplayObjectContainer
>>              }
>> @@ -1653,7 +1710,7 @@
>>        }
>>        this.imgLoader = null;
>>        this.resourceCache = null;
>> -      this.drawBackground();
>> +      this.drawDecoration();
>>      }
>> 
>>      public function setAccessible(accessible:*) :void {
>> @@ -1696,7 +1753,7 @@
>> 
>>      var __contextmenu:LzContextMenu;
>>      var __bgcolorhidden:Boolean = false;
>> -    var __bgsprite:Sprite = null;
>> +    var __bgshape:Shape = null;
>> 
>>  #passthrough {
>>      function get isBkgndRequired () :Boolean {
>> @@ -1712,12 +1769,12 @@
>>              // remove invisible background
>>              this.__bgcolorhidden = false;
>>              this.bgcolor = null;
>> -            this.drawBackground();
>> +            this.drawDecoration();
>>          } else if (this.bgcolor == null&&  this.isBkgndRequired) {
>>              // create an invisible background
>>              this.__bgcolorhidden = true;
>>              this.bgcolor = 0xffffff;
>> -            this.drawBackground();
>> +            this.drawDecoration();
>>          }
>>      }
>> 
>> @@ -1949,113 +2006,93 @@
>>          trace('LzSprite.setID not yet implemented');
>>      }
>> 
>> -    var shadowfilter:DropShadowFilter = new DropShadowFilter(0, 0, 0, 1, 4, 
>> 4, 1, 2, false, false, false);
>> -    var shadowsprite:Sprite = null;
>> -    var _shadowcolor:*;
>> -    var _shadowangle:Number;;
>> -    var _shadowdistance:Number;
>> -    var _shadowblurradius:Number;
>> +  var bordershape:Shape = null;
>> +  var shadowshape:Shape = null;
>> 
>> -    /**
>> -       Set up drop shadow filter.
>> +  private function updateBorderShape() {
>> +    if (parent != null) {
>> +      var myIndex:int = parent.getChildIndex(this);
>> +    }
>> +    if (borderTopWidth || borderRightWidth || borderBottomWidth || 
>> borderLeftWidth) {
>> +      if (bordershape == null) {
>> +        bordershape = new Shape();
>> +      }
>> +      if (parent != null) {
>> +        // insert my border just behind me
>> +        bordershape.x = x;
>> +        bordershape.y = y;
>> +        parent.addChildAt(bordershape, myIndex);
>> +      }
>> +    } else {
>> +      if (parent != null&&  bordershape != null) {
>> +        parent.removeChild(bordershape);
>> +        bordershape = null;
>> +      }
>> +    }
>> +    // Shadow must be in its own shape, see drawBackground
>> +    if (shadowblurradius) {
>> +      if (shadowshape == null) {
>> +        shadowshape = new Shape();
>> +      }
>> +      if (parent != null) {
>> +        // insert my shadow just behind me (and my border if any)
>> +        shadowshape.x = x;
>> +        shadowshape.y = y;
>> +        parent.addChildAt(shadowshape, myIndex);
>> +      }
>> +    } else {
>> +      if (parent != null&&  shadowshape != null) {
>> +        parent.removeChild(shadowshape);
>> +        shadowshape = null;
>> +      }
>> +    }
>> +    if (bordershape || shadowshape) {
>> +      drawBorder();
>> +    }
>> +  }
>> 
>> -       TODO [hqm 2010-12] If a color of "null" is passed in, the
>> -       filter is removed. It looks like currently the LFC always
>> -       passes in a valid color object for shadowcolor. There should
>> -       probably be some API in the LFC to remove the filter by passing
>> -       null in.
>> -
>> -       @access private
>> -     */
>> -    function updateShadow(shadowcolor, shadowdistance:Number, 
>> shadowangle:Number, shadowblurradius:Number) {
>> -        /* DropShadowFilter attributes
>> -         *  [distance:Number]
>> -         *  [angle:Number]
>> -         *  [color:Number]
>> -         *  [alpha:Number]
>> -         *  [blurX:Number]
>> -         *  [blurY:Number]
>> -         *  [strength:Number]
>> -         *  [quality:Number]
>> -         *  [inner:Boolean]
>> -         *  [knockout:Boolean]
>> -         *  [hideObject:Boolean])
>> -         */
>> -
>> -        this._shadowcolor = shadowcolor;
>> -        this._shadowangle = shadowangle;
>> -        this._shadowdistance = shadowdistance;
>> -        this._shadowblurradius = shadowblurradius;
>> 
>> -        if (shadowcolor == null) {
>> -            if (shadowsprite != null) {
>> -                removeChild(shadowsprite);
>> -                this.shadowsprite = null;
>> -            }
>> -        } else {
>> -            var filters = [];
>> -            var inner:Boolean = shadowblurradius<  0;
>> -            if (inner) {
>> -                // Flip the distance (inner uses a positive value)
>> -                shadowblurradius = -shadowblurradius;
>> -            }
>> -            shadowfilter.angle = shadowangle;
>> -            shadowfilter.distance = shadowdistance;
>> -            var color_alpha = 
>> LzColorUtils.coloralphafrominternal(shadowcolor);
>> -            var color = color_alpha[0];
>> -            var alpha = color_alpha[1];
>> -            shadowfilter.color = color;
>> -            shadowfilter.alpha = alpha != null ? alpha : 1;
>> -            shadowfilter.blurX = shadowblurradius;
>> -            shadowfilter.blurY = shadowblurradius;
>> -            shadowfilter.inner = inner;
>> -            filters = [shadowfilter];
>> +    var shadowcolor:*;
>> +    var shadowangle:Number;;
>> +    var shadowdistance:Number;
>> +    var shadowblurradius:Number;
>> 
>> -
>> -            // If the bgcolor is hidden or null, make a dedicated sprite
>> -            // for the shadow, and fill it to match our bbox+radius shape
>> +    /**
>> +       Set up drop shadow filter.
>> 
>> -            shadowfilter.knockout = true;
>> -            // Fill in rect the size and shape of our bounding box. If 
>> there is a bgsprite already, use it,
>> -            // else make a dedicated shadow sprite.
>> -            if (shadowsprite == null) {
>> -                shadowsprite = new Sprite();
>> -                shadowsprite.mouseEnabled = false;
>> -                shadowsprite.mouseChildren = false;
>> -                addChildAt(shadowsprite,0);
>> -            }
>> -            var context = shadowsprite.graphics;
>> +       A radius of 0 means no shadow
>> 
>> -            context.clear();
>> -            context.beginFill(0xFF0000, 1);
>> -            // The border rectangle includes the background
>> -            this.drawBorder(context);
>> -            context.endFill();
>> +       @access private
>> +     */
>> +    function updateShadow(color, distance:Number, angle:Number, 
>> blurradius:Number) {
>> +        this.shadowcolor = color;
>> +        this.shadowangle = angle;
>> +        this.shadowdistance = distance;
>> +        this.shadowblurradius = blurradius;
>> 
>> -            shadowsprite.filters = filters;
>> -        }
>> +        updateBorderShape();
>> +        drawDecoration();
>>      }
>> -
>> -
>> +
>>      var cornerradius:Array = [0, 0, 0, 0];
>>      function setCornerRadius(radius) {
>>          cornerradius = radius;
>> -        this.drawBackground();
>> +        this.drawDecoration();
>>      }
>> 
>> -    var marginTop = 0;
>> -    var marginRight = 0;
>> -    var marginBottom = 0;
>> -    var marginLeft = 0;
>> -    var borderTopWidth = 0;
>> -    var borderRightWidth = 0;
>> -    var borderBottomWidth = 0;
>> -    var borderLeftWidth = 0;
>> -    var paddingTop = 0;
>> -    var paddingRight = 0;
>> -    var paddingBottom = 0;
>> -    var paddingLeft = 0;
>> -    var borderColor = null;
>> +    var marginTop:Number = 0;
>> +    var marginRight:Number = 0;
>> +    var marginBottom:Number = 0;
>> +    var marginLeft:Number = 0;
>> +    var borderTopWidth:Number = 0;
>> +    var borderRightWidth:Number = 0;
>> +    var borderBottomWidth:Number = 0;
>> +    var borderLeftWidth:Number = 0;
>> +    var paddingTop:Number = 0;
>> +    var paddingRight:Number = 0;
>> +    var paddingBottom:Number = 0;
>> +    var paddingLeft:Number = 0;
>> +    var borderColor:* = null;
>> 
>>      var __csscache = null;
>>      function setCSS(name, value, isdimension) {
>> @@ -2069,7 +2106,11 @@
>>          this[name] = (isdimension ? parseFloat(value) : value);
>>          this.x = this._x + this.marginLeft + this.borderLeftWidth + 
>> this.paddingLeft;
>>          this.y = this._y + this.marginTop + this.borderTopWidth + 
>> this.paddingTop;
>> -        this.drawBackground();
>> +        if (masksprite) {
>> +          this.drawMask();
>> +        }
>> +        updateBorderShape();
>> +        this.drawDecoration();
>>      }
>> 
>>      static function setMediaLoadTimeout(ms){
>> @@ -2097,7 +2138,7 @@
>>          this.repeatx = x;
>>          this.repeaty = y;
>>          this.backgroundrepeat = backgroundrepeat;
>> -        this.drawBackground();
>> +        this.drawDecoration();
>>      }
>> 
>>      private function copyBitmap(from:*, w:Number, h:Number, to:BitmapData = 
>> null, m:Matrix = null) {
>> 
>> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
>> ===================================================================
>> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as     
>> 2011-03-14 13:10:02 UTC (rev 18863)
>> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as     
>> 2011-03-14 16:36:30 UTC (rev 18864)
>> @@ -402,7 +402,7 @@
>>          override public function setHeight( h:Number ):void {
>>              if (owner.hassetheight) {
>>                // Clip the text according to the LZX dimensions
>> -              super.setClip(true);
>> +              setClip(true);
>>                // Must be called after setting the clipping mask
>>                super.setHeight(h);
>>                // [2011-02-03 ptw] (LPP-9628) Round up to the nearest
>> @@ -411,7 +411,7 @@
>>                // scroll dimensions.
>>                textfield.height = Math.ceil(h / lineheight) * lineheight + 
>> PAD_TEXTHEIGHT;
>>              } else {
>> -              super.setClip(false);
>> +              setClip(false);
>>                super.setHeight(h);
>>                textfield.height = h;
>>              }
>> @@ -482,7 +482,7 @@
>>                  }
>>              } else if (args['height'] != null) {
>>                  // See setHeight
>> -                super.setClip(true);
>> +                setClip(true);
>>                  textfield.height = Math.ceil(args.height / lineheight) * 
>> lineheight + PAD_TEXTHEIGHT;
>>              }
>>              // Default the scrollheight to the visible height.
>> @@ -960,55 +960,6 @@
>>          this.activateLinks(active);
>>      }
>> 
>> -
>> -    /**
>> -       Set up drop shadow filter.
>> -
>> -       TODO [hqm 2010-12] If a color of "null" is passed in, the
>> -       filter is removed. It looks like the LFC always passes in a valid
>> -       color object for shadowcolor. There should probably be some API
>> -       in the LFC to remove the filter by passing null in.
>> -
>> -       @access private
>> -     */
>> -
>> -    override function updateShadow(shadowcolor, shadowdistance:Number, 
>> shadowangle:Number, shadowblurradius:Number) {
>> -        /* DropShadowFilter attributes
>> -         *  [distance:Number]
>> -         *  [angle:Number]
>> -         *  [color:Number]
>> -         *  [alpha:Number]
>> -         *  [blurX:Number]
>> -         *  [blurY:Number]
>> -         *  [strength:Number]
>> -         *  [quality:Number]
>> -         *  [inner:Boolean]
>> -         *  [knockout:Boolean]
>> -         *  [hideObject:Boolean])
>> -         */
>> -
>> -        var filters = [];
>> -        var mc = getDisplayObject();
>> -        if (shadowcolor != null) {
>> -            var inner:Boolean = shadowblurradius<  0;
>> -            if (inner) {
>> -                // Flip the distance (inner uses a positive value)
>> -                shadowblurradius = -shadowblurradius;
>> -            }
>> -            shadowfilter.angle = shadowangle;
>> -            shadowfilter.distance = shadowdistance;
>> -            var color_alpha = 
>> LzColorUtils.coloralphafrominternal(shadowcolor);
>> -            var color = color_alpha[0];
>> -            var alpha = color_alpha[1];
>> -            shadowfilter.color = color;
>> -            shadowfilter.alpha = alpha != null ? alpha : 1;
>> -            shadowfilter.blurX = shadowblurradius;
>> -            shadowfilter.blurY = shadowblurradius;
>> -            shadowfilter.inner = inner;
>> -            filters = [shadowfilter];
>> -        }
>> -        mc.filters = filters;
>> -    }
>>  }
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Laszlo-checkins mailing list
>> [email protected]
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins
> <FirefoxScreenSnapz001.png>


Reply via email to