https://bugs.webkit.org/show_bug.cgi?id=68719
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Sep 2011 20:25:11 +0000 (20:25 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Sep 2011 20:25:11 +0000 (20:25 +0000)
commit1fb7d582ab415189d7d66578f0cad08bbbebe49b
treeee5f9b58bc48ff39871b8c0b82b55f650f0c5fa7
parent273cb6acf24b25593aa3d14c8d3a651c42742390
https://bugs.webkit.org/show_bug.cgi?id=68719

Push through multiple regions when an object doesn't fit in any of them. Unlike with pages and
columns, when regions have a non-uniform height, we may need to push through multiple regions
in order to find one that fits.

Added an optimization for quickly noticing if regions do have a uniform height so that we can
treat them like columns and pages if so.

Also fixed the end line matchup to properly null out endLine when no next line box exists. The new
layout tests I wrote to cover this feature exposed this crasher, so fixing it in order to land
the new tests.

Reviewed by Anders Carlsson.

Source/WebCore:

Added new tests in fast/regions.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustForUnsplittableChild):
(WebCore::RenderBlock::pushToNextPageWithMinimumLogicalHeight):
(WebCore::RenderBlock::adjustLinePositionForPagination):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::matchedEndLine):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::layout):
* rendering/RenderFlowThread.h:

LayoutTests:

* fast/regions/webkit-flow-float-pushed-to-last-region.html: Added.
* fast/regions/webkit-flow-float-unable-to-push.html: Added.
* platform/mac/fast/regions/webkit-flow-float-pushed-to-last-region-expected.png: Added.
* platform/mac/fast/regions/webkit-flow-float-pushed-to-last-region-expected.txt: Added.
* platform/mac/fast/regions/webkit-flow-float-unable-to-push-expected.png: Added.
* platform/mac/fast/regions/webkit-flow-float-unable-to-push-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/regions/webkit-flow-float-pushed-to-last-region.html [new file with mode: 0644]
LayoutTests/fast/regions/webkit-flow-float-unable-to-push.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/webkit-flow-float-pushed-to-last-region-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/webkit-flow-float-pushed-to-last-region-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/webkit-flow-float-unable-to-push-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/webkit-flow-float-unable-to-push-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/RenderFlowThread.cpp
Source/WebCore/rendering/RenderFlowThread.h