Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 13 Dec 2019 13:27:27 +0000
changeset 506899 27fdce12f0c57fce41191959117adf6dfeb4a0e6
parent 506898 c5ab79c8accdfca5fbbbb400cd7e92f25914108d
child 506900 23604fbfa562bfde7d8bbb86199ea7469d59fb60
push id36915
push userrgurzau@mozilla.com
push dateFri, 13 Dec 2019 21:43:22 +0000
treeherdermozilla-central@f09f24f2b545 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn, smaug
bugs1603455
milestone73.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug It's been enabled since Firefox 64. Differential Revision: https://phabricator.services.mozilla.com/D56951
browser/base/content/test/static/browser_parsable_css.js
dom/base/Document.cpp
dom/base/Document.h
dom/base/test/test_youtube_flash_embed.html
dom/events/EventListenerManager.cpp
dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html
dom/html/test/browser_fullscreen-newtab.js
dom/html/test/file_fullscreen-unprefix-disabled-inner.html
dom/html/test/file_fullscreen-unprefix-disabled.html
dom/html/test/mochitest.ini
dom/html/test/test_fullscreen-api-race.html
dom/html/test/test_fullscreen-api.html
dom/media/tests/mochitest/test_getUserMedia_basicScreenshare.html
dom/plugins/test/mochitest/test_bug1028200-1.html
dom/plugins/test/mochitest/test_bug1028200-2.html
dom/plugins/test/mochitest/test_bug1028200-3.html
dom/plugins/test/mochitest/test_bug1028200-4.html
dom/plugins/test/mochitest/test_bug1028200-5.html
dom/plugins/test/mochitest/test_bug1028200-6.html
dom/plugins/test/mochitest/test_bug1028200-7.html
dom/tests/mochitest/pointerlock/test_pointerlock-api.html
dom/webidl/Document.webidl
dom/webidl/DocumentOrShadowRoot.webidl
dom/webidl/Element.webidl
modules/libpref/init/StaticPrefList.yaml
servo/components/style/gecko/non_ts_pseudo_class_list.rs
servo/components/style/gecko/selector_parser.rs
servo/components/style/gecko/wrapper.rs
testing/web-platform/meta/fullscreen/__dir__.ini
testing/web-platform/meta/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html.ini
--- a/browser/base/content/test/static/browser_parsable_css.js
+++ b/browser/base/content/test/static/browser_parsable_css.js
@@ -97,32 +97,16 @@ if (
   // -moz-block-height is used in form controls but not exposed to the web.
   whitelist.push({
     sourceName: /(?:res|gre-resources)\/forms\.css$/i,
     errorMessage: /Error in parsing value for \u2018line-height\u2019/iu,
     isFromDevTools: false,
   });
 }
 
-if (!Services.prefs.getBoolPref("full-screen-api.unprefix.enabled")) {
-  whitelist.push(
-    {
-      sourceName: /(?:res|gre-resources)\/(ua|html)\.css$/i,
-      errorMessage: /Unknown pseudo-class .*\bfullscreen\b/i,
-      isFromDevTools: false,
-    },
-    {
-      // PDFjs is futureproofing its pseudoselectors, and those rules are dropped.
-      sourceName: /web\/viewer\.css$/i,
-      errorMessage: /Unknown pseudo-class .*\bfullscreen\b/i,
-      isFromDevTools: false,
-    }
-  );
-}
-
 if (!Services.prefs.getBoolPref("layout.css.scrollbar-width.enabled")) {
   whitelist.push({
     sourceName: /(?:res|gre-resources)\/forms\.css$/i,
     errorMessage: /Unknown property .*\bscrollbar-width\b/i,
     isFromDevTools: false,
   });
 }
 
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -13236,46 +13236,37 @@ void Document::RemoteFrameFullscreenChan
   RequestFullscreen(std::move(request), XRE_IsContentProcess());
 }
 
 void Document::RemoteFrameFullscreenReverted() {
   UniquePtr<FullscreenExit> exit = FullscreenExit::CreateForRemote(this);
   RestorePreviousFullscreenState(std::move(exit));
 }
 
