зеркало из https://github.com/mozilla/gecko-dev.git
Bug 481752: remove broken plugin-disabling code (re-enable plugins by default), r=stuart
This commit is contained in:
Родитель
31ad419bae
Коммит
dc01cb63fb
|
@ -260,7 +260,7 @@ pref("privacy.item.downloads", true);
|
|||
pref("privacy.item.passwords", true);
|
||||
pref("privacy.item.sessions", true);
|
||||
|
||||
pref("plugins.enabled", false);
|
||||
pref("plugins.enabled", true);
|
||||
|
||||
#ifdef WINCE
|
||||
pref("layout.css.dpi", 96);
|
||||
|
|
|
@ -61,6 +61,11 @@ const kDefaultFavIconURL = "chrome://browser/skin/images/default-favicon.png";
|
|||
"gURIFixup",
|
||||
"@mozilla.org/docshell/urifixup;1",
|
||||
[Ci.nsIURIFixup]
|
||||
],
|
||||
[
|
||||
"gPrefService",
|
||||
"@mozilla.org/preferences-service;1",
|
||||
[Ci.nsIPrefBranch2]
|
||||
]
|
||||
].forEach(function (service) {
|
||||
let [name, contract, ifaces] = service;
|
||||
|
|
|
@ -51,15 +51,6 @@ const FINDSTATE_FIND_PREVIOUS = 2;
|
|||
|
||||
Cu.import("resource://gre/modules/SpatialNavigation.js");
|
||||
|
||||
// create a lazy-initialized handle for the pref service on the global object
|
||||
// in the style of bug 385809
|
||||
__defineGetter__("gPrefService", function () {
|
||||
delete gPrefService;
|
||||
var gPrefService;
|
||||
return gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch2);
|
||||
});
|
||||
|
||||
function getBrowser() {
|
||||
return Browser.selectedBrowser;
|
||||
}
|
||||
|
@ -241,14 +232,12 @@ var Browser = {
|
|||
this.addTab(whereURI, true);
|
||||
}
|
||||
|
||||
var disablePlugins = true;
|
||||
try { disablePlugins = gPrefService.getBoolPref("temporary.disablePlugins"); } catch (ex) { }
|
||||
if (disablePlugins)
|
||||
{
|
||||
document.getElementById("plugins.enabled").pref.value = false;
|
||||
this.setPluginState(false);
|
||||
// Re-enable plugins if we had previously disabled them. We should get rid of
|
||||
// this code eventually...
|
||||
if (gPrefService.prefHasUserValue("temporary.disablePlugins")) {
|
||||
gPrefService.clearUserPref("temporary.disablePlugins");
|
||||
this.setPluginState(true);
|
||||
}
|
||||
gPrefService.setBoolPref("temporary.disablePlugins", false);
|
||||
},
|
||||
|
||||
updateViewportSize: function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче