Bug 1268749 part 1 - Add pref to disable unprefixed fullscreen api. r=smaug
MozReview-Commit-ID: 4NjbHgDfvBM
--- a/dom/html/test/test_fullscreen-api-race.html
+++ b/dom/html/test/test_fullscreen-api-race.html
@@ -22,17 +22,20 @@ SimpleTest.waitForExplicitFinish();
// and in real life, requestFullscreen can only be called inside a user
// event handler. But we want to fix this race condition at some point,
// via queuing all exiting request as well as entering request together
// which we may eventually need to do for bug 1188256.
SimpleTest.requestFlakyTimeout(
"Need to wait for potential fullscreen transition");
addLoadEvent(function () {
SpecialPowers.pushPrefEnv({
- "set": [["full-screen-api.allow-trusted-requests-only", false]]
+ "set": [
+ ["full-screen-api.unprefix.enabled", true],
+ ["full-screen-api.allow-trusted-requests-only", false]
+ ]
}, next);
});
const OPEN_WINDOW_FUNCS = [
function openNewTab() {
return window.open("about:blank");
},
function openNewWindow() {
--- a/dom/html/test/test_fullscreen-api.html
+++ b/dom/html/test/test_fullscreen-api.html
@@ -86,16 +86,17 @@ try {
is(window.fullScreen, false, "Shouldn't be able to set window fullscreen from content");
// Ensure the full-screen api is enabled, and will be disabled on test exit.
// Disable the requirement for trusted contexts only, so the tests are easier
// to write
addLoadEvent(function() {
SpecialPowers.pushPrefEnv({
"set": [
["full-screen-api.enabled", true],
+ ["full-screen-api.unprefix.enabled", true],
["full-screen-api.allow-trusted-requests-only", false],
["full-screen-api.transition-duration.enter", "0 0"],
["full-screen-api.transition-duration.leave", "0 0"]
]}, nextTest);
});
SimpleTest.waitForExplicitFinish();
</script>
</pre>
--- a/dom/tests/mochitest/pointerlock/test_pointerlock-api.html
+++ b/dom/tests/mochitest/pointerlock/test_pointerlock-api.html
@@ -25,16 +25,17 @@ https://bugzilla.mozilla.org/show_bug.cg
* around this, all tests are run in a child window, which can go fullscreen.
* This method is borrowed from dom/html/test/test_fullscreen-api.html.
**/
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [
["full-screen-api.enabled", true],
+ ["full-screen-api.unprefix.enabled", true],
["full-screen-api.allow-trusted-requests-only", false],
["full-screen-api.transition-duration.enter", "0 0"],
["full-screen-api.transition-duration.leave", "0 0"]
]}, nextTest);
// Run the tests which go full-screen in new window, as Mochitests
// normally run in an iframe, which by default will not have the
// allowfullscreen attribute set, so full-screen won't work.
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4565,16 +4565,21 @@ pref("dom.webnotifications.serviceworker
// Alert animation effect, name is disableSlidingEffect for backwards-compat.
pref("alerts.disableSlidingEffect", false);
// Show favicons in web notifications.
pref("alerts.showFavicons", false);
// DOM full-screen API.
pref("full-screen-api.enabled", false);
+#ifdef RELEASE_BUILD
+pref("full-screen-api.unprefix.enabled", false);
+#else
+pref("full-screen-api.unprefix.enabled", true);
+#endif
pref("full-screen-api.allow-trusted-requests-only", true);
pref("full-screen-api.pointer-lock.enabled", true);
// transition duration of fade-to-black and fade-from-black, unit: ms
pref("full-screen-api.transition-duration.enter", "200 200");
pref("full-screen-api.transition-duration.leave", "200 200");
// timeout for black screen in fullscreen transition, unit: ms
pref("full-screen-api.transition.timeout", 500);
// time for the warning box stays on the screen before sliding out, unit: ms