Nits:

1) In LzSprite.js you could put the declaration of __warnOnce inside if($debug)

2) You should remove the FIXME's labelled

    // FIXME [2008-11-24 ptw] (LPP-7391)

and note that you are also fixing that bug.

3) Should you file a bug about updateMaxLines?

Meta-comment:

It seems like we might want to generalize this mechanism so you can say 
something like:

  <attribute name="foo" value="$inherit{}" />

so that we can define arbitrary values that cascade?  I imagine $inherit 
turning into a special LzBindExpr subclass that does what you have implemented 
here, but for an arbitrarily named property.

Otherwise approved.

On 2010-03-30, at 17:26, Max Carlson wrote:

> Change 20100325-maxcarlson-v by maxcarl...@bank on 2010-03-25 11:20:34 PDT
>    in /Users/maxcarlson/openlaszlo/trunk-clean
>    for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: UPDATED: Make dynamic text register for changes to parent 
> font/size/style attributes
> 
> Bugs Fixed: LPP-8376 - Font attributes from stylesheets do not cascade from 
> parent views to child text nodes (partial)
> 
> Technical Reviewer: ptw
> QA Reviewer: hminsky
> 
> Details: Improved, updated to address Andre's comments.  I'm not addressing 
> this comment from Tucker:
> This won't notice if someone sets an intervening view's property:
> 
> <view id="out" font="$style{'onefont'}">
>  <view id="in" onclick="this.setAttribute('font', 'anotherfont')">
>    <text>Show me the font</text>
>  </view>
> </view>
> 
> 
> kernel/swf/* - Simplify __initTextProperties(), use hassetheight passed in.
> 
> kernel/dhtml/LzSprite - Only warn once about issues with cascading fgcolor 
> and stretches.
> 
> kernel/swf9/LzTextSprite - Simplify __initTextProperties(), use hassetheight 
> passed in.
> 
> LzNode - Add searchParentAttrs() API to look for several attribute parents at 
> once.
> 
> LzText - Register for updates to font/size/style/fgcolor attributes if a 
> parent with a non-null value is found.  Explicitly unregister when a value is 
> set directly.  Clean up constructor, build explicit list of init attributes 
> for __initTextProperties().  Comment, comment out unused updateMaxLines() API.
> 
> LaszloView - Remove redundant fontname attribute, clean up docs.
> 
> LaszloCanvas - Update canvas attribute spec, update comments, don't call 
> __LZresolveReferences() unless necessary.
> 
> ViewCompiler - Don't crawl children to set static font/name/style attributes 
> - which prevented views from knowing if they had an instance value.
> 
> CanvasCompiler - Pass canvas font in via 'font' attribute instead of 
> 'fontname'.
> 
> Tests: See LPP-8376 - testcase now works for dynamically created text. 
> test/lztest/lztest-textheight.lzx runs as before across all runtimes.
> 
> Files:
> M       WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
> M       WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
> M       WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> M       WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
> M       WEB-INF/lps/lfc/core/LzNode.lzs
> M       WEB-INF/lps/lfc/views/LzText.lzs
> M       WEB-INF/lps/lfc/views/LaszloView.lzs
> M       WEB-INF/lps/lfc/views/LaszloCanvas.lzs
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java
> 
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/20100325-maxcarlson-v.tar
> 


Reply via email to