-
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] Line spacing is not even for contents that has ruby
https://bugs.webkit.org/show_bug.cgi?id=271295 <rdar://122436686> Reviewed by Antti Koivisto. Let annotation spill into previous/next line's half-leading to keep vertical (horizontal) rhythm (i.e. do not stretch lines with ruby too much even if it means overlapping adjacent line boxes). * LayoutTests/fast/ruby/tight-line-spacing-with-line-height-expected.html: Added. * LayoutTests/fast/ruby/tight-line-spacing-with-line-height.html: Added. * Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp: (WebCore::Layout::RubyFormattingContext::adjustLayoutBoundsAndStretchAncestorRubyBase): Canonical link: https://commits.webkit.org/276402@main
- Loading branch information
1 parent
bcddb3e
commit 983282c
Showing
4 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
LayoutTests/fast/ruby/tight-line-spacing-with-line-height-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,17 @@ | ||
<style> | ||
div { | ||
padding-top: 5px; | ||
padding-bottom: 5px; | ||
line-height: 16px; | ||
font-size: 16px; | ||
font-family: Ahem; | ||
width: 150px; | ||
outline: 1px solid blue; | ||
} | ||
rt { | ||
font-size: 16px; | ||
} | ||
</style> | ||
<div>X<br>X<br>X<br></div> | ||
|
||
<pre>PASS if annotation tightly fits.</pre> |
15 changes: 15 additions & 0 deletions
15
LayoutTests/fast/ruby/tight-line-spacing-with-line-height.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,15 @@ | ||
<style> | ||
div { | ||
line-height: 26px; | ||
font-size: 16px; | ||
font-family: Ahem; | ||
width: 150px; | ||
outline: 1px solid blue; | ||
} | ||
rt { | ||
font-size: 16px; | ||
} | ||
</style> | ||
<div>X<br><ruby>X<rt>x</rt></ruby></div> | ||
|
||
<pre>PASS if annotation tightly fits.</pre> |
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