Skip to content

Commit e54d4f5

Browse files
committed
[css-view-transitions-1] Use snapshot containing block for new root
This aligns with current behavior, but was overlooked in the spec. Closes w3c#10177
1 parent dcc8029 commit e54d4f5

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
@@ -1846,11 +1846,14 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
18461846

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

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

1851-
1. Set |height| to the current height of |capturedElement|'s [=new element=]'s [=border box=].
1852+
1. Set |width| to the current width of |newRect|.
18521853

1853-
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.
1854+
1. Set |height| to the current height of |newRect|.
1855+
1856+
1. Set |transform| to a transform that would map |newRect| from the [=snapshot containing block origin=] to its current visual position.
18541857

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

@@ -1959,6 +1962,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
19591962
* Auto-skip animation when document is hidden. See <a href="https://github.com/w3c/csswg-drafts/issues/9543">issue 9543</a>.
19601963
* 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>.
19611964
* 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>.
1965+
* 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>.
19621966

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