Skip to content

Commit

Permalink
Use HTML's new "allowed to use" algorithm
Browse files Browse the repository at this point in the history
Fixes #41.
  • Loading branch information
foolip authored and annevk committed Aug 12, 2016
1 parent e5e96a9 commit 42f9d15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 55 deletions.
36 changes: 8 additions & 28 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<hgroup>
<h1 class="p-name">Fullscreen API</h1>
<h2 class="no-num no-toc">Living Standard — Last Updated 21 July 2016</h2>
<h2 class="no-num no-toc">Living Standard — Last Updated 12 August 2016</h2>
</hgroup>

<dl>
Expand Down Expand Up @@ -104,25 +104,6 @@ <h2 id="model"><span class="secno">3 </span>Model</h2>
<a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-element" title="concept-element">elements</a> have an associated
<dfn id="iframe-fullscreen-flag">iframe fullscreen flag</dfn>. Unless stated otherwise it is unset.

<p>All <a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document" title="concept-document">documents</a>
have an associated <dfn id="fullscreen-enabled-flag">fullscreen enabled flag</dfn>. Unless stated otherwise it is
unset.

<p class="note">HTML defines the exact conditions under which the
<a href="#fullscreen-enabled-flag">fullscreen enabled flag</a> is set. A
<a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document" title="concept-document">document</a> from a
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/browsers.html#top-level-browsing-context">top-level browsing context</a> will have it set. For a
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/browsers.html#nested-browsing-context">nested browsing context</a> it is only set if the
<a href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-iframe-element"><code class="external" data-anolis-spec="html">iframe</code></a> element that is responsible for creating the
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/browsers.html#nested-browsing-context">nested browsing context</a> has its
<a href="https://html.spec.whatwg.org/multipage/embedded-content.html#attr-iframe-allowfullscreen"><code class="external" data-anolis-spec="html">allowfullscreen</code></a> attribute set. That attribute is
defined by HTML as well.
<a href="#refsHTML">[HTML]</a>
<!--
not set for <iframe>, createDocument();
set for <iframe allowfullscreen>
-->

<p>All <a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-document" title="concept-document">documents</a>
have an associated <dfn id="fullscreen-element">fullscreen element</dfn>. The <a href="#fullscreen-element">fullscreen element</a> is
the topmost <a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-element" title="concept-element">element</a> in the
Expand Down Expand Up @@ -256,10 +237,9 @@ <h2 id="api"><span class="secno">4 </span>API</h2>

<li><p><var title="">element</var> is <a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#in-a-document">in a document</a>.

<li><p><var title="">element</var>'s
<a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-node-document" title="concept-node-document">node document</a>'s
<a href="#fullscreen-enabled-flag">fullscreen enabled flag</a> is set.
<!-- The fullscreen enabled flag is propagated properly by HTML -->
<li><p><var title="">element</var>'s <a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-node-document" title="concept-node-document">node document</a>
is <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/embedded-content.html#allowed-to-use">allowed to use</a> the feature indicated by
attribute name <code>allowfullscreen</code>.

<li><p><var title="">element</var>'s
<a class="external" data-anolis-spec="dom" href="https://dom.spec.whatwg.org/#concept-node-document" title="concept-node-document">node document</a>'s
Expand Down Expand Up @@ -371,10 +351,10 @@ <h2 id="api"><span class="secno">4 </span>API</h2>
</ol>

<p>The <dfn id="dom-document-fullscreenenabled" title="dom-Document-fullscreenEnabled"><code>fullscreenEnabled</code></dfn>
attribute's getter must return true if the <a href="#context-object">context object</a> has its
<a href="#fullscreen-enabled-flag">fullscreen enabled flag</a> set and <a href="#fullscreen-is-supported">fullscreen is supported</a>, and
false otherwise.
<!-- The fullscreen enabled flag is propagated properly by HTML -->
attribute's getter must return true if the <a href="#context-object">context object</a> is
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/embedded-content.html#allowed-to-use">allowed to use</a> the feature indicated by
attribute name <code>allowfullscreen</code> and <a href="#fullscreen-is-supported">fullscreen is supported</a>,
and false otherwise.

<p>The <dfn id="dom-document-fullscreenelement" title="dom-Document-fullscreenElement"><code>fullscreenElement</code></dfn>
attribute's getter must return <a href="#context-object">context object</a>'s
Expand Down
34 changes: 7 additions & 27 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,6 @@ <h2>Model</h2>
<span data-anolis-spec=dom title=concept-element>elements</span> have an associated
<dfn>iframe fullscreen flag</dfn>. Unless stated otherwise it is unset.

<p>All <span data-anolis-spec=dom title=concept-document>documents</span>
have an associated <dfn>fullscreen enabled flag</dfn>. Unless stated otherwise it is
unset.

<p class=note>HTML defines the exact conditions under which the
<span>fullscreen enabled flag</span> is set. A
<span data-anolis-spec=dom title=concept-document>document</span> from a
<span data-anolis-spec=html>top-level browsing context</span> will have it set. For a
<span data-anolis-spec=html>nested browsing context</span> it is only set if the
<code data-anolis-spec=html>iframe</code> element that is responsible for creating the
<span data-anolis-spec=html>nested browsing context</span> has its
<code data-anolis-spec=html>allowfullscreen</code> attribute set. That attribute is
defined by HTML as well.
<span data-anolis-ref>HTML</span>
<!--
not set for <iframe>, createDocument();
set for <iframe allowfullscreen>
-->

<p>All <span data-anolis-spec=dom title=concept-document>documents</span>
have an associated <dfn>fullscreen element</dfn>. The <span>fullscreen element</span> is
the topmost <span data-anolis-spec=dom title=concept-element>element</span> in the
Expand Down Expand Up @@ -241,10 +222,9 @@ <h2>API</h2>

<li><p><var title>element</var> is <span data-anolis-spec=dom>in a document</span>.

<li><p><var title>element</var>'s
<span data-anolis-spec=dom title=concept-node-document>node document</span>'s
<span>fullscreen enabled flag</span> is set.
<!-- The fullscreen enabled flag is propagated properly by HTML -->
<li><p><var title>element</var>'s <span data-anolis-spec=dom title=concept-node-document>node document</span>
is <span data-anolis-spec=html>allowed to use</span> the feature indicated by
attribute name <code>allowfullscreen</code>.

<li><p><var title>element</var>'s
<span data-anolis-spec=dom title=concept-node-document>node document</span>'s
Expand Down Expand Up @@ -356,10 +336,10 @@ <h2>API</h2>
</ol>

<p>The <dfn title=dom-Document-fullscreenEnabled><code>fullscreenEnabled</code></dfn>
attribute's getter must return true if the <span>context object</span> has its
<span>fullscreen enabled flag</span> set and <span>fullscreen is supported</span>, and
false otherwise.
<!-- The fullscreen enabled flag is propagated properly by HTML -->
attribute's getter must return true if the <span>context object</span> is
<span data-anolis-spec=html>allowed to use</span> the feature indicated by
attribute name <code>allowfullscreen</code> and <span>fullscreen is supported</span>,
and false otherwise.

<p>The <dfn title=dom-Document-fullscreenElement><code>fullscreenElement</code></dfn>
attribute's getter must return <span>context object</span>'s
Expand Down

0 comments on commit 42f9d15

Please sign in to comment.