Skip to content

Commit

Permalink
[css-view-transitions-1] Refactor skip during cross-doc transition on…
Browse files Browse the repository at this point in the history
… old Document (#9611)
  • Loading branch information
khushalsagar authored Nov 17, 2023
1 parent 3499ece commit 1213a4d
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions css-view-transitions-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -949,22 +949,9 @@ 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=],
given |transition|'s [=relevant global object=],
to execute the following steps:

1. [=Call the update callback=] for |transition|.

1. [=Reject=] |transition|'s [=ViewTransition/ready promise=] with an "{{InvalidStateError}}" {{DOMException}}.

1. [=Mark as handled=] |transition|'s [=ViewTransition/ready promise=].

1. [=Resolve=] |transition|'s [=ViewTransition/finished promise=].

1. Return |transition|.

1. If |document|'s [=auto-skip view transitions=] is true,
then [=skip the view transition=] for |transition| with "{{InvalidStateError}}" {{DOMException}},
and return.

1. If |document|'s [=active view transition=] is not null,
then [=skip the view transition|skip that view transition=]
Expand Down Expand Up @@ -1051,7 +1038,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
Initially a new [=map=].

: <dfn>phase</dfn>
:: One of the following ordered phases:
:: One of the following ordered phases, initially "`pending-capture`":

1. "`pending-capture`".
1. "`update-callback-called`".
Expand Down Expand Up @@ -1649,16 +1636,15 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;

1. Let |document| be |transition|'s [=relevant global object's=] [=associated document=].

1. [=Assert=]: |document|'s [=document/active view transition=] is |transition|.

1. [=Assert=]: |transition|'s [=ViewTransition/phase=] is not "`done`".

1. If |transition|'s [=ViewTransition/phase=] is before "`update-callback-called`", then [=queue a global task=] on the [=DOM manipulation task source=],
given |transition|'s [=relevant global object=], to [=call the update callback=] of |transition|.

1. Set [=document/rendering suppression for view transitions=] to false.

1. [=Clear view transition=] |transition|.
1. If |document|'s [=document/active view transition=] is |transition|,
[=Clear view transition=] |transition|.

1. Set |transition|'s [=ViewTransition/phase=] to "`done`".

Expand Down Expand Up @@ -1948,6 +1934,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
* Animate back-drop filter similar to transform/size. See <a href="https://github.com/w3c/csswg-drafts/issues/9358">issue 9358</a>.
* Copy `color-scheme` from DOM element to ''::view-transition-group()''. See <a href="https://github.com/w3c/csswg-drafts/issues/9276">issue 9276</a>.
* Expose [=auto-skip view transition=] for a {{Document}}, to allow having outbound cross-document transitions preceed programmatic view transiitons. see <a href="https://github.com/w3c/csswg-drafts/issues/9512">issue 9512</a>.

<h3 id="changes-since-2022-05-25">
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
</h3>
Expand Down

0 comments on commit 1213a4d

Please sign in to comment.