[webkit-changes] [WebKit/WebKit] 3fa3e3: [IFC][Integration][Pagination] Use shared paginati...

Antti Koivisto noreply at github.com
Mon Feb 20 09:47:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3fa3e382d441fa982f47391909f58857a91fae46
      https://github.com/WebKit/WebKit/commit/3fa3e382d441fa982f47391909f58857a91fae46
  Author: Antti Koivisto <antti at apple.com>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBox.cpp
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp
    M Source/WebCore/rendering/RenderBlockFlow.cpp
    M Source/WebCore/rendering/RenderBlockFlow.h

  Log Message:
  -----------
  [IFC][Integration][Pagination] Use shared pagination adjustment code
https://bugs.webkit.org/show_bug.cgi?id=252561
rdar://105676940

Reviewed by Alan Baradlay.

Use the now iterator based RenderBlockFlow::computeLineAdjustmentForPagination instead of the custom code.

* Source/WebCore/layout/integration/inline/InlineIteratorLineBox.cpp:
(WebCore::InlineIterator::lineBoxFor):
* Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::adjustContent):

Only invoke adjustment code in a paginated context.

* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::computeAdjustmentsForPagination):

Call to RenderBlockFlow::computeLineAdjustmentForPagination do the adjustments.
Widows/orphans still need to be handled here, similar to legacy.

(WebCore::LayoutIntegration::computeLineTopAndBottomWithOverflow): Deleted.
(WebCore::LayoutIntegration::computeLineBreakIndex): Deleted.
(WebCore::LayoutIntegration::computeOffsetAfterLineBreak): Deleted.
(WebCore::LayoutIntegration::setPageBreakForLine): Deleted.
(WebCore::LayoutIntegration::updateMinimumPageHeight): Deleted.

Delete the IFC specific pagination code.

* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::computeLineAdjustmentForPagination):

Reanme the adjustment struct to not have the same name in different namespaces.

* Source/WebCore/rendering/RenderBlockFlow.h:

Canonical link: https://commits.webkit.org/260543@main




More information about the webkit-changes mailing list