-
Notifications
You must be signed in to change notification settings - Fork 759
[css-view-transitions-2] Separte MPA transition start from check #9819
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -434,32 +434,44 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule. | |
| ### Setting up the view-transition in the old {{Document}} ### {#setup-old-document-vt} | ||
|
|
||
| <div algorithm> | ||
| To <dfn export>setup cross-document view-transition</dfn> given a {{Document}} |oldDocument|, | ||
| a {{Document}} |newDocument|, a {{NavigationType}} |navigationType|, a boolean |isBrowserUINavigation|, and |onReady|, which is an algorithm accepting nothing: | ||
| To check if a <dfn export>should navigation trigger a cross-document view-transition?</dfn> given | ||
noamr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| an [=origin=] |oldOrigin|, an [=origin=] |newOrigin|, a boolean |newDocumentWasCreatedWithCrossOriginRedirects|, a {{NavigationType}} |navigationType|, and a boolean |isBrowserUINavigation|: | ||
|
|
||
| 1. If the user agent decides to display an [=implementation-defined=] navigation experience, e.g. a gesture-based transition for a back navigation, | ||
| the user agent may ignore the author-defined view transition. If that is the case, return. | ||
| the user agent may ignore the author-defined view transition. If that is the case, return false. | ||
|
|
||
| 1. If |navigationType| is {{NavigationType/reload}}, then return false. | ||
|
|
||
| 1. If |navigationType| is {{NavigationType/reload}}, then return. | ||
| 1. If ||newDocumentWasCreatedWithCrossOriginRedirects|, then return false. | ||
noamr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. If |isBrowserUINavigation| is true, and |navigationType| is {{NavigationType/push}} or {{NavigationType/replace}}, then return. | ||
| 1. If |isBrowserUINavigation| is true, and |navigationType| is {{NavigationType/push}} or {{NavigationType/replace}}, then return false. | ||
|
|
||
| 1. If |oldDocument|'s [=environment settings object/origin=] is not [=same origin=] as | ||
| |newDocument|'s [=environment settings object/origin=] then call |onReady| and return. | ||
| 1. If |oldOrigin| is not [=same origin=] as |newOrigin| then return false. | ||
|
|
||
| 1. If |newDocument| [=was created via cross-origin redirects=] is true | ||
|
||
| and |newDocument|'s [=latest entry=] is null, then call |onReady| and return. | ||
| and |newDocument|'s [=latest entry=] is null, then return false. | ||
|
|
||
| Note: A document with a non-null [=latest entry=] | ||
| is being [=Document/reactivated=], in which case we don't need to check for cross-origin redirects. | ||
|
|
||
| 1. Return true. | ||
| </div> | ||
| <div algorithm> | ||
| To <dfn export>setup cross-document view-transition</dfn> given a {{Document}} |oldDocument|, | ||
| a {{Document}} |newDocument|, a {{NavigationType}} |navigationType|, a boolean |isBrowserUINavigation|, and |onReady|, which is an algorithm accepting nothing: | ||
|
|
||
| 1. [=Resolve @view-transition rule=] for |oldDocument| and let |resolvedRule| be the result. | ||
|
|
||
| 1. If |resolvedRule| is "<code>skip transition</code>", then call |onReady| and return. | ||
| 1. If |resolvedRule| is "<code>skip transition</code>", then return false. | ||
noamr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Note: We don't know yet if |newDocument| has opted in, as it might not be parsed yet. | ||
| We check the opt-in for |newDocument| when we fire the {{Window/pagereveal}} event. | ||
|
|
||
| 1. If the result of calling [=should navigation trigger cross-document view-transition?=] | ||
noamr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| given |oldDocument|'s [=Document/origin=], |newDocument|'s [=Document/origin=], | ||
| |newDocument|'s [=was created via cross-origin redirects=], |navigationType|, and |isBrowserUINavigation| is false, | ||
| then return. | ||
|
|
||
| 1. If |oldDocument|'s [=active view transition=] is not null, | ||
| then [=skip the view transition|skip=] |oldDocument|'s [=active view transition=] | ||
| with an "{{AbortError}}" {{DOMException}} in |oldDocument|'s [=relevant Realm=]. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.