[Gecko Bug 2055303] Reparent abspos children in non-first inline continuation in a fragmentainer during column balancing.#61533
Merged
Conversation
…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
approved these changes
Jul 26, 2026
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the Firefox project.
harrisonwithrow-cloud
approved these changes
Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 afterDrainPushedChildList()is to ensure the above-mentioned invariant that the newcheck 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