Skip to content

Commit d03b676

Browse files
committed
[css-view-transition-1] Simplify handling of ::view-transition
1 parent ace0934 commit d03b676

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
689689
Its [=originating element=] is the document's [=document element=],
690690
and its [=containing block=] is the [=snapshot containing block=].
691691

692+
This element is only rendered when it has children.
693+
692694
Note: This element serves as the [=tree/parent=] of all ''::view-transition-group()'' pseudo-elements.
693695

696+
Note: The position of this element within the [=document element=] does not matter, as its [=containing block=] is the [=snapshot containing block=].
697+
694698
### View Transition Named Subtree Root: the ''::view-transition-group()'' pseudo-element ### {#::view-transition-group}
695699

696700
The <dfn>::view-transition-group()</dfn> [=pseudo-element=]
@@ -836,7 +840,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
836840
When a {{Document}}'s [=document/active view transition=]'s [=ViewTransition/phase=] is "`animating`",
837841
the boxes generated by any element in that {{Document}} with [=captured in a view transition=]
838842
and its [=element contents=],
839-
except [=ViewTransition/transition root pseudo-element=]'s [=tree/inclusive descendants=],
843+
except the [=tree/inclusive descendants=] of the ''::view-transition'' [=pseudo-element=] on that {{Document}}'s [=document element=],
840844
are not painted (as if they had ''visibility: hidden'') and
841845
do not respond to hit-testing (as if they had ''pointer-events: none'').
842846

@@ -1102,10 +1106,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
11021106
Note: This is [=marked as handled=] to prevent duplicate {{unhandledrejection}}s,
11031107
as this promise only ever rejects along with the [=update callback done promise=].
11041108

1105-
: <dfn>transition root pseudo-element</dfn>
1106-
:: a ''::view-transition''.
1107-
Initially a new ''::view-transition''.
1108-
11091109
: <dfn>initial snapshot containing block size</dfn>
11101110
:: a [=tuple=] of two numbers (width and height), or null.
11111111
Initially null.
@@ -1158,14 +1158,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
11581158

11591159
Note: This is used to hold dynamic styles relating to transitions.
11601160

1161-
: <dfn>show view transition tree</dfn>
1162-
:: A boolean. Initially false.
1163-
1164-
When this is true, [=this=]'s [=active view transition=]'s [=ViewTransition/transition root pseudo-element=] renders as a child of [=this=]'s [=document element=],
1165-
with [=this=]'s [=document element=] being its [=originating element=].
1166-
1167-
Note: The position of the [=ViewTransition/transition root pseudo-element=] within the [=document element=] does not matter, as the [=ViewTransition/transition root pseudo-element=]'s [=containing block=] is the [=snapshot containing block=].
1168-
11691161
: <dfn>update callback queue</dfn>
11701162
:: A [=/list=], initially empty.
11711163
</dl>
@@ -1475,14 +1467,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
14751467

14761468
1. Let |document| be [=this's=] [=relevant global object's=] [=associated document=].
14771469

1478-
1. Set |document|'s [=show view transition tree=] to true.
1479-
14801470
1. [=map/For each=] |transitionName| → |capturedElement| of |transition|'s [=ViewTransition/named elements=]:
14811471

14821472
1. Let |group| be a new ''::view-transition-group()'',
14831473
with its [=view transition name=] set to |transitionName|.
14841474

1485-
1. Append |group| to |transition|'s [=ViewTransition/transition root pseudo-element=].
1475+
1. Append |group| to the ''::view-transition'' [=pseudo-element=] on |document|'s [=document element=].
14861476

14871477
1. Let |imagePair| be a new ''::view-transition-image-pair()'',
14881478
with its [=view transition name=] set to |transitionName|.
@@ -1829,7 +1819,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
18291819

18301820
1. Let |hasActiveAnimations| be a boolean, initially false.
18311821

1832-
1. [=list/For each=] |element| of |transition|'s [=ViewTransition/transition root pseudo-element=]'s [=tree/inclusive descendants=]:
1822+
1. [=list/For each=] |element| of the [=tree/inclusive descendants=] of the ''::view-transition'' [=pseudo-element=] on |document|'s [=document element=]:
18331823
1. For each |animation| whose [=timeline=] is a [=document timeline=] associated with |document|,
18341824
and contains at least one [=animation/associated effect=] whose [=effect target=] is |element|,
18351825
set |hasActiveAnimations| to true if any of the following conditions are true:
@@ -1978,7 +1968,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
19781968
and |style| is in |document|'s [=document/dynamic view transition style sheet=],
19791969
then remove |style| from |document|'s [=document/dynamic view transition style sheet=].
19801970

1981-
1. Set |document|'s [=document/show view transition tree=] to false.
1971+
1. Remove all children of the ''::view-transition'' [=pseudo-element=] on |document|'s [=document element=].
19821972

19831973
1. Set |document|'s [=document/active view transition=] to null.
19841974
</div>

0 commit comments

Comments
 (0)