Bug 1521040 - Remove ondialoghelp attribute and add custom event handler r=Gijs
authorvinoth <cegvinoth@gmail.com>
Mon, 21 Jan 2019 21:29:54 +0000
changeset 514827 63d80647ebd2
parent 514826 3b3ceab396f6
child 514828 8a2bc240e695
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1521040
milestone66.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 1521040 - Remove ondialoghelp attribute and add custom event handler r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D16946
browser/base/content/utilityOverlay.js
browser/components/preferences/browserLanguages.xul
browser/components/preferences/colors.xul
browser/components/preferences/connection.xul
browser/components/preferences/fonts.xul
browser/components/preferences/languages.xul
browser/components/preferences/sanitize.xul
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -968,16 +968,18 @@ function openHelpLink(aHelpTopic, aCalle
   var url = getHelpLinkURL(aHelpTopic);
   var where = aWhere;
   if (!aWhere)
     where = aCalledFromModal ? "window" : "tab";
 
   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.
   var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
 
   var helpTopic = document.documentElement.getAttribute("helpTopic");
   openHelpLink(helpTopic, !instantApply);
 }
--- a/browser/components/preferences/browserLanguages.xul
+++ b/browser/components/preferences/browserLanguages.xul
@@ -11,18 +11,17 @@
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="browser-languages-window"
         data-l10n-attrs="title, style"
         buttons="accept,cancel,help"
         persist="screenX screenY"
         role="dialog"
         onload="gBrowserLanguagesDialog.onLoad();"
         onbeforeaccept="return gBrowserLanguagesDialog.beforeAccept();"
-        helpTopic="prefs-languages"
-        ondialoghelp="openPrefsHelp()">
+        helpTopic="prefs-languages">
 
   <linkset>
     <link rel="localization" href="branding/brand.ftl"/>
     <link rel="localization" href="browser/preferences/languages.ftl"/>
   </linkset>
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
--- a/browser/components/preferences/colors.xul
+++ b/browser/components/preferences/colors.xul
@@ -11,18 +11,17 @@
 <dialog id="ColorsDialog" type="child" class="prefwindow"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         data-l10n-id="colors-window"
         data-l10n-attrs="title, style"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
-        helpTopic="prefs-fonts-and-colors"
-        ondialoghelp="openPrefsHelp()">
+        helpTopic="prefs-fonts-and-colors">
 
   <linkset>
     <link rel="localization" href="browser/preferences/colors.ftl"/>
   </linkset>
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
 
--- a/browser/components/preferences/connection.xul
+++ b/browser/components/preferences/connection.xul
@@ -12,18 +12,17 @@
         xmlns:html="http://www.w3.org/1999/xhtml"
         data-l10n-id="connection-window"
         data-l10n-attrs="title, style"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
         onbeforeaccept="return gConnectionsDialog.beforeAccept();"
         onload="gConnectionsDialog.checkForSystemProxy();"
-        helpTopic="prefs-connection-settings"
-        ondialoghelp="openPrefsHelp()">
+        helpTopic="prefs-connection-settings">
 
   <!-- Used for extension-controlled lockdown message -->
   <linkset>
     <link rel="localization" href="browser/preferences/connection.ftl"/>
     <link rel="localization" href="browser/preferences/preferences.ftl"/>
     <link rel="localization" href="branding/brand.ftl"/>
   </linkset>
 
--- a/browser/components/preferences/fonts.xul
+++ b/browser/components/preferences/fonts.xul
@@ -11,18 +11,17 @@
 <dialog id="FontsDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         data-l10n-id="fonts-window"
         data-l10n-attrs="title"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
-        helpTopic="prefs-fonts-and-colors"
-        ondialoghelp="openPrefsHelp()">
+        helpTopic="prefs-fonts-and-colors">
 
   <linkset>
     <link rel="localization" href="browser/preferences/fonts.ftl"/>
   </linkset>
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
 
--- a/browser/components/preferences/languages.xul
+++ b/browser/components/preferences/languages.xul
@@ -10,18 +10,17 @@
 <dialog id="LanguagesDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         data-l10n-id="webpage-languages-window"
         data-l10n-attrs="title, style"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
         onload="gLanguagesDialog.onLoad();"
-        helpTopic="prefs-languages"
-        ondialoghelp="openPrefsHelp()">
+        helpTopic="prefs-languages">
 
   <linkset>
     <link rel="localization" href="browser/preferences/languages.ftl"/>
   </linkset>
 
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
   <script type="application/javascript" src="chrome://browser/content/preferences/languages.js"/>
--- a/browser/components/preferences/sanitize.xul
+++ b/browser/components/preferences/sanitize.xul
@@ -11,17 +11,16 @@
 <!DOCTYPE dialog>
 
 <dialog id="SanitizeDialog" type="child"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         buttons="accept,cancel,help"
         persist="lastSelected screenX screenY"
         role="dialog"
-        ondialoghelp="openPrefsHelp()"
         data-l10n-id="sanitize-prefs"
         data-l10n-attrs="style"
         helpTopic="prefs-clear-private-data"
         onload="gSanitizeDialog.init();">
 
   <linkset>
     <link rel="localization" href="browser/sanitize.ftl"/>
     <link rel="localization" href="branding/brand.ftl"/>