[wpt-sync] Sync PR 45762 - [anchor] Delay ::backdrop updates during interleaving
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox127 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 45762 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/45762
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
[anchor] Delay ::backdrop updates during interleaving
Interleaved style recalc which affects ::backdrop shares some of the
same problems that we had for Container Queries. Elements in the top
layer appears earlier in the layout tree, and so we get the call to
UpdateStyleForOutOfFlow for ::backdrop before the call to
UpdateStyleForOutOfFlow for the originating element.
This is problematic, because the second call to UpdateStyleForOutOfFlow
(for the originating element) may also recalc the style of the
::backdrop pseudo-element (which already had its
UpdateStyleForOutOfFlow call). The result is a computed style for
::backdrop, where all anchor*() functions are invalid.This issue currently masked by a combination of CL:5447517 and
Issue 330758160: the second call to UpdateStyleForOutOfFlow
recalculates the style, but doesn't invalidate anything.
Since the computed value of an invalid anchor*() is auto (CL:5447517),
getComputedStyle() grabs the value from the box, which is still correct
due to missing invalidation.However, if we add explicit 0px fallbacks to the anchor() functions
within ::backdrop, getComputedStyle() won't ask the box, and we see
that the computed values are in fact wrong.This problem is similar to the issues with had with ::backdrop for
Container Queries, so we can solve this the same way: by delaying
the updates to ::backdrop using PostStyleUpdateScope, and do another
round if needed.Note: The new test (position-try-backdrop.html) also passes without
this CL. The anchor attribute test no longer passes without this CL
however, due to the addition of explicit 0px fallbacks (which aren't
supposed to be taken).Bug: 335052779
Change-Id: I48f33568e172983be28264a982b5e04c22e16001
Reviewed-on: https://chromium-review.googlesource.com/5458187
WPT-Export-Revision: 1960ba3612e0e8d05644c24aafa5e42cb0fbde8b
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
CI Results
Ran 4 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 3 subtests
Status Summary
Firefox
OK : 2
FAIL: 4
Chrome
OK : 2
PASS: 4
Safari
OK : 2
FAIL: 4
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-anchor-position/position-try-backdrop.html [wpt.fyi]
- ::backdrop can use position-try-options:
FAIL(Chrome:PASS, Safari:FAIL)
- ::backdrop can use position-try-options:
- /html/dom/elements/global-attributes/the-anchor-attribute-003.tentative.html [wpt.fyi]
- ::before uses originating element's implicit anchor:
FAIL(Chrome:PASS, Safari:FAIL) - ::after uses originating element's implicit anchor:
FAIL(Chrome:PASS, Safari:FAIL) - ::backdrop uses originating element's implicit anchor:
FAIL(Chrome:PASS, Safari:FAIL)
- ::before uses originating element's implicit anchor:
Comment 4•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e08e1b7cdfd0
https://hg.mozilla.org/mozilla-central/rev/82946cb85eaf
Description
•