Files
firefox/testing/web-platform/tests/css/css-multicol/multicol-span-float-003.html
T
Ting-Yu Lin e87669a552 Bug 1671527 Part 3 - Reparent floats when creating non-column-span wrapper frames. r=emilio
When we are in CreateColumnSpanSiblings(), there are floats in
nsFrameConstructorState::mFloatedList that are waiting to be added to
aInitialBlock once we leave scope of the float containing block.
However, since we are creating non-column-span continuations, which are
continuations of aInitialBlock, we should reparent the floats to these
continuations if their placeholders are the descendants of the
newly-created continuations.

multicol-span-float-002.html exercises
nsCSSFrameConstructor::ConstructBlock() and multicol-span-float-003.html
exercises nsCSSFrameConstructor::CreateIBSiblings().

Without this patch, multicol-span-float-002.html and
multicol-span-float-003.html still pass, but they trigger

```
ASSERTION: nsBlockFrame::CheckFloats: Explicit float list is out of
sync with float cache
```

1524382.html used to trigger the above assertions. Now it's fixed.

Differential Revision: https://phabricator.services.mozilla.com/D120105
2021-07-23 22:52:05 +00:00

45 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS Multi-column Layout Test: Test floats in a multi-column container with column-span</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#the-multi-column-model">
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
<link rel="stylesheet" href="/fonts/ahem.css">
<link rel="match" href="multicol-span-float-002-ref.html">
<meta name="assert" content="This test verifies the floats, which are inside the mulitcol layout with column-span, are positioned with regard to the column box where the float appears.">
<style>
article {
column-count: 1;
width: 300px;
font: 1.25em/1 Ahem;
}
.float-left {
float: left;
color: black;
}
.float-right {
float: right;
color: navy;
}
.column-span {
column-span: all;
color: pink;
}
</style>
<article>
<span>
<div class="float-left">black</div>
<div class="float-right">navyy</div>
<div class="column-span">Pink</div>
<div class="float-left">black</div>
<div class="float-right">navyy</div>
</span>
</article>
</html>