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
and has a [=node document=] equal to to |document|,
1323
1325
in [paint order](https://drafts.csswg.org/css2/#painting-order):
1324
1326
1327
+
<div class=note>We iterate in paint order to ensure that this order is cached in |namedElements|.
1328
+
This defines the DOM order for ::view-transition-group pseudo-elements, such that the element at the bottom of the paint stack generates the first pseudo child of ::view-transition.</div>
1329
+
1325
1330
1. If any [=flat tree=] ancestor of this |element| [=skips its contents=], then [=continue=].
1326
1331
1327
1332
1. If |element| has more than one [=box fragment=], then [=continue=].
1. [=set/Append=] |transitionName| to |usedTransitionNames|.
1341
1346
1347
+
1. Set |element|'s [=captured in a view transition=] to true.
1348
+
1349
+
1. [=list/Append=] |element| to |captureElements|.
1350
+
1351
+
<div class="note">The algorithm continues in a separate loop to ensure that [=captured in a view transition=] is set on all elements participating in this capture before it is read by future steps in the algorithm.</div>
1352
+
1353
+
1. [=list/For each=] |element| in |captureElements|:
1354
+
1342
1355
1. Let |capture| be a new [=captured element=] struct.
1343
1356
1344
1357
1. Set |capture|'s [=old image=] to the result of [=capturing the image=] of |element|.
1. Set |capture|'s [=captured element/old mix-blend-mode=] to the [=computed value=] of 'mix-blend-mode' on |element|.
1365
1378
1379
+
1. Let |transitionName| be the [=computed value=] of 'view-transition-name' for |element|.
1380
+
1366
1381
1. Set |namedElements|[|transitionName|] to |capture|.
1382
+
1383
+
1. [=list/For each=] |element| in |captureElements|:
1384
+
1385
+
1. Set |element|'s [=captured in a view transition=] to false.
1367
1386
</div>
1368
1387
1369
1388
### [=Capture the new state=] ### {#capture-new-state-algorithm}
@@ -1855,6 +1874,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
1855
1874
* Use a keyframe to add plus-lighter blending during cross-fade. See <a href="https://github.com/w3c/csswg-drafts/issues/8924">issue 8924</a>.
1856
1875
* Add mix-blend-mode to list of properties copied over to the ''::view-transition-group''. See <a href="https://github.com/w3c/csswg-drafts/issues/8962">issue 8962</a>.
1857
1876
* Add text-orientation to list of properties copied over to the ''::view-transition-group''. See <a href="https://github.com/w3c/csswg-drafts/issues/8230">issue 8230</a>.
1877
+
* Refactor the old capture algorithm to properly set [=captured in a view transition=] before reading the value.
1858
1878
1859
1879
<h3 id="changes-since-2022-05-25">
1860
1880
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
0 commit comments