Skip to content

Commit e0805b7

Browse files
noamrkhushalsagar
andauthored
[css-view-transitions-1] Use snapshot containing block for new root (#10181)
* [css-view-transitions-1] Use snapshot containing block for new root This aligns with current behavior, but was overlooked in the spec. Closes #10177 * Update css-view-transitions-1/Overview.bs --------- Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
1 parent 79e05b6 commit e0805b7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

css-view-transitions-1/Overview.bs

+7-3
Original file line numberDiff line numberDiff line change
@@ -1850,11 +1850,14 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
18501850

18511851
Note: Other rendering constraints are enforced via |capturedElement|'s [=new element=] being [=captured in a view transition=].
18521852

1853-
1. Set |width| to the current width of |capturedElement|'s [=new element=]'s [=border box=].
1853+
1. Let |newRect| be [=snapshot containing block=] if |capturedElement| is the [=document element=],
1854+
otherwise, |capturedElement|'s [=border box=].
18541855

1855-
1. Set |height| to the current height of |capturedElement|'s [=new element=]'s [=border box=].
1856+
1. Set |width| to the current width of |newRect|.
18561857

1857-
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.
1858+
1. Set |height| to the current height of |newRect|.
1859+
1860+
1. Set |transform| to a transform that would map |newRect| from the [=snapshot containing block origin=] to its current visual position.
18581861

18591862
1. Set |writingMode| to the [=computed value=] of 'writing-mode' on |capturedElement|'s [=new element=].
18601863

@@ -1963,6 +1966,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
19631966
* Auto-skip animation when document is hidden. See <a href="https://github.com/w3c/csswg-drafts/issues/9543">issue 9543</a>.
19641967
* 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>.
19651968
* 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>.
1969+
* Use snapshot containing block when capturing new state for document element. See <a href="https://github.com/w3c/csswg-drafts/issues/10177">issue #10177</a>.
19661970

19671971
<h3 id="changes-since-2022-05-25">
19681972
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)