Skip to content
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

[css-view-transitions-1][css-view-transitions-2] Initial draft for cross-document view transitions #9022

Merged
merged 22 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions css-view-transitions-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,19 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
Note: This is used to detect changes in the [=snapshot containing block size=],
which causes the transition to [=skip the view transition|skip=].
[Discussion of this behavior](https://github.com/w3c/csswg-drafts/issues/8045).

: <dfn>old state captured steps</dfn>
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
:: An algorithm accepting nothing, or null.
Initially null.
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved

Note: this is used for cross-document view transitions.
</dl>

A {{ViewTransition}} must never have both an [=ViewTransition/update callback=] and a [=ViewTransition/old state captured steps=].

Note: [=ViewTransition/update callback=] is optionally set for same-document view transitions,
and [=ViewTransition/old state captured steps=] is set for cross-document view transitions.

The {{ViewTransition/finished}} [=getter steps=] are to return [=this's=] [=ViewTransition/finished promise=].

The {{ViewTransition/ready}} [=getter steps=] are to return [=this's=] [=ViewTransition/ready promise=].
Expand Down Expand Up @@ -1207,6 +1218,8 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],
and return.

1. If |transition|'s [=ViewTransition/process old state captured=] is not null, then call [=ViewTransition/process old state captured=] and return.

1. Set |document|'s [=document/rendering suppression for view transitions=] to true.

1. [=Queue a global task=] on the [=DOM manipulation task source=],
Expand Down Expand Up @@ -1587,6 +1600,8 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
Note: Since the rejection of |transition|'s [=ViewTransition/update callback done promise=] isn't explicitly handled here,
if |transition|'s [=ViewTransition/update callback done promise=] rejects,
then |transition|'s [=ViewTransition/finished promise=] will reject with the same reason.

1. If |transition|'s [=ViewTransition/process old state captured=] is not null, then call |transition|'s [=ViewTransition/process old state captured=].
</div>

## [=Capture the image=] ## {#capture-the-image-algorithm}
Expand Down
Loading