Skip to content

Commit

Permalink
Adding final step to mask cross-origin
Browse files Browse the repository at this point in the history
rebase

rebase

Fix modal check in dialog closing algorithm

The value for is modal needs to be cached. This was pointed out here:
whatwg#9178 (comment).
  • Loading branch information
rubberyuzu committed Sep 5, 2023
1 parent b875825 commit 4de4124
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -60726,6 +60726,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>Let <var>wasModal</var> be the value of <var>subject</var>'s <span>is
modal</span> flag.</p></li>

<li><p>Let <var>wasModal</var> be the value of <var>subject</var>'s <span>is
modal</span> flag.</p></li>

<li><p>Set the <span>is modal</span> flag of <var>subject</var> to false.</p></li>

<li><p>If <var>result</var> is not null, then set the <code
Expand Down Expand Up @@ -100314,6 +100317,69 @@ location.href = '#foo';</code></pre>
</li>
</ol>

<p>To <dfn>build NotRestoredReasons object for page</dfn> given <code>Document state</code>
<var>documentState</var>:
<ol>
<li><p><span>Assert</span>: <var>documentState</var>'s <span
data-x="document-state-document">document</span>'s <span>node navigable</span> is a
<span>top-level traversable</span>.</p></li>

<li><p><span>Build NotRestoredReasons object for document</span> given <var>documentState</var>'s
<span data-x="document-state-document">document</span>.</p></li>

<li><p>Count the number of <var>documentState</var>'s <span
data-x="document-state-document">document</span>'s <span>descendant navigables</span> whose
<span data-x="concept-document-origin">origin</span> is not <span>same origin</span> with
<var>documentState</var>'s <span data-x="document-state-document">document</span>.</p>

<ol>
<li><p>Let <var>crossOriginDescendants</var> be an empty <span>list</span>.</p></li>

<li><p><span data-x="list iterate">For each</span> <var>navigable</var> of
<var>documentState</var>'s <span data-x="document-state-document">document</span>'s
<span>descendant navigables</span>:</p>
<ol>
<li><p>If <var>navigable</var>'s <span data-x="nav-document">active document</span>'s
<span data-x="concept-document-origin">origin</span> is not <span>same origin</span> with
<var>documentState</var>'s <span data-x="document-state-document">document</span>, then <span
data-x="list append">append</span> <var>navigable</var> to
<var>crossOriginDescendants</var>.</p></li>
</ol>
</li>

<li><p>Set <var>crossOriginCount</var> be <var>crossOriginDescendants</var>'s <span
data-x="list size">size</span>.</p></li>
</ol>
</li>

<li><p>Let <var>randomIndex</var> be a randomly selected integer from 0 to
<var>crossOriginCount</var>-1.</p></li>

<li><p>Let <var>index</var> be 0.</p></li>

<li><p><span data-x="list iterate">For each</span> <var>crossOriginDescendants</var>:</p>
<ol>
<li><p>Let <var>reasonsForCrossOriginChild</var> be <var>navigable</var>'s <span
data-x="nav-document">active document</span>'s <span>document state</span>'s <span
data-x="document-state-not-restored-reasons">notRestoredReasons</span>.</p></li>

<li><p>Set <var>reasonsForCrossOriginChild</var>'s <span
data-x="dom-not-restored-reasons-url">url</span> to null.</p></li>

<li><p>Set <var>reasonsForCrossOriginChild</var>'s <span
data-x="dom-not-restored-reasons-url">url</span> be null.</p></li>

<li><p>Set <var>reasonsForCrossOriginChild</var>'s <span
data-x="dom-not-restored-reasons-reasons">reasons</span> be null.</p></li>

<li><p>Set <var>reasonsForCrossOriginChild</var>'s <span
data-x="dom-not-restored-reasons-children">children</span> be null.</p></li>
</ol>
</li>
</ol>
</li>
</ol>

<p>To <dfn>build NotRestoredReasons object for page</dfn> given <code>Document state</code>
<var>documentState</var>:
<ol>
Expand Down

0 comments on commit 4de4124

Please sign in to comment.