You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[css-view-transitions-2] Apply resolutions from F2F (w3c#9090)
* [css-view-transitions-2] Apply feedback from F2F
- Disable view-transitions for reload
- Add wording in security about 3p CSS
- Fire reveal event before rAF, inside update the rendering
Closesw3c#8784Closesw3c#8889
See w3c#8048
* Remove reload thing in the meantime
text: was created via cross-origin redirects; type: dfn;
41
+
text: run the animation frame callbacks; type: dfn;
40
42
text: unload; type: dfn;
41
-
text: render-blocked; type: dfn;
42
-
text: unblock rendering; type: dfn;
43
-
text: page showing; type: dfn;
43
+
text: update the rendering; type: dfn;
44
44
</pre>
45
45
46
46
<pre class=anchors>
@@ -267,8 +267,17 @@ The <dfn attribute for=PageRevealEvent>viewTransition</dfn> [=getter steps=] are
267
267
268
268
269
269
# Algorithms # {#algorithms}
270
+
## Data Structures ## {#concepts}
270
271
271
-
## Additions to {{ViewTransition}} ## {#view-transitions-extension}
272
+
### Additions to {{Document}} ### {#additions-to-document}
273
+
274
+
A {{Document}} additionally has:
275
+
276
+
<dl dfn-for=document>
277
+
: <dfn>is revealed</dfn>
278
+
:: a boolean, initially false.
279
+
280
+
### Additions to {{ViewTransition}} ## {#view-transitions-extension}
272
281
273
282
A {{ViewTransition}} additionally has:
274
283
<dl dfn-for=ViewTransition>
@@ -287,32 +296,21 @@ The <dfn attribute for=PageRevealEvent>viewTransition</dfn> [=getter steps=] are
287
296
Note: This would wait until a transition is captured or skipped before proceeding to unloading the old document and activating the new one.
288
297
</div>
289
298
290
-
<div algorithm="monkey patch to render blocking">
291
-
Run the following step at the end of [=unblock rendering=]:
292
-
293
-
1. [=reveal document|reveal=] |document|.
294
-
295
-
Issue: Reword the text in the [=render-blocked=] definition, to call [=reveal document=] |document| if the [=implementation-defined=] timeout value has been exceeded.
296
-
</div>
297
-
298
-
<div algorithm="monkey patch to script processing model">
299
-
In the <a href="https://html.spec.whatwg.org/#script-processing-model">Script processing model</a> section,
300
-
move <a href="https://html.spec.whatwg.org/#script-processing-model:unblock-rendering">unblock rendering</a> step to the end.
299
+
<div algorithm="monkey patch to rendering">
300
+
Run the following step in [=update the rendering|updating the renedering=], before [=running the animation frame callbacks=]:
301
301
302
-
Note: this ensures that the [=reveal document=]steps are called after firing script `load` or `error` events.
302
+
1. For each [=fully active=]{{Document}} |doc| in |docs|, [=reveal document|reveal=] |doc|.
303
303
</div>
304
304
305
305
<div algorithm="monkey patch to reactivation">
306
-
Run the following step in [=Document/reactivate=], before step 4 (querying for [=page showing=]):
306
+
Run the following step at the end of [=Document/reactivate=]:
307
307
308
-
1. [=Reveal document|reveal=] |document|.
308
+
1. Set |document|'s [=is revealed=] to false.
309
309
</div>
310
310
311
311
<div algorithm="page reveal">
312
312
To <dfn>reveal {{Document}}</dfn> |document|:
313
-
1. Assert: |document|'s [=page showing=] is false.
314
-
315
-
1. If |document| is [=render-blocked=], then return.
313
+
1. If |document|'s [=document/is revealed=] is true, then return.
316
314
317
315
1. Let |transition| be the result of getting the [=inbound cross-document view-transition=] for |document|.
318
316
@@ -322,6 +320,8 @@ The <dfn attribute for=PageRevealEvent>viewTransition</dfn> [=getter steps=] are
322
320
using {{PageRevealEvent}}.
323
321
324
322
1. If |transition| is not null, then [=activate view transition|activate=] |transition|.
323
+
324
+
1. Set |document|'s [=document/is revealed=] to true.
325
325
</div>
326
326
327
327
## Setting up and activating the cross-document view transition ## {#setting-up-and-activating-the-cross-document-view-transition}
@@ -416,7 +416,7 @@ To prevent cross-origin issues, at this point cross-document view transitions ca
416
416
same-origin navigations. As discussed in <a href="https://github.com/WICG/view-transitions/issues/200">WICG/view-transitions#200</a>,
417
417
this still presents two potential threats:
418
418
419
-
1. The <a data-xref-type="http-header">Cross-Origin-Opener-Policy</a> of both documents might be different.
419
+
1. The [=environment settings object/cross-origin isolated capability=] in both documents might be different.
420
420
This can cause a situation where a {{Document}} that is [=environment settings object/cross-origin isolated capability|cross-origin isolated=]
421
421
can read image data from a document that is not cross-origin isolated. This is already mitigated in [[css-view-transitions-1#sec],
422
422
as the same restriction applies for captured cross-origin iframes.
@@ -433,6 +433,11 @@ this still presents two potential threats:
433
433
Note: this only applies to server-side redirects. A client-side redirect, e.g. using
434
434
[^meta/http-equiv/refresh^], is equivalent to a new navigation.
435
435
436
+
1. This feature exposes more information to CSS, as so far CSS was not aware of anything navigation-related.
437
+
This can raise concerns around safety 3rd-party CSS. However, as a general rule, 3rd-party stylesheets should come
438
+
from trusted sources to begin with, as CSS can learn about the document or change it in many ways.
439
+
440
+
436
441
See <a href="https://github.com/w3c/csswg-drafts/issues/8684">Issue #8684</a> and
437
442
<a href="https://github.com/WICG/view-transitions/issues/200">WICG/view-transitions#200</a> for
0 commit comments