Approved!

On 3/14/11 6:11 AM, P T Withington wrote:
[It would be great if you could review this sooner than later as the component 
sampler is currently broken in trunk due to my previous attempt at this issue.]

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] [email protected] (pending)
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

Files:
M       WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M       WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
M       WEB-INF/lps/lfc/kernel/swf9/LzSprite.as


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20110314-mHC.tar

Reply via email to