Simple line layout: Set the pagination strut on the flow when the first line does...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2017 22:37:41 +0000 (22:37 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2017 22:37:41 +0000 (22:37 +0000)
commit2e25fbc4aeb00e6a341e558c5c627fa426d44c55
tree7eeb6d90087829f3c8aa40749e790703fcfa33cd
parentf503403dea74d2abcb02354ae50f2b3d3db77543
Simple line layout: Set the pagination strut on the flow when the first line does not fit the page.
https://bugs.webkit.org/show_bug.cgi?id=168738
<rdar://problem/30659469>

Reviewed by Antti Koivisto.

The pagination strut for the first line is tracked by the parent RenderBlockFlow and not by
the line itself (see RenderBlockFlow::adjustLinePositionForPagination()). Also renamed *PaginationStrut* to
*LineStrut* to make sure we don't confuse it with the block level strut.

Not enabled yet.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::computeLineTopAndBottomWithOverflow):
(WebCore::SimpleLineLayout::computeLineBreakIndex):
(WebCore::SimpleLineLayout::setPageBreakForLine):
(WebCore::SimpleLineLayout::adjustLinePositionsForPagination):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::Layout::create):
(WebCore::SimpleLineLayout::Layout::Layout):
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Layout::hasLineStruts):
(WebCore::SimpleLineLayout::Layout::struts):
(WebCore::SimpleLineLayout::Layout::hasPaginationStruts): Deleted.
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/SimpleLineLayoutFunctions.h:
(WebCore::SimpleLineLayout::computeFlowHeight):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/SimpleLineLayout.h
Source/WebCore/rendering/SimpleLineLayoutFunctions.h
Source/WebCore/rendering/SimpleLineLayoutResolver.h