WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
17906
white-space: pre-wrap or -webkit-line-break: after-white-space text can overlap float at end of line
https://bugs.webkit.org/show_bug.cgi?id=17906
Summary
white-space: pre-wrap or -webkit-line-break: after-white-space text can overl...
mitz
Reported
2008-03-17 20:50:12 PDT
A float occurring in the trailing whitespace of a line with white-space: pre-wrap or -webkit-line-break: after-white-space (editable HTML uses the latter by default) is not pushed down to the next line if it does not fit. See attached test case.
Attachments
Test case
(791 bytes, text/html)
2008-03-17 20:50 PDT
,
mitz
no flags
Details
Fix for floats added in trailing whitespace for an already full linebox
(2.08 KB, patch)
2008-07-15 13:17 PDT
,
Jacob Refstrup
mitz: review-
Details
Formatted Diff
Diff
Final patch with layout test added and feedback from mitz incorporated
(8.15 KB, patch)
2008-07-21 09:44 PDT
,
Jacob Refstrup
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2008-03-17 20:50:29 PDT
Created
attachment 19857
[details]
Test case
mitz
Comment 2
2008-03-18 13:32:06 PDT
<
rdar://problem/5805741
>
Jacob Refstrup
Comment 3
2008-07-15 13:17:09 PDT
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.
mitz
Comment 4
2008-07-19 11:49:43 PDT
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.
mitz
Comment 5
2008-07-20 14:26:23 PDT
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).
Jacob Refstrup
Comment 6
2008-07-20 19:28:52 PDT
(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
Jacob Refstrup
Comment 7
2008-07-21 09:44:40 PDT
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.
mitz
Comment 8
2008-07-21 11:09:27 PDT
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.
mitz
Comment 9
2008-07-25 13:22:04 PDT
Landed in <
http://trac.webkit.org/changeset/35354
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug