@@ -40,7 +40,7 @@ spec:html
40
40
text: was created via cross-origin redirects; type: dfn;
41
41
text: run the animation frame callbacks; type: dfn;
42
42
text: unload; type: dfn;
43
- text: update the rendering ; type: dfn;
43
+ text: pagereveal ; type: dfn; for: Window ;
44
44
spec:infra; type:dfn; text:list
45
45
</pre>
46
46
@@ -265,7 +265,7 @@ document.startViewTransition({update: updateTheDOMSomehow});
265
265
266
266
The ''@view-transition'' rule is used by a document to indicate that cross-document navigations
267
267
should setup and activate a {{ViewTransition}} . To take effect, it must be present in the old document
268
- when unloading, and in the new document when it is [=reveal=] .
268
+ when unloading, and in the new document when the [=Window/pagereveal=] is fired .
269
269
270
270
271
271
## @view-transition rule grammar ## {#view-transition-grammar}
@@ -316,23 +316,6 @@ Note: as per default behavior, the ''@view-transition'' rule can be nested insid
316
316
317
317
# API # {#api}
318
318
319
- ## The <dfn interface>PageRevealEvent</dfn> ## {#ready-to-render-event}
320
-
321
- Note: this should go in the HTML spec. See [Issue 9315] (https://github.com/whatwg/html/issues/9315).
322
-
323
- <xmp class=idl>
324
- [Exposed=Window]
325
- interface PageRevealEvent : Event {
326
- readonly attribute ViewTransition? viewTransition;
327
- };
328
- </xmp>
329
-
330
- A {{PageRevealEvent}} has a null-or-{{ViewTransition}} <dfn for=PageRevealEvent>view transition</dfn> , initially null.
331
-
332
- Note: this event is fired when the document is [=reveal=] .
333
-
334
- The <dfn attribute for=RevealEvent>viewTransition</dfn> [=getter steps=] are to return [=this=] 's [=PageRevealEvent/view transition=] .
335
-
336
319
## Additions to {{Document}} ## {#additions-to-document-api}
337
320
338
321
<xmp class=idl>
@@ -390,14 +373,6 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
390
373
# Algorithms # {#algorithms}
391
374
## Data Structures ## {#concepts}
392
375
393
- ### Additions to {{Document}} ### {#additions-to-document}
394
-
395
- A {{Document}} additionally has:
396
-
397
- <dl dfn-for=document>
398
- : <dfn>pagereveal fired</dfn>
399
- :: a boolean, initially false.
400
-
401
376
### Additions to {{ViewTransition}} ### {#view-transitions-extension}
402
377
403
378
A {{ViewTransition}} additionally has:
@@ -422,35 +397,10 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
422
397
Note: This would wait until a transition is captured or skipped before proceeding to unloading the old document and activating the new one.
423
398
</div>
424
399
425
- <div algorithm="monkey patch to rendering">
426
- Run the following step in [=update the rendering|updating the renedering=] , before [=running the animation frame callbacks=] :
427
-
428
- 1. For each [=fully active=] {{Document}} |doc| in |docs|, run the [=reveal=] steps for |doc|.
429
- </div>
430
-
431
- <div algorithm="monkey patch to reactivation">
432
- Run the following step at the end of [=Document/reactivate=] :
433
-
434
- 1. Set |document|'s [=pagereveal fired=] to false.
435
- </div>
436
-
437
- <div algorithm="page reveal">
438
- To <dfn>reveal</dfn> {{Document}} |document|:
439
- 1. If |document|'s [=document/page pagereveal fired=] is true, then return.
440
-
441
- 1. Let |transition| be the result of [=resolving cross-document view-transition=] for |document|.
442
-
443
- 1. [=Fire an event=] named <code> pagereveal</code> at |document|'s [=relevant global object=] ,
444
- using {{PageRevealEvent}} , with [=PageRevealEvent/view transition=] initialized to |transition|.
445
-
446
- 1. If |transition| is not null, then [=activate view transition/activate=] |transition|.
447
-
448
- 1. Set |document|'s [=document/page pagereveal fired=] to true.
449
- </div>
450
400
451
401
## Setting up and activating the cross-document view transition ## {#setting-up-and-activating-the-cross-document-view-transition}
452
402
453
- ### Resolving the ''@view-transition'' ' rule
403
+ ### Resolving the ''@view-transition'' ' rule ### {#resolve-view-transition-rule-algo}
454
404
455
405
<div algorithm>
456
406
To get the <dfn>resolve @view-transition rule</dfn> for a {{Document}} |document|:
@@ -465,12 +415,12 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
465
415
466
416
1. Let |typesDescriptor| be |matchingRule|'s [=@view-transition/type=] descriptor.
467
417
468
- 1. If |typesDescriptor|'s [=computed value=] is ''@view-transition/type/none' ', then return an [=empty list=] .
418
+ 1. If |typesDescriptor|'s [=computed value=] is ''@view-transition/type/none' ', then return a [=/ list=] « » .
469
419
470
420
1. Return a [=list=] of strings corresponding to |typesDescriptor|'s [=computed value=] .
471
421
</div>
472
422
473
- ### Setting up the view-transition in the old {{Document}}
423
+ ### Setting up the view-transition in the old {{Document}} ### {#setup-old-document-vt}
474
424
475
425
<div algorithm>
476
426
To <dfn export>setup cross-document view-transition</dfn> given a {{Document}} |oldDocument|,
@@ -495,7 +445,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
495
445
1. If |resolvedRule| is "<code> skip transition</code> ", then call |onReady| and return.
496
446
497
447
Note: We don't know yet if |newDocument| has opted in, as it might not be parsed yet.
498
- We check the opt-in for |newDocument| when it is [=reveal=] .
448
+ We check the opt-in for |newDocument| when we fire the [=Window/pagereveal=] event .
499
449
500
450
1. If |oldDocument|'s [=active view transition=] is not null,
501
451
then [=skip the view transition|skip=] |oldDocument|'s [=active view transition=]
@@ -550,13 +500,13 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
550
500
Note: The process continues in [=setup view transition=] , via [=perform pending transition operations=] .
551
501
552
502
1. The user agent should display the currently displayed frame until either:
553
- * |newDocument| is [=revealed=]
503
+ * The [=Window/pagereveal=] event is fired.
554
504
* its [=active view transition=] 's [=ViewTransition/phase=] is "`done`".
555
505
556
506
Note: this is to ensure that there are no unintended flashes between displaying the old and new state, to keep the transition smooth.
557
507
</div>
558
508
559
- ### Accessing the view-transition in the new {{Document}}
509
+ ### Accessing the view-transition in the new {{Document}} ### {#access-view-transition-in-new-doc}
560
510
561
511
<div algorithm>
562
512
To <dfn export>resolve cross-document view-transition</dfn> for {{Document}} |document|:
@@ -567,7 +517,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
567
517
then return null.
568
518
569
519
Note: |transition|'s [=ViewTransition/is inbound cross-document transition=] would be false if a same-document
570
- transition was started before the page was [=reveal=] .
520
+ transition was started before the [=Window/pagereveal=] event was fired .
571
521
572
522
1. [=Resolve @view-transition rule=] for |document| and let |resolvedRule| be the result.
573
523
0 commit comments