Source/WebCore: <rdar://problem/8733254> Float disappears after incremental layout
Fixed the original bug and a copule more issues noticed while doing so.
Reviewed by Dave Hyatt.
Tests: fast/dynamic/dirty-float-in-clean-line.html
fast/dynamic/float-at-line-break.html
fast/dynamic/float-from-empty-line.html
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren): If findNextLineBreak() returned an empty line,
update the line break info of the last line with the new line break position. This is tested
by float-from-empty-line.html.
(WebCore::RenderBlock::checkFloatsInCleanLine): Factored out code from determineStartPosition()
into this new function.
(WebCore::RenderBlock::determineStartPosition): Call checkFloatsInCleanLine().
(WebCore::RenderBlock::determineEndPosition): When iterating over lines, check clean lines with
floats, as they may yet become dirty because of the floats. This is tested by
dirty-float-in-clean-line.html.
(WebCore::RenderBlock::findNextLineBreak): If a float fits on the line, and the current line
break is at the float, advance it to after the float. Otherwise, if the line gets dirty and the
next one does not, the float will not make it into any line. This is tested by
float-at-line-break.html.
LayoutTests: <rdar://problem/8733254> Float disappears after incremental layout
Reviewed by Dave Hyatt.
* fast/dynamic/dirty-float-in-clean-line-expected.checksum: Added.
* fast/dynamic/dirty-float-in-clean-line-expected.png: Added.
* fast/dynamic/dirty-float-in-clean-line-expected.txt: Added.
* fast/dynamic/dirty-float-in-clean-line.html: Added.
* fast/dynamic/float-at-line-break-expected.checksum: Added.
* fast/dynamic/float-at-line-break-expected.png: Added.
* fast/dynamic/float-at-line-break-expected.txt: Added.
* fast/dynamic/float-at-line-break.html: Added.
* fast/dynamic/float-from-empty-line-expected.checksum: Added.
* fast/dynamic/float-from-empty-line-expected.png: Added.
* fast/dynamic/float-from-empty-line-expected.txt: Added.
* fast/dynamic/float-from-empty-line.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed