From 1660bab5bc1dd25f64c74fc7cafaf51857103ab3 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Wed, 14 Feb 2024 10:11:45 +0000 Subject: [PATCH] [css-view-transitions-1] Export an algorithm to skip a transition in 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 --- css-view-transitions-1/Overview.bs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index 1a2a4c76fb2..ef969e3854c 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -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. +## View transition page-visibility change steps ## {#page-visibility-change-steps} +
+ The view transition page-visibility change steps given {{Document}} |document| are: + + 1. If |document|'s [=Document/visibility state=] is "hidden", 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. +
+ ## [=Capture the image=] ## {#capture-the-image-algorithm}
@@ -1939,6 +1952,7 @@ Changes from issue 9817. * Auto-skip animation when document is hidden. See issue 9543. * Remove references to cross-document view-transitions, to keep the L1 spec clean. See Issue 9886. +* Export an algorithm to skip the active transition when the page is hidden. See issue 9543.

Changes from 2022-05-25 Working Draft