Skip to content

Commit

Permalink
Need to propagate tallest unbreakable before forced breaks.
Browse files Browse the repository at this point in the history
Even if there's a forced break inside the child added to the fragment
builder, we need to propagate the tallest unbreakable block-size, to get
column balancing right.

This fixes an existing test, but I felt that we needed a test that more
clearly illustrates this fix, so added that. The existing test still
fails in legacy layout, but for a different reason (layout is correct,
but outline painting order is wrong).

Took the opportunity to rename PropagateBreak() to PropagateBreakInfo(),
since this method doesn't only care about actual breaks. Also, no need
to call this one if no block fragmentation is involved.

Bug: 829028
Change-Id: Ie951817095267567b9fae578fd519b4ba76dc24c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3231178
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#933116}
  • Loading branch information
mstensho authored and chromium-wpt-export-bot committed Oct 19, 2021
1 parent 4c956da commit 18e08e2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions css/css-multicol/multicol-fill-balance-016.html
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#cf">
<p>Test passes if there is a filled green square.</p>
<div id="mc" style="columns:10; background:green;">
<div>
<div style="height:100px; contain:size;"></div>
<div style="break-before:column;"></div>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> {
assert_equals(mc.offsetHeight, 100);
});
</script>

0 comments on commit 18e08e2

Please sign in to comment.