-/* static */
-bool Document::IsUnprefixedFullscreenEnabled(JSContext* aCx,
-                                             JSObject* aObject) {
-  MOZ_ASSERT(NS_IsMainThread());
-  return nsContentUtils::IsSystemCaller(aCx) ||
-         StaticPrefs::full_screen_api_unprefix_enabled();
-}
-
 static bool HasFullscreenSubDocument(Document* aDoc) {
   uint32_t count = CountFullscreenSubDocuments(aDoc);
   NS_ASSERTION(count <= 1,
                "Fullscreen docs should have at most 1 fullscreen child!");
   return count >= 1;
 }
 
 // Returns nullptr if a request for Fullscreen API is currently enabled
 // in the given document. Returns a static string indicates the reason
 // why it is not enabled otherwise.
 static const char* GetFullscreenError(Document* aDoc, CallerType aCallerType) {
-  bool apiEnabled = StaticPrefs::full_screen_api_enabled();
-  if (apiEnabled && aCallerType == CallerType::System) {
+  if (!StaticPrefs::full_screen_api_enabled()) {
+    return "FullscreenDeniedDisabled";
+  }
+
+  if (aCallerType == CallerType::System) {
     // Chrome code can always use the fullscreen API, provided it's not
     // explicitly disabled.
     return nullptr;
   }
 
-  if (!apiEnabled) {
-    return "FullscreenDeniedDisabled";
-  }
-
   if (!aDoc->IsVisible()) {
     return "FullscreenDeniedHidden";
   }
 
   // Ensure that all containing elements are <iframe> and have
   // allowfullscreen attribute set.
   nsCOMPtr<nsIDocShell> docShell(aDoc->GetDocShell());
   if (!docShell || !docShell->GetFullscreenAllowed()) {
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -3650,17 +3650,16 @@ class Document : public nsINode,
   void Clear() const {
     // Deprecated
   }
   void CaptureEvents();
   void ReleaseEvents();
 
   mozilla::dom::HTMLAllCollection* All();
 
-  static bool IsUnprefixedFullscreenEnabled(JSContext* aCx, JSObject* aObject);
   static bool DocumentSupportsL10n(JSContext* aCx, JSObject* aObject);
   static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject);
   static bool IsWebAnimationsEnabled(CallerType aCallerType);
   static bool IsWebAnimationsGetAnimationsEnabled(JSContext* aCx,
                                                   JSObject* aObject);
   static bool AreWebAnimationsImplicitKeyframesEnabled(JSContext* aCx,
                                                        JSObject* aObject);
   static bool AreWebAnimationsTimelinesEnabled(JSContext* aCx,
--- a/dom/base/test/test_youtube_flash_embed.html
+++ b/dom/base/test/test_youtube_flash_embed.html
@@ -15,22 +15,18 @@
        let msg = JSON.parse(e.data);
        if (msg.fn == "finish") {
          SimpleTest.finish();
          return;
        }
        self[msg.fn].apply(null, msg.args);
      }
      function onLoad() {
-       SpecialPowers.pushPrefEnv({
-         "set": [["full-screen-api.unprefix.enabled", true]]
-       }, function() {
-         // The test file must be loaded into youtube.com domain
-         // because it needs unprivileged access to fullscreenEnabled.
-         ifr.src = "https://mochitest.youtube.com" + path;
-       });
+       // The test file must be loaded into youtube.com domain
+       // because it needs unprivileged access to fullscreenEnabled.
+       ifr.src = "https://mochitest.youtube.com" + path;
      }
     </script>
   </head>
   <body onload="onLoad()">
     <iframe id="ifr" allowfullscreen></iframe>
   </body>
 </html>
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -14,17 +14,16 @@
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/HalSensor.h"
 #include "mozilla/InternalMutationEvent.h"
 #include "mozilla/JSEventHandler.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/PresShell.h"
-#include "mozilla/StaticPrefs_full_screen_api.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/EventCallbackDebuggerNotification.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/EventTargetBinding.h"
 #include "mozilla/dom/LoadedScript.h"
 #include "mozilla/dom/PopupBlocker.h"
 #include "mozilla/dom/ScriptLoader.h"
@@ -642,26 +641,16 @@ bool EventListenerManager::ListenerCanHa
   // aListener=>mEventMessage != eUnidentifiedEvent as long as the atoms are
   // the same
   if (MOZ_UNLIKELY(aListener->mAllEvents)) {
     return true;
   }
   if (aEvent->mMessage == eUnidentifiedEvent) {
     return aListener->mTypeAtom == aEvent->mSpecifiedEventType;
   }
-  if (MOZ_UNLIKELY(!StaticPrefs::full_screen_api_unprefix_enabled() &&
-                   aEvent->IsTrusted() &&
-                   (aEventMessage == eFullscreenChange ||
-                    aEventMessage == eFullscreenError))) {
-    // If unprefixed Fullscreen API is not enabled, don't dispatch it
-    // to the content.
-    if (!aEvent->mFlags.mInSystemGroup && !aListener->mIsChrome) {
-      return false;
-    }
-  }
   MOZ_ASSERT(mIsMainThreadELM);
   return aListener->mEventMessage == aEventMessage;
 }
 
 static bool IsDefaultPassiveWhenOnRoot(EventMessage aMessage) {
   if (aMessage == eTouchStart || aMessage == eTouchMove) {
     return StaticPrefs::dom_event_default_to_passive_touch_listeners();
   }
--- a/dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html
+++ b/dom/events/test/pointerevents/test_trigger_fullscreen_by_pointer_events.html
@@ -40,17 +40,16 @@ function startTest() {
       synthesizeMouseAtCenter(target, { type: "mouseup" }, win);
     }, win);
   });
 }
 
 SimpleTest.waitForFocus(() => {
   SpecialPowers.pushPrefEnv({
     "set": [
-      ["full-screen-api.unprefix.enabled", true],
       ["full-screen-api.allow-trusted-requests-only", false],
       ["dom.w3c_pointer_events.enabled", true]
     ]
   }, startTest);
 });
 </script>
 </body>
 </html>
--- a/dom/html/test/browser_fullscreen-newtab.js
+++ b/dom/html/test/browser_fullscreen-newtab.js
@@ -75,23 +75,21 @@ async function runTest() {
         "The chrome document should not be in fullscreen"
       );
     }
   );
 }
 
 add_task(async function() {
   await pushPrefs(
-    ["full-screen-api.unprefix.enabled", true],
     ["full-screen-api.transition-duration.enter", "0 0"],
     ["full-screen-api.transition-duration.leave", "0 0"]
   );
   await runTest();
 });
 
 add_task(async function() {
   await pushPrefs(
-    ["full-screen-api.unprefix.enabled", true],
     ["full-screen-api.transition-duration.enter", "200 200"],
     ["full-screen-api.transition-duration.leave", "200 200"]
   );
   await runTest();
 });
deleted file mode 100644
--- a/dom/html/test/file_fullscreen-unprefix-disabled-inner.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="UTF-8">
-  <title>Test for Bug 1268749</title>
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <style>
-    #fullscreen {
-      color: green;
-    }
-    #fullscreen:fullscreen {
-      color: red;
-    }
-  </style>
-</head>
-<body>
-  <div id="fullscreen"></div>
-<script>
-
-function ok(condition, msg) {
-  opener.opener.ok(condition, "[unprefix-disabled] " + msg);
-}
-
-function is(a, b, msg) {
-  opener.opener.is(a, b, "[unprefix-disabled] " + msg);
-}
-
-function info(msg) {
-  opener.opener.info("[unprefix-disabled] " + msg);
-}
-
-SimpleTest.requestFlakyTimeout(
-  "need to wait for a while to confirm no unexpected event is dispatched");
-
-let div = document.getElementById("fullscreen");
-let unattachedDiv = document.createElement('div');
-
-function begin() {
-  ok(!("requestFullscreen" in div), "No element.requestFullscreen");
-  ok(!("exitFullscreen" in document), "No document.exitFullscreen");
-  ok(!("fullscreen" in document), "No document.fullscreen");
-  ok(!("fullscreenElement" in document), "No document.fullscreenElement");
-  ok(!("fullscreenEnabled" in document), "No document.fullscreenEnabled");
-  ok(!("onfullscreenchange" in document), "No document.onfullscreenchange");
-  ok(!("onfullscreenerror" in document), "No document.onfullscreenerror");
-
-  for (var event of ["fullscreenchange", "fullscreenerror"]) {
-    let customEvent = new Event(event, {bubbles: true});
-    let gotCustomEventFromWindow = false;
-    let gotCustomEventFromDocument = false;
-    let listenerForWindow = evt => {
-      ok(!gotCustomEventFromWindow,
-         "Should get custom event from window only once");
-      ok(evt == customEvent, "Should get the desired custom event");
-      gotCustomEventFromWindow = true;
-    };
-    let listenerForDocument = evt => {
-      ok(!gotCustomEventFromDocument,
-         "Should get custom event from document only once");
-      ok(evt == customEvent, "Should get the desired custom event");
-      gotCustomEventFromDocument = true;
-    };
-    window.addEventListener(event, listenerForWindow);
-    document.addEventListener(event, listenerForDocument);
-    document.dispatchEvent(customEvent);
-    ok(gotCustomEventFromWindow, "Should get the custom event from window");
-    ok(gotCustomEventFromDocument, "Should get the custom event from document");
-    window.removeEventListener(event, listenerForWindow);
-    document.removeEventListener(event, listenerForDocument);
-
-    for (var target of [window, document]) {
-      target.addEventListener(event, () => {
-        ok(false, `No ${event} should be triggered on ${target}`);
-      });
-    }
-  }
-
-  document.addEventListener("mozfullscreenchange", enteredFullscreen);
-  SimpleTest.executeSoon(() => div.mozRequestFullScreen());
-}
-
-function enteredFullscreen() {
-  document.removeEventListener("mozfullscreenchange", enteredFullscreen);
-  is(getComputedStyle(div).color, "rgb(0, 128, 0)",
-     ":fullscreen should not apply");
-  document.addEventListener("mozfullscreenchange", exitedFullscreen);
-  SimpleTest.executeSoon(() => document.mozCancelFullScreen());
-}
-
-function exitedFullscreen() {
-  document.removeEventListener("mozfullscreenchange", exitedFullscreen);
-  document.addEventListener("mozfullscreenerror", errorFullscreen);
-  SimpleTest.executeSoon(() => unattachedDiv.mozRequestFullScreen());
-}
-
-function errorFullscreen() {
-  document.removeEventListener("mozfullscreenerror", errorFullscreen);
-  // Wait a short time before exiting this test to confirm that there is
-  // really no unwanted event gets dispatched.
-  setTimeout(() => opener.finish(), 200);
-}
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/html/test/file_fullscreen-unprefix-disabled.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="UTF-8">
-  <title>Test for Bug 1268749</title>
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="file_fullscreen-utils.js"></script>
-</head>
-<body>
-<script>
-
-var gWindow = null;
-
-function begin() {
-  SpecialPowers.pushPrefEnv({
-    "set": [["full-screen-api.unprefix.enabled", false]]
-  }, () => {
-    gWindow = window.open("file_fullscreen-unprefix-disabled-inner.html",
-                          "", "width=500,height=500");
-    waitForLoadAndPaint(gWindow, () => {
-      gWindow.focus();
-      SimpleTest.waitForFocus(() => gWindow.begin(), gWindow);
-    });
-  });
-}
-
-function finish() {
-  gWindow.close();
-  SpecialPowers.popPrefEnv(opener.nextTest);
-}
-
-</script>
-</body>
-</html>
--- a/dom/html/test/mochitest.ini
+++ b/dom/html/test/mochitest.ini
@@ -462,18 +462,16 @@ support-files =
   file_fullscreen-plugins.html
   file_fullscreen-rollback.html
   file_fullscreen-scrollbar.html
   file_fullscreen-selector.html
   file_fullscreen-shadowdom.html
   file_fullscreen-svg-element.html
   file_fullscreen-table.html
   file_fullscreen-top-layer.html
