RESOLVED DUPLICATE of bug 3692 3793
Width of monospace text blocks can be incorrectly calculated
https://bugs.webkit.org/show_bug.cgi?id=3793
Summary Width of monospace text blocks can be incorrectly calculated
Oliver Hunt
Reported 2005-07-01 11:07:47 PDT
Width of a text block with monospace font is miscalculated if a word-spacing is specified. This leads to rendering bugs if more than one block appears on a line.
Attachments
Testcase (276 bytes, text/html)
2005-07-01 11:09 PDT, Oliver Hunt
no flags
Patch to correct output (1.29 KB, patch)
2005-07-01 11:44 PDT, Oliver Hunt
no flags
über-test-case (2.08 KB, text/html)
2005-07-01 12:23 PDT, Joost de Valk (AlthA)
no flags
screenshot of firefox behavior (138.07 KB, image/tiff)
2005-07-01 12:40 PDT, Joost de Valk (AlthA)
no flags
Oliver Hunt
Comment 1 2005-07-01 11:09:39 PDT
Created attachment 2731 [details] Testcase Simple, minimal testcase
Oliver Hunt
Comment 2 2005-07-01 11:44:35 PDT
Created attachment 2732 [details] Patch to correct output Okay this should work
Dave Hyatt
Comment 3 2005-07-01 11:49:34 PDT
Are you adding in the word-spacing with every space encountered? What if someone types "A[space] [space][space]B"?
Dave Hyatt
Comment 4 2005-07-01 11:49:53 PDT
Test in Firefox.
Oliver Hunt
Comment 5 2005-07-01 12:12:17 PDT
(In reply to comment #3) > Are you adding in the word-spacing with every space encountered? What if someone types "A[space] > [space][space]B"? > It should be fine, by the time we calculate hte width of text blocks all the extraneous white space ha been removed.
Joost de Valk (AlthA)
Comment 6 2005-07-01 12:23:02 PDT
Created attachment 2733 [details] über-test-case
Joost de Valk (AlthA)
Comment 7 2005-07-01 12:40:34 PDT
Created attachment 2735 [details] screenshot of firefox behavior
Oliver Hunt
Comment 8 2005-07-01 13:33:06 PDT
Okay the current patch borks when a comment is placed in whitespace, in a monospace text block. Looking at the rendertree a the leading space following the comment is not being removed -- it is if the font is not monospaced. The fact that this is only in monospace makes me hope it will be reasonably easy to find... ho hum... this irks me..
Oliver Hunt
Comment 9 2005-07-02 01:08:49 PDT
I think this bug is fixed with the patch... am going to open another bug covering the comment issue.
Oliver Hunt
Comment 10 2005-07-02 06:14:59 PDT
spurious spacing around comment tags is due to the use of pre tags rather than font-family: monospace; I'm going to do a few checks but i think the current patch is in fact correct.
Oliver Hunt
Comment 11 2005-08-17 02:58:10 PDT
*** This bug has been marked as a duplicate of 3692 ***
Note You need to log in before you can comment on or make changes to this bug.