Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1927270] Force fill columns if the current multicol's nested balancing depth exceeds the maximum. #50010

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

moz-wptsync-bot
Copy link
Collaborator

Currently, only a maximum of two levels of nested "balancing" multicol are
allowed. In the third or deeper levels of a multicol container that uses the
balancing behavior (column-fill: balancing), we don't honor the balancing
request and make it act as if column-count: 1 is set, for performance reasons
[1].

In such scenarios, this patch sets the mForceAuto to true, allowing the
content to be laid out regardless of whether the multicol is at the top of the
page or not [2]. This prevents the indefinite creation of columns.

This change should have minimal impact on real sites, as nested multicol layouts
beyond two levels are rare.

WARNING: Opening the testcase in Firefox without this patch applied can hang the
browser.

[1] https://searchfox.org/mozilla-central/rev/ead020d3989d3e9477b353d3d117f9c0f4b16f53/layout/generic/nsColumnSetFrame.cpp#296-301
[2] https://searchfox.org/mozilla-central/rev/6b61714b224f8cdca1a48ef1c51edab027f2c09f/layout/generic/nsColumnSetFrame.cpp#650-654

Differential Revision: https://phabricator.services.mozilla.com/D233711

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1927270
gecko-commit: c0d9ef2b735c417769b9caadbb74056846c38e51
gecko-reviewers: dshin

…xceeds the maximum.

Currently, only a maximum of two levels of nested "balancing" multicol are
allowed. In the third or deeper levels of a multicol container that uses the
balancing behavior (`column-fill: balancing`), we don't honor the balancing
request and make it act as if `column-count: 1` is set, for performance reasons
[1].

In such scenarios, this patch sets the `mForceAuto` to `true`, allowing the
content to be laid out regardless of whether the multicol is at the top of the
page or not [2]. This prevents the indefinite creation of columns.

This change should have minimal impact on real sites, as nested multicol layouts
beyond two levels are rare.

WARNING: Opening the testcase in Firefox without this patch applied can hang the
browser.

[1] https://searchfox.org/mozilla-central/rev/ead020d3989d3e9477b353d3d117f9c0f4b16f53/layout/generic/nsColumnSetFrame.cpp#296-301
[2] https://searchfox.org/mozilla-central/rev/6b61714b224f8cdca1a48ef1c51edab027f2c09f/layout/generic/nsColumnSetFrame.cpp#650-654

Differential Revision: https://phabricator.services.mozilla.com/D233711

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1927270
gecko-commit: c0d9ef2b735c417769b9caadbb74056846c38e51
gecko-reviewers: dshin
Copy link
Collaborator

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

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 c379876 into master Jan 10, 2025
19 checks passed
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1927270 branch January 10, 2025 10:32
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.

3 participants