[wpt-sync] Sync PR 37802 - [CQ] Improve ::backdrop support in container queries
Categories
(Core :: Layout, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox111 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 37802 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/37802
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
[CQ] Improve ::backdrop support in container queries
Containers with ::backdrop pseudo-elements are especially problematic
for our implementation of container queries, because we do layout for
the ::backdrop pseudo-element before we reach layout for the
originating element. This means that at the time we discover that some
::backdrop needs an update (based on some CQ evaluation), it will be
too late to effectuate that change.This CL fixes this by delaying the creation of (problematic)
::backdrop pseudo-elements until after style and layout is done, then
doing another pass if needed.
- During Element::RecalcStyle, at the point we'd normally update the
::backdrop, we'll now instead add a pending update to
PostStyleUpdateScope if needed.- At the instantiation sites for PostStyleUpdateScope, we apply those
pending updates (if any), and re-run style and layout. Applying the
updates means that the PseudoElements are created/removed, and
marked for style recalc. This differs from regular PseudoElement
updates, since newly created PseudoElements aren't normally marked
for recalc: instead their styles are computed immediately after
creation. Marking for recalc is necessary in our case, because at
the time the pending
::backdrop happens outside the style recalc lifecycle phase.Fixed: 1405428
Change-Id: I1f57afd40c6a0834c8498ff814954db515a0e8ca
Reviewed-on: https://chromium-review.googlesource.com/4142899
WPT-Export-Revision: 2b74109166918c126e73452959116212feeb21bb
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 3•3 years ago
|
||
Comment 4•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1a7b02bfac2a
https://hg.mozilla.org/mozilla-central/rev/b4333904a09a
Description
•