From eaf7fdd065070217cba298e563f98c50ac4aac89 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Fri, 17 Nov 2023 17:31:04 +0000 Subject: [PATCH] [css-view-transitions-2] UA may apply implementation-defined timeout o cross-document view transition (#9608) * [css-view-transitions-2] UA may apply implementation-defined timeout to cross-document view transition Closes #9155 * Reword timeout --- css-view-transitions-2/Overview.bs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/css-view-transitions-2/Overview.bs b/css-view-transitions-2/Overview.bs index 58a639a4f691..5e1e4e2c290a 100644 --- a/css-view-transitions-2/Overview.bs +++ b/css-view-transitions-2/Overview.bs @@ -517,17 +517,23 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule. We explicitly clear it here since the old Document may be cached by the UA. 1. [=Queue a global task=] on the [=DOM manipulation task source=] given |newDocument|'s [=relevant global object=], - to perform the following step: + to perform the following steps: - 1. Let |newDocument|'s [=active view transition=] be a new {{ViewTransition}} in |newDocument|'s [=relevant Realm=], + 1. Let |inboundTransition| be a new {{ViewTransition}} in |newDocument|'s [=relevant Realm=], whose [=ViewTransition/named elements=] is |outboundTransition|'s [=ViewTransition/named elements=], [=ViewTransition/initial snapshot containing block size=] is |outboundTransition|'s [=ViewTransition/initial snapshot containing block size=], and whose [=ViewTransition/is inbound cross-document transition=] is true. - 1. [=Call the update callback=] for |newDocument|'s [=active view transition=]. + 1. Let |newDocument|'s [=active view transition=] be |inboundTransition|. + + 1. [=Call the update callback=] for |inboundTransition|. 1. Call |onReady|. + 1. At any given time, the UA may decide to skip |inboundTransition|, e.g. after an [=implementation-defined=] timeout. + To do so, the UA should [=queue a global task=] on the [=DOM manipulation task source=] given |document|'s [=relevant global object=] to perform the following step: + If |transition|'s [=ViewTransition/phase=] is not "`done`", then [=skip the view transition=] |transition| with a "{{TimeoutError}}" {{DOMException}}. + Note: |outboundTransition| is not exposed to JavaScript, it is used only for capturing the state of the old document.