Skip to content

Commit 8271e96

Browse files
authored
[css-view-transitions-2] Skip cross-document view-transitions when hidden or not-yet-revealed (#9948)
* [css-view-transitions-2] Skip cross-document view-transitions when hidden or not-yet-revealed Closes #9822 See also #9543 * Add dfn
1 parent 1315f6a commit 8271e96

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

css-view-transitions-2/Overview.bs

+6
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ spec:html
4949
text: run the animation frame callbacks; type: dfn;
5050
text: unload; type: dfn;
5151
text: pagereveal; type: dfn; for: Window;
52+
text: has been revealed; type: dfn;
5253
spec:infra; type:dfn; text:list
5354
</pre>
5455

@@ -613,6 +614,9 @@ Prepend this to the [=Perform pending transition operations=] algorithm given a
613614
<div algorithm>
614615
To get the <dfn>resolve @view-transition rule</dfn> for a {{Document}} |document|:
615616

617+
1. If |document|'s [=Document/visibility state=] is "<code>hidden</code>",
618+
then return "<code>skip transition</code>".
619+
616620
1. Let |matchingRule| be the last ''@view-transition'' rule in |document|.
617621

618622
1. If |matchingRule| is not found, then return "<code>skip transition</code>".
@@ -655,6 +659,8 @@ Prepend this to the [=Perform pending transition operations=] algorithm given a
655659

656660
1. [=Assert=]: These steps are running as part of a [=task=] queued on |oldDocument|.
657661

662+
1. If |oldDocument|'s [=has been revealed=] is false, then return null.
663+
658664
1. Let |resolvedRule| be the result of [=Resolve @view-transition rule|resolving the @view-transition rule=] for |oldDocument|.
659665

660666
1. If |resolvedRule| is "<code>skip transition</code>", then return null.

0 commit comments

Comments
 (0)