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
@@ -884,24 +885,6 @@ and by applying ''view-transition-group'' to the internal element referencing th
884
885
The [=used value=] for 'view-transition-group' resolves to a 'view-transition-name' in its ancestor chain, or to ''view-transition-name/none''. When generating the [=named view transition pseudo-element=], the ''::view-transition-group()'' with that name
885
886
would be the parent of the ''::view-transition-group()'' generated for this element's 'view-transition-name'.
886
887
887
-
When the [=computed value=] of 'view-transition-name' for an element is ''view-transition-name/none'', its 'view-transition-group'[=used value=] is always resolved to ''view-transition-name/none'' as well.
888
-
889
-
<dl dfn-type=value dfn-for=view-transition-group>
890
-
: <dfn>normal</dfn>
891
-
:: The [=used value=] is the element's [=nearest containing group name=].
892
-
893
-
: <dfn>nearest</dfn>
894
-
:: The [=used value=] is the 'view-transition-name'[=computed value=] of the nearest ancestor whose 'view-transition-name'[=computed value=] is not ''view-transition-name/none''.
895
-
896
-
: <dfn>contain</dfn>
897
-
:: The [=used value=] is the element's [=nearest containing group name=].
898
-
899
-
Note: Descendant elements are contained within this group by default, as it would be their element's [=nearest containing group name=].
900
-
901
-
: <dfn><<custom-ident>></dfn>
902
-
:: The [=used value=] is the given <<custom-ident>> if the element has an ancestor whose 'view-transition-name'[=computed value=] is that <<custom-ident>>, otherwise the element's [=nearest containing group name=]
903
-
</dl>
904
-
905
888
# Algorithms # {#algorithms}
906
889
907
890
## Data structures ## {#cross-doc-data-structures}
@@ -1177,28 +1160,64 @@ When capturing the old or new state for an element, perform the following steps
1177
1160
1178
1161
## Capturing and applying 'view-transition-group' ## {#vt-group-algorithm}
1179
1162
1180
-
### Compute the nearest containing 'view-transition-group' ### {#vt-group-nearest-contain}
1181
-
<div algorithm="nearest containing group name">
1163
+
### Resolving the 'view-transition-group' value ### {#vt-group-value-resolve}
1164
+
1165
+
<div algorithm="resolve the document-scoped view-transition-group">
1166
+
To get the <dfn>document-scoped view transition group</dfn> of an {{Element}} |element|, perform the following steps:
1167
+
1168
+
1. Let |computedGroup| be the [=computed value=] of element's 'view-transition-group' property.
1169
+
1. If |computedGroup| is associated with |element|'s [=node document=], return |computedGroup|.
1170
+
1. Return ''view-transition-group/normal''.
1171
+
</div>
1172
+
1173
+
### Resolving the containing group name ### {#vt-containing-group-name-resolve}
1174
+
1175
+
<div algorithm="resolve nearest containing group name">
1176
+
1177
+
To resolve the <dfn>nearest containing group name</dfn> of an {{Element}} |element|, perform the following steps given a {{ViewTransition}} |viewTransition|:
1178
+
1. Assert: |element| participates in |viewTransition|.
1179
+
1. Let |ancestorGroup| be |element|'s nearest [=flat tree=] [=tree/ancestor=] who participates in |viewTransition| and whose [=document-scoped view transition group=] is not ''view-transition-group/normal''.
1180
+
1. If |ancestorGroup| exists, return |ancestorGroup|'s [=document-scoped view transition name=].
1181
+
1. Return ''view-transition-name/none''.
1182
+
</div>
1183
+
1184
+
### Resolving the group name ### {#vt-group-name-resolve}
1185
+
1186
+
<div algorithm="resolve used group name">
1187
+
To resolve the <dfn>used group name</dfn> of an {{Element}} |element|, perform the following steps given a {{ViewTransition}} |transition|:
1182
1188
1183
-
To get the <dfn>nearest containing group name</dfn> for an {{Element}} |element|, perform the following steps:
1189
+
1. Assert: |element| participates in |transition|.
1190
+
1. Let |group| be |element|'s [=document-scoped view transition group=].
1191
+
1. Let |containingGroupName| be |element|'s [=nearest containing group name=] given |transition|.
1192
+
1. Return the first matching statement, switching on |group|:
1184
1193
1185
-
1. Let |nearestAncestorWithContain| be |element|'s nearest ancestor whose 'view-transition-name' [=computed value=] is not ''view-transition-name/none'' and whose 'view-transition-group'[=computed value=] is ''view-transition-group/contain''.
1186
-
1. If |nearestAncestorWithContain| is null, return ''view-transition-group/none''.
Note: an element with ''view-transition-group/contain'' becomes the [=nearest containing group name=] for its descendants.
1200
+
1201
+
: <dfn>nearest</dfn>
1202
+
:: The [=document-scoped view transition name=] of the element's nearest [=flat tree=] ancestor which participates in the |transition|.
1203
+
1204
+
: <dfn><<custom-ident>></dfn>
1205
+
:: |group| if the element has a [=flat tree=][=tree/ancestor=] whose [=document-scoped view transition name=] is |group| and participates in |transition|; Otherwise |containingGroupName|.
1206
+
</dl>
1188
1207
</div>
1189
1208
1190
1209
### Compute the old 'view-transition-group' ### {#vt-group-capture-old}
1191
1210
<div algorithm="additional old capture steps (group)">
1192
-
When [[css-view-transitions-1#capture-old-state-algorithm|capturing the old state for an element]], perform the following steps given a [=captured element=] |capturedElement|, and an [=element=] |element|:
1211
+
When [[css-view-transitions-1#capture-old-state-algorithm|capturing the old state for an element]], perform the following steps given a [=captured element=] |capturedElement|, a {{ViewTransition}} |transition|, and an [=element=] |element|:
1193
1212
1194
-
1. Set |capturedElement|'s [=captured element/containing group name=] to the [=used value=] of |element|'s ''view-transition-group''.
1213
+
1. Set |capturedElement|'s [=captured element/containing group name=] to |element|'s[=used group name=]given |transition|.
1195
1214
</div>
1196
1215
1197
1216
### Compute the new 'view-transition-group' ### {#vt-group-capture-new}
1198
1217
<div algorithm="additional new capture steps (group)">
1199
-
When [[css-view-transitions-1#capture-new-state-algorithm|capturing the new state for an element]], perform the following steps given a [=captured element=] |capturedElement| and an [=element=] |element|:
1218
+
When [[css-view-transitions-1#capture-new-state-algorithm|capturing the new state for an element]], perform the following steps given a [=captured element=] |capturedElement| a {{ViewTransition}} |transition|, and an [=element=] |element|:
1200
1219
1201
-
1. Set |capturedElement|'s [=captured element/containing group name=] to the [=used value=] of |element|'s 'view-transition-group'.
1220
+
1. Set |capturedElement|'s [=captured element/containing group name=] to |element|'s[=used group name=]given |transition|.
1202
1221
</div>
1203
1222
1204
1223
### Reparent a ''::view-transition-group()'' to its specified containing group ### {#vt-group-reparent}
0 commit comments