Bug 1630691: Part 2 - Get rid of the "dom.mozBrowserFramesEnabled" pref. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D71227
This commit is contained in:
Kris Maglione
2020-04-29 19:29:11 +00:00
parent d040e38be1
commit 0ea5d93998
4 changed files with 2 additions and 34 deletions

View File

@@ -1713,9 +1713,6 @@ pref("dom.ipc.processPrelaunch.enabled", true);
pref("browser.migrate.chrome.history.limit", 2000); pref("browser.migrate.chrome.history.limit", 2000);
pref("browser.migrate.chrome.history.maxAgeInDays", 180); pref("browser.migrate.chrome.history.maxAgeInDays", 180);
// Enable browser frames for use on desktop. Only exposed to chrome callers.
pref("dom.mozBrowserFramesEnabled", true);
pref("extensions.pocket.api", "api.getpocket.com"); pref("extensions.pocket.api", "api.getpocket.com");
pref("extensions.pocket.enabled", true); pref("extensions.pocket.enabled", true);
pref("extensions.pocket.oAuthConsumerKey", "40249-e88c401e1b1f2242d9e441c4"); pref("extensions.pocket.oAuthConsumerKey", "40249-e88c401e1b1f2242d9e441c4");

View File

@@ -11,9 +11,6 @@ var EXPORTED_SYMBOLS = ["BrowserElementPromptService"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed";
const BROWSER_FRAMES_ENABLED_PREF = "dom.mozBrowserFramesEnabled";
function debug(msg) { function debug(msg) {
// dump("BrowserElementPromptService - " + msg + "\n"); // dump("BrowserElementPromptService - " + msg + "\n");
} }
@@ -648,16 +645,6 @@ var BrowserElementPromptService = {
return; return;
} }
// If the pref is disabled, do nothing except wait for the pref to change.
if (!this._browserFramesPrefEnabled()) {
Services.prefs.addObserver(
BROWSER_FRAMES_ENABLED_PREF,
this,
/* ownsWeak = */ true
);
return;
}
this._initialized = true; this._initialized = true;
this._browserElementParentMap = new WeakMap(); this._browserElementParentMap = new WeakMap();
@@ -734,17 +721,8 @@ var BrowserElementPromptService = {
delete this._browserElementChildMap[outerWindowID.data]; delete this._browserElementChildMap[outerWindowID.data];
}, },
_browserFramesPrefEnabled() {
return Services.prefs.getBoolPref(BROWSER_FRAMES_ENABLED_PREF, false);
},
observe(subject, topic, data) { observe(subject, topic, data) {
switch (topic) { switch (topic) {
case NS_PREFBRANCH_PREFCHANGE_TOPIC_ID:
if (data == BROWSER_FRAMES_ENABLED_PREF) {
this._init();
}
break;
case "outer-window-destroyed": case "outer-window-destroyed":
this._observeOuterWindowDestroyed(subject); this._observeOuterWindowDestroyed(subject);
break; break;

View File

@@ -255,9 +255,8 @@ nsresult nsGenericHTMLFrameElement::AfterSetAttr(
} }
} }
} else if (aName == nsGkAtoms::mozbrowser) { } else if (aName == nsGkAtoms::mozbrowser) {
mReallyIsBrowser = mReallyIsBrowser = !!aValue && XRE_IsParentProcess() &&
!!aValue && StaticPrefs::dom_mozBrowserFramesEnabled() && NodePrincipal()->IsSystemPrincipal();
XRE_IsParentProcess() && NodePrincipal()->IsSystemPrincipal();
} }
} }

View File

@@ -2084,12 +2084,6 @@
value: true value: true
mirror: always mirror: always
# Is support for mozBrowser frames enabled?
- name: dom.mozBrowserFramesEnabled
type: bool
value: false
mirror: always
# Whether we disable triggering mutation events for changes to style # Whether we disable triggering mutation events for changes to style
# attribute via CSSOM. # attribute via CSSOM.
# NOTE: This preference is used in unit tests. If it is removed or its default # NOTE: This preference is used in unit tests. If it is removed or its default