Bug 1532685 - avoid opening help pages more than once by adding listeners to the actual dialogs instead of using utilityOverlay.js, r=jaws

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Gijs Kruitbosch 2019-03-06 16:10:37 +00:00
parent b6be38fdef
commit 4fe5536b6a
7 changed files with 12 additions and 2 deletions

View File

@ -1035,8 +1035,6 @@ function openHelpLink(aHelpTopic, aCalledFromModal, aWhere) {
openTrustedLinkIn(url, where);
}
window.addEventListener("dialoghelp", openPrefsHelp);
function openPrefsHelp() {
// non-instant apply prefwindows are usually modal, so we can't open in the topmost window,
// since its probably behind the window.

View File

@ -18,6 +18,8 @@ ChromeUtils.defineModuleGetter(this, "RemoteSettings",
ChromeUtils.defineModuleGetter(this, "SelectionChangedMenulist",
"resource:///modules/SelectionChangedMenulist.jsm");
document.documentElement.addEventListener("dialoghelp", window.top.openPrefsHelp);
/* This dialog provides an interface for managing what language the browser is
* displayed in.
*

View File

@ -4,6 +4,8 @@
/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
document.documentElement.addEventListener("dialoghelp", window.top.openPrefsHelp);
Preferences.addAll([
{ id: "browser.display.document_color_use", type: "int" },
{ id: "browser.anchor_color", type: "string" },

View File

@ -7,6 +7,8 @@
/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
/* import-globals-from in-content/extensionControlled.js */
document.documentElement.addEventListener("dialoghelp", window.top.openPrefsHelp);
Preferences.addAll([
// Add network.proxy.autoconfig_url before network.proxy.type so they're
// both initialized when network.proxy.type initialization triggers a call to

View File

@ -18,6 +18,8 @@ const kFontSizeFmtVariable = "font.size.variable.%LANG%";
const kFontSizeFmtFixed = "font.size.fixed.%LANG%";
const kFontMinSizeFmt = "font.minimum-size.%LANG%";
document.documentElement.addEventListener("dialoghelp", window.top.openPrefsHelp);
Preferences.addAll([
{ id: "font.language.group", type: "wstring" },
{ id: "browser.display.use_document_fonts", type: "int" },

View File

@ -7,6 +7,8 @@
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
document.documentElement.addEventListener("dialoghelp", window.top.openPrefsHelp);
Preferences.addAll([
{ id: "intl.accept_languages", type: "wstring" },
{ id: "pref.browser.language.disable_button.up", type: "bool" },

View File

@ -5,6 +5,8 @@
/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
document.documentElement.addEventListener("dialoghelp", window.top.openPrefsHelp);
Preferences.addAll([
{ id: "privacy.clearOnShutdown.history", type: "bool" },
{ id: "privacy.clearOnShutdown.formdata", type: "bool" },