-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require that the document is fully active in requestFullscreen() #85
Conversation
This is similar to the check in exitFullscreen(), and Blink already has a check like this, which is why I'd like to get it into the spec. Firefox actually fails the test in web-platform-tests/wpt#5901 because it fires a fullscreenerror event, a behavior I think would be hard to implement in Blink (trying to fire an event in an inactive document does nothing last I checked) and isn't super useful. |
|
||
<li><p>Let <var>promise</var> be a new promise. | ||
|
||
<li><p>If <var>pendingDoc</var> is not <a>fully active</a>, then reject <var>promise</var> with a | ||
<code>TypeError</code> exception and return <var>promise</var>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot return here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? This is before the "in parallel" steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrongly assumed that we need to run those either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provided @upsuper agrees.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… the spec" This relands https://codereview.chromium.org/2573773002/, which was reverted in https://codereview.chromium.org/2654083006/. Relevant spec changes since December 2016: * whatwg/fullscreen#68 * whatwg/fullscreen#72 * whatwg/fullscreen#85 * whatwg/fullscreen#87 * whatwg/fullscreen#90 * whatwg/fullscreen#92 Updated tests for whatwg/fullscreen#92: * document-exit-fullscreen-nested-manual.html asserts that fullscreenElement changes are not synchronous. * document-exit-fullscreen-timing-manual.html and element-request-fullscreen-timing-manual.html assert that fullscreenElement changes before the resize event. (They still fail in content_shell because there is no resize, but pass in chromium if run manually.) * element-request-fullscreen-and-exit-iframe-manual.html asserts that the order of "run the fullscreen steps" (firing events) is now frame tree order. Bug: 402376 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I9c01b237ecfd7d74b28e3dbafcacdefe43416cdf Reviewed-on: https://chromium-review.googlesource.com/521162 Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: John Mellor <johnme@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#480702} WPT-Export-Revision: 26d298d134b1407ffb035481dea00e95e66a4de9
… the spec" This relands https://codereview.chromium.org/2573773002/, which was reverted in https://codereview.chromium.org/2654083006/. Relevant spec changes since December 2016: * whatwg/fullscreen#68 * whatwg/fullscreen#72 * whatwg/fullscreen#85 * whatwg/fullscreen#87 * whatwg/fullscreen#90 * whatwg/fullscreen#92 Updated tests for whatwg/fullscreen#92: * document-exit-fullscreen-nested-manual.html asserts that fullscreenElement changes are not synchronous. * document-exit-fullscreen-timing-manual.html and element-request-fullscreen-timing-manual.html assert that fullscreenElement changes before the resize event. (They still fail in content_shell because there is no resize, but pass in chromium if run manually.) * element-request-fullscreen-and-exit-iframe-manual.html asserts that the order of "run the fullscreen steps" (firing events) is now frame tree order. Bug: 402376 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I9c01b237ecfd7d74b28e3dbafcacdefe43416cdf Reviewed-on: https://chromium-review.googlesource.com/521162 Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: John Mellor <johnme@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#480702} WPT-Export-Revision: 26d298d134b1407ffb035481dea00e95e66a4de9
… the spec" This relands https://codereview.chromium.org/2573773002/, which was reverted in https://codereview.chromium.org/2654083006/. Relevant spec changes since December 2016: * whatwg/fullscreen#68 * whatwg/fullscreen#72 * whatwg/fullscreen#85 * whatwg/fullscreen#87 * whatwg/fullscreen#90 * whatwg/fullscreen#92 Updated tests for whatwg/fullscreen#92: * document-exit-fullscreen-nested-manual.html asserts that fullscreenElement changes are not synchronous. * document-exit-fullscreen-timing-manual.html and element-request-fullscreen-timing-manual.html assert that fullscreenElement changes before the resize event. (They still fail in content_shell because there is no resize, but pass in chromium if run manually.) * element-request-fullscreen-and-exit-iframe-manual.html asserts that the order of "run the fullscreen steps" (firing events) is now frame tree order. Bug: 402376 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I9c01b237ecfd7d74b28e3dbafcacdefe43416cdf Reviewed-on: https://chromium-review.googlesource.com/521162 Commit-Queue: Philip Jägenstedt <foolip@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: John Mellor <johnme@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#480862}
Test: web-platform-tests/wpt#5901
Preview | Diff