Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-view-transitions-2] Skip cross-document view-transitions when hidden or not-yet-revealed #9948

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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