[webkit-changes] [WebKit/WebKit] 65ee36: REGRESSION(IFC multicol): Satisfying `widows` can ...

Antti Koivisto noreply at github.com
Mon Mar 4 09:24:24 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 65ee365616b160ff51540fd6611625d89eda3b64
      https://github.com/WebKit/WebKit/commit/65ee365616b160ff51540fd6611625d89eda3b64
  Author: Antti Koivisto <antti at apple.com>
  Date:   2024-03-04 (Mon, 04 Mar 2024)

  Changed paths:
    A LayoutTests/fast/multicol/multicol-intrusive-float-orphan-expected.html
    A LayoutTests/fast/multicol/multicol-intrusive-float-orphan.html
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
    M Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h
    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

  Log Message:
  -----------
  REGRESSION(IFC multicol): Satisfying `widows` can cause a floating image to overlap text
https://bugs.webkit.org/show_bug.cgi?id=269818
rdar://123343009

Reviewed by Alan Baradlay.

Combination of a widow break and intruding floats requires another layout pass.
Legacy line layout did this as well using a bit different approach.

* LayoutTests/fast/multicol/multicol-intrusive-float-orphan-expected.html: Added.
* LayoutTests/fast/multicol/multicol-intrusive-float-orphan.html: Added.
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h:
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::updateInlineDamage):

Include the vertical restart position to InlineDamage,

(WebCore::Layout::InlineInvalidation::restartForPagination):

Add a new invlaidation type for pagination relayout. It restarts from the top of the page to be relayouted.

* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):

Perform another layout if we have damage after pagination adjustments.

(WebCore::LayoutIntegration::LineLayout::adjustContentForPagination):

Damage the content if needed.

(WebCore::LayoutIntegration::LineLayout::adjustContent): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::computeAdjustmentsForPagination):

In case we need a layout restart return the restart position.
This is needed when we have a widow break.

* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list