Closed Bug 1988032 Opened 9 months ago Closed 7 months ago

Assign the ASR (active scrolled root) of the anchor to the anchored element

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: dshin, Assigned: tnikkel)

References

(Blocks 2 open bugs, Regressed 1 open bug)

Details

(Whiteboard: [anchorpositioning:graphics], [wptsync upstream])

Attachments

(7 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
Blocks: 1923392
Whiteboard: [anchorpositioning:triage] → [anchorpositioning:graphics]
Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

This gives an easy way to disable in case of issues and allows toggling for testing purposes (to narrow down if a potential issue is async or main thread scrolling related).

Being inside an active view transition forces a scroll frame to be inactive.

https://searchfox.org/firefox-main/rev/70425199e9a5fa80aa7419fa51763013a67226e1/layout/generic/ScrollContainerFrame.cpp#4349

IsInViewTransitionCapture is set on a stacking context basis. This means that when painting walks from a placeholder frame to its out of flow then IsInViewTransitionCapture follows. But the ASR tree (which we must construct for async scrolling the anchor pos) strictly follows the parent (not the placeholder). So we'd have to do a completely separate walk, and I'm not sure it's worth it. If it turns out to be important we can implement something, or even better just remove that code in DecideScrollableLayer which I'm pretty sure we don't need but I don't want to open that can of worms right now.

Anchored content can get assigned an ASR that is "far away" from it with no relation in the frame tree. So if something about the ASR changes we need to invalidate the anchored content but that is not straight forward, and not worth it until/unless we find it causing an issue.

Anchored content can get assigned an ASR that is "far away" from it with no relation in the frame tree. So if something about the ASR changes we need to invalidate the anchored content but that is not straight forward, and not worth it until/unless we find it causing an issue.

Attachment #9528559 - Attachment is obsolete: true
See Also: → 2001861
Pushed by tnikkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cb45424f429d https://hg.mozilla.org/integration/autoland/rev/f8ad4916eec4 Assign the ASR of the anchor to the anchored content. r=hiro,layout-reviewers,layout-anchor-positioning-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/7165d46e3b24 https://hg.mozilla.org/integration/autoland/rev/9c6896a99939 Add some basic anchor pos plus async scroll reftests. r=hiro,layout-reviewers https://github.com/mozilla-firefox/firefox/commit/98d14e2dc819 https://hg.mozilla.org/integration/autoland/rev/dec66d84e74c Add a pref to control async scroll of CSS anchor positioned content. r=layout-reviewers,hiro https://github.com/mozilla-firefox/firefox/commit/472901d51347 https://hg.mozilla.org/integration/autoland/rev/aa8819fe8168 Don't async scroll with anchors if there is an active view transition. r=layout-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/9063b3c208f7 https://hg.mozilla.org/integration/autoland/rev/b8ee0d9bc9d4 Disable RDL if are there active CSS anchor pos. r=layout-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/8244ecad8b53 https://hg.mozilla.org/integration/autoland/rev/9daaf6d08950 Tweak ASR assert to handle unusual native anonymous content in the custom content container in view transition case. r=emilio,layout-reviewers

Backed out for causing build bustages

Flags: needinfo?(tnikkel)
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/56298 for changes under testing/web-platform/tests
Whiteboard: [anchorpositioning:graphics] → [anchorpositioning:graphics], [wptsync upstream]
Flags: needinfo?(tnikkel)
Pushed by tnikkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/94b9e3475381 https://hg.mozilla.org/integration/autoland/rev/ae3b4e95cd36 Assign the ASR of the anchor to the anchored content. r=hiro,layout-reviewers,layout-anchor-positioning-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/0aec81c009fd https://hg.mozilla.org/integration/autoland/rev/74ae9f86faab Add some basic anchor pos plus async scroll reftests. r=hiro,layout-reviewers https://github.com/mozilla-firefox/firefox/commit/f24cbbb7a2d1 https://hg.mozilla.org/integration/autoland/rev/1c2d8a47374e Add a pref to control async scroll of CSS anchor positioned content. r=layout-reviewers,hiro https://github.com/mozilla-firefox/firefox/commit/66d347cb0dba https://hg.mozilla.org/integration/autoland/rev/bc2eb1b66aae Don't async scroll with anchors if there is an active view transition. r=layout-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/ebad30b3999d https://hg.mozilla.org/integration/autoland/rev/cfd58f087220 Disable RDL if are there active CSS anchor pos. r=layout-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/5f4e0ab4bf4d https://hg.mozilla.org/integration/autoland/rev/b2284f1c94ea Tweak ASR assert to handle unusual native anonymous content in the custom content container in view transition case. r=emilio,layout-reviewers

It's a single pixel just at the edge of a lower case letter t (two instances in each test).

Upstream PR merged by moz-wptsync-bot
Regressions: 2002761
Depends on: 2004160
No longer depends on: 2004160
Regressions: 2004160
QA Whiteboard: [qa-triage-done-c148/b147]
Regressions: 2023983
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: