Skip to content

Commit

Permalink
[css-view-transitions-1] Export an algorithm to skip a transition in …
Browse files Browse the repository at this point in the history
…a hidden document (#9949)

* [css-view-transitions-1] Export an algorithm to skip a transition in a hidden document

See #9543

* Remove cruft

* Add assert
  • Loading branch information
noamr authored Feb 14, 2024
1 parent 2bdb489 commit 1660bab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions css-view-transitions-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,19 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
then |transition|'s [=ViewTransition/finished promise=] will reject with the same reason.
</div>

## View transition page-visibility change steps ## {#page-visibility-change-steps}
<div algorithm>
The <dfn export>view transition page-visibility change steps</dfn> given {{Document}} |document| are:

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

1. If |document|'s [=active view transition=] is not null, then [=skip the view transition|skip=] |document|'s [=active view transition=].

1. Otherwise, [=assert=]: [=active view transition=] is null.

Note: this is called from the HTML spec.
</div>

## [=Capture the image=] ## {#capture-the-image-algorithm}

<div algorithm>
Expand Down Expand Up @@ -1939,6 +1952,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
* Add animation-delay inherit to UA stylesheet rules for (::view-transition) -image-pair, -old, and -new. See <a href="https://github.com/w3c/csswg-drafts/issues/9817">issue 9817</a>.
* Auto-skip animation when document is hidden. See <a href="https://github.com/w3c/csswg-drafts/issues/9543">issue 9543</a>.
* Remove references to cross-document view-transitions, to keep the L1 spec clean. See <a href="https://github.com/w3c/csswg-drafts/issues/9886">Issue 9886</a>.
* Export an algorithm to skip the active transition when the page is hidden. See <a href="https://github.com/w3c/csswg-drafts/issues/9543">issue 9543</a>.

<h3 id="changes-since-2022-05-25">
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
Expand Down

0 comments on commit 1660bab

Please sign in to comment.