gecko-dev/testing/web-platform/tests/css/css-multicol/change-intrinsic-width.html
Morten Stenshorne 9ea6ee382a Bug 1606712 [wpt PR 21009] - Handle multicol intrinsic inline-size changes., a=testonly
Automatic update from web-platform-tests
Handle multicol intrinsic inline-size changes.

This was broken both in legacy multicol and with
LayoutNGBlockFragmentation.

Legacy: We stored the intrinsic size in the column sets, in addition to
in the flow thread. There was no good reason for this, and it caused
trouble once something caused the intrinsic size of the multicol
container to change, since the column sets would never be marked dirty
again. Just set the intrinsic size of column sets to 0 to fix this.

LayoutNGBlockFragmentation: The flow thread is still created even if NG
block fragmentation is enabled, but the flow thread is invisible to NG,
so when calculating the intrinsic size of nodes in a subtree, we'll skip
the flow thread - which means that it will never be marked clean. Skip
to the containing block of the flow thread when marking preferred
logical widths dirty.

This fixes the remaining part of the demo in bug 1037790 - when trying
to reduce column-count to 1. Without this fix, the multicol container
would remain too wide.

Bug: 1037790
Change-Id: I89c7cbeb3132162b6c52ae30e98a0da21cd34ef1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985770
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728401}

--

wpt-commits: e30880f3341ca022f7009af13eb871872d02caaf
wpt-pr: 21009
2020-01-08 00:50:04 +00:00

14 lines
763 B
HTML

<!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/#pseudo-algorithm">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1037790">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="columns:2; column-fill:auto; column-gap:0; width:fit-content; height:100px; background:red;">
<div id="firstChild" style="width:200px; height:100px; background:green;"></div>
<div style="width:50px; height:100px; background:green;"></div>
</div>
<script>
document.body.offsetTop;
firstChild.style.width = "50px";
</script>