Skip to content
Permalink
Browse files

Use fullscreen logic for initial about:blank documents too

Fixes #1385.

(It seems this was an oversight
8359fee resulting from having two
places to initialize document objects as the result of navigation.
Cleaning that up is a larger separate task.)
  • Loading branch information...
annevk authored and foolip committed Jun 9, 2016
1 parent 8edc92d commit c2a8d605e0115c80d1ccb4b15371ecaa56a33e30
Showing with 35 additions and 35 deletions.
  1. +35 −35 source
70 source

<hr>

<p>When a user agent is to <dfn>implement the sandboxing</dfn> for a <code>Document</code>, it
must populate <code>Document</code>'s <span>active sandboxing flag set</span> with the union of
the flags that are present in the following <span data-x="sandboxing flag set">sandboxing flag
sets</span> at the time the <code>Document</code> object is created:</p>
<p>To <dfn>implement the sandboxing</dfn> for a <code>Document</code> object <var>document</var>,
run these steps:</p>

<ul>
<ol>
<li>
<p>Populate <var>document</var>'s <span>active sandboxing flag set</span> with the union of the
flags that are present in the following <span data-x="sandboxing flag set">sandboxing flag
sets</span>:</p>

<li><p>If the <code>Document</code>'s <span data-x="concept-document-bc">browsing context</span>
is a <span>top-level browsing context</span>, then: the flags set on the <span>browsing
context</span>'s <span>popup sandboxing flag set</span>.</p></li>
<ul>
<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> is a
<span>top-level browsing context</span>, then: the flags set on the <span>browsing
context</span>'s <span>popup sandboxing flag set</span>.</p></li>

<li><p>If the <code>Document</code>'s <span data-x="concept-document-bc">browsing context</span>
is a <span>nested browsing context</span>, then: the flags set on the <span>browsing
context</span>'s <span><code>iframe</code> sandboxing flag set</span>.</p></li>
<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> is a
<span>nested browsing context</span>, then: the flags set on the <span>browsing
context</span>'s <span><code>iframe</code> sandboxing flag set</span>.</p></li>

<li><p>If the <code>Document</code>'s <span data-x="concept-document-bc">browsing context</span>
is a <span>nested browsing context</span>, then: the flags set on the <span>browsing
context</span>'s <span>parent browsing context</span>'s <span>active document</span>'s
<span>active sandboxing flag set</span>.</p></li>
<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> is a
<span>nested browsing context</span>, then: the flags set on the <span>browsing
context</span>'s <span>parent browsing context</span>'s <span>active document</span>'s
<span>active sandboxing flag set</span>.</p></li>

<li><p>The flags set on the <code>Document</code>'s resource's <span>forced sandboxing flag
set</span>, if it has one.</p></li>
<li><p>The flags set on <var>document</var>'s resource's <span>forced sandboxing flag
set</span>, if it has one.</p></li>
</ul>
</li>

</ul>
<li id="fullscreen-logic"><p>If the <span>active sandboxing flag set</span> of
<var>document</var>'s <span data-x="concept-document-bc">browsing context</span> or any of its
<span data-x="ancestor browsing context">ancestor browsing contexts</span> (if any) have the
<span>sandboxed fullscreen browsing context flag</span> set, then abort these steps.</p></li>

<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> has a
<span>browsing context container</span> and either it is not an <code>iframe</code> element, or
it does not have the <code data-x="attr-iframe-allowfullscreen">allowfullscreen</code> attribute
specified, or its <span>node document</span> does not have the <span>fullscreen enabled
flag</span> set, then also abort these steps.</p></li>

<li><p>Set <var>document</var>'s <span>fullscreen enabled flag</span>.</p></li>
</ol>



</li>

<li><p><span>Implement the sandboxing</span> for the <code>Document</code>.</p></li>

<li id="fullscreen-logic">

<p>If the <span>active sandboxing flag set</span> of the <code>Document</code>'s
<span data-x="concept-document-bc">browsing context</span> or any of its <span
data-x="ancestor browsing context">ancestor browsing contexts</span> (if any) have the
<span>sandboxed fullscreen browsing context flag</span> set, then skip this step.</p>

<p>If the <code>Document</code>'s <span data-x="concept-document-bc">browsing context</span>
has a <span>browsing context container</span> and either it is not an <code>iframe</code>
element, or it does not have the <code
data-x="attr-iframe-allowfullscreen">allowfullscreen</code> attribute specified, or its
<code>Document</code> does not have the <span>fullscreen enabled flag</span> set, then also
skip this step.</p>

<p>Otherwise, set the <code>Document</code>'s <span>fullscreen enabled flag</span>.</p>

</ol>

</li>

0 comments on commit c2a8d60

Please sign in to comment.
You can’t perform that action at this time.