-
Notifications
You must be signed in to change notification settings - Fork 711
[css-view-transitions-2] cross-document transition preceeds startViewTransition on outgoing page #9609
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
Conversation
…Transition on outgoing page Closes w3c#9512
css-view-transitions-1/Overview.bs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the changes made here into the appendix as well "changes since " thing at the bottom
@@ -949,6 +949,23 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; | |||
|
|||
1. Let |document| be [=this's=] [=relevant global object's=] [=associated document=]. | |||
|
|||
1. If |document|'s [=auto-skip view transitions=] is true, then: | |||
|
|||
1. [=Queue a global task=] on the [=DOM manipulation task source=], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is off.
1. If |document|'s [=auto-skip view transitions=] is true, then: | ||
|
||
1. [=Queue a global task=] on the [=DOM manipulation task source=], | ||
given |transition|'s [=relevant global object=], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be doing all this in a separate task or just the update callback dispatch? skip transition only makes running the callback async: https://drafts.csswg.org/css-view-transitions-1/#skip-the-view-transition.
|
||
1. [=Reject=] |transition|'s [=ViewTransition/ready promise=] with an "{{InvalidStateError}}" {{DOMException}}. | ||
|
||
1. [=Mark as handled=] |transition|'s [=ViewTransition/ready promise=]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this isn't needed, rejecting above will automatically mark it as handled?
|
||
1. [=Mark as handled=] |transition|'s [=ViewTransition/ready promise=]. | ||
|
||
1. [=Resolve=] |transition|'s [=ViewTransition/finished promise=]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the default case, we mirror the result of update callback promise into finished. IIRC the rationale was that developers use the finished promise to execute code that should run when the DOM update was successful.
I sent a PR to refactor a bit so we can use the skip the view transition algo instead of repeating a bunch of same stuff here: #9611
When starting a transition in an old page and there's a capture ongoing for a cross-document view transition, the programatically-created transition is automatically skipped, calling its callback and resolving the promises on the next task. The
ready
promise is rejected.As per resolution.
Closes #9512