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.
Created attachment 19857 [details] Test case
<rdar://problem/5805741>
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>.