Skip to content

Commit a5ced7a

Browse files
dumbmoronchromium-wpt-export-bot
authored andcommitted
Preserve forced break-between values for inline children
CalculateBreakBetweenValue() always returned |EBreakBetween::kAuto| for inline children, which dropped propagated break values from block descendants. Compute break-between via InitialBreakBefore() instead, so carried breaks from previous siblings are preserved. Fixed: 40075224 Change-Id: I674a8b613eb62744653c8ea287183a0149c229ff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7609860 Reviewed-by: jj <jj@chromium.org> Commit-Queue: jj <jj@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1591034}
1 parent ef06abd commit a5ced7a

4 files changed

Lines changed: 74 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
3+
<link rel="help" href="https://issues.chromium.org/issues/40075224#comment10">
4+
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
5+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
6+
<div style="width:100px; height:100px; background:red;">
7+
<div style="columns:4; column-fill:auto; gap:0; height:400px;">
8+
<span>
9+
<div style="break-before:column; height:100px; background:green;"></div>
10+
</span>
11+
<span>
12+
<div style="break-before:column; height:100px; background:green;"></div>
13+
</span>
14+
<span>
15+
<div style="break-before:column; height:100px; background:green;"></div>
16+
</span>
17+
<span>
18+
<div style="break-before:column; height:100px; background:green;"></div>
19+
</span>
20+
</div>
21+
</div>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
3+
<link rel="help" href="https://issues.chromium.org/issues/40075224#comment10">
4+
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
5+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
6+
<div style="width:100px; height:100px; background:red;">
7+
<div style="columns:4; column-fill:auto; gap:0; height:400px;">
8+
<span>
9+
<div style="break-after:column; height:100px; background:green;"></div>
10+
</span>
11+
<span>
12+
<div style="break-after:column; height:100px; background:green;"></div>
13+
</span>
14+
<span>
15+
<div style="break-after:column; height:100px; background:green;"></div>
16+
</span>
17+
<span>
18+
<div style="break-after:column; height:100px; background:green;"></div>
19+
</span>
20+
</div>
21+
</div>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="jj" href="mailto:jj@imput.net">
3+
<link rel="help" href="https://issues.chromium.org/issues/40075224">
4+
<style>
5+
.break { break-after: page }
6+
h1, body { margin: 0 }
7+
</style>
8+
<h1>one</h1>
9+
<div class=break></div>
10+
<h1>two</h1>
11+
<div class=break></div>
12+
<h1>three</h1>
13+
<div class=break></div>
14+
<h1>four</h1>
15+
<!-- There should be four pages. -->
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<link rel="author" title="jj" href="mailto:jj@imput.net">
3+
<link rel="help" href="https://issues.chromium.org/issues/40075224">
4+
<link rel="match" href="block-in-inline-015-print-ref.html">
5+
<style>
6+
.break { break-after: page }
7+
.inline { display: inline }
8+
h1, body { margin: 0 }
9+
</style>
10+
<div class=inline><h1>one</h1></div>
11+
<div class=inline><div class=break></div></div>
12+
<div class=inline><h1>two</h1></div>
13+
<div class=inline><div class=break></div></div>
14+
<div class=inline><h1>three</h1></div>
15+
<div class=inline><div class=break></div></div>
16+
<div class=inline><h1>four</h1></div>
17+
<!-- There should be four pages. -->

0 commit comments

Comments
 (0)