Skip to content

Commit 35bc09f

Browse files
aethanycmoz-wptsync-bot
authored andcommitted
Reparent abspos children in non-first inline continuation in a fragmentainer during column balancing.
This patch adds a new sanity check in absolute containing block for inline as abspos containing block. It ensures only the first inline continuation in a fragmentainer can contain abspos children, and all the other continuations in the same fragmentainer cannot. The crashtest added in this patch can trigger the assertions without the fix in `PrepareAbsoluteFrames()`. The fix in `PrepareAbsoluteFrames()` has two parts: the first part after `DrainPushedChildList()` is to ensure the above-mentioned invariant that the new check verifies. The second part is to generalize existing logic, ensuring at most one continuation of an abspos frame can be in the child list. The check for this is at [1]. [1] https://searchfox.org/firefox-main/rev/3b3f727963c10fe58e6e72c15989ad0e35dbf832/layout/generic/AbsoluteContainingBlock.cpp#344-351 Differential Revision: https://phabricator.services.mozilla.com/D313899 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2055303 gecko-commit: ac9d3ffd60fc50cf8497e130e256723ec98c1ce8 gecko-reviewers: layout-reviewers, dshin
1 parent 0c5e9f8 commit 35bc09f

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=2055303">
4+
<style>
5+
#b, :root {
6+
word-break: break-word;
7+
position: sticky;
8+
column-width: 1em;
9+
}
10+
* { min-height: 69vmax; }
11+
</style>
12+
<script id="a">
13+
window.addEventListener("DOMContentLoaded", () => {
14+
a.appendChild(c);
15+
b.insertBefore(d, b.childNodes[0]);
16+
b.appendChild(f);
17+
});
18+
</script>
19+
<body>
20+
<b id="b">%s;H`</b>
21+
<h5>
22+
<button id="c">
23+
<table>
24+
<th id="f">)B.r+ZG</th>
25+
<dialog id="d" open="true"></dialog>

0 commit comments

Comments
 (0)