Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IFC] Incorrect decorating box position in vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=255256 Reviewed by Antti Koivisto. Incorrect bidi logic found its way in to non-bidi layout at 247113@main. Classic case of flipping coords twice incorrectly gets you the correct result in most cases. This patch fixes them both. 1. When converting incoming visual geometry to logical we need to differentiate root box from participating inline level boxes. e.g. a participating box's (visual) padding right always stretches the box to the logical top direction, while the root's padding right can either be a logical top or bottom constraint depending on the direction. 2. Always use line box's relative geometry flipping for inline content. * LayoutTests/TestExpectations: These never worked (we were just lucky) * LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode-expected.html: Added. * LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode.html: Added. * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent): (WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox): Canonical link: https://commits.webkit.org/262855@main
- Loading branch information
1 parent
304640c
commit 1612e71
Showing
6 changed files
with
54 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<style> | ||
div { | ||
writing-mode: vertical-lr; | ||
font-size: 50px; | ||
font-family: Ahem; | ||
white-space: pre; | ||
} | ||
span { | ||
background-color: green; | ||
color: blue; | ||
} | ||
</style> | ||
<div><span>some </span><br> | ||
<span>text</span></span> | ||
<span>some </span><br> | ||
<span>text</span></span></div> |
14 changes: 14 additions & 0 deletions
14
LayoutTests/fast/inline/aligned-inline-box-decoration-in-vertical-writing-mode.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<style> | ||
div { | ||
writing-mode: vertical-lr; | ||
font-size: 50px; | ||
font-family: Ahem; | ||
} | ||
span { | ||
background-color: green; | ||
color: blue; | ||
} | ||
</style> | ||
<!-- PASS if content and background positions match --> | ||
<div><span>some<span style="vertical-align: 100px">text</span></span> | ||
<div><span style="unicode-bidi: isolate">some<span style="vertical-align: 100px">text</span></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters