Bug 1584931 - P3. Hide the flashblock checkbox when fission is enabled. r=Gijs
authorDimi Lee <dlee@mozilla.com>
Wed, 04 Dec 2019 09:00:36 +0000
changeset 505286 808799f11727c9d66f4beeb9f876a40cdca1c83e
parent 505285 e33d5fb3f370647b0e5acd308d6dd6cd269bf136
child 505287 d6c086ca57803c699016d97f940c49619642b769
push id36881
push userdvarga@mozilla.com
push dateWed, 04 Dec 2019 16:22:31 +0000
treeherdermozilla-central@13fb375eaf14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1584931
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 1584931 - P3. Hide the flashblock checkbox when fission is enabled. r=Gijs Depends on D55091 Differential Revision: https://phabricator.services.mozilla.com/D55092
toolkit/mozapps/extensions/content/pluginPrefs.js
--- a/toolkit/mozapps/extensions/content/pluginPrefs.js
+++ b/toolkit/mozapps/extensions/content/pluginPrefs.js
@@ -37,23 +37,32 @@ async function renderPluginMetadata(id) 
       .join(": ");
     types.push(type.type + (extras ? " (" + extras + ")" : ""));
   }
   typeLabel.textContent = types.join(",\n");
   let showProtectedModePref = canDisableFlashProtectedMode(plugin);
   document
     .getElementById("pluginEnableProtectedMode")
     .setAttribute("collapsed", showProtectedModePref ? "" : "true");
+
+  // Disable flash blocking when Fission is enabled (See Bug 1584931).
+  document.getElementById(
+    "pluginFlashBlocking"
+  ).hidden = canDisableFlashBlocking();
 }
 
 // Protected mode is win32-only, not win64
 function canDisableFlashProtectedMode(aPlugin) {
   return aPlugin.isFlashPlugin && Services.appinfo.XPCOMABI == "x86-msvc";
 }
 
+function canDisableFlashBlocking() {
+  return Services.prefs.getBoolPref("fission.autostart");
+}
+
 function init() {
   let params = new URLSearchParams(location.hash.slice(1));
   renderPluginMetadata(params.get("id"));
 
   for (let id of Object.keys(PREFS)) {
     let checkbox = document.getElementById(id);
     var prefVal = Services.prefs.getBoolPref(PREFS[id].pref);
     checkbox.checked = PREFS[id].invert ? !prefVal : prefVal;