Skip to content
Permalink
Browse files

Move the element type check out of the ready check

There is no need to check this again in the animation frame task.
  • Loading branch information...
foolip authored and annevk committed Sep 27, 2016
1 parent c1a9238 commit b5fe5324f217b5155ebb6dde72d2fdc6d97b6264
Showing with 22 additions and 22 deletions.
  1. +12 −12 fullscreen.bs
  2. +10 −10 fullscreen.html
@@ -184,12 +184,6 @@ if all of the following are true, and false otherwise:

<ul>

<li><p><var>element</var>'s <a for=Element>namespace</a> is the <a>HTML namespace</a> or
<var>element</var> is an
<a href=https://www.w3.org/TR/SVG11/struct.html#SVGElement>SVG <code>svg</code></a> or
<a href=https://www.w3.org/Math/draft-spec/chapter2.html#interf.toplevel>MathML <code>math</code></a>
element. [[!SVG]] [[!MATHML]]

<li><p><var>element</var> is <a>in a document</a>.

<li><p><var>element</var>'s <a>node document</a> is <a>allowed to use</a> the feature indicated by
@@ -208,14 +202,20 @@ these steps:
<li><p>Let <var>promise</var> be a new promise.

<li>
<p>If any of the following conditions are true, set <var>error</var> to true:
<p>If any of the following conditions are false, then set <var>error</var> to true:

<ul>
<li><p>The <a>fullscreen element ready check</a> for <var>pending</var> returns false.
<li><p><var>pending</var>'s <a for=Element>namespace</a> is the <a>HTML namespace</a> or
<var>pending</var> is an
<a href=https://www.w3.org/TR/SVG11/struct.html#SVGElement>SVG <code>svg</code></a> or
<a href=https://www.w3.org/Math/draft-spec/chapter2.html#interf.toplevel>MathML <code>math</code></a>
element. [[!SVG]] [[!MATHML]]

<li><p>The <a>fullscreen element ready check</a> for <var>pending</var> returns true.

<li><p><a lt="Fullscreen is supported">Fullscreen is <em>not</em> supported</a>.
<li><p><a>Fullscreen is supported</a>.

<li><p>This algorithm is not <a>allowed to request fullscreen</a>.
<li><p>This algorithm is <a>allowed to request fullscreen</a>.
</ul>

<li><p>Return <var>promise</var>, and run the remaining steps <a>in parallel</a>.
@@ -261,7 +261,7 @@ these steps:
<li><p>Otherwise, append <var>doc</var> to <var>eventDocs</var>.

<li><p>If <var>element</var> is <var>pending</var> and <var>pending</var> is an <{iframe}>
<a>element</a>, set <var>element</var>'s <a>iframe fullscreen flag</a>.
<a>element</a>, then set <var>element</var>'s <a>iframe fullscreen flag</a>.

<li><p><a lt="Fullscreen an element">Fullscreen <var>element</var></a> within <var>doc</var>.
</ol>
@@ -327,7 +327,7 @@ false if <a>context object</a>'s <a>fullscreen element</a> is null, and true oth
<a>document</a>.
<!-- cross-process -->

<li><p>If <var>topLevelDoc</var> is in <var>docs</var>, set <var>resize</var> to true.
<li><p>If <var>topLevelDoc</var> is in <var>docs</var>, then set <var>resize</var> to true.

<li><p>Return <var>promise</var>, and run the remaining steps <a>in parallel</a>.

