fune/testing/web-platform/tests/css/css-break/float-in-self-collapsing-block-001.html
Morten Stenshorne c0de96b27e Bug 1725225 [wpt PR 29998] - Break floats inside self-collapsing blocks correctly., a=testonly
Automatic update from web-platform-tests
Break floats inside self-collapsing blocks correctly.

Even if the BFC block-offset is unknown when finishing layout of a block
(this can happen if the block is self-collapsing), we still need to
FinalizeForFragmentation(), in order to detect any breaks inside child
floats, so that the break gets propagated correctly. If the initial
optimistic BFC block-offset guess was correct, we won't lay out again
with a forced block-offset identical to the optimistic one. So this is
our only chance.

Just use the "expected" block-offset if there's no BFC block-offset set.

Among the new tests, only float-in-self-collapsing-block-000.html were
failing without this, but I also added another test to verify that we
don't get stuck with an incorrect optimistic guess.

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

--

wpt-commits: 30332a8593b2d8819573b7291bf7211222b6c358
wpt-pr: 29998
2021-08-14 08:15:36 +00:00

14 lines
796 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-break-3/#parallel-flows">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1238508">
<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:100px; height:100px; background:red;">
<div style="height:50px; background:green;"></div>
<div>
<div style="float:left; margin-top:-10px; width:100%; height:100px; background:green;"></div>
<div style="margin-top:10px;"></div>
</div>
<div style="clear:both; height:50px; background:green;"></div>
</div>