-  file_fullscreen-unprefix-disabled-inner.html
-  file_fullscreen-unprefix-disabled.html
   file_fullscreen-utils.js
 [test_fullscreen-api-race.html]
 tags = fullscreen
 skip-if = toolkit == 'android' || (verify && debug && os == 'mac') || (os == "mac" && debug) # Android: same as test_fullscreen-api.html, 1356570
 [test_hidden.html]
 [test_html_attributes_reflection.html]
 [test_htmlcollection.html]
 [test_iframe_sandbox_general.html]
--- a/dom/html/test/test_fullscreen-api-race.html
+++ b/dom/html/test/test_fullscreen-api-race.html
@@ -29,17 +29,16 @@ SimpleTest.waitForExplicitFinish();
 // 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.unprefix.enabled", true],
       ["full-screen-api.allow-trusted-requests-only", false],
       // Use legacy data: URI behavior to run test.
       ["security.data_uri.unique_opaque_origin", false],
       ["security.data_uri.block_toplevel_data_uri_navigations", false],
     ]
   }, next);
 });
 
--- a/dom/html/test/test_fullscreen-api.html
+++ b/dom/html/test/test_fullscreen-api.html
@@ -39,17 +39,16 @@ var gTestWindows = [
   { test: "file_fullscreen-navigation.html" },
   { test: "file_fullscreen-scrollbar.html" },
   { test: "file_fullscreen-selector.html" },
   { test: "file_fullscreen-shadowdom.html" },
   { test: "file_fullscreen-top-layer.html" },
   { test: "file_fullscreen-backdrop.html" },
   { test: "file_fullscreen-nested.html" },
   { test: "file_fullscreen-prefixed.html" },
-  { test: "file_fullscreen-unprefix-disabled.html" },
   { test: "file_fullscreen-lenient-setters.html" },
   { test: "file_fullscreen-table.html" },
   { test: "file_fullscreen-event-order.html" },
   { test: "file_fullscreen-featurePolicy.html",
     prefs: [["dom.security.featurePolicy.enabled", true],
             ["dom.security.featurePolicy.header.enabled", true],
             ["dom.security.featurePolicy.webidl.enabled", true]] },
   { test: "file_fullscreen-async.html" },
@@ -168,17 +167,16 @@ 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/media/tests/mochitest/test_getUserMedia_basicScreenshare.html
+++ b/dom/media/tests/mochitest/test_getUserMedia_basicScreenshare.html
@@ -64,17 +64,16 @@
 
   /**
    * Run a test to verify that we can complete a start and stop media playback
    * cycle for a screenshare MediaStream on a video HTMLMediaElement.
    */
   runTest(async function () {
     await pushPrefs(
       ["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"],
     );
 
     let testVideo = createMediaElement('video', 'testVideo');
 
     let canvas = document.createElement("canvas");
--- a/dom/plugins/test/mochitest/test_bug1028200-1.html
+++ b/dom/plugins/test/mochitest/test_bug1028200-1.html
@@ -43,17 +43,16 @@
       add_task(async function() {
         /* Needed to be able to programatically (without user interaction) enter
          * fullscreen  (has been deemed a security issue otherwise and therefore
          * disabled by default)
          */
         await SpecialPowers.pushPrefEnv({
           "set": [
             ["full-screen-api.allow-trusted-requests-only", false],
-            ["full-screen-api.unprefix.enabled", true],
           ],
         });
       });
 
       add_task(async function() {
         let fullScreenElement = document.getElementById("div1");
         let plugin = document.getElementById("iframe1")
           .contentDocument.getElementById("iframe2")
--- a/dom/plugins/test/mochitest/test_bug1028200-2.html
+++ b/dom/plugins/test/mochitest/test_bug1028200-2.html
@@ -43,17 +43,16 @@
       add_task(async function() {
         /* Needed to be able to programatically (without user interaction) enter
          * fullscreen  (has been deemed a security issue otherwise and therefore
          * disabled by default)
          */
         await SpecialPowers.pushPrefEnv({
           "set": [
             ["full-screen-api.allow-trusted-requests-only", false],
-            ["full-screen-api.unprefix.enabled", true],
           ],
         });
       });
 
       add_task(async function() {
         let fullScreenElement = document.getElementById("div1");
         let plugin = document.getElementById("plugin1");
 
--- a/dom/plugins/test/mochitest/test_bug1028200-3.html
+++ b/dom/plugins/test/mochitest/test_bug1028200-3.html
@@ -43,17 +43,16 @@
       add_task(async function() {
         /* Needed to be able to programatically (without user interaction) enter
          * fullscreen  (has been deemed a security issue otherwise and therefore
          * disabled by default)
          */
         await SpecialPowers.pushPrefEnv({
           "set": [
             ["full-screen-api.allow-trusted-requests-only", false],
-            ["full-screen-api.unprefix.enabled", true],
           ],
         });
       });
 
       add_task(async function() {
         let fullScreenElement = document.getElementById("iframe1");
         let plugin = document.getElementById("iframe1")
              .contentDocument.getElementById("iframe2")
--- a/dom/plugins/test/mochitest/test_bug1028200-4.html
+++ b/dom/plugins/test/mochitest/test_bug1028200-4.html
@@ -43,17 +43,16 @@
       add_task(async function() {
         /* Needed to be able to programatically (without user interaction) enter
          * fullscreen  (has been deemed a security issue otherwise and therefore
          * disabled by default)
          */
         await SpecialPowers.pushPrefEnv({
           "set": [
             ["full-screen-api.allow-trusted-requests-only", false],
-            ["full-screen-api.unprefix.enabled", true],
           ],
         });
       });
 
       add_task(async function() {
         let fullScreenElement = document.getElementById("iframe1");
         let plugin = document.getElementById("iframe1")
              .contentDocument.getElementById("iframe2")
--- a/dom/plugins/test/mochitest/test_bug1028200-5.html
+++ b/dom/plugins/test/mochitest/test_bug1028200-5.html
@@ -43,17 +43,16 @@
       add_task(async function() {
         /* Needed to be able to programatically (without user interaction) enter
          * fullscreen  (has been deemed a security issue otherwise and therefore
          * disabled by default)
          */
         await SpecialPowers.pushPrefEnv({
           "set": [
             ["full-screen-api.allow-trusted-requests-only", false],
-            ["full-screen-api.unprefix.enabled", true],
           ],
         });
       });
 
       add_task(async function() {
         let fullScreenElement = document.getElementById("div1");
         let plugin = document.getElementById("plugin1");
 
--- a/dom/plugins/test/mochitest/test_bug1028200-6.html
+++ b/dom/plugins/test/mochitest/test_bug1028200-6.html
@@ -43,17 +43,16 @@
       add_task(async function() {
         /* Needed to be able to programatically (without user interaction) enter
          * fullscreen  (has been deemed a security issue otherwise and therefore
          * disabled by default)
          */
         await SpecialPowers.pushPrefEnv({
           "set": [
             ["full-screen-api.allow-trusted-requests-only", false],
-            ["full-screen-api.unprefix.enabled", true],
           ],
         });
       });
 
       add_task(async function() {
         let fullScreenElement = document.getElementById("iframe1");
         let plugin = document.getElementById("plugin1");
 
--- a/dom/plugins/test/mochitest/test_bug1028200-7.html
+++ b/dom/plugins/test/mochitest/test_bug1028200-7.html
@@ -43,17 +43,16 @@
       add_task(async function() {
         /* Needed to be able to programatically (without user interaction) enter
          * fullscreen  (has been deemed a security issue otherwise and therefore
          * disabled by default)
          */
         await SpecialPowers.pushPrefEnv({
           "set": [
             ["full-screen-api.allow-trusted-requests-only", false],
-            ["full-screen-api.unprefix.enabled", true],
           ],
         });
       });
 
       add_task(async function() {
         let fullScreenElement = document.getElementById("iframeA");
         let plugin = document.getElementById("iframe1")
           .contentDocument.getElementById("iframe2")
--- a/dom/tests/mochitest/pointerlock/test_pointerlock-api.html
+++ b/dom/tests/mochitest/pointerlock/test_pointerlock-api.html
@@ -25,17 +25,16 @@ 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/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -283,34 +283,32 @@ partial interface Document {
 
   [SameObject] readonly attribute HTMLAllCollection all;
 };
 
 // https://fullscreen.spec.whatwg.org/#api
 partial interface Document {
   // Note: Per spec the 'S' in these two is lowercase, but the "Moz"
   // versions have it uppercase.
-  [LenientSetter, Unscopable, Func="Document::IsUnprefixedFullscreenEnabled"]
+  [LenientSetter, Unscopable]
   readonly attribute boolean fullscreen;
   [BinaryName="fullscreen"]
   readonly attribute boolean mozFullScreen;
-  [LenientSetter, Func="Document::IsUnprefixedFullscreenEnabled", NeedsCallerType]
+  [LenientSetter, NeedsCallerType]
   readonly attribute boolean fullscreenEnabled;
   [BinaryName="fullscreenEnabled", NeedsCallerType]
   readonly attribute boolean mozFullScreenEnabled;
 
-  [Throws, Func="Document::IsUnprefixedFullscreenEnabled"]
+  [Throws]
   Promise<void> exitFullscreen();
   [Throws, BinaryName="exitFullscreen"]
   Promise<void> mozCancelFullScreen();
 
   // Events handlers
-  [Func="Document::IsUnprefixedFullscreenEnabled"]
   attribute EventHandler onfullscreenchange;
-  [Func="Document::IsUnprefixedFullscreenEnabled"]
   attribute EventHandler onfullscreenerror;
 };
 
 // https://w3c.github.io/pointerlock/#extensions-to-the-document-interface
 // https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
 partial interface Document {
   void exitPointerLock();
 
--- a/dom/webidl/DocumentOrShadowRoot.webidl
+++ b/dom/webidl/DocumentOrShadowRoot.webidl
@@ -23,17 +23,17 @@ interface mixin DocumentOrShadowRoot {
 
   // Not implemented yet: bug 1430307.
   // CaretPosition? caretPositionFromPoint (float x, float y);
 
   readonly attribute Element? activeElement;
   readonly attribute StyleSheetList styleSheets;
 
   readonly attribute Element? pointerLockElement;
-  [LenientSetter, Func="Document::IsUnprefixedFullscreenEnabled"]
+  [LenientSetter]
   readonly attribute Element? fullscreenElement;
   [BinaryName="fullscreenElement"]
   readonly attribute Element? mozFullScreenElement;
 };
 
 // https://drafts.csswg.org/web-animations-1/#extensions-to-the-documentorshadowroot-interface-mixin
 partial interface mixin DocumentOrShadowRoot {
   [Func="Document::IsWebAnimationsGetAnimationsEnabled"]
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -277,25 +277,23 @@ partial interface Element {
 Element includes ChildNode;
 Element includes NonDocumentTypeChildNode;
 Element includes ParentNode;
 Element includes Animatable;
 Element includes GeometryUtils;
 
 // https://fullscreen.spec.whatwg.org/#api
 partial interface Element {
-  [Throws, Func="Document::IsUnprefixedFullscreenEnabled", NeedsCallerType]
+  [Throws, NeedsCallerType]
   Promise<void> requestFullscreen();
   [Throws, BinaryName="requestFullscreen", NeedsCallerType, Deprecated="MozRequestFullScreenDeprecatedPrefix"]
   Promise<void> mozRequestFullScreen();
 
   // Events handlers
-  [Func="Document::IsUnprefixedFullscreenEnabled"]
   attribute EventHandler onfullscreenchange;
-  [Func="Document::IsUnprefixedFullscreenEnabled"]
   attribute EventHandler onfullscreenerror;
 };
 
 // https://w3c.github.io/pointerlock/#extensions-to-the-element-interface
 partial interface Element {
   [NeedsCallerType, Pref="dom.pointer-lock.enabled"]
   void requestPointerLock();
 };
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -3063,22 +3063,16 @@
 # Prefs starting with "full-screen-api."
 #---------------------------------------------------------------------------
 
 - name: full-screen-api.enabled
   type: bool
   value: false
   mirror: always
 
-- name: full-screen-api.unprefix.enabled
-  type: RelaxedAtomicBool
-  value: true
-  mirror: always
-  rust: true
-
 - name: full-screen-api.allow-trusted-requests-only
   type: bool
   value: true
   mirror: always
 
 - name: full-screen-api.mouse-event-allow-left-button-only
   type: bool
   value: true
--- a/servo/components/style/gecko/non_ts_pseudo_class_list.rs
+++ b/servo/components/style/gecko/non_ts_pseudo_class_list.rs
@@ -43,18 +43,17 @@ macro_rules! apply_non_ts_list {
                 ("focus", Focus, focus, IN_FOCUS_STATE, _),
                 ("focus-within", FocusWithin, focusWithin, IN_FOCUS_WITHIN_STATE, _),
                 ("hover", Hover, hover, IN_HOVER_STATE, _),
                 ("-moz-drag-over", MozDragOver, mozDragOver, IN_DRAGOVER_STATE, _),
                 ("target", Target, target, IN_TARGET_STATE, _),
                 ("indeterminate", Indeterminate, indeterminate, IN_INDETERMINATE_STATE, _),
                 ("-moz-devtools-highlighted", MozDevtoolsHighlighted, mozDevtoolsHighlighted, IN_DEVTOOLS_HIGHLIGHTED_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
                 ("-moz-styleeditor-transitioning", MozStyleeditorTransitioning, mozStyleeditorTransitioning, IN_STYLEEDITOR_TRANSITIONING_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
-                ("fullscreen", Fullscreen, fullscreen, IN_FULLSCREEN_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
-                ("-moz-full-screen", MozFullScreen, mozFullScreen, IN_FULLSCREEN_STATE, _),
+                ("fullscreen", Fullscreen, fullscreen, IN_FULLSCREEN_STATE, _),
                 // TODO(emilio): This is inconsistently named (the capital R).
                 ("-moz-focusring", MozFocusRing, mozFocusRing, IN_FOCUSRING_STATE, _),
                 ("-moz-broken", MozBroken, mozBroken, IN_BROKEN_STATE, _),
                 ("-moz-loading", MozLoading, mozLoading, IN_LOADING_STATE, _),
                 ("-moz-suppressed", MozSuppressed, mozSuppressed, IN_SUPPRESSED_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
                 ("-moz-has-dir-attr", MozHasDirAttr, mozHasDirAttr, IN_HAS_DIR_ATTR_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
                 ("-moz-dir-attr-ltr", MozDirAttrLTR, mozDirAttrLTR, IN_HAS_DIR_ATTR_LTR_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
                 ("-moz-dir-attr-rtl", MozDirAttrRTL, mozDirAttrRTL, IN_HAS_DIR_ATTR_RTL_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
--- a/servo/components/style/gecko/selector_parser.rs
+++ b/servo/components/style/gecko/selector_parser.rs
@@ -132,16 +132,17 @@ impl NonTSPseudoClass {
     /// Parses the name and returns a non-ts-pseudo-class if succeeds.
     /// None otherwise. It doesn't check whether the pseudo-class is enabled
     /// in a particular state.
     pub fn parse_non_functional(name: &str) -> Option<Self> {
         macro_rules! pseudo_class_parse {
             ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => {
                 match_ignore_ascii_case! { &name,
                     $($css => Some(NonTSPseudoClass::$name),)*
+                    "-moz-full-screen" => Some(NonTSPseudoClass::Fullscreen),
                     _ => None,
                 }
             }
         }
         apply_non_ts_list!(pseudo_class_parse)
     }
 
     /// Returns true if this pseudo-class has any of the given flags set.
@@ -164,26 +165,19 @@ impl NonTSPseudoClass {
                     NonTSPseudoClass::MozAny(_) => false,
                 }
             }
         }
         apply_non_ts_list!(pseudo_class_check_is_enabled_in)
     }
 
     /// Returns whether the pseudo-class is enabled in content sheets.
+    #[inline]
     fn is_enabled_in_content(&self) -> bool {
-        match *self {
-            // For pseudo-classes with pref, the availability in content
-            // depends on the pref.
-            NonTSPseudoClass::Fullscreen => static_prefs::pref!("full-screen-api.unprefix.enabled"),
-            // Otherwise, a pseudo-class is enabled in content when it
-            // doesn't have any enabled flag.
-            _ => !self
-                .has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
-        }
+        !self.has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME)
     }
 
     /// Get the state flag associated with a pseudo-class, if any.
     pub fn state_flag(&self) -> ElementState {
         macro_rules! flag {
             (_) => {
                 ElementState::empty()
             };
--- a/servo/components/style/gecko/wrapper.rs
+++ b/servo/components/style/gecko/wrapper.rs
@@ -2040,17 +2040,16 @@ impl<'le> ::selectors::Element for Gecko
         use selectors::matching::*;
         match *pseudo_class {
             NonTSPseudoClass::Defined |
             NonTSPseudoClass::Focus |
             NonTSPseudoClass::Enabled |
             NonTSPseudoClass::Disabled |
             NonTSPseudoClass::Checked |
             NonTSPseudoClass::Fullscreen |
-            NonTSPseudoClass::MozFullScreen |
             NonTSPseudoClass::Indeterminate |
             NonTSPseudoClass::PlaceholderShown |
             NonTSPseudoClass::Target |
             NonTSPseudoClass::Valid |
             NonTSPseudoClass::Invalid |
             NonTSPseudoClass::MozUIValid |
             NonTSPseudoClass::MozBroken |
             NonTSPseudoClass::MozUserDisabled |
deleted file mode 100644
--- a/testing/web-platform/meta/fullscreen/__dir__.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-prefs: [full-screen-api.unprefix.enabled:true]
--- a/testing/web-platform/meta/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html.ini
+++ b/testing/web-platform/meta/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen.html.ini
@@ -1,10 +1,9 @@
 [iframe-allowfullscreen.html]
-  prefs: [full-screen-api.unprefix.enabled:true]
   [iframe-same-origin-allowfullscreen]
     expected: FAIL
 
   [iframe-cross-origin-allowfullscreen]
     expected: FAIL
 
   [iframe-noload-noallowfullscreen]
     expected: FAIL