Skip to content
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

Add "same origin with its ancestors" #10559

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -96471,11 +96471,6 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<li><p>Return <var>navigables</var>.</p></li>
</ol>

<p class="note">These descendant-collecting algorithms are described as looking at the DOM tree
of descendant <code>Document</code> objects. In reality, this is often not feasible since the DOM
tree can be in another process from the caller of the algorithm. Instead, implementations
generally replicate the appropriate trees across processes.</p>

<p id="document-tree-child-browsing-context">The <dfn>document-tree child navigables</dfn> of a
<code>Document</code> <var>document</var> are given by these steps:</p>

Expand Down Expand Up @@ -96505,6 +96500,35 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<li><p>Return <var>navigables</var>.</p></li>
</ol>

<p class="note">These descendant-collecting algorithms are described as looking at the DOM tree
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node tree throughout?

of descendant <code>Document</code> objects. In reality, this is often not feasible since the DOM
tree can be in another process from the caller of the algorithm. Instead, implementations
generally replicate the appropriate trees across processes.</p>

<p>A <code>Document</code> <var>document</var> is <dfn export>same origin with its
ancestors</dfn> if the following algorithm returns true:</p>

<ol>
<li><p>Let <var>origin</var> be <var>document</var>'s <span
data-x="concept-document-origin">origin</span>.</p></li>

<li>
<p><span data-x="list iterate">For each</span> <var>ancestorNavigable</var> of
<var>document</var>'s <span>ancestor navigables</span>:</p>

<ol>
<li><p>Let <var>ancestorOrigin</var> be <var>ancestorNavigable</var>'s <span
data-x="nav-document">document</span>'s <span
data-x="concept-document-origin">origin</span>.</p></li>

<li><p>If <var>ancestorOrigin</var> is not <span>same origin</span> with <var>origin</var>,
then return false.</p></li>
</ol>
</li>

<li><p>Return true.</p></li>
</ol>


<h5 id="garbage-collection-and-browsing-contexts">Navigable destruction</h5>

Expand Down