Skip to content

Commit b09d34f

Browse files
aethanycmoz-wptsync-bot
authored andcommitted
Consider multicol container in paginated context when setting mIsTopOfPage bit.
A top-level multicol in a paginated context can be fragmented. We should use the same logic to set the `mIsTopOfPage` bit as if the multicol is a nested one. WARNING: loading the testcase without this patch can trap Firefox in an infinite loop. Differential Revision: https://phabricator.services.mozilla.com/D177578 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1831829 gecko-commit: 1620189277fc5ccc3e0afdf9ddba9de9794491e4 gecko-reviewers: emilio
1 parent 4fd791b commit b09d34f

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Fragmentation Reference: Print a multi-column container containing break-inside:avoid elements</title>
5+
<link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">
6+
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
7+
8+
<style>
9+
@page {
10+
size: 5in 3in;
11+
margin: 0.5in;
12+
}
13+
body {
14+
margin: 0;
15+
}
16+
div {
17+
width: 100%;
18+
height: 1in;
19+
background: green;
20+
}
21+
</style>
22+
23+
<article>
24+
<!-- page 1 -->
25+
<div style="width: 100%"></div>
26+
<div style="width:50%"></div>
27+
28+
<!-- page 2 -->
29+
<div style="width: 100%"></div>
30+
<div style="width: 50%"></div>
31+
</article>
32+
</html>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>CSS Fragmentation Test: Print a multi-column container containing break-inside:avoid elements</title>
5+
<link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">
6+
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
7+
<link rel="help" href="https://drafts.csswg.org/css-break-3/#break-within">
8+
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1831829">
9+
<link rel="match" href="break-inside-avoid-multicol-001-print-ref.html">
10+
11+
<style>
12+
@page {
13+
size: 5in 3in;
14+
margin: 0.5in;
15+
}
16+
body {
17+
margin: 0;
18+
}
19+
article {
20+
column-count: 2;
21+
column-gap: 0;
22+
}
23+
article > div {
24+
width: 100%;
25+
height: 3in;
26+
background: green;
27+
break-inside: avoid;
28+
}
29+
</style>
30+
31+
<article>
32+
<!-- page 1 -->
33+
<div></div>
34+
35+
<!-- page 2 -->
36+
<div></div>
37+
</article>
38+
</html>

0 commit comments

Comments
 (0)