[Gecko Bug 1927270] Force fill columns if the current multicol's nested balancing depth exceeds the maximum. #50010
+20
−0
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.
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 balancingrequest and make it act as if
column-count: 1
is set, for performance reasons[1].
In such scenarios, this patch sets the
mForceAuto
totrue
, allowing thecontent 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