[CSS Regions] Break after doesn't work correctly with auto-height regions
authorabucur@adobe.com <abucur@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2013 18:32:14 +0000 (18:32 +0000)
committerabucur@adobe.com <abucur@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2013 18:32:14 +0000 (18:32 +0000)
commit8c19da11ac005bad3947e69d11355face7a858b5
treeb5f3542c46aa4124f22af13542f0077f5d6c75c4
parent09dd31505a9332762be32e80b9cb1bcb4b49bb28
[CSS Regions] Break after doesn't work correctly with auto-height regions
https://bugs.webkit.org/show_bug.cgi?id=112241

Reviewed by David Hyatt.

Source/WebCore:

The change correctly returns the break position during the normal layout phase for
auto-height regions. The problem doesn't exist during the constrained layout phase
so it only affects the size of the auto-height regions by incorrectly positioning
the content inside the flow.

Test: fast/regions/autoheight-break-after.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::applyAfterBreak): Include the margin offset in the returned break position.

LayoutTests:

This reference test verifies the correct break positioned is computed when there are auto-height regions during
the normal layout phase.
The test includes an auto-height region, a region with a specified size and an auto-height region. The first
region ends with a paragraph with a forced break after. During the normal layout phase, if the paragraph margin
is not included in the break offset, the next paragraph is incorrectly positioned and it will result in an
incorrectly sized last region.
In the constrained layout phase, the break position is returned correctly, the paragraph is positioned further down
causing overflow in the auto-height region.

* fast/regions/autoheight-break-after-expected.html: Added.
* fast/regions/autoheight-break-after.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/regions/autoheight-break-after-expected.html [new file with mode: 0644]
LayoutTests/fast/regions/autoheight-break-after.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp