Skip to content

Commit 1213a4d

Browse files
authored
[css-view-transitions-1] Refactor skip during cross-doc transition on old Document (#9611)
1 parent 3499ece commit 1213a4d

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -949,22 +949,9 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
949949

950950
1. Let |document| be [=this's=] [=relevant global object's=] [=associated document=].
951951

952-
1. If |document|'s [=auto-skip view transitions=] is true, then:
953-
954-
1. [=Queue a global task=] on the [=DOM manipulation task source=],
955-
given |transition|'s [=relevant global object=],
956-
to execute the following steps:
957-
958-
1. [=Call the update callback=] for |transition|.
959-
960-
1. [=Reject=] |transition|'s [=ViewTransition/ready promise=] with an "{{InvalidStateError}}" {{DOMException}}.
961-
962-
1. [=Mark as handled=] |transition|'s [=ViewTransition/ready promise=].
963-
964-
1. [=Resolve=] |transition|'s [=ViewTransition/finished promise=].
965-
966-
1. Return |transition|.
967-
952+
1. If |document|'s [=auto-skip view transitions=] is true,
953+
then [=skip the view transition=] for |transition| with "{{InvalidStateError}}" {{DOMException}},
954+
and return.
968955

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

10531040
: <dfn>phase</dfn>
1054-
:: One of the following ordered phases:
1041+
:: One of the following ordered phases, initially "`pending-capture`":
10551042

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

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

1652-
1. [=Assert=]: |document|'s [=document/active view transition=] is |transition|.
1653-
16541639
1. [=Assert=]: |transition|'s [=ViewTransition/phase=] is not "`done`".
16551640

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

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

1661-
1. [=Clear view transition=] |transition|.
1646+
1. If |document|'s [=document/active view transition=] is |transition|,
1647+
[=Clear view transition=] |transition|.
16621648

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

@@ -1948,6 +1934,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
19481934
* Animate back-drop filter similar to transform/size. See <a href="https://github.com/w3c/csswg-drafts/issues/9358">issue 9358</a>.
19491935
* Copy `color-scheme` from DOM element to ''::view-transition-group()''. See <a href="https://github.com/w3c/csswg-drafts/issues/9276">issue 9276</a>.
19501936
* 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>.
1937+
19511938
<h3 id="changes-since-2022-05-25">
19521939
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
19531940
</h3>

0 commit comments

Comments
 (0)