Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information