From bc450ad1ffc4d63a4e2fbebd9f1ea6595a7d0a35 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Tue, 13 Feb 2024 19:37:46 +0000 Subject: [PATCH 1/2] [css-view-transitions-2] Skip cross-document view-transitions when hidden or not-yet-revealed Closes #9822 See also #9543 --- css-view-transitions-2/Overview.bs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/css-view-transitions-2/Overview.bs b/css-view-transitions-2/Overview.bs index d90d0814e66..932aa23954a 100644 --- a/css-view-transitions-2/Overview.bs +++ b/css-view-transitions-2/Overview.bs @@ -613,6 +613,9 @@ Prepend this to the [=Perform pending transition operations=] algorithm given a
To get the resolve @view-transition rule for a {{Document}} |document|: + 1. If |document|'s [=Document/visibility state=] is "hidden", + then return "skip transition". + 1. Let |matchingRule| be the last ''@view-transition'' rule in |document|. 1. If |matchingRule| is not found, then return "skip transition". @@ -655,6 +658,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 "skip transition", then return null. From b7737c946ba3903f12d2c6542d190d94a3513257 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Tue, 13 Feb 2024 19:42:00 +0000 Subject: [PATCH 2/2] Add dfn --- css-view-transitions-2/Overview.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/css-view-transitions-2/Overview.bs b/css-view-transitions-2/Overview.bs index 932aa23954a..2cfa37341fc 100644 --- a/css-view-transitions-2/Overview.bs +++ b/css-view-transitions-2/Overview.bs @@ -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