Bug 1260763 - advanced pref panel: move onchange listener from xul to js;r=jaws
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 27 Apr 2016 19:32:05 +0200
changeset 334476 3e2e4184eeffe605002d06eca912050e88ec3e04
parent 334475 37465cb0c50550fd6f673223942b3c479e39e569
child 334477 70b3e6ac383941005652196f432d9134dea468a7
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1260763
milestone49.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 1260763 - advanced pref panel: move onchange listener from xul to js;r=jaws MozReview-Commit-ID: 54GEpX5DV8W
browser/components/preferences/in-content/advanced.js
browser/components/preferences/in-content/advanced.xul
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -84,16 +84,18 @@ var gAdvancedPane = {
                      gAdvancedPane.updateWritePrefs);
     setEventListener("showUpdateHistory", "command",
                      gAdvancedPane.showUpdates);
 #endif
     setEventListener("viewCertificatesButton", "command",
                      gAdvancedPane.showCertificates);
     setEventListener("viewSecurityDevicesButton", "command",
                      gAdvancedPane.showSecurityDevices);
+    setEventListener("cacheSize", "change",
+                     gAdvancedPane.updateCacheSizePref);
 
 #ifdef MOZ_WIDGET_GTK
     // GTK tabbox' allow the scroll wheel to change the selected tab,
     // but we don't want this behavior for the in-content preferences.
     let tabsElement = document.getElementById("tabsElement");
     tabsElement.addEventListener("DOMMouseScroll", event => {
       event.stopPropagation();
     }, true);
--- a/browser/components/preferences/in-content/advanced.xul
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -278,17 +278,16 @@
                     accesskey="&overrideSmartCacheSize.accesskey;"/>
         </hbox>
         <hbox align="center" class="indent">
           <label id="useCacheBefore" control="cacheSize"
                  accesskey="&limitCacheSizeBefore.accesskey;">
             &limitCacheSizeBefore.label;
           </label>
           <textbox id="cacheSize" type="number" size="4" max="1024"
-                   onchange="gAdvancedPane.updateCacheSizePref();"
                    aria-labelledby="useCacheBefore cacheSize useCacheAfter"/>
           <label id="useCacheAfter" flex="1">&limitCacheSizeAfter.label;</label>
         </hbox>
       </groupbox>
 
       <!-- Offline apps -->
       <groupbox id="offlineGroup">
         <caption><label>&offlineStorage2.label;</label></caption>