From ad4295617918556863a10beb9674f075765bc329 Mon Sep 17 00:00:00 2001 From: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> Date: Fri, 7 Oct 2022 11:08:02 -0400 Subject: [PATCH] Rename shared element transition -> view transition --- css-view-transitions-1/Overview.bs | 114 ++++++++++++++--------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index e4a5cab79da..29be48420f4 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -1,15 +1,15 @@
-Title: CSS Shared Element Transitions Module Level 1
-Shortname: css-shared-element-transitions
+Title: CSS View Transitions Module Level 1
+Shortname: css-view-transitions
 Level: 1
 Status: ED
 Group: csswg
-ED: https://drafts.csswg.org/css-shared-element-transitions-1/
+ED: https://drafts.csswg.org/css-view-transitions-1/
 Work Status: exploring
 Editor: Tab Atkins-Bittner, Google, http://xanthir.com/contact/, w3cid 42199
 Editor: Jake Archibald, Google
 Editor: Khushal Sagar, Google
-Abstract: This module defines the Single-Page Document-Transition API, along with associated properties and pseudo-elements.
+Abstract: This module defines the View Transition API, along with associated properties and pseudo-elements.
 
-## The {{DOMTransition}} interface ## {#the-domtransition-interface} +## The {{ViewTransition}} interface ## {#the-domtransition-interface}
- The {{DOMTransition}} represents and controls + The {{ViewTransition}} represents and controls a single same-document transition. That is, it controls a transition where the starting and ending document are the same, possibly with changes to the document's DOM structure.
-A {{DOMTransition}} has the following: +A {{ViewTransition}} has the following: -
+
: tagged elements :: a [=/map=], whose keys are [=page transition tags=] and whose values are [=captured elements=]. @@ -595,18 +595,18 @@ A {{DOMTransition}} has the following: Initially [=a new promise=] in [=this's=] [=relevant Realm=].
-The {{DOMTransition/finished}} [=getter steps=] are to return [=this's=] [=DOMTransition/finished promise=]. +The {{ViewTransition/finished}} [=getter steps=] are to return [=this's=] [=ViewTransition/finished promise=]. -The {{DOMTransition/ready}} [=getter steps=] are to return [=this's=] [=DOMTransition/ready promise=]. +The {{ViewTransition/ready}} [=getter steps=] are to return [=this's=] [=ViewTransition/ready promise=]. -The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOMTransition/DOM updated promise=]. +The {{ViewTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=ViewTransition/DOM updated promise=]. -### {{DOMTransition/skipTransition()}} ### {#DOMTransition-skipTransition} +### {{ViewTransition/skipTransition()}} ### {#ViewTransition-skipTransition}
- The [=method steps=] for skipTransition() are: + The [=method steps=] for skipTransition() are: - 1. If [=this=]'s [=DOMTransition/phase=] is not "`done`", + 1. If [=this=]'s [=ViewTransition/phase=] is not "`done`", then [=skip the page transition=] for [=this=] with an "{{AbortError}}" {{DOMException}}.
@@ -656,18 +656,18 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM 1. If |document|'s [=document/active DOM transition=] is not null, then: - 1. If |document|'s [=document/active DOM transition=]'s [=DOMTransition/phase=] is "`pending-capture`", then [=perform an outgoing capture=] with |document|'s [=document/active DOM transition=]. + 1. If |document|'s [=document/active DOM transition=]'s [=ViewTransition/phase=] is "`pending-capture`", then [=perform an outgoing capture=] with |document|'s [=document/active DOM transition=]. - 1. Otherwise, if |document|'s [=document/active DOM transition=]'s [=DOMTransition/phase=] is "`animating`", then [=update transition DOM=] for |document|'s [=document/active DOM transition=]. + 1. Otherwise, if |document|'s [=document/active DOM transition=]'s [=ViewTransition/phase=] is "`animating`", then [=update transition DOM=] for |document|'s [=document/active DOM transition=]. ## [=Perform an outgoing capture=] ## {#perform-an-outgoing-capture-algorithm}
- To perform an outgoing capture given a {{DOMTransition}} |transition|, + To perform an outgoing capture given a {{ViewTransition}} |transition|, perform the following steps: - 1. Let |taggedElements| be |transition|'s [=DOMTransition/tagged elements=]. + 1. Let |taggedElements| be |transition|'s [=ViewTransition/tagged elements=]. 1. Let |usedTransitionTags| be a new [=/set=] of strings. @@ -740,17 +740,17 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM Note: A task is queued here because the texture read back in [=capturing the image=] may be async, although the render steps in the HTML spec act as if it's synchronous. - 1. If |transition|'s [=DOMTransition/phase=] is "`done`", then abort these steps. + 1. If |transition|'s [=ViewTransition/phase=] is "`done`", then abort these steps. Note: This happens if |transition| was [=skip the page transition|skipped=] before this point. 1. [=Call the DOM update callback=] of |transition|. - 1. [=promise/React=] to |transition|'s [=DOMTransition/DOM updated promise=]: + 1. [=promise/React=] to |transition|'s [=ViewTransition/DOM updated promise=]: * If the promise does not settle within an implementation-defined timeout, then: - 1. If |transition|'s [=DOMTransition/phase=] is "`done`", then return. + 1. If |transition|'s [=ViewTransition/phase=] is "`done`", then return. Note: This happens if |transition| was [=skip the page transition|skipped=] before this point. @@ -758,7 +758,7 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM * If the promise was fulfilled, then: - 1. If |transition|'s [=DOMTransition/phase=] is "`done`", then return. + 1. If |transition|'s [=ViewTransition/phase=] is "`done`", then return. Note: This happens if |transition| was [=skip the page transition|skipped=] before this point. @@ -809,11 +809,11 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM Note: The frame-by-frame parts of the animation are handled in [=update transition DOM=]. - 1. [=Resolve=] [=DOMTransition/ready promise=]. + 1. [=Resolve=] [=ViewTransition/ready promise=]. * If the promise was rejected with reason |r|, then: - 1. If |transition|'s [=DOMTransition/phase=] is "`done`", then return. + 1. If |transition|'s [=ViewTransition/phase=] is "`done`", then return. Note: This happens if |transition| was [=skip the page transition|skipped=] before this point. @@ -823,19 +823,19 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM ## Skip the page transition ## {#skip-the-page-transition-algorithm}
- To skip the page transition for {{DOMTransition}} |transition| with reason |reason|: + To skip the page transition for {{ViewTransition}} |transition| with reason |reason|: 1. Let |document| be |transition|'s [=relevant global object's=] [=associated document=]. 1. [=Assert=]: |document|'s [=document/active DOM transition=] is |transition|. - 1. [=Assert=]: |transition|'s [=DOMTransition/phase=] is not "`done`". + 1. [=Assert=]: |transition|'s [=ViewTransition/phase=] is not "`done`". - 1. If |transition|'s [=DOMTransition/phase=] is [=phases/before=] "`dom-update-callback-called`", then [=call the DOM update callback=] of |transition|. + 1. If |transition|'s [=ViewTransition/phase=] is [=phases/before=] "`dom-update-callback-called`", then [=call the DOM update callback=] of |transition|. 1. Set [=document/transition suppressing rendering=] to false. - 1. If |transition|'s [=DOMTransition/phase=] is equal to or [=phases/after=] "`animating`", then: + 1. If |transition|'s [=ViewTransition/phase=] is equal to or [=phases/after=] "`animating`", then: 1. Remove all associated [=page-transition pseudo-elements=] from |document|. @@ -843,13 +843,13 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM Issue: There needs to be a definition/link for "associated". - 1. Set |transition|'s [=DOMTransition/phase=] to "`done`". + 1. Set |transition|'s [=ViewTransition/phase=] to "`done`". 1. Set |document|'s [=document/active DOM transition=] to null. - 1. [=Reject=] |transition|'s [=DOMTransition/ready promise=] with |reason|. + 1. [=Reject=] |transition|'s [=ViewTransition/ready promise=] with |reason|. - 1. [=Reject=] |transition|'s [=DOMTransition/finished promise=] with |reason|. + 1. [=Reject=] |transition|'s [=ViewTransition/finished promise=] with |reason|.
## [=Capture the image=] ## {#capture-the-image-algorithm} @@ -890,7 +890,7 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM ## [=Update transition DOM=] ## {#update-transition-dom-algorithm}
- To update transition DOM given a {{DOMTransition}} |transition|: + To update transition DOM given a {{ViewTransition}} |transition|: 1. Let |document| be |transition|'s [=relevant global object's=] [=associated document=]. @@ -903,7 +903,7 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM Issue: There needs to be a definition/link for "active animation". - 1. Set |transition|'s [=DOMTransition/phase=] to "`done`". + 1. Set |transition|'s [=ViewTransition/phase=] to "`done`". 1. Remove all associated [=page-transition pseudo-elements=] from |document|. @@ -913,11 +913,11 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM 1. Set |document|'s [=document/active DOM transition=] to null. - 1. [=Resolve=] |transition|'s[=DOMTransition/finished promise=]. + 1. [=Resolve=] |transition|'s[=ViewTransition/finished promise=]. 1. Return. - 1. [=map/For each=] |tag| -> |capturedElement| of |transition|'s [=DOMTransition/tagged elements=]: + 1. [=map/For each=] |tag| -> |capturedElement| of |transition|'s [=ViewTransition/tagged elements=]: 1. If |capturedElement| has an "incoming element", run [=capture the image=] on |capturedElement|'s "incoming element" and update the displayed @@ -957,7 +957,7 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM ## [=Animate a page transition=] ## {#animate-a-page-transition-algorithm}
- To animate a page transition given a {{DOMTransition}} |transition|: + To animate a page transition given a {{ViewTransition}} |transition|: 1. Generate a <> named "page-transition-fade-out" in [=user-agent origin=] as follows: @@ -989,7 +989,7 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM } - 1. [=map/For each=] |tag| -> |capturedElement| of |transition|'s [=DOMTransition/tagged elements=]: + 1. [=map/For each=] |tag| -> |capturedElement| of |transition|'s [=ViewTransition/tagged elements=]: 1. If neither of |capturedElement|'s [=captured element/outgoing image=] or [=captured element/incoming element=] is null: @@ -1021,7 +1021,7 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM - 1. Set |transition|'s [=DOMTransition/phase=] to "`animating`". + 1. Set |transition|'s [=ViewTransition/phase=] to "`animating`". Issue: How are keyframes scoped to user-agent origin? We could decide scope based on whether `animation-name` in the computed style @@ -1034,11 +1034,11 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM ## [=Create transition pseudo-elements=] ## {#create-transition-pseudo-elements-algorithm}
- To create transition pseudo-elements for a {{DOMTransition}} |transition|: + To create transition pseudo-elements for a {{ViewTransition}} |transition|: 1. Let |transitionRoot| be the result of creating a new ''::page-transition'' pseudo-element. - 1. [=map/For each=] |transitionTag| → |capturedElement| of |transition|'s [=DOMTransition/tagged elements=]: + 1. [=map/For each=] |transitionTag| → |capturedElement| of |transition|'s [=ViewTransition/tagged elements=]: 1. Let |container| be the result of creating a new ''::page-transition-container'' pseudo-element with the tag |transitionTag|. @@ -1113,18 +1113,18 @@ The {{DOMTransition/domUpdated}} [=getter steps=] are to return [=this's=] [=DOM
- To call the DOM update callback of a {{DOMTransition}} |transition|: + To call the DOM update callback of a {{ViewTransition}} |transition|: - 1. [=Assert=]: |transition|'s [=DOMTransition/phase=] is [=phases/before=] "`dom-update-callback-called`". + 1. [=Assert=]: |transition|'s [=ViewTransition/phase=] is [=phases/before=] "`dom-update-callback-called`". - 1. Let |callbackPromise| be the result of [=/invoking=] |transition|'s [=DOMTransition/DOM update callback=]. + 1. Let |callbackPromise| be the result of [=/invoking=] |transition|'s [=ViewTransition/DOM update callback=]. - 1. Set |transition|'s [=DOMTransition/phase=] to "`dom-update-callback-called`". + 1. Set |transition|'s [=ViewTransition/phase=] to "`dom-update-callback-called`". 1. [=promise/React=] to |callbackPromise|: - * If |callbackPromise| was fulfilled, then [=resolve=] |transition|'s [=DOMTransition/DOM updated promise=]. + * If |callbackPromise| was fulfilled, then [=resolve=] |transition|'s [=ViewTransition/DOM updated promise=]. - * If |callbackPromise| was rejected with reason |r|, then [=reject=] |transition|'s [=DOMTransition/DOM updated promise=] with |r|. + * If |callbackPromise| was rejected with reason |r|, then [=reject=] |transition|'s [=ViewTransition/DOM updated promise=] with |r|.