[webkit-changes] [WebKit/WebKit] c994ed: Use formatting context root's writing mode and tex...
Sammy Gill
noreply at github.com
Thu Dec 1 08:38:20 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c994ed0a39843aa33c3e125b9b3379ec90bc02f4
https://github.com/WebKit/WebKit/commit/c994ed0a39843aa33c3e125b9b3379ec90bc02f4
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2022-12-01 (Thu, 01 Dec 2022)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-003-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-006-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-007-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-002.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-003.tentative-expected.txt
M Source/WebCore/platform/graphics/FontBaseline.h
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBox.h
M Source/WebCore/rendering/RenderFlexibleBox.cpp
M Source/WebCore/rendering/RenderGrid.cpp
Log Message:
-----------
Use formatting context root's writing mode and text orientation when synthesizing baselines.
https://bugs.webkit.org/show_bug.cgi?id=247815
rdar://102245183
Reviewed by Alan Baradlay.
When synthesizing baselines for boxes we must take into consideration
the writing mode and text orientation of the formatting context root to
synthesize the correct type of baseline. The formatting context is also
used to determine which edges (content, border, or margin) of the box
to use.
The formatting context root's writing mode is used to determine which
type of baseline to synthesize. We could either synthesize the
alphabetic baseline or the central baseline depending on the scenario.
Previously, we were only synthesizing the alphabetic baseline. Now if
the writing mode is vertical with a text-orientation of "mixed," or
"upright," we will synthesize the central baseline.
Spec references:
https://drafts.csswg.org/css-align-3/#baseline-export
https://drafts.csswg.org/css-inline-3/#alignment-baseline-property
https://drafts.csswg.org/css-inline-3/#dominant-baseline-property
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-003-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-006-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-007-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-002.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-003.tentative-expected.txt:
* Source/WebCore/platform/graphics/FontBaseline.h:
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::inlineBlockBaseline const):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineBlockBaseline const):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::synthesizedBaseline):
(WebCore::synthesizedBaselineFromBorderBox): Deleted.
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::baselinePosition const):
(WebCore::RenderFlexibleBox::firstLineBaseline const):
(WebCore::RenderFlexibleBox::lastLineBaseline const):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::baselinePosition const):
(WebCore::RenderGrid::firstLineBaseline const):
(WebCore::RenderGrid::lastLineBaseline const):
Canonical link: https://commits.webkit.org/257239@main
More information about the webkit-changes
mailing list