[webkit-changes] [WebKit/WebKit] 5a0498: [IFC][Pagination] Pass pagination adjustments to r...
Antti Koivisto
noreply at github.com
Sun Feb 19 10:50:09 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5a049809955a360f7ec43aa244acc1e65b4b70e6
https://github.com/WebKit/WebKit/commit/5a049809955a360f7ec43aa244acc1e65b4b70e6
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-19 (Sun, 19 Feb 2023)
Changed paths:
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
[IFC][Pagination] Pass pagination adjustments to renderer positioning code
https://bugs.webkit.org/show_bug.cgi?id=252165
<rdar://problem/105390360>
Reviewed by Alan Baradlay.
Renderer positioning code needs to take pagination into account.
This patch doesn't enable any new content so there are no test changes.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):
Split into constructContent/adjustContent/updateRenderTreePositions.
Apply pagination adjustments before updating render tree positions. Before it was applied after, by the flow.
(WebCore::LayoutIntegration::LineLayout::constructContent):
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
Traverse the display boxes so we know which line the renderer is on and can apply adjustments.
(WebCore::LayoutIntegration::LineLayout::adjustContent):
(WebCore::LayoutIntegration::LineLayout::adjustForPagination): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::computeLineTopAndBottomWithOverflow):
(WebCore::LayoutIntegration::computeLineBreakIndex):
(WebCore::LayoutIntegration::setPageBreakForLine):
(WebCore::LayoutIntegration::computeAdjustmentsForPagination):
Separate adjustment computation from applying adjustments.
Remove page indexed Strut vector, instead use an adjustment vector with entry per line. This simplifies the code.
(WebCore::LayoutIntegration::adjustLinePositionsForPagination):
Apply adjustments to inline content.
(WebCore::LayoutIntegration::makeAdjustedContent): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):
Pagination is now handled in LineLayout::layout.
Canonical link: https://commits.webkit.org/260524@main
More information about the webkit-changes
mailing list