[webkit-changes] [WebKit/WebKit] 5faeb7: [Multicol][IFC] Support vertical writing modes

Antti Koivisto noreply at github.com
Thu Sep 21 11:18:47 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5faeb73b26d401045e76b6c5bad739a6084637db
      https://github.com/WebKit/WebKit/commit/5faeb73b26d401045e76b6c5bad739a6084637db
  Author: Antti Koivisto <antti at apple.com>
  Date:   2023-09-21 (Thu, 21 Sep 2023)

  Changed paths:
    M LayoutTests/fast/repaint/box-shadow-top-left-repaint-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-multicol-002-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-multicol-003-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-multicol-002-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-multicol-003-expected.txt
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/ios/fast/multicol/block-axis-horizontal-bt-expected.txt
    M LayoutTests/platform/ios/fast/multicol/block-axis-vertical-lr-expected.txt
    M LayoutTests/platform/ios/fast/multicol/client-rects-spanners-complex-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/BottomToTop-bt-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/BottomToTop-lr-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/LeftToRight-bt-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/LeftToRight-lr-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/RightToLeft-bt-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/RightToLeft-lr-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/TopToBottom-bt-expected.txt
    M LayoutTests/platform/ios/fast/multicol/pagination/TopToBottom-lr-expected.txt
    M LayoutTests/platform/ios/fast/multicol/tall-image-behavior-lr-expected.txt
    M LayoutTests/platform/ios/fast/multicol/tall-image-behavior-lr-mixed-expected.txt
    M LayoutTests/platform/ios/fast/multicol/tall-image-behavior-rl-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/border-padding-pagination-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/column-count-with-rules-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/column-rules-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/float-avoidance-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/float-multicol-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/float-paginate-complex-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/float-paginate-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/nested-columns-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-lr/unsplittable-inline-block-expected.txt
    M LayoutTests/platform/ios/fast/multicol/vertical-rl/float-multicol-expected.txt
    M LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-multicol-003-expected.txt
    M LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-multicol-003-expected.txt
    M LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt
    M LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt
    M LayoutTests/platform/mac/fast/multicol/vertical-lr/float-multicol-expected.txt
    M LayoutTests/platform/mac/fast/multicol/vertical-lr/float-paginate-complex-expected.txt
    M LayoutTests/platform/mac/fast/multicol/vertical-rl/float-multicol-expected.txt
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.h
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h
    M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp
    M Source/WebCore/layout/layouttree/LayoutBoxGeometry.h
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  [Multicol][IFC] Support vertical writing modes
https://bugs.webkit.org/show_bug.cgi?id=261817
rdar://115779405

Reviewed by Alan Baradlay.

Enable vertical writing modes in IFC with multicolumn content.

* LayoutTests/fast/repaint/box-shadow-top-left-repaint-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-multicol-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-multicol-003-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-multicol-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-multicol-003-expected.txt:
* LayoutTests/platform/ios/fast/multicol/block-axis-horizontal-bt-expected.txt:
* LayoutTests/platform/ios/fast/multicol/block-axis-vertical-lr-expected.txt:
* LayoutTests/platform/ios/fast/multicol/client-rects-spanners-complex-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/BottomToTop-bt-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/BottomToTop-lr-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/LeftToRight-bt-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/LeftToRight-lr-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/RightToLeft-bt-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/RightToLeft-lr-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/TopToBottom-bt-expected.txt:
* LayoutTests/platform/ios/fast/multicol/pagination/TopToBottom-lr-expected.txt:
* LayoutTests/platform/ios/fast/multicol/tall-image-behavior-lr-expected.txt:
* LayoutTests/platform/ios/fast/multicol/tall-image-behavior-lr-mixed-expected.txt:
* LayoutTests/platform/ios/fast/multicol/tall-image-behavior-rl-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/border-padding-pagination-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/column-count-with-rules-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/column-rules-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/float-avoidance-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/float-multicol-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/float-paginate-complex-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/float-paginate-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/nested-columns-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-lr/unsplittable-inline-block-expected.txt:
* LayoutTests/platform/ios/fast/multicol/vertical-rl/float-multicol-expected.txt:
* LayoutTests/platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt:
* LayoutTests/platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt:
* LayoutTests/platform/mac/fast/multicol/vertical-lr/float-multicol-expected.txt:
* LayoutTests/platform/mac/fast/multicol/vertical-lr/float-paginate-complex-expected.txt:
* LayoutTests/platform/mac/fast/multicol/vertical-rl/float-multicol-expected.txt:
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h:
(WebCore::InlineDisplay::Line::moveInBlockDirection):
(WebCore::InlineDisplay::Line::moveVertically): Deleted.
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForBlockStyle):

Enable.

* Source/WebCore/layout/integration/LayoutIntegrationCoverage.h:
* Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h:
(WebCore::InlineIterator::LineBox::inkOverflowLogicalTop const):
(WebCore::InlineIterator::LineBox::inkOverflowLogicalBottom const):
(WebCore::InlineIterator::LineBox::inkOverflowTop const): Deleted.
(WebCore::InlineIterator::LineBox::inkOverflowBottom const): Deleted.

Rename for clarity.

* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h:
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::inkOverflowLogicalTop const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::inkOverflowLogicalBottom const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::inkOverflowTop const): Deleted.
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::inkOverflowBottom const): Deleted.
* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxModernPath.h:
(WebCore::InlineIterator::LineBoxIteratorModernPath::inkOverflowLogicalTop const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::inkOverflowLogicalBottom const):

Fix this to return logical top and bottom.

(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalTopAdjustedForPrecedingLineBox const):
(WebCore::InlineIterator::LineBoxIteratorModernPath::contentLogicalBottomAdjustedForFollowingLineBox const):

Adjust either top or bottom based on if the lines are flipped.

(WebCore::InlineIterator::LineBoxIteratorModernPath::inkOverflowTop const): Deleted.
(WebCore::InlineIterator::LineBoxIteratorModernPath::inkOverflowBottom const): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):

No need for manual margin adjustment here after fixing geometryForWritingModeAndDirection.

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

If the float is splittable but doesn't have any lines make minimum bottom zero.

(WebCore::LayoutIntegration::adjustLinePositionsForPagination):

Adjust correct direction based on writing mode.

* Source/WebCore/layout/layouttree/LayoutBoxGeometry.h:
(WebCore::Layout::BoxGeometry::geometryForWritingModeAndDirection const):

This may need to flip horizontal margins based on the writing mode.

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

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




More information about the webkit-changes mailing list