Summary: | white-space: pre-wrap or -webkit-line-break: after-white-space text can overlap float at end of line | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||
Component: | Layout and Rendering | Assignee: | mitz | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | jacob.refstrup | ||||||||
Priority: | P2 | Keywords: | HasReduction, InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
mitz
2008-03-17 20:50:12 PDT
Created attachment 19857 [details]
Test case
Created attachment 22285 [details]
Fix for floats added in trailing whitespace for an already full linebox
The root cause seems to be that the call to skipWhitespace(InlineIterator&) when the line box is already full causes floats to be added (correct) but also positioned (incorrect); the positioning should be deferred until newLine() is called.
I've regressed this on gtk without issues (but then again gtk doesn't seem to dump render trees) but will need a volunteer to check it on MacOSX.
Comment on attachment 22285 [details]
Fix for floats added in trailing whitespace for an already full linebox
Looks good, but I think it would help, instead of the comments, to distinguish between the two skipWhitespace functions by renaming them to skipTrailingWhitespace and skipLeadingWhitespace. The former would also not need to return the available width.
Comment on attachment 22285 [details]
Fix for floats added in trailing whitespace for an already full linebox
r- for now because I think it's important to distinguish between the functions (see previous comment).
(In reply to comment #5) > (From update of attachment 22285 [details] [edit]) > r- for now because I think it's important to distinguish between the functions > (see previous comment). > Thx for the feedback -- I'll update the patch tomorrow when time allows. - Jacob Created attachment 22406 [details]
Final patch with layout test added and feedback from mitz incorporated
Added test case (editable-text-overlapping-float.html) and expected output (for Qt)
Renamed functions per mitz's suggestions.
Removed return value from skipTrailingWhitespace as it's not used.
Comment on attachment 22406 [details]
Final patch with layout test added and feedback from mitz incorporated
Looks good, but cannot be landed as-is: the css2.1 directory contains a standard test suite; the new test should go in fast/block/float. Expected results (render tree and bitmap) will for Mac OS X will need to be generated too. I am going to take care of those things when landing the patch.
Landed in <http://trac.webkit.org/changeset/35354>. |