-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IFC][Ruby] Annotation overhanging fails in vertical-lr mode
https://bugs.webkit.org/show_bug.cgi?id=267821 Reviewed by Antti Koivisto. 1. Input rectangles to overlap checking should share the same coordinate system. 2. However it does not have to be the final visual rect. Let's use the display box's native coordinate system (before flipping) to check whether annotation can overlap adjacent content. * LayoutTests/fast/ruby/simple-overhang-vertical-lr-expected.html: Added. * LayoutTests/fast/ruby/simple-overhang-vertical-lr.html: Added. * Source/WebCore/layout/formattingContexts/inline/InlineRect.h: (WebCore::Layout::InlineRect::intersects): * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::applyRubyOverhang): * Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp: (WebCore::Layout::annotationMarginBoxVisualRect): (WebCore::Layout::annotationOverlapCheck): (WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore): (WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter): (WebCore::Layout::visualRectIncludingBlockDirection): Deleted. * Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h: Canonical link: https://commits.webkit.org/273280@main
- Loading branch information
1 parent
f6f45d4
commit 177e6f3
Showing
6 changed files
with
53 additions
and
32 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
LayoutTests/fast/ruby/simple-overhang-vertical-lr-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,13 @@ | ||
<style> | ||
rt { | ||
font-size: 20px; | ||
color: transparent; | ||
} | ||
|
||
.container { | ||
font-family: Ahem; | ||
font-size: 20px; | ||
writing-mode: vertical-rl; | ||
} | ||
</style> | ||
<div class=container>X<ruby>base<rt>annotation</rt></ruby>X</div> |
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,13 @@ | ||
<style> | ||
rt { | ||
font-size: 20px; | ||
color: transparent; | ||
} | ||
|
||
.container { | ||
font-family: Ahem; | ||
font-size: 20px; | ||
writing-mode: vertical-lr; | ||
} | ||
</style> | ||
<div class=container>X<ruby>base<rt>annotation</rt></ruby>X</div> |
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
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