Skip to content

[Gecko Bug 2055303] Reparent abspos children in non-first inline continuation in a fragmentainer during column balancing.#61533

Merged
moz-wptsync-bot merged 1 commit into
masterfrom
gecko/2055303
Jul 27, 2026
Merged

[Gecko Bug 2055303] Reparent abspos children in non-first inline continuation in a fragmentainer during column balancing.#61533
moz-wptsync-bot merged 1 commit into
masterfrom
gecko/2055303

Conversation

@moz-wptsync-bot

Copy link
Copy Markdown
Collaborator

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

…ntainer 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

@wpt-pr-bot wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

@moz-wptsync-bot
moz-wptsync-bot merged commit 35bc09f into master Jul 27, 2026
28 checks passed
@moz-wptsync-bot
moz-wptsync-bot deleted the gecko/2055303 branch July 27, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants