Skip to content

Commit 1660bab

Browse files
authored
[css-view-transitions-1] Export an algorithm to skip a transition in a hidden document (w3c#9949)
* [css-view-transitions-1] Export an algorithm to skip a transition in a hidden document See w3c#9543 * Remove cruft * Add assert
1 parent 2bdb489 commit 1660bab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,19 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
16621662
then |transition|'s [=ViewTransition/finished promise=] will reject with the same reason.
16631663
</div>
16641664

1665+
## View transition page-visibility change steps ## {#page-visibility-change-steps}
1666+
<div algorithm>
1667+
The <dfn export>view transition page-visibility change steps</dfn> given {{Document}} |document| are:
1668+
1669+
1. If |document|'s [=Document/visibility state=] is "<code>hidden</code>", then:
1670+
1671+
1. If |document|'s [=active view transition=] is not null, then [=skip the view transition|skip=] |document|'s [=active view transition=].
1672+
1673+
1. Otherwise, [=assert=]: [=active view transition=] is null.
1674+
1675+
Note: this is called from the HTML spec.
1676+
</div>
1677+
16651678
## [=Capture the image=] ## {#capture-the-image-algorithm}
16661679

16671680
<div algorithm>
@@ -1939,6 +1952,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
19391952
* 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>.
19401953
* Auto-skip animation when document is hidden. See <a href="https://github.com/w3c/csswg-drafts/issues/9543">issue 9543</a>.
19411954
* 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>.
1955+
* 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>.
19421956

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

0 commit comments

Comments
 (0)