Skip to content

Commit aa08a5b

Browse files
noamrkhushalsagar
andauthored
[css-view-transitions-2] Define the navigation: auto descriptor (w3c#9780)
* [css-view-transitions-2] Define the descriptor * Update css-view-transitions-2/Overview.bs Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> * Use manual link for uni * Update css-view-transitions-2/Overview.bs Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> * Update css-view-transitions-2/Overview.bs Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com> --------- Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
1 parent d995b34 commit aa08a5b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

css-view-transitions-2/Overview.bs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,13 @@ Note: as per default behavior, the ''@view-transition'' rule can be nested insid
299299

300300
: <dfn>auto</dfn>
301301
:: The transition will be enabled if the navigation is same-origin, without cross-origin
302-
redirects, and is not a {{NavigationType/reload}}.
302+
redirects, and whoes {{NavigationType}} is
303+
* {{NavigationType/traverse}} or
304+
* {{NavigationType/push}} or {{NavigationType/replace}} with <a href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#user-navigation-involvement">user navigation involvement</a> not equal to `"browser UI"`.
305+
306+
Note: Navigations excluded from ''@view-transition/navigation/auto'' are for example, navigating
307+
via the URL address bar or clicking a bookmark, as well as any form of user or script initiated {{NavigationType/reload}}.
308+
303309
</dl>
304310

305311
## The [=@view-transition/type=] descriptor ## {#view-transition-type-descriptor}
@@ -389,12 +395,15 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
389395
## Monkey patches to HTML ## {#monkey-patch-to-html}
390396

391397
<div algorithm="monkey patch to apply the history step">
392-
Prepend a step at the beginning of the task [=queue a global task|queued=] on |navigable|'s [=active window=]
398+
Prepend these steps at the beginning of the task [=queue a global task|queued=] on |navigable|'s [=active window=]
393399
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>):
394400

395-
This monkey-patch step assumes a boolean |changingNavigationContinuation|, a [=/navigable=] |navigable|, a {{Document}} |oldDocument|, a {{Document}} |newDocument|, and a {{NavigationType}} |navigationType|.
401+
This monkey-patch step assumes a boolean |changingNavigationContinuation|, a [=/navigable=] |navigable|, a {{Document}} |oldDocument|, a {{Document}} |newDocument|, a {{NavigationType}} |navigationType|,
402+
and a <a href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#user-navigation-involvement">user navigation involvement</a> |userInvolvementForNavigateEvents|.
396403

397-
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.
404+
1. Let |isBrowserUINavigation| be true if |userInvolvementForNavigateEvents| is `"browser UI"`, otherwise false.
405+
406+
1. If |changingNavigationContinuation| update-only is false, then [=setup cross-document view-transition=] given |oldDocument|, |newDocument|, |navigationType|, |isBrowserUINavigation|, and the remaining steps and return from these steps.
398407

399408
Note: This would wait until a transition is captured or skipped before proceeding to unloading the old document and activating the new one.
400409
</div>
@@ -426,13 +435,15 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
426435

427436
<div algorithm>
428437
To <dfn export>setup cross-document view-transition</dfn> given a {{Document}} |oldDocument|,
429-
a {{Document}} |newDocument|, a {{NavigationType}} |navigationType|, and |onReady|, which is an algorithm accepting nothing:
438+
a {{Document}} |newDocument|, a {{NavigationType}} |navigationType|, a boolean |isBrowserUINavigation|, and |onReady|, which is an algorithm accepting nothing:
430439

431440
1. If the user agent decides to display an [=implementation-defined=] navigation experience, e.g. a gesture-based transition for a back navigation,
432441
the user agent may ignore the author-defined view transition. If that is the case, return.
433442

434443
1. If |navigationType| is {{NavigationType/reload}}, then return.
435444

445+
1. If |isBrowserUINavigation| is true, and |navigationType| is {{NavigationType/push}} or {{NavigationType/replace}}, then return.
446+
436447
1. If |oldDocument|'s [=environment settings object/origin=] is not [=same origin=] as
437448
|newDocument|'s [=environment settings object/origin=] then call |onReady| and return.
438449

0 commit comments

Comments
 (0)