Bug 1570212 - Convert dom.disable_window_print to a static pref. r=mccr8

Differential Revision: https://phabricator.services.mozilla.com/D40158

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicholas Nethercote 2019-08-02 11:59:05 +00:00
parent af1a8f2d27
commit eb6de3be4d
3 changed files with 10 additions and 8 deletions

View File

@ -3506,13 +3506,7 @@ void nsGlobalWindowInner::Stop(ErrorResult& aError) {
/* static */
bool nsGlobalWindowInner::IsWindowPrintEnabled(JSContext*, JSObject*) {
static bool called = false;
static bool printDisabled = false;
if (!called) {
called = true;
Preferences::AddBoolVarCache(&printDisabled, "dom.disable_window_print");
}
return !printDisabled;
return !StaticPrefs::dom_disable_window_print();
}
void nsGlobalWindowInner::Print(ErrorResult& aError) {

View File

@ -223,7 +223,6 @@ pref("privacy.popups.showBrowserMessage", true);
/* disable opening windows with the dialog feature */
pref("dom.disable_window_open_dialog_feature", true);
pref("dom.disable_window_showModalDialog", true);
pref("dom.disable_window_print", true);
pref("dom.disable_window_find", true);
pref("keyword.enabled", true);

View File

@ -1265,6 +1265,15 @@
value: false
mirror: always
- name: dom.disable_window_print
type: bool
#ifdef ANDROID
value: true
#else
value: false
#endif
mirror: always
- name: dom.element.transform-getters.enabled
type: bool
value: false