<rdar://problem/9190108> Crash when hiding a float
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Apr 2011 21:59:36 +0000 (21:59 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Apr 2011 21:59:36 +0000 (21:59 +0000)
commitb26b553fbfc2c8377e9e9c894e39ebb5e74c0ed2
tree2f7efa65880177df86d2a4a2f8064efb9c83acb3
parentc36f660b607faeb8cc416da420698afb3865a0ef
<rdar://problem/9190108> Crash when hiding a float

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/block/float/overhanging-tall-block.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverhangingFloats): Moved the call to childLogicalTop() out of the loop.
Capped the logical bottom so that we get the correct maximum.
* rendering/RenderBlock.h: Decleared appendFloatingObjectToLastLine().
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::appendFloatingObjectToLastLine): Added. Ensures correct bookkeeping by
extending the float if needed so that it touches the line.
(WebCore::RenderBlock::layoutInlineChildren): Changed to call appendFloatingObjectToLastLine().
(WebCore::RenderBlock::checkFloatsInCleanLine): Capped the float height so the we mark the right
range of lines as dirty.
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::appendFloat): Replaced the floats() accessor with this function, which
allows the creation of the vector to be combined with appending the first float.

LayoutTests:

* fast/block/float/overhanging-tall-block.html: Added.
* platform/mac/fast/block/float/overhanging-tall-block-expected.checksum: Added.
* platform/mac/fast/block/float/overhanging-tall-block-expected.png: Added.
* platform/mac/fast/block/float/overhanging-tall-block-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/block/float/overhanging-tall-block.html [new file with mode: 0755]
LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RootInlineBox.h