-
Notifications
You must be signed in to change notification settings - Fork 708
[css-view-transitions-1] Where are the "named elements" map cleaned up? #9669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Similarly I don't see where the pseudo element tree is being torn down in the algorithms. |
Nevermind for the pseudo element tree. "show view transition tree" covers it. |
What would be the observable effect of specifying this? the map gets populated twice and is no longer in use after setting the pseudo elements style, but I don't know what it would mean that it holds stale elements after this. If you change view transition names after capturing the new state it's too late for this view transition as everything is already captured. |
@noamr The named elements map is used as input to build the pseudo element tree, so it's rather important that cleanup is specified. Otherwise, implementing as it is means that the pseudo element tree will be built with non-existent groups if you do the following steps:
-> B gets constructed along with A (even though B has |
Oh I see. The named element map is associated with a particular ViewTransition object, so starting a new one would ignore any existing one from a previous transition. |
Ah right, that makes sense thanks! |
I wonder if it makes sense to add a note if this is implicit. |
It's explicit though: https://www.w3.org/TR/css-view-transitions-1/#viewtransition-named-elements "A {{ViewTransition}} has the following:" |
That part is explicit, but I think it would be useful to mention a note about clean up: "Note: Since this is associated to the ViewTransition, this means the map is cleaned up along with the view transition when that ends" or something. Because naturally when you're looking to implement this, you're looking for where things are getting cleaned up. |
Sounds reasonable @nt1m. Feel free to send a PR or let me know if you'd like me to do that. :) |
I sent a PR: #9769 |
I noticed while reading the spec that the "named elements" map is never cleaned up, so it might become stale with elements that no longer have a
view-transition-name
. But it's also possible that I missed something here.@khushalsagar @noamr @vmpstr @fantasai @tabatkins
The text was updated successfully, but these errors were encountered: