You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[css-view-transitions-1] A few clarifications and nits (#9028)
* Fix refs and split 'activate'
* [css-view-transitions-1] A few clarifications and nits
- Separated view transition activation to own algorithm, to prepare for cross-doc
- Clarifying that new elements are invisible during the transition
- Changed type of image from ImageData to 2D-bitmap
- Fixed a few broken refs
See #8958
* Update css-view-transitions-1/Overview.bs
Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
* Flip order
* New line
---------
Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
1. [=Skip the view transition=] |transition| with |reason|.
1244
1249
1245
-
* If the promise was fulfilled, then:
1250
+
* If the promise was fulfilled, then [=activate view transition|activate=] |transition|.
1251
+
</div>
1246
1252
1247
-
1. If |transition|'s [=ViewTransition/phase=] is "`done`", then return.
1253
+
<div algorithm>
1254
+
To <dfn>activate view transition</dfn> for a {{ViewTransition}} |transition|,
1255
+
perform the following steps:
1248
1256
1249
-
Note: This happens if |transition| was [=skip the view transition|skipped=] before this point.
1257
+
1. If |transition|'s [=ViewTransition/phase=] is "`done`", then return.
1258
+
1259
+
Note: This happens if |transition| was [=skip the view transition|skipped=] before this point.
1250
1260
1251
-
1. If |transition|'s [=ViewTransition/initial snapshot containing block size=] is not equal to the [=snapshot containing block size=],
1252
-
then [=skip the view transition=] for |transition|, and return.
1261
+
1. Set [=document/rendering suppression for view transitions=] to false.
1253
1262
1254
-
1. Set [=document/rendering suppression for view transitions=] to false.
1263
+
1. If |transition|'s [=ViewTransition/initial snapshot containing block size=] is not equal to the [=snapshot containing block size=],
1264
+
then [=skip the view transition=] for |transition|, and return.
1255
1265
1256
-
1. [=Capture the new state=] for |transition|.
1266
+
1. [=Capture the new state=] for |transition|.
1257
1267
1258
-
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],
1259
-
and return.
1268
+
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],
1269
+
and return.
1260
1270
1261
-
1. [=list/For each=] |capturedElement| of |transition|'s [=ViewTransition/named elements=]'[=map/values=]:
1271
+
1. [=list/For each=] |capturedElement| of |transition|'s [=ViewTransition/named elements=]'[=map/values=]:
1262
1272
1263
-
1. If |capturedElement|'s [=captured element/new element=] is not null,
1264
-
then set |capturedElement|'s [=captured element/new element=]'s [=captured in a view transition=] to true.
1273
+
1. If |capturedElement|'s [=captured element/new element=] is not null,
1274
+
then set |capturedElement|'s [=captured element/new element=]'s [=captured in a view transition=] to true.
1265
1275
1266
-
1. [=Setup transition pseudo-elements=] for |transition|.
1276
+
1. [=Setup transition pseudo-elements=] for |transition|.
1267
1277
1268
-
1. [=Update pseudo-element styles=] for |transition|.
1278
+
1. [=Update pseudo-element styles=] for |transition|.
1269
1279
1270
-
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],
1271
-
and return.
1280
+
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],
1281
+
and return.
1272
1282
1273
-
Note: The above steps will require running document lifecycle phases,
1274
-
to compute information calculated during style/layout.
1283
+
Note: The above steps will require running document lifecycle phases,
1284
+
to compute information calculated during style/layout.
1275
1285
1276
-
1. Set |transition|'s [=ViewTransition/phase=] to "`animating`".
1286
+
1. Set |transition|'s [=ViewTransition/phase=] to "`animating`".
0 commit comments