From e54d4f5018ec68c823953ea0d8f8bb67a803c60f Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Mon, 8 Apr 2024 16:15:41 +0100 Subject: [PATCH 1/2] [css-view-transitions-1] Use snapshot containing block for new root This aligns with current behavior, but was overlooked in the spec. Closes #10177 --- css-view-transitions-1/Overview.bs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index 1ab3fbb09f5..1368e50ed84 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -1846,11 +1846,14 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; Note: Other rendering constraints are enforced via |capturedElement|'s [=new element=] being [=captured in a view transition=]. - 1. Set |width| to the current width of |capturedElement|'s [=new element=]'s [=border box=]. + 1. Let |newRect| be [=snapshot containing block=] if |capturedElement| is the [=document element=], + otherwise, |capturedElement's [=border box=]. - 1. Set |height| to the current height of |capturedElement|'s [=new element=]'s [=border box=]. + 1. Set |width| to the current width of |newRect|. - 1. Set |transform| to a transform that would map |capturedElement|'s [=new element=]'s [=border box=] from the [=snapshot containing block origin=] to its current visual position. + 1. Set |height| to the current height of |newRect|. + + 1. Set |transform| to a transform that would map |newRect| from the [=snapshot containing block origin=] to its current visual position. 1. Set |writingMode| to the [=computed value=] of 'writing-mode' on |capturedElement|'s [=new element=]. @@ -1959,6 +1962,7 @@ Changes from 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. +* Use snapshot containing block when capturing new state for document element. See issue #10177.

Changes from 2022-05-25 Working Draft From 8b6634963a6c0d19fddbcae86b6cef2c63b8ccc3 Mon Sep 17 00:00:00 2001 From: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> Date: Tue, 9 Apr 2024 04:18:08 -0400 Subject: [PATCH 2/2] Update css-view-transitions-1/Overview.bs --- css-view-transitions-1/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index 1368e50ed84..a8c85727241 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -1847,7 +1847,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; Note: Other rendering constraints are enforced via |capturedElement|'s [=new element=] being [=captured in a view transition=]. 1. Let |newRect| be [=snapshot containing block=] if |capturedElement| is the [=document element=], - otherwise, |capturedElement's [=border box=]. + otherwise, |capturedElement|'s [=border box=]. 1. Set |width| to the current width of |newRect|.