@@ -393,6 +393,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
393
393
394
394
The <dfn>snapshot viewport origin</dfn> refers to the start of the block and inline axes of the [=snapshot viewport=] .
395
395
396
+ The <dfn>snapshot viewport size</dfn> refers to the width and height of the [=snapshot viewport=] as a [=/tuple=] of two numbers.
397
+
396
398
## The [=view-transition layer=] stacking layer ## {#view-transition-stacking-layer}
397
399
398
400
This specification introduces a stacking layer to the [[CSS2#elaborate-stacking-contexts]] .
@@ -637,6 +639,14 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
637
639
: <dfn>transition root pseudo-element</dfn>
638
640
:: a ''::view-transition'' .
639
641
Initially a new ''::view-transition'' .
642
+
643
+ : <dfn>initial snapshot viewport size</dfn>
644
+ :: a [=tuple=] of two numbers (width and height), or null.
645
+ Initially null.
646
+
647
+ Note: This is used to detect changes in the [=snapshot viewport size=] ,
648
+ which causes the transition to [=skip the view transition|skip=] .
649
+ [Discussion of this behavior] (https://github.com/w3c/csswg-drafts/issues/8045).
640
650
</dl>
641
651
642
652
The {{ViewTransition/finished}} [=getter steps=] are to return [=this's=] [=ViewTransition/finished promise=] .
@@ -713,6 +723,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
713
723
714
724
1. Let |document| be |transition|'s [=relevant global object' s=] [=associated document=] .
715
725
726
+ 1. Set |transition|'s [=ViewTransition/initial snapshot viewport size=] to the [=snapshot viewport size=] .
727
+
716
728
1. [=list/For each=] |element| of every {{Element}} and [=pseudo-element=] connected to |document|,
717
729
in [paint order] (https://drafts.csswg.org/css2/#painting-order):
718
730
@@ -806,6 +818,9 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
806
818
807
819
Note: This happens if |transition| was [=skip the view transition|skipped=] before this point.
808
820
821
+ 1. If |transition|'s [=ViewTransition/initial snapshot viewport size=] is not equal to the [=snapshot viewport size=] ,
822
+ then [=skip the view transition=] for |transition|, and return.
823
+
809
824
1. Set [=document/transition suppressing rendering=] to false.
810
825
811
826
1. Let |usedTransitionNames| be a new [=/set=] of strings.
@@ -1012,6 +1027,9 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
1012
1027
1013
1028
1. Return.
1014
1029
1030
+ 1. If |transition|'s [=ViewTransition/initial snapshot viewport size=] is not equal to the [=snapshot viewport size=] ,
1031
+ then [=skip the view transition=] for |transition|, and return.
1032
+
1015
1033
1. [=Update pseudo-element styles=] for |transition|.
1016
1034
1017
1035
Note: The above implies that a change in incoming element's size or position will cause a new keyframe to be generated.
0 commit comments