[webkit-changes] [WebKit/WebKit] ccbff7: [css-writing-modes] Initial implementation of side...

Tim Nguyen noreply at github.com
Thu Aug 10 12:58:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ccbff7dd4d141ad09538007bd17981a0f698d342
      https://github.com/WebKit/WebKit/commit/ccbff7dd4d141ad09538007bd17981a0f698d342
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-radius-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-inset-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-margin-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-padding-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-size-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/writing-mode-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/select-multiple-scrolling.optional-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/select-size-scrolling-and-sizing.optional-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/text-input-block-size.optional-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/text-input-vertical-overflow-no-scroll-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/textarea-rows-cols-sizing-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-lr-001-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-rl-001-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-lr-writing-mode-and-rtl-direction-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-lr-writing-mode-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-rl-writing-mode-and-rtl-direction-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-rl-writing-mode-expected.txt
    M LayoutTests/platform/ios-wk2/TestExpectations
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/css/CSSPrimitiveValueMappings.h
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/CSSValueKeywords.in
    M Source/WebCore/css/parser/CSSParserContext.cpp
    M Source/WebCore/css/parser/CSSParserContext.h
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
    M Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/platform/text/WritingMode.h
    M Source/WebCore/rendering/BaselineAlignment.cpp
    M Source/WebCore/rendering/BaselineAlignment.h
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderDetailsMarker.cpp
    M Source/WebCore/rendering/RenderFlexibleBox.cpp
    M Source/WebCore/rendering/RenderFlexibleBox.h
    M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
    M Source/WebCore/rendering/RenderTableCell.cpp
    M Source/WebCore/rendering/RenderTreeAsText.cpp
    M Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
    M Source/WebCore/rendering/style/RenderStyle.cpp
    M Source/WebCore/rendering/style/RenderStyle.h
    M Source/WebCore/rendering/style/RenderStyleInlines.h
    M Source/WebCore/style/StyleAdjuster.cpp
    M Source/WebCore/style/StyleBuilderState.cpp

  Log Message:
  -----------
  [css-writing-modes] Initial implementation of sideways writing modes
https://bugs.webkit.org/show_bug.cgi?id=260012
rdar://113669284

Reviewed by Alan Baradlay.

This splits the WritingMode enum into BlockFlowDirection / TypographicMode. The WritingMode enum now reflects the CSS values directly.

There is a writingModeToBlockFlowDirection() method that does the conversion from WritingMode to BlockFlowDirection.

The new sideways writing modes are behind a preference, since the inline direction needs work.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-radius-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-inset-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-margin-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-padding-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-size-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/writing-mode-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/select-multiple-scrolling.optional-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/select-size-scrolling-and-sizing.optional-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/text-input-block-size.optional-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/text-input-vertical-overflow-no-scroll-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/textarea-rows-cols-sizing-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-lr-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/writing-mode-parsing-sideways-rl-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-lr-writing-mode-and-rtl-direction-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-lr-writing-mode-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-rl-writing-mode-and-rtl-direction-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-sideways-rl-writing-mode-expected.txt:
* LayoutTests/platform/ios-wk2/TestExpectations:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::toCSSValueID):
(WebCore::fromCSSValueID):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::operator==):
(WebCore::add):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::toScrollAlignmentForInlineDirection):
(WebCore::toScrollAlignmentForBlockDirection):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::flipVisualRectToLogicalForWritingMode):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForTextDecorations):
(WebCore::Layout::InlineDisplayContentBuilder::flipLogicalRectToVisualForWritingModeWithinLine const):
(WebCore::Layout::InlineDisplayContentBuilder::flipRootInlineBoxRectToVisualForWritingMode const):
(WebCore::Layout::InlineDisplayContentBuilder::setLeftForWritingMode const):
(WebCore::Layout::InlineDisplayContentBuilder::setRightForWritingMode const):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::flipLogicalLineRectToVisualForWritingMode):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForStyle):
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp:
(WebCore::LayoutIntegration::flexBoxLogicalBorder):
(WebCore::LayoutIntegration::flexBoxLogicalPadding):
(WebCore::LayoutIntegration::FlexLayout::updateFormattingRootGeometryAndInvalidate):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::verticalLogicalMargin):
(WebCore::LayoutIntegration::logicalBorder):
(WebCore::LayoutIntegration::logicalPadding):
(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::updateInlineContentConstraints):
(WebCore::LayoutIntegration::LineLayout::physicalBaselineForLine const):
(WebCore::LayoutIntegration::LineLayout::lastLineLogicalBaseline const):
(WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::paginationModeForRenderStyle):
* Source/WebCore/platform/text/WritingMode.h:
(WebCore::writingModeToBlockFlowDirection):
(WebCore::makeTextFlowInitalizer):
(WebCore::makeTextFlow):
* Source/WebCore/rendering/BaselineAlignment.cpp:
(WebCore::BaselineGroup::BaselineGroup):
(WebCore::BaselineGroup::isOppositeBlockFlow const):
(WebCore::BaselineGroup::isOrthogonalBlockFlow const):
(WebCore::BaselineGroup::isCompatible const):
(WebCore::BaselineAlignmentState::findCompatibleSharedGroup):
* Source/WebCore/rendering/BaselineAlignment.h:
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustBorderBoxRectForPainting):
(WebCore::RenderBlock::paintRectToClipOutFromBorder):
(WebCore::RenderBlock::borderTop const):
(WebCore::RenderBlock::borderLeft const):
(WebCore::RenderBlock::borderBottom const):
(WebCore::RenderBlock::borderRight const):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::shouldFlipBeforeAfterMargins):
(WebCore::RenderBox::visualOverflowRectForPropagation const):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):
* Source/WebCore/rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::orientation const):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::isLeftToRightFlow const):
(WebCore::RenderFlexibleBox::transformedBlockFlowDirection const):
(WebCore::RenderFlexibleBox::flowAwareBorderBefore const):
(WebCore::RenderFlexibleBox::flowAwareBorderAfter const):
(WebCore::RenderFlexibleBox::flowAwarePaddingBefore const):
(WebCore::RenderFlexibleBox::flowAwarePaddingAfter const):
(WebCore::RenderFlexibleBox::flowAwareMarginBeforeForChild const):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
(WebCore::RenderFlexibleBox::transformedWritingMode const): Deleted.
* Source/WebCore/rendering/RenderFlexibleBox.h:
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::computeScrollOrigin):
* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paddingTop const):
(WebCore::RenderTableCell::paddingBottom const):
(WebCore::RenderTableCell::paddingLeft const):
(WebCore::RenderTableCell::paddingRight const):
* Source/WebCore/rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::borderBeforeInWritingMode):
(WebCore::borderAndPaddingBeforeInWritingMode):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::borderBefore const):
(WebCore::RenderStyle::borderAfter const):
(WebCore::RenderStyle::borderBeforeWidth const):
(WebCore::RenderStyle::borderAfterWidth const):
(WebCore::RenderStyle::fontAndGlyphOrientation):
(WebCore::RenderStyle::shouldPlaceVerticalScrollbarOnLeft const):
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::initialWritingMode):
(WebCore::RenderStyle::blockFlowDirection const):
(WebCore::RenderStyle::typographicMode const):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
* Source/WebCore/style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::adjustStyleForInterCharacterRuby):

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




More information about the webkit-changes mailing list