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