Skip to content

Commit

Permalink
Add "same origin with its ancestors"
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Aug 15, 2024
1 parent cb09f8c commit b8f313f
Showing 1 changed file with 29 additions and 5 deletions.
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
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

0 comments on commit b8f313f

Please sign in to comment.