diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index d90034be575..7f084ba5823 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -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=], + 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 [=active view transition=] is not null, then [=skip the view transition|skip that view transition=] with an "{{AbortError}}" {{DOMException}} in [=this's=] [=relevant Realm=]. @@ -1142,6 +1159,9 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; with [=this=]'s [=document element=] is its [=originating element=]. Note: The position of the [=ViewTransition/transition root pseudo-element=] within the [=document element=] does not matter, as the [=ViewTransition/transition root pseudo-element=]'s [=containing block=] is the [=snapshot containing block=]. + + : auto-skip view transitions + :: A boolean. Initially false. ### Additions to Elements ### {#elements-concept} @@ -1927,7 +1947,7 @@ Changes from issue 9365. * Animate back-drop filter similar to transform/size. See issue 9358. * Copy `color-scheme` from DOM element to ''::view-transition-group()''. See issue 9276. - +* Expose [=auto-skip view transition=] for a {{Document}}, to allow having outbound cross-document transitions preceed programmatic view transiitons. see issue 9512.

Changes from 2022-05-25 Working Draft

diff --git a/css-view-transitions-2/Overview.bs b/css-view-transitions-2/Overview.bs index 58a639a4f69..34c646c6f65 100644 --- a/css-view-transitions-2/Overview.bs +++ b/css-view-transitions-2/Overview.bs @@ -502,6 +502,10 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule. Note: this means that any running transition would be skipped when the document is ready to unload. + 1. Set |document|'s [=auto-skip view transitions=] to true. + + Note: this means that calling {{Document/startViewTransition()}} while capturing the old document for a cross-document view-transition would run the callback but skip the animation. + 1. Let |outboundTransition| be a new {{ViewTransition}} object in |oldDocument|'s [=relevant Realm=], whose [=ViewTransition/active types=] is |resolvedRule|, and whose [=ViewTransition/process old state captured=] is set to the following steps: @@ -516,6 +520,8 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule. Note: The ViewTransition object on the old Document should be destroyed after its state has been copied to the new Document below. We explicitly clear it here since the old Document may be cached by the UA. + 1. Set |document|'s [=auto-skip view transitions=] to false. + 1. [=Queue a global task=] on the [=DOM manipulation task source=] given |newDocument|'s [=relevant global object=], to perform the following step: