Skip to content

Commit

Permalink
[text-box-trim] Test block-end with Ruby
Browse files Browse the repository at this point in the history
This patch adds a test of the `text-box-trim` property for the
block-end behavior when a Ruby hangs to the block-end side.

The test and reference for the block-start added in
crrev.com/c/5539108 are updated to share the reference file.

Bug: 40254880
Change-Id: Ie068940eff74aab2eb4baa7588b37baaef59c590
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5553008
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Koji Ishii <kojii@chromium.org>
Commit-Queue: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304323}
  • Loading branch information
kojiishi authored and chromium-wpt-export-bot committed May 22, 2024
1 parent 0e12228 commit e7a9f83
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions css/css-inline/text-box-trim/text-box-trim-ruby-end-001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-edge">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#propdef-text-box-trim">
<link rel="match" href="text-box-trim-ruby-start-001-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
.spacer {
height: 40px;
background: lightgray;
}
.target {
font-family: Ahem;
font-size: 40px;
line-height: 1;
ruby-position: under;
text-box-trim: end;
text-box-edge: text;
}
rt {
/* The Ruby annotation positioning is UA-dependent. In order to ref-test the
trimming of parts above the ascent, hide the Ruby annotation. */
color: transparent;
}
</style>
<div class="spacer"></div>
<div class="target">A <ruby>BASE<rt>RUBY</rt></ruby> B</div>
<div class="spacer"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
</style>
<div class="spacer"></div>
<div class="target">A BASE B</div>
<div class="spacer"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
</style>
<div class="spacer"></div>
<div class="target">A <ruby>BASE<rt>RUBY</rt></ruby> B</div>
<div class="spacer"></div>

0 comments on commit e7a9f83

Please sign in to comment.