Skip to content

Commit 537adc8

Browse files
authored
[css-view-transitions-1] Replace 'snapshot viewport' with 'snapshot root' (w3c#8324)
* [CSS-VIEW-TRANSITIONS] Replace 'snapshot viewport' with 'snapshot root'
1 parent 88af5be commit 537adc8

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
246246
a [=pseudo-element root=].
247247
Its [=originating element=] is the document's [=document element=].
248248

249-
Its [=containing block=] is the [=snapshot viewport=].
249+
Its [=containing block=] is the [=snapshot root=].
250250

251251
The following is added to the [=HTML user agent style sheet=]:
252252

@@ -259,8 +259,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
259259

260260
<div class="note">
261261
This pseudo-element provides a containing block for all ''::view-transition-group()'' pseudo-elements.
262-
The aim of the style is to size the pseudo-element to cover the [=snapshot viewport=]
263-
and position all ''::view-transition-group()'' pseudo-elements relative to the [=snapshot viewport origin=].
262+
The aim of the style is to size the pseudo-element to cover the [=snapshot root=]
263+
and position all ''::view-transition-group()'' pseudo-elements relative to the [=snapshot root origin=].
264264
</div>
265265

266266
: <dfn>::view-transition-group( <<pt-name-selector>> )</dfn>
@@ -363,39 +363,39 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
363363

364364
The initial phase is the first item in the sequence.
365365

366-
## The snapshot viewport ## {#snapshot-viewport-concept}
366+
## The snapshot root ## {#snapshot-root-concept}
367367

368-
The <dfn>snapshot viewport</dfn> covers all areas of the window that could potentially display web content.
368+
The <dfn>snapshot root</dfn> is a rectangle that covers all areas of the window that could potentially display web content.
369369
This area is consistent regardless of root scrollbars or interactive widgets.
370370

371371
Issue: "Interactive widgets" refers to UI described within a property definition in [[css-viewport#interactive-widget-section]].
372372
This should be extracted into an exported definition that can be used independently of the property.
373373

374374
<figure>
375375
<img src="diagrams/phone-browser.svg" width="200" height="335" alt="A diagram of a phone screen, including a top status bar, a browser URL bar, web-content area with a floating scrollbar, a virtual keyboard, and a bottom bar with an OS back button">
376-
<img src="diagrams/phone-browser-snapshot-viewport.svg" width="200" height="335" alt="The previous diagram, but highlights the area that's the 'snapshot' viewport, which includes everything except the top status bar and the bottom bar with the OS back button">
376+
<img src="diagrams/phone-browser-snapshot-root.svg" width="200" height="335" alt="The previous diagram, but highlights the area that's the 'snapshot root', which includes everything except the top status bar and the bottom bar with the OS back button">
377377
<figcaption>
378-
An example of the [=snapshot viewport=] on a mobile OS.
378+
An example of the [=snapshot root=] on a mobile OS.
379379
The snapshot includes the URL bar, as this can be scrolled away.
380380
The keyboard is included as this appears and disappears.
381-
The top and bottom bars are part of the OS rather than the browser, so they're not included in the snapshot viewport.
381+
The top and bottom bars are part of the OS rather than the browser, so they're not included in the snapshot root.
382382
</figcaption>
383383
</figure>
384384

385385
<figure>
386386
<img src="diagrams/desktop-browser.svg" width="132" height="79" alt="A diagram of a desktop browser window, including a tab bar, a URL bar, and a web-content area featuring both horizontal and vertical scrollbars" style="height:auto; width: 600px">
387-
<img src="diagrams/desktop-browser-snapshot-viewport.svg" width="132" height="79" alt="The previous diagram, but highlights the area that's the 'snapshot' viewport, which includes the web content area and the scrollbars" style="height:auto; width: 600px">
387+
<img src="diagrams/desktop-browser-snapshot-root.svg" width="132" height="79" alt="The previous diagram, but highlights the area that's the 'snapshot root', which includes the web content area and the scrollbars" style="height:auto; width: 600px">
388388
<figcaption>
389-
An example of the [=snapshot viewport=] on a desktop OS.
389+
An example of the [=snapshot root=] on a desktop OS.
390390
This includes the scrollbars, but does not include the URL bar, as web content never appears in that area.
391391
</figcaption>
392392
</figure>
393393

394394
This means the snapshot canvas size is likely to be consistent for the [=document element=]'s [=captured element/old image=] and [=captured element/new element=].
395395

396-
The <dfn>snapshot viewport origin</dfn> refers to the start of the block and inline axes of the [=snapshot viewport=].
396+
The <dfn>snapshot root origin</dfn> refers to the top-left corner of the [=snapshot root=].
397397

398-
The <dfn>snapshot viewport size</dfn> refers to the width and height of the [=snapshot viewport=] as a [=/tuple=] of two numbers.
398+
The <dfn>snapshot root size</dfn> refers to the width and height of the [=snapshot root=] as a [=/tuple=] of two numbers.
399399

400400
## The [=view-transition layer=] stacking layer ## {#view-transition-stacking-layer}
401401

@@ -493,7 +493,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
493493
When this is true, [=this=]'s [=active DOM transition=]'s [=ViewTransition/transition root pseudo-element=] renders as a child of [=this=]'s [=document element=],
494494
and [=this=]'s [=document element=] is its [=originating element=].
495495

496-
Note: The position of the [=ViewTransition/transition root pseudo-element=] within the [=document element=] does not matter, as the [=ViewTransition/transition root pseudo-element=]'s [=containing block=] is the [=snapshot viewport=].
496+
Note: The position of the [=ViewTransition/transition root pseudo-element=] within the [=document element=] does not matter, as the [=ViewTransition/transition root pseudo-element=]'s [=containing block=] is the [=snapshot root=].
497497
</dl>
498498

499499
# API # {#api}
@@ -642,11 +642,11 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
642642
:: a ''::view-transition''.
643643
Initially a new ''::view-transition''.
644644

645-
: <dfn>initial snapshot viewport size</dfn>
645+
: <dfn>initial snapshot root size</dfn>
646646
:: a [=tuple=] of two numbers (width and height), or null.
647647
Initially null.
648648

649-
Note: This is used to detect changes in the [=snapshot viewport size=],
649+
Note: This is used to detect changes in the [=snapshot root size=],
650650
which causes the transition to [=skip the view transition|skip=].
651651
[Discussion of this behavior](https://github.com/w3c/csswg-drafts/issues/8045).
652652
</dl>
@@ -725,7 +725,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
725725

726726
1. Let |document| be |transition|'s [=relevant global object's=] [=associated document=].
727727

728-
1. Set |transition|'s [=ViewTransition/initial snapshot viewport size=] to the [=snapshot viewport size=].
728+
1. Set |transition|'s [=ViewTransition/initial snapshot root size=] to the [=snapshot root size=].
729729

730730
1. [=list/For each=] |element| of every {{Element}} and [=pseudo-element=] connected to |document|,
731731
in [paint order](https://drafts.csswg.org/css2/#painting-order):
@@ -762,13 +762,13 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
762762
1. Set |capture|'s [=captured element/old styles=] to the following:
763763

764764
: 'transform'
765-
:: A CSS transform that would place |element|
766-
from the [=snapshot viewport origin=] to its current quad.
765+
:: A transform that would map |element|'s [=border box=] from
766+
the [=snapshot root origin=] to its current visual position.
767767
:: This value is identity for the [=document element=].
768768

769769
: 'width'
770770
: 'height'
771-
:: The size of the [=snapshot viewport=] if |element| is the [=document element=],
771+
:: The size of the [=snapshot root=] if |element| is the [=document element=],
772772
otherwise, the width and height of |element|'s border box.
773773

774774
: 'object-view-box'
@@ -820,7 +820,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
820820

821821
Note: This happens if |transition| was [=skip the view transition|skipped=] before this point.
822822

823-
1. If |transition|'s [=ViewTransition/initial snapshot viewport size=] is not equal to the [=snapshot viewport size=],
823+
1. If |transition|'s [=ViewTransition/initial snapshot root size=] is not equal to the [=snapshot root size=],
824824
then [=skip the view transition=] for |transition|, and return.
825825

826826
1. Set [=document/transition suppressing rendering=] to false.
@@ -923,8 +923,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
923923

924924
1. If |element| is the [=document element=], then:
925925

926-
1. Render the region of the |element| and the [=top layer=] that intersects the [=snapshot viewport=],
927-
on a transparent canvas the size of the [=snapshot viewport=],
926+
1. Render the region of the |element| and the [=top layer=] that intersects the [=snapshot root=],
927+
on a transparent canvas the size of the [=snapshot root=],
928928
following the [=capture rendering characteristics=], and these additional characteristics:
929929

930930
- Areas outside |element|'s [=scrolling box=] should be rendered as if they were scrolled to, without moving or resizing the [=layout viewport=].
@@ -954,7 +954,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
954954
</figure>
955955

956956
1. Return the canvas as an image.
957-
The natural size of the image is equal to the [=snapshot viewport=].
957+
The natural size of the image is equal to the [=snapshot root=].
958958

959959
1. Otherwise:
960960

@@ -1029,7 +1029,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
10291029

10301030
1. Return.
10311031

1032-
1. If |transition|'s [=ViewTransition/initial snapshot viewport size=] is not equal to the [=snapshot viewport size=],
1032+
1. If |transition|'s [=ViewTransition/initial snapshot root size=] is not equal to the [=snapshot root size=],
10331033
then [=skip the view transition=] for |transition|, and return.
10341034

10351035
1. [=Update pseudo-element styles=] for |transition|.
@@ -1210,7 +1210,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
12101210

12111211
1. Set |height| to the current height of |capturedElement|'s [=new element=]'s [=border box=].
12121212

1213-
1. Set |transform| to a transform that maps the |capturedElement|'s [=new element=]'s [=border box=] from document origin to its quad from the [=snapshot viewport origin=].
1213+
1. Set |transform| to a transform that would map |capturedElement|'s [=new element=]'s [=border box=] from the [=snapshot root origin=] to its current visual position.
12141214

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

css-view-transitions-1/diagram-source/desktop-browser-snapshot-viewport-original.svg

Lines changed: 1 addition & 1 deletion
Loading

css-view-transitions-1/diagram-source/phone-browser-snapshot-viewport-original.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)