|
|
|
[
Permlink
| « Hide
]
P T Withington - 08/Dec/06 11:04 AM
This says it passes, although the appearance of the output is different. There is a blue bar under the text in SWF and not in DHTML.
The issue with the blue bar seems to be that a text view with a colored background and an empty string value gets
a few pixels of padding or something in the SWF case, which show up in the bgcolor, but that does not happen in DHTML. If the text is not blank, then it looks the same in SWF and DHTML. I have a proposal to not size text fields to 100 by default, which would fix this
$ svn diff WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as Index: WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as =================================================================== --- WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as (revision 5184) +++ WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as (working copy) @@ -159,8 +159,6 @@ LzTextSprite.prototype.maxhscroll = 0; -//DEFAULT_WIDTH: Width to use for text field if none is specified -LzTextSprite.prototype.DEFAULT_WIDTH = 100; // [todo: 2004-3-29 hqm] lines seem to get the ends clipped off if you use the TextField.textWidth // from Flash, so I am adding a constant. Am I missing something here? LzTextSprite.prototype.PAD_TEXTWIDTH = 4; @@ -253,7 +251,7 @@ var mw = mc.wordWrap; mc.multiline = false; mc.wordWrap = false; - var twidth = mc.textWidth + this.PAD_TEXTWIDTH; + var twidth = mc.textWidth == 0 ? 0 : mc.textWidth + this.PAD_TEXTWIDTH; mc.multiline = ml; mc.wordWrap = mw; return twidth; hqm@IBM-2E06404CB67 /cygdrive/c/users/hqm/openlaszlo/legals3 $ svn diff WEB-INF/lps/lfc/views/LzText.lzs Index: WEB-INF/lps/lfc/views/LzText.lzs =================================================================== --- WEB-INF/lps/lfc/views/LzText.lzs (revision 5184) +++ WEB-INF/lps/lfc/views/LzText.lzs (working copy) @@ -106,16 +106,6 @@ */ static var DEFAULT_WIDTH = 100; -/** - * @access private - * @keywords final - * @todo 2004-3-29 hqm lines seem to get the ends clipped off if you use the TextField.textWidth - * from Flash, so I am adding a constant. Am I missing something here? - */ -static var PAD_TEXTWIDTH = 4; - -static var DEFAULT_SIZE = 8; - defaultattrs.pixellock = true; /** @@ -221,12 +211,9 @@ if (this.text != null && this.text != '' && this.text.length > 0) { args.width = this.getTextWidth(); } else { - // Empty string would result in a zero width view, which confuses - // developers, so use something reasonable instead. - args.width = this.DEFAULT_WIDTH; + args.width = 0; } } - if (args.width == null) args.width = 100; // To compute our height: // + If height is supplied, use it. But we still need a default size for InputText to keep it from not appearing at all in the default use case. updated the lztest-textheight.lzx, there are still two failures but those occurred prior to this change.
(4.0 branch (4.0.3) build r5544)
Testfile fails: test/lztest/lztest-textstyle.lzx lztest-textstyle passes for me in swf8 and DHTML, in FF, and IE7 (windows XP)
I am closing this bug, but a new bug needs to be filed because an associated test lztest-textheight.lzx is failing still. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||