Skip to content

Commit b56b2de

Browse files
aethanycmoz-wptsync-bot
authored andcommitted
Remove overly restrictive assertion in ColumnSetWrapperFrame::AppendFrames().
We can correctly append elements into a multicol container even when they have column-span descendants, so remove the assertion to allow this operation. The WPT added in this patch triggers the assertion in the old code. Differential Revision: https://phabricator.services.mozilla.com/D281580 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2010353 gecko-commit: ca85711042f0eda5a8db2b2a283688d86211bce5 gecko-reviewers: layout-reviewers, emilio
1 parent fb624e2 commit b56b2de

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Multi-column Layout Reference: Append a block with column-span descendants to multicol</title>
5+
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
6+
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
7+
8+
<style>
9+
#column {
10+
column-count: 3;
11+
column-rule: 6px solid;
12+
width: 400px;
13+
outline: 1px solid black;
14+
}
15+
h3 {
16+
column-span: all;
17+
outline: 1px solid blue;
18+
}
19+
</style>
20+
21+
<body onload="runTest();">
22+
<article id="column">
23+
<div>block1</div>
24+
<h3>spanner</h3>
25+
<div>block2</div>
26+
<div>
27+
<div>block3</div>
28+
<h3>spanner2</h3>
29+
<div>block4</div>
30+
</div>
31+
</article>
32+
</body>
33+
</html>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html class="reftest-wait">
3+
<meta charset="utf-8">
4+
<title>CSS Multi-column Layout Test: Append a block with column-span descendants to multicol</title>
5+
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
6+
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
7+
<link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
8+
<link rel="match" href="multicol-span-all-dynamic-add-014-ref.html">
9+
10+
<script>
11+
function runTest() {
12+
document.body.offsetHeight;
13+
14+
var block3 = document.createElement("div");
15+
block3.innerHTML = "<div>block3</div><h3>spanner2</h3><div>block4</div>";
16+
column.appendChild(block3);
17+
18+
document.documentElement.removeAttribute("class");
19+
}
20+
</script>
21+
22+
<style>
23+
#column {
24+
column-count: 3;
25+
column-rule: 6px solid;
26+
width: 400px;
27+
outline: 1px solid black;
28+
}
29+
h3 {
30+
column-span: all;
31+
outline: 1px solid blue;
32+
}
33+
</style>
34+
35+
<body onload="runTest();">
36+
<article id="column">
37+
<div>block1</div>
38+
<h3>spanner</h3>
39+
<div>block2</div>
40+
</article>
41+
</body>
42+
</html>

0 commit comments

Comments
 (0)