RESOLVED FIXED 32495
REGRESSION (r47440): font-size:small with background-color causes text to get clipped
https://bugs.webkit.org/show_bug.cgi?id=32495
Summary REGRESSION (r47440): font-size:small with background-color causes text to get...
Ojan Vafai
Reported 2009-12-13 14:03:13 PST
In FF3.5, IE7 and Safari 4, the text it not clipped in this test case. In nightlies the first line of text is clipped. The offending HTML: <span style="background-color: white; font-size: 20px;"> <span style="font-size: small; ">FOOBARBAZ<br>BAZBARFOO</span></span>
Attachments
Patch (37.83 KB, patch)
2010-01-13 12:51 PST, Dave Hyatt
no flags
Patch (37.83 KB, patch)
2010-01-13 12:57 PST, Dave Hyatt
mitz: review+
hyatt: commit-queue-
Ojan Vafai
Comment 1 2009-12-13 14:04:44 PST
Marking P1 as it's a regression.
mitz
Comment 2 2009-12-13 14:20:02 PST
mitz
Comment 3 2009-12-13 19:38:03 PST
mitz
Comment 4 2009-12-23 14:17:41 PST
(In reply to comment #3) > Caused by <http://trac.webkit.org/changeset/47440>. Specifically, this part: “Significant changes have been made to the "almost strict mode" line box quirk where objects with no text children have no effect on the height of a line. Instead of making the height() of the objects variable and dependent on overflow, the objects now have their full height and get placed on the baseline properly. They simply don't contribute to overflow above lineTop/Bottom.” Since the box is full height, it paints the background through the entire height.
mitz
Comment 5 2009-12-23 14:37:54 PST
Hyatt, do you have any ideas how to fix this?
Dave Hyatt
Comment 6 2010-01-13 12:51:48 PST
Dave Hyatt
Comment 7 2010-01-13 12:57:40 PST
Ojan Vafai
Comment 8 2010-01-13 13:00:00 PST
The code in paintBoxDecorations and paintMask looks suspiciously similar. Is there a reason not to put it in a helper function? It would make the code more readable to and constrain the quirk to one place in the code.
mitz
Comment 9 2010-01-13 13:01:07 PST
Comment on attachment 46495 [details] Patch r=me (with updated test)
Dave Hyatt
Comment 10 2010-01-13 13:23:52 PST
Fixed in r53200.
Note You need to log in before you can comment on or make changes to this bug.