Bug 1268749 part 1 - Add pref to disable unprefixed fullscreen api. r=smaug a=lizzard
☠☠ backed out by a32e6eb7b93f ☠ ☠
authorXidorn Quan <quanxunzhen@gmail.com>
Mon, 09 May 2016 08:52:29 +1000
changeset 326224 618f026f5e41c7cdee61f87a3e96a5405ef1a60c
parent 326223 f84225671f1f4564545ea913bac4f435aab05d6c
child 326225 795de3310aa3dc798c6ca3ab76869ab1cebc3484
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, lizzard
bugs1268749
milestone47.0
Bug 1268749 part 1 - Add pref to disable unprefixed fullscreen api. r=smaug a=lizzard MozReview-Commit-ID: 4NjbHgDfvBM
dom/html/test/test_fullscreen-api-race.html
dom/html/test/test_fullscreen-api.html
dom/tests/mochitest/pointerlock/test_pointerlock-api.html
modules/libpref/init/all.js
--- 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
@@ -87,16 +87,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
@@ -4539,16 +4539,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