Skip to content

Commit

Permalink
Reject exitFullscreen() in inactive documents
Browse files Browse the repository at this point in the history
If the document becomes inactive after the request, then there will not
be another animation frame task, in which case the promise will be left
hanging instead.

Test: web-platform-tests/wpt#4350.

Fixes #67.
  • Loading branch information
foolip authored and annevk committed Dec 16, 2016
1 parent d79128d commit 59574a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fullscreen.bs
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ attribute's getter must run these steps:
<ol>
<li><p>Let <var>promise</var> be a new promise.

<li><p>If <var>doc</var>'s <a>fullscreen element</a> is null, reject <var>promise</var> with a
<code>TypeError</code> exception, and return <var>promise</var>.
<li><p>If <var>doc</var> is not <a>fully active</a> or <var>doc</var>'s <a>fullscreen element</a>
is null, then reject <var>promise</var> with a <code>TypeError</code> exception and return
<var>promise</var>.

<li><p>Let <var>resize</var> be false.

Expand Down
2 changes: 1 addition & 1 deletion fullscreen.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ <h2 class="heading settled" data-level="3" id="api"><span class="secno">3. </spa
<li>
<p>Let <var>promise</var> be a new promise. </p>
<li>
<p>If <var>doc</var>’s <a data-link-type="dfn" href="#fullscreen-element">fullscreen element</a> is null, reject <var>promise</var> with a <code>TypeError</code> exception, and return <var>promise</var>. </p>
<p>If <var>doc</var> is not <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#fully-active">fully active</a> or <var>doc</var>’s <a data-link-type="dfn" href="#fullscreen-element">fullscreen element</a> is null, then reject <var>promise</var> with a <code>TypeError</code> exception and return <var>promise</var>. </p>
<li>
<p>Let <var>resize</var> be false. </p>
<li>
Expand Down

0 comments on commit 59574a4

Please sign in to comment.