Closed Bug 1744969 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 31956 - Disallow container queries at or inside multicol containers.

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 31956 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/31956
Details from upstream follow.

Morten Stenshorne <mstensho@chromium.org> wrote:

Disallow container queries at or inside multicol containers.

Container queries will remain disallowed until we have full NG block
fragmentation support, for all layout types, including printing.

The reason is that, with container queries, style is recalculated during
layout. We cannot risk that we switch between legacy and NG layout while
we're there, since we may have started NG layout on ancestors that style
recalc suddenly wants to be legacy.

Had to improve the multicol detection mechanism that's run during style
recalc because of this, to ensure that we only trigger legacy fallback
when an element is actually going to become a multicol container (which
isn't the case for e.g. \<span style="columns:2;">). Otherwise we may
trigger unnecessary legacy layout fallback on ancestors all the way up
to the block formatting context root, which may already be in the middle
of NG layout, if we're evaluating container queries.

Regarding the tests included: The inline-with-columns-* ones would only
crash without LayoutNGBlockFragmentation enabled, while all the others
would only crash with LayoutNGBlockFragmentation enabled.

Had to update a couple of unit tests that no longer get legacy fallback
(because there aren't actually any multicols there).

Bug: 1276898
AX-Relnotes: n/a
Change-Id: Ia75fe86d91966233ffeea43a3940113b6a431075

Reviewed-on: https://chromium-review.googlesource.com/3320292
WPT-Export-Revision: 8b4a229b533da6180ef210978d8535986b9ffb83

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 14 tests

Status Summary

Firefox

PASS: 14

Chrome

PASS: 14

Safari

PASS: 14

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7963c1cda833
[wpt PR 31956] - Disallow container queries at or inside multicol containers., a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.