Skip to content

Commit

Permalink
[css-view-transitions-2] Skip cross-document view-transitions when hi…
Browse files Browse the repository at this point in the history
…dden 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
  • Loading branch information
noamr authored Feb 13, 2024
1 parent 1315f6a commit 8271e96
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions css-view-transitions-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ spec:html
text: run the animation frame callbacks; type: dfn;
text: unload; type: dfn;
text: pagereveal; type: dfn; for: Window;
text: has been revealed; type: dfn;
spec:infra; type:dfn; text:list
</pre>

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

1. If |document|'s [=Document/visibility state=] is "<code>hidden</code>",
then return "<code>skip transition</code>".

1. Let |matchingRule| be the last ''@view-transition'' rule in |document|.

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

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

1. If |oldDocument|'s [=has been revealed=] is false, then return null.

1. Let |resolvedRule| be the result of [=Resolve @view-transition rule|resolving the @view-transition rule=] for |oldDocument|.

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

0 comments on commit 8271e96

Please sign in to comment.