Automatic update from web-platform-tests Fix tablutation inside a ruby base Tab stops must be positioned relative to the start content edge of the preserved tab's nearest block container ancestor, per CSS Text 3 white-space phase 2. Ruby bases are laid out by their own sub-LineBreaker, which measured each tab from the start of the ruby base rather than from the block container. As a result, tabs inside a ruby base were placed at the wrong offset and could crash when measuring max-content width. This CL introduces a tab_stop_offset_ member on LineBreaker that records the offset of a (sub-)line's start from the tab-stop origin. HandleControlItem adds tab_stop_offset_ when shaping tabulation characters. Guard the new behavior behind the TabSizeInRubyBase runtime feature. Spec: https://www.w3.org/TR/css-text-3/#white-space-phase-2 Bug: 505419357 Change-Id: I10aba8c1eaae54e9d4ab8c9b6ba2b0d94fa27296 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8038344 Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/main@{#1660956} -- wpt-commits: a2d61b13ff34cf8dee30daea4e25fe25fb638f1c wpt-pr: 61244
19 lines
588 B
HTML
19 lines
588 B
HTML
<!DOCTYPE html>
|
|
<meta charset="UTF-8">
|
|
<title>CSS Ruby Test: tabulation inside a ruby base</title>
|
|
<link rel="author" title="Minseong Kim" href="mailto:jja08111@gmail.com">
|
|
<link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-phase-2">
|
|
<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#line-breaks">
|
|
<link rel="match" href="ruby-tab-in-base-001-ref.html">
|
|
<link rel="stylesheet" href="/fonts/ahem.css">
|
|
<style>
|
|
div.test {
|
|
font: 25px/1 Ahem;
|
|
white-space: pre;
|
|
tab-size: 100px;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div class="test">X<ruby>	Y<rt>z</rt></ruby></div>
|
|
</body>
|