Files
Kent Tamura b54daeece1 Bug 2053809 [wpt PR 61183] - Propagate block-end annotation space from previous sibling block, a=testonly
Automatic update from web-platform-tests
Propagate block-end annotation space from previous sibling block

When laying out a block container, if it has no block-end border and not
a new formatting context, propagate its last line's block-end annotation
space to its layout result.

During layout of subsequent sibling blocks, this space is retrieved from
the constraint space and added to the initial block-start annotation
space to allow ruby annotations to overlap.

This CL extends ConstraintSpace to carry the previous sibling's
block-end annotation space, and propagates them in BlockLayoutAlgorithm.
This CL also moves block_start_annotation_space from RareData to
BlockData.

WPT:
Update some tests to avoid shorter block-gap, by adding
`overflow: hidden`, which creates a new formatting context.

DesignDoc: https://docs.google.com/document/d/1h1jTJLXHcdMdFUIgMRxkFEJQ3wQ86Ru38sMA9r51pEw/edit?usp=sharing

Bug: 445727139
Change-Id: I52dd0c401883668225ceadf310146261e6c6267d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8000812
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1659340}

--

wpt-commits: e62266ca7e915a23ab921231f878d6ef9d5e5453
wpt-pr: 61183
2026-07-12 11:58:38 +00:00

30 lines
1.3 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Tests for ruby-overhang: spaces with ideographic spaces and preserved tabs and EOL</title>
<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#ruby-overhang">
<link rel="match" href="ruby-overhang-spaces-006-ref.html">
<meta name=assert content="With 'ruby-overhang: spaces', excess ruby overhang on top of the ideographic spaces and preserved tabs and EOL, but no further.">
<style>
ruby {
ruby-overhang: spaces;
ruby-align: center;
}
div {
font-size: 20px;
border-left: 5px solid;
border-right: 5px solid;
width: max-content;
overflow: hidden;
}
.test { border-color: orange; }
.measure { border-color: blue; }
</style>
<body lang="ja">
<p>Test passes if orange and blue lines are aligned.
<div class=test>あ&Tab; &#x000A;<ruby>あ<rt>ああああああああああああああ</ruby>&#x000A; &Tab;あ</div>
<div class=test>あ&#x000A; &Tab;<ruby>あ<rt>ああああああああああああああ</ruby>&Tab; &#x000A;あ</div>
<div class=test>あ &#x000A;&Tab;<ruby>あ<rt>ああああああああああああああ</ruby>&Tab;&#x000A; あ</div>
<div class=test>あ&Tab;&#x000A;&Tab;<ruby>あ<rt>ああああああああああああああ</ruby>&Tab;&#x000A;&Tab;あ</div>
<div class=measure>あ   あ   あ</div>
</body>