@@ -71,7 +71,7 @@
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-fullscreen.svg"> </a> </p>
<hgroup>
<h1 class="p-name no-ref" id="title">Fullscreen API</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-09-16">16 September 2016</time></span></h2>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-09-27">27 September 2016</time></span></h2>
</hgroup>
<div data-fill-with="spec-metadata">
<dl>
@@ -208,8 +208,6 @@ <h2 class="heading settled" data-level="4" id="api"><span class="secno">4. </spa
<p>A <dfn data-dfn-type="dfn" data-noexport="" id="fullscreen-element-ready-check">fullscreen element ready check<a class="self-link" href="#fullscreen-element-ready-check"></a></dfn> for an <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-element">element</a> <var>element</var> returns true
if all of the following are true, and false otherwise: </p>
<ul>
<li>
<p><var>element</var>’s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-element-namespace">namespace</a> is the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#html-namespace">HTML namespace</a> or <var>element</var> is an <a href="https://www.w3.org/TR/SVG11/struct.html#SVGElement">SVG <code>svg</code></a> or <a href="https://www.w3.org/Math/draft-spec/chapter2.html#interf.toplevel">MathML <code>math</code></a> element. <a data-link-type="biblio" href="#biblio-svg">[SVG]</a> <a data-link-type="biblio" href="#biblio-mathml">[MATHML]</a> </p>
<li>
<p><var>element</var> is <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#in-a-document">in a document</a>. </p>
<li>
@@ -226,14 +224,16 @@ <h2 class="heading settled" data-level="4" id="api"><span class="secno">4. </spa
<li>
<p>Let <var>promise</var> be a new promise. </p>
<li>
<p>If any of the following conditions are true, set <var>error</var> to true: </p>
<p>If any of the following conditions are false, then set <var>error</var> to true: </p>
<ul>
<li>
<p>The <a data-link-type="dfn" href="#fullscreen-element-ready-check">fullscreen element ready check</a> for <var>pending</var> returns false. </p>
<p><var>pending</var>’s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-element-namespace">namespace</a> is the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#html-namespace">HTML namespace</a> or <var>pending</var> is an <a href="https://www.w3.org/TR/SVG11/struct.html#SVGElement">SVG <code>svg</code></a> or <a href="https://www.w3.org/Math/draft-spec/chapter2.html#interf.toplevel">MathML <code>math</code></a> element. <a data-link-type="biblio" href="#biblio-svg">[SVG]</a> <a data-link-type="biblio" href="#biblio-mathml">[MATHML]</a> </p>
<li>
<p>The <a data-link-type="dfn" href="#fullscreen-element-ready-check">fullscreen element ready check</a> for <var>pending</var> returns true. </p>
<li>
<p><a data-link-type="dfn" href="#fullscreen-is-supported">Fullscreen is <em>not</em> supported</a>. </p>
<p><a data-link-type="dfn" href="#fullscreen-is-supported">Fullscreen is supported</a>. </p>
<li>
<p>This algorithm is not <a data-link-type="dfn" href="#allowed-to-request-fullscreen">allowed to request fullscreen</a>. </p>
<p>This algorithm is <a data-link-type="dfn" href="#allowed-to-request-fullscreen">allowed to request fullscreen</a>. </p>
</ul>
<li>
<p>Return <var>promise</var>, and run the remaining steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>. </p>
@@ -264,7 +264,7 @@ <h2 class="heading settled" data-level="4" id="api"><span class="secno">4. </spa
<li>
<p>Otherwise, append <var>doc</var> to <var>eventDocs</var>. </p>
<li>
<p>If <var>element</var> is <var>pending</var> and <var>pending</var> is an <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-iframe-element">iframe</a></code> <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-element">element</a>, set <var>element</var>’s <a data-link-type="dfn" href="#iframe-fullscreen-flag">iframe fullscreen flag</a>. </p>
<p>If <var>element</var> is <var>pending</var> and <var>pending</var> is an <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-iframe-element">iframe</a></code> <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-element">element</a>, then set <var>element</var>’s <a data-link-type="dfn" href="#iframe-fullscreen-flag">iframe fullscreen flag</a>. </p>
<li>
<p><a data-link-type="dfn" href="#fullscreen-an-element">Fullscreen <var>element</var></a> within <var>doc</var>. </p>
</ol>
@@ -312,7 +312,7 @@ <h2 class="heading settled" data-level="4" id="api"><span class="secno">4. </spa
<li>
<p>Let <var>topLevelDoc</var> be <var>doc</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#top-level-browsing-context">top-level browsing context</a>’s <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-document">document</a>. </p>
<li>
<p>If <var>topLevelDoc</var> is in <var>docs</var>, set <var>resize</var> to true. </p>
<p>If <var>topLevelDoc</var> is in <var>docs</var>, then set <var>resize</var> to true. </p>
<li>
<p>Return <var>promise</var>, and run the remaining steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>. </p>
<li>
@@ -483,7 +483,7 @@ <h3 class="no-num no-ref heading settled" id="normative"><span class="content">N
<dt id="biblio-svg">[SVG]
<dd>Jon Ferraiolo. <a href="https://www.w3.org/TR/SVG/">Scalable Vector Graphics (SVG) 1.0 Specification</a>. 4 September 2001. REC. URL: <a href="https://www.w3.org/TR/SVG/">https://www.w3.org/TR/SVG/</a>
<dt id="biblio-webidl">[WEBIDL]
<dd>Cameron McCormack; Boris Zbarsky. <a href="https://heycam.github.io/webidl/">WebIDL Level 1</a>. 8 March 2016. CR. URL: <a href="https://heycam.github.io/webidl/">https://heycam.github.io/webidl/</a>
<dd>Cameron McCormack; Boris Zbarsky. <a href="https://heycam.github.io/webidl/">WebIDL Level 1</a>. 15 September 2016. PR. URL: <a href="https://heycam.github.io/webidl/">https://heycam.github.io/webidl/</a>
</dl>
</div>
<h2 class="no-num heading settled" id="acknowledgments"><span class="content">Acknowledgments</span><a class="self-link" href="#acknowledgments"></a></h2>

0 comments on commit b5fe532

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