Questions: 1. In DHTML, I don't think we should remove non-breaking spaces when condensewhite is on. I think the desired behavior is that if condensewhite is on, the text of the view should be set as the htmltext of the div, so that normal browser whitespace collapse occurs, but explicit non-breaking spaces are observed. If condensewhite is _off_, then when the view text is set into the sprite htmltext, we transform any space to a non-breaking space, to simulate what happens in swf. (We would use `white-space: pre`, but that has the wrong wrapping behavior for compatibility with swf. `pre-wrap` would work, if it were supported.)
2. I don't know what swf does with tabs. In CSS `white-space: pre` tabs are expanded to 8-character columns. Are we trying to emulate that? Or just ignoring tabs? 3. as3 apparently has an option to condense whitespace. Should the as3 kernel use that setting, rather than a regex transformation? On 2010-01-29, at 17:55, Max Carlson wrote: > Change 20100129-maxcarlson-W by maxcarl...@bank on 2010-01-29 14:41:50 PST > in /Users/maxcarlson/openlaszlo/trunk-clean > for http://svn.openlaszlo.org/openlaszlo/trunk > > Summary: Add condensewhite attribute for consensing whitespace in text > > Bugs Fixed: LPP-7558 - DHTML <text> does not preserve whitespace > > Technical Reviewer: ptw > QA Reviewer: hminsky > > Details: */LzTextSprite.as - Add condenseWhiteSpace() implementation, modify > setText() to collapse whitespace when condensewhite == true; > > Library.lzs - Move RegExp declaration before LzTextSprite so it can be used > by text sprites. > > LzSprite.js - When inner_html_no_entity_apos quirk is true compile > inner_html_no_entity_apos_re once, like for the inner_html_strips_newlines > quirk. > > LzTextSprite.js - If condensewhite == true, remove nonbreaking spaces - > otherwise, replace spaces with nonbreaking spaces. Add condenseWhiteSpace() > implementation. > > LzText.lzs - Add condensewhite attribute, event and setter. > > Tests: The following shows collapsed whitespace where condensewhite is true: > <canvas> > <vbox> > <text id="cond" bgcolor="#ffaaaa" text=" Hello Laszlo! " > condensewhite="true"/> > <text id="nocond" bgcolor="#ffaaaa" text=" Hello Laszlo! " > condensewhite="false"/> > </vbox> > </canvas> > > > Files: > M WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as > M WEB-INF/lps/lfc/kernel/swf/Library.lzs > M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js > M WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js > M WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as > M WEB-INF/lps/lfc/views/LzText.lzs > > Changeset: > http://svn.openlaszlo.org/openlaszlo/patches/20100129-maxcarlson-W.tar > > _______________________________________________ > Laszlo-reviews mailing list > [email protected] > http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
