Bug 1900536 [wpt PR 46613] - ruby-align: Implement the layout behavior, a=testonly
Automatic update from web-platform-tests ruby-align: Implement the layout behavior ... and make the status "experimental". The main logic is ApplyRubyAlign() in ruby_utils.cc. We already have alignment logic. So this CL just adjusts it for ruby-align values. * LineBreaker::AddRubyColumnResult() should set LineStyle to pass <ruby>'s style. * GetOverhang() should return an empty AnnotationOverhang instance for ruby-align:space-between and an end-only instance for ruby-align:start. * Move out space-around tests from css-ruby/ruby-align-00*.html because Firefox and Chrome have different justification opportunity counts for "X X X". Bug: 40249572 Change-Id: I78af66e853356301135dc03bd1ab82c1a0e6ca31 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5595788 Reviewed-by: Koji Ishii <kojii@chromium.org> Auto-Submit: Kent Tamura <tkent@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/main@{#1309784} -- wpt-commits: 55b8d9e9a6ab75a494bcb9b4e5a2fba75060edc2 wpt-pr: 46613
This commit is contained in:
committed by
moz-wptsync-bot
parent
87949a53fa
commit
fdd34a2a23
@@ -12,6 +12,3 @@
|
||||
<div>X X X</div>
|
||||
<div style="text-align: center">X X X</div>
|
||||
<div style="text-align-last: justify">X X X</div>
|
||||
<!-- 8px = (width: 160px - 5 * font-size: 16px) /
|
||||
(1 + justification opportunities: 4) / 2 -->
|
||||
<div style="text-align-last: justify; padding: 0 8px">X X X</div>
|
||||
|
||||
@@ -20,7 +20,4 @@
|
||||
</ruby><br>
|
||||
<ruby style="ruby-align: space-between">
|
||||
<rb>X X X<rt><div></div></rt>
|
||||
</ruby><br>
|
||||
<ruby style="ruby-align: space-around">
|
||||
<rb>X X X<rt><div></div></rt>
|
||||
</ruby>
|
||||
|
||||
@@ -20,7 +20,4 @@
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb style="ruby-align: space-between">X X X<rt><div></div></rt>
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb style="ruby-align: space-around">X X X<rt><div></div></rt>
|
||||
</ruby>
|
||||
|
||||
@@ -20,9 +20,4 @@
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb></rb><rt><div style="text-align-last: justify">X X X</div></rt>
|
||||
</ruby><br>
|
||||
<!-- 8px = (width: 160px - 5 * font-size: 16px) /
|
||||
(1 + justification opportunities: 4) / 2 -->
|
||||
<ruby>
|
||||
<rb></rb><rt><div style="text-align-last: justify; padding: 0 8px">X X X</div></rt>
|
||||
</ruby>
|
||||
|
||||
@@ -22,7 +22,4 @@
|
||||
</ruby><br>
|
||||
<ruby style="ruby-align: space-between">
|
||||
<rb><div></div><rt>X X X</rt>
|
||||
</ruby><br>
|
||||
<ruby style="ruby-align: space-around">
|
||||
<rb><div></div><rt>X X X</rt>
|
||||
</ruby>
|
||||
|
||||
@@ -22,7 +22,4 @@
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb><div></div><rt style="ruby-align: space-between">X X X</rt>
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb><div></div><rt style="ruby-align: space-around">X X X</rt>
|
||||
</ruby>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tests for ruby-align</title>
|
||||
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="stylesheet" href="/fonts/ahem.css">
|
||||
<link rel="stylesheet" href="support/ruby-common.css">
|
||||
<style>
|
||||
div { width: 160px; box-sizing: border-box; }
|
||||
|
||||
.annotation-test ruby { line-height: 0; }
|
||||
.annotation-test rt { font-size: 100%; }
|
||||
.annotation-test rb { font-size: 0; }
|
||||
.annotation-test rt > div { width: 160px; box-sizing: border-box; }
|
||||
</style>
|
||||
<body style="font: 16px/3 Ahem">
|
||||
<!-- 8px = (width: 160px - 5 * font-size: 16px) /
|
||||
(1 + justification opportunities: 4) / 2 -->
|
||||
<div style="text-align-last: justify; padding: 0 8px">X X X</div>
|
||||
<div style="text-align-last: justify; padding: 0 8px">X X X</div>
|
||||
|
||||
<div class="annotation-test">
|
||||
<!-- 8px = (width: 160px - 5 * font-size: 16px) /
|
||||
(1 + justification opportunities: 4) / 2 -->
|
||||
<ruby>
|
||||
<rb></rb><rt><div style="text-align-last: justify; padding: 0 8px">X X X</div></rt>
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb></rb><rt><div style="text-align-last: justify; padding: 0 8px">X X X</div></rt>
|
||||
</ruby>
|
||||
</div>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tests for ruby-align</title>
|
||||
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#ruby-align-property">
|
||||
<link rel="match" href="ruby-align-space-around-ref.html">
|
||||
<link rel="stylesheet" href="/fonts/ahem.css">
|
||||
<link rel="stylesheet" href="support/ruby-common.css">
|
||||
<style>
|
||||
ruby { line-height: 0; }
|
||||
rt > div { width: 160px; }
|
||||
|
||||
.annotation-test ruby { line-height: 0; }
|
||||
.annotation-test rt { font-size: 100%; }
|
||||
.annotation-test rb { font-size: 0; }
|
||||
.annotation-test rb > div { width: 160px; }
|
||||
</style>
|
||||
<body style="font: 16px/3 Ahem">
|
||||
<ruby style="ruby-align: space-around">
|
||||
<rb>X X X<rt><div></div></rt>
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb style="ruby-align: space-around">X X X<rt><div></div></rt>
|
||||
</ruby>
|
||||
|
||||
<div class="annotation-test">
|
||||
<ruby style="ruby-align: space-around">
|
||||
<rb><div></div><rt>X X X</rt>
|
||||
</ruby><br>
|
||||
<ruby>
|
||||
<rb><div></div><rt style="ruby-align: space-around">X X X</rt>
|
||||
</ruby>
|
||||
</div>
|
||||
Reference in New Issue
Block a user