Skip to content

Commit 361b667

Browse files
committed
Carry over sticky activation for same-origin navs and traversals
See discussion in WICG/view-transitions#239 and #11328 (comment).
1 parent 5589e0c commit 361b667

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

source

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80190,8 +80190,8 @@ interface <dfn interface>VisibilityStateEntry</dfn> : <span>PerformanceEntry</sp
8019080190

8019180191
<h4 id="user-activation-data-model">Data model</h4>
8019280192

80193-
<p>For the purpose of tracking user activation, each <code>Window</code> <var>W</var> has two
80194-
relevant values:</p>
80193+
<p>For the purpose of tracking user activation, each <code>Window</code> <var>W</var> has the
80194+
following relevant values:</p>
8019580195

8019680196
<ul>
8019780197
<li><p>A <dfn>last activation timestamp</dfn>, which is either a
@@ -80201,6 +80201,8 @@ interface <dfn interface>VisibilityStateEntry</dfn> : <span>PerformanceEntry</sp
8020180201

8020280202
<li><p>A <dfn>last history-action activation timestamp</dfn>, which is either a
8020380203
<code>DOMHighResTimeStamp</code> or positive infinity, initially positive infinity.</p></li>
80204+
80205+
<li><p>A <dfn>sticky activation override</dfn>, a boolean, initially false.</p></li>
8020480206
</ul>
8020580207

8020680208
<p>A user agent also defines a <dfn>transient activation duration</dfn>, which is a constant
@@ -80217,12 +80219,14 @@ interface <dfn interface>VisibilityStateEntry</dfn> : <span>PerformanceEntry</sp
8021780219
<dt><dfn export>Sticky activation</dfn></dt>
8021880220
<dd>
8021980221
<p>When the <span>current high resolution time</span> given <var>W</var> is greater than or
80220-
equal to the <span>last activation timestamp</span> in <var>W</var>, <var>W</var> is said to
80221-
have <span>sticky activation</span>.</p>
80222+
equal to the <span>last activation timestamp</span> in <var>W</var>, or <var>W</var>'s
80223+
<span>sticky activation override</span> is true, <var>W</var> is said to have <span>sticky
80224+
activation</span>.</p>
8022280225

8022380226
<p>This is <var>W</var>'s historical activation state, indicating whether the user has ever
8022480227
interacted in <var>W</var>. It starts false, then changes to true (and never changes back to
80225-
false) when <var>W</var> gets the very first <span>activation notification</span>.</p>
80228+
false) when <var>W</var> gets the very first <span>activation notification</span>. It is also
80229+
carried over between windows for same-origin navigations and traversals.</p>
8022680230
</dd>
8022780231

8022880232
<dt><dfn export>Transient activation</dfn></dt>
@@ -106369,6 +106373,13 @@ location.href = '#foo';</code></pre>
106369106373
<var>realmExecutionContext</var>, <var>navigationParams</var>'s <span
106370106374
data-x="navigation-params-reserved-environment">reserved environment</span>,
106371106375
<var>topLevelCreationURL</var>, and <var>topLevelOrigin</var>.</p></li>
106376+
106377+
<li><p>If <var>navigable</var>'s <span data-x="nav-window">active window</span> has
106378+
<span>sticky activation</span>, and <var>navigable</var>'s <span data-x="nav-document">active
106379+
document</span>'s <span data-x="concept-document-origin">origin</span> is <span>same
106380+
origin</span> with <var>navigationParams</var>'s <span
106381+
data-x="navigation-params-origin">origin</span>, then set <var>window</var>'s <span>sticky
106382+
activation override</span> to true.</p></li>
106372106383
</ol>
106373106384

106374106385
<p class="note">This is the usual case, where the new <code>Document</code> we're about to

0 commit comments

Comments
 (0)