-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Move has cross-site ancestor to the environment, from the ESO
#11540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
a0cdf7c
dcb9bd4
57be3c4
ed33f02
abeb411
192ccbe
f07cc3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -92621,8 +92621,8 @@ interface <dfn interface>BarProp</dfn> { | |||||
| <p>To <dfn>set up a window environment settings object</dfn>, given a <span>URL</span> | ||||||
| <var>creationURL</var>, a <span>JavaScript execution context</span> <var>execution context</var>, | ||||||
| null or an <span>environment</span> <var>reservedEnvironment</var>, a <span>URL</span> | ||||||
| <var>topLevelCreationURL</var>, and an <span>origin</span> <var>topLevelOrigin</var>, run these | ||||||
| steps:</p> | ||||||
| <var>topLevelCreationURL</var>, an <span>origin</span> <var>topLevelOrigin</var>, and a | ||||||
| boolean <var>hasCrossSiteAncestor</var>:</p> | ||||||
|
|
||||||
| <ol> | ||||||
| <li><p>Let <var>realm</var> be the value of <var>execution context</var>'s Realm | ||||||
|
|
@@ -92660,30 +92660,6 @@ interface <dfn interface>BarProp</dfn> { | |||||
| <span data-x="concept-document-window">associated <code>Document</code></span>.</p> | ||||||
| </dd> | ||||||
|
|
||||||
| <dt>The <span data-x="concept-settings-object-has-cross-site-ancestor">has cross-site | ||||||
| ancestor</span></dt> | ||||||
| <dd> | ||||||
| <ol> | ||||||
| <li><p>If <var>window</var>'s <span>navigable</span>'s <span | ||||||
| data-x="nav-parent">parent</span> is null, then return false.</p></li> | ||||||
|
|
||||||
| <li><p>Let <var>parentDocument</var> be <var>window</var>'s <span>navigable</span>'s <span | ||||||
| data-x="nav-parent">parent</span>'s <span data-x="nav-document">active | ||||||
| document</span>.</p></li> | ||||||
|
|
||||||
| <li><p>If <var>parentDocument</var>'s <span>relevant settings object</span>'s <span | ||||||
| data-x="concept-settings-object-has-cross-site-ancestor">has cross-site ancestor</span> is | ||||||
| true, then return true.</p></li> | ||||||
|
|
||||||
| <li><p>If <var>parentDocument</var>'s <span data-x="concept-document-origin">origin</span> | ||||||
| is not <span>same site</span> with <var>window</var>'s <span | ||||||
| data-x="concept-document-window">associated <code>Document</code></span>'s <span | ||||||
| data-x="concept-document-origin">origin</span>, then return true.</p></li> | ||||||
|
|
||||||
| <li><p>Return false.</p></li> | ||||||
| </ol> | ||||||
| </dd> | ||||||
|
|
||||||
| <dt>The <span data-x="concept-settings-object-policy-container">policy container</span></dt> | ||||||
| <dd> | ||||||
| <p>Return the <span data-x="concept-document-policy-container">policy container</span> of | ||||||
|
|
@@ -92748,8 +92724,10 @@ interface <dfn interface>BarProp</dfn> { | |||||
|
|
||||||
| <li><p>Set <var>settings object</var>'s <span data-x="concept-environment-creation-url">creation | ||||||
| URL</span> to <var>creationURL</var>, <var>settings object</var>'s <span>top-level creation | ||||||
| URL</span> to <var>topLevelCreationURL</var>, and <var>settings object</var>'s <span>top-level | ||||||
| origin</span> to <var>topLevelOrigin</var>.</p></li> | ||||||
| URL</span> to <var>topLevelCreationURL</var>, <var>settings object</var>'s <span>top-level | ||||||
| origin</span> to <var>topLevelOrigin</var>, and <var>settings object</var>'s <span | ||||||
| data-x="concept-environment-cross-site-ancestor">has cross-site ancestor</span> to | ||||||
| <var>hasCrossSiteAncestor</var>.</p></li> | ||||||
|
|
||||||
| <li><p>Set <var>realm</var>'s [[HostDefined]] field to <var>settings object</var>.</p></li> | ||||||
| </ol> | ||||||
|
|
@@ -100111,9 +100089,25 @@ interface <dfn interface>NotRestoredReasons</dfn> { | |||||
| otherwise <var>embedder</var>'s <span>relevant settings object</span>'s <span>top-level | ||||||
| origin</span>.</p></li> | ||||||
|
|
||||||
| <li><p>Let <var>hasCrossSiteAncestor</var> be false.</p></li> | ||||||
|
|
||||||
| <li> | ||||||
| <p>If <var>embedder</var> is not null:</p> | ||||||
|
|
||||||
| <ol> | ||||||
| <li><p>If <var>origin</var> is <span>same site</span> with <var>embedder</var>'s | ||||||
| <span>relevant settings object</span>'s <span | ||||||
| data-x="concept-settings-object-origin">origin</span>, then set <var>hasCrossSiteAncestor</var> | ||||||
| to <var>embedder</var>'s <span>relevant settings object</span>'s <span | ||||||
| data-x="concept-environment-cross-site-ancestor">has cross-site ancestor</span>.</p></li> | ||||||
|
|
||||||
| <li><p>Otherwise, set <var>hasCrossSiteAncestor</var> to true.</p></li> | ||||||
| </ol> | ||||||
| </li> | ||||||
|
|
||||||
| <li><p><span>Set up a window environment settings object</span> with <code>about:blank</code>, | ||||||
| <var>realm execution context</var>, null, <var>topLevelCreationURL</var>, and | ||||||
| <var>topLevelOrigin</var>.</p></li> | ||||||
| <var>realm execution context</var>, null, <var>topLevelCreationURL</var>, | ||||||
| <var>topLevelOrigin</var>, and <var>hasCrossSiteAncestor</var>.</p></li> | ||||||
|
|
||||||
| <li><p>Let <var>loadTimingInfo</var> be a new <span>document load timing info</span> with | ||||||
| its <span>navigation start time</span> set to the result of calling <span>coarsen time</span> | ||||||
|
|
@@ -104209,6 +104203,8 @@ location.href = '#foo';</code></pre> | |||||
|
|
||||||
| <li><p>Let <var>topLevelOrigin</var> be null.</p></li> | ||||||
|
|
||||||
| <li><p>Let <var>hasCrossSiteAncestor</var> be false.</p></li> | ||||||
|
|
||||||
| <li> | ||||||
| <p>If <var>navigable</var> is not a <span>top-level traversable</span>, then:</p> | ||||||
|
|
||||||
|
|
@@ -104222,6 +104218,14 @@ location.href = '#foo';</code></pre> | |||||
|
|
||||||
| <li><p>Set <var>topLevelOrigin</var> to <var>parentEnvironment</var>'s <span>top-level | ||||||
| origin</span>.</p></li> | ||||||
|
|
||||||
| <li><p>If <var>parentEnvironment</var>'s <span | ||||||
| data-x="concept-settings-object-origin">origin</span> is <span>same site</span> with | ||||||
| <var>currentURL</var>'s <span data-x="concept-url-origin">origin</span>, then set | ||||||
|
||||||
| <var>hasCrossSiteAncestor</var> to <var>parentEnvironment</var>'s <span | ||||||
| data-x="concept-environment-cross-site-ancestor">has cross-site ancestor</span>.</p></li> | ||||||
|
|
||||||
| <li><p>Otherwise, set <var>hasCrossSiteAncestor</var> to true.</p></li> | ||||||
| </ol> | ||||||
| </li> | ||||||
|
|
||||||
|
|
@@ -104232,8 +104236,10 @@ location.href = '#foo';</code></pre> | |||||
| data-x="concept-environment-target-browsing-context">target browsing context</span> is | ||||||
| <var>navigable</var>'s <span data-x="nav-bc">active browsing context</span>, <span | ||||||
| data-x="concept-environment-creation-url">creation URL</span> is <var>currentURL</var>, | ||||||
| <span>top-level creation URL</span> is <var>topLevelCreationURL</var>, and <span>top-level | ||||||
| origin</span> is <var>topLevelOrigin</var>.</p> | ||||||
| <span>top-level creation URL</span> is <var>topLevelCreationURL</var>, <span>top-level | ||||||
| origin</span> is <var>topLevelOrigin</var>, and <span | ||||||
| data-x="concept-environment-cross-site-ancestor">has cross-site ancestor</span> is | ||||||
| <var>hasCrossSiteAncestor</var>.</p> | ||||||
|
|
||||||
| <p class="note">The created environment's <span | ||||||
| data-x="concept-environment-active-service-worker">active service worker</span> is set in | ||||||
|
|
@@ -106737,6 +106743,8 @@ location.href = '#foo';</code></pre> | |||||
| <li><p>Let <var>topLevelOrigin</var> be <var>navigationParams</var>'s <span | ||||||
| data-x="navigation-params-origin">origin</span>.</p></li> | ||||||
|
|
||||||
| <li><p>Let <var>hasCrossSiteAncestor</var> be false.</p></li> | ||||||
|
|
||||||
| <li> | ||||||
| <p>If <var>navigable</var>'s <span data-x="nav-container">container</span> is not null, | ||||||
| then:</p> | ||||||
|
|
@@ -106750,13 +106758,22 @@ location.href = '#foo';</code></pre> | |||||
|
|
||||||
| <li><p>Set <var>topLevelOrigin</var> to <var>parentEnvironment</var>'s <span>top-level | ||||||
| origin</span>.</p></li> | ||||||
|
|
||||||
| <li><p>If <var>navigationParams</var>'s <span | ||||||
| data-x="navigation-params-request">origin</span> is <span>same site</span> with | ||||||
|
||||||
| <var>parentEnvironment</var>'s <span data-x="concept-settings-object-origin">origin</span>, | ||||||
| then set <var>hasCrossSiteAncestor</var> to <var>parentEnvironment</var>'s <span | ||||||
| data-x="concept-environment-cross-site-ancestor">has cross-site ancestor</span>.</p></li> | ||||||
|
|
||||||
| <li><p>Otherwise, set <var>hasCrossSiteAncestor</var> to true</p></li> | ||||||
| </ol> | ||||||
| </li> | ||||||
|
|
||||||
| <li><p><span>Set up a window environment settings object</span> with <var>creationURL</var>, | ||||||
| <var>realmExecutionContext</var>, <var>navigationParams</var>'s <span | ||||||
| data-x="navigation-params-reserved-environment">reserved environment</span>, | ||||||
| <var>topLevelCreationURL</var>, and <var>topLevelOrigin</var>.</p></li> | ||||||
| <var>topLevelCreationURL</var>, <var>topLevelOrigin</var>, and | ||||||
| <var>hasCrossSiteAncestor</var>.</p></li> | ||||||
| </ol> | ||||||
|
|
||||||
| <p class="note">This is the usual case, where the new <code>Document</code> we're about to | ||||||
|
|
@@ -108624,6 +108641,16 @@ new PaymentRequest(…); // Allowed to use | |||||
| involved.</p> | ||||||
| </dd> | ||||||
bvandersloot-mozilla marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| <dt>A <dfn data-x="concept-environment-cross-site-ancestor" export for="environment">has | ||||||
| cross-site ancestor</dfn></dt> | ||||||
| <dd><p>A boolean. For window <span data-x="environment settings object">environment settings | ||||||
| objects</span> this will be set to true if an ancestor frame has an <span | ||||||
| data-x="concept-settings-object-origin">origin</span> that is not <span>same site</span> | ||||||
| with the current window's <span data-x="concept-settings-object-origin">origin</span> and | ||||||
| otherwise false. For workers and worklets it is set to the <span | ||||||
| data-x="concept-environment-cross-site-ancestor">has cross-site ancestor</span> of its | ||||||
| creator.</p></dd> | ||||||
|
||||||
|
|
||||||
|
||||||
| creator, but we don't gave a definition for they yet due to a circular dependencey.</p></dd> | |
| creator, but we don't have a definition for that yet due to a circular dependency.</p></dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the circular dependency? What is the issue here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, we wanted to store this value with the worker on its creation. But reading this back, I think we can just let it be implementation defined for now, as top-level origin is. Thoughts?
Uh oh!
There was an error while loading. Please reload this page.