Skip to content

Commit

Permalink
Fix warnings and broken refs (#9725)
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr authored Dec 19, 2023
1 parent 3ffefcc commit 5069172
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions css-view-transitions-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
1. Once it's time to [=unload=] the old document, if the navigation is [=same origin=]
and the old {{Document}} has opted in to cross-document view-transitions, the old state is captured.

1. An event named {{PageRevealEvent|reveal}} is fired on the new {{Document}}, with a `viewTransition` property,
1. An event named {{Window/pagereveal}} is fired on the new {{Document}}, with a `viewTransition` property,
which is a {{ViewTransition}} object. This {{ViewTransition}}'s <code>{{ViewTransition/updateCallbackDone}}</code> is already resolved,
and its [=captured elements=] are populated from the old {{Document}}.

Expand Down Expand Up @@ -153,7 +153,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;

- Opt-in to navigation-triggered view-transitions in both pages.
- Pass the click location to the new document, e.g. via {{WindowSessionStorage/sessionStorage}}.
- Intercept the {{ViewTransition}} object in the new document, using the {{PageRevealEvent}}.
- Intercept the {{ViewTransition}} object in the new document, using the {{Window/pagereveal}} event.

In both pages:
```css
Expand Down Expand Up @@ -265,7 +265,7 @@ document.startViewTransition({update: updateTheDOMSomehow});

The ''@view-transition'' rule is used by a document to indicate that cross-document navigations
should setup and activate a {{ViewTransition}}. To take effect, it must be present in the old document
when unloading, and in the new document when the [=Window/pagereveal=] is fired.
when unloading, and in the new document when the {{Window/pagereveal}} is fired.


## @view-transition rule grammar ## {#view-transition-grammar}
Expand Down Expand Up @@ -392,6 +392,8 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
Prepend a step at the beginning of the task [=queue a global task|queued=] on |navigable|'s [=active window=]
when <a href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#apply-the-history-step">applying the history step</a> (14.11.1, <a href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#updating-the-traversable:queue-a-global-task-3">here</a>):

This monkey-patch step assumes a boolean |changingNavigationContinuation|, a [=/navigable=] |navigable|, a {{Document}} |oldDocument|, a {{Document}} |newDocument|, and a {{NavigationType}} |navigationType|.

If |changingNavigationContinuation| update-only is false, then [=setup cross-document view-transition=] given |oldDocument|, |newDocument|, |navigationType|, and the remaining steps and return from these steps.

Note: This would wait until a transition is captured or skipped before proceeding to unloading the old document and activating the new one.
Expand Down Expand Up @@ -445,7 +447,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
1. If |resolvedRule| is "<code>skip transition</code>", then call |onReady| and return.

Note: We don't know yet if |newDocument| has opted in, as it might not be parsed yet.
We check the opt-in for |newDocument| when we fire the [=Window/pagereveal=] event.
We check the opt-in for |newDocument| when we fire the {{Window/pagereveal}} event.

1. If |oldDocument|'s [=active view transition=] is not null,
then [=skip the view transition|skip=] |oldDocument|'s [=active view transition=]
Expand Down Expand Up @@ -500,7 +502,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
Note: The process continues in [=setup view transition=], via [=perform pending transition operations=].

1. The user agent should display the currently displayed frame until either:
* The [=Window/pagereveal=] event is fired.
* The {{Window/pagereveal}} event is fired.
* its [=active view transition=]'s [=ViewTransition/phase=] is "`done`".

Note: this is to ensure that there are no unintended flashes between displaying the old and new state, to keep the transition smooth.
Expand All @@ -517,7 +519,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
then return null.

Note: |transition|'s [=ViewTransition/is inbound cross-document transition=] would be false if a same-document
transition was started before the [=Window/pagereveal=] event was fired.
transition was started before the {{Window/pagereveal}} event was fired.

1. [=Resolve @view-transition rule=] for |document| and let |resolvedRule| be the result.

Expand Down

0 comments on commit 5069172

Please sign in to comment.