Bug 1360140 - Add Learn More link for the Use recommended performance settings checkbox draft
authorEvan Tseng <evan@tseng.io>
Thu, 04 May 2017 21:31:05 +0800
changeset 572681 d598a0c8b9a522eece82b120d6109e7745677301
parent 572425 4a6a71f4aa22e4dc3961884ce505ce34bdd799a2
child 627085 17ba0dceb52c7063d8fd660440370c793ce98618
push id57140
push userbmo:evan@tseng.io
push dateThu, 04 May 2017 13:31:44 +0000
bugs1360140
milestone55.0a1
Bug 1360140 - Add Learn More link for the Use recommended performance settings checkbox MozReview-Commit-ID: 3IQAbU3ovhg
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/main.xul
browser/locales/en-US/chrome/browser/preferences/advanced.dtd
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -67,16 +67,20 @@ var gMainPane = {
 
     this.buildContentProcessCountMenuList();
 
     let addEnginesLink = document.getElementById("addEngines");
     let searchEnginesURL = Services.wm.getMostRecentWindow("navigator:browser")
                                       .BrowserSearch.searchEnginesURL;
     addEnginesLink.setAttribute("href", searchEnginesURL);
 
+    let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
+    let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
+    performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
+
     window.addEventListener("click", this);
     window.addEventListener("command", this);
     window.addEventListener("dragstart", this);
     window.addEventListener("keypress", this);
     window.addEventListener("select", this);
     window.addEventListener("blur", this, true);
 
     Services.obs.addObserver(this, "browser-search-engine-modified");
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -560,20 +560,23 @@
             accesskey="&useSmoothScrolling.accesskey;"
             preference="general.smoothScroll"/>
 </groupbox>
 
 <!-- Performance -->
 <groupbox id="performanceGroup" data-category="paneGeneral" hidden="true">
   <caption><label>&performance.label;</label></caption>
 
-  <checkbox id="useRecommendedPerformanceSettings"
-            label="&useRecommendedPerformanceSettings.label;"
-            accesskey="&useRecommendedPerformanceSettings.accesskey;"
-            preference="browser.preferences.defaultPerformanceSettings.enabled"/>
+  <hbox align="center">
+    <checkbox id="useRecommendedPerformanceSettings"
+              label="&useRecommendedPerformanceSettings.label;"
+              accesskey="&useRecommendedPerformanceSettings.accesskey;"
+              preference="browser.preferences.defaultPerformanceSettings.enabled"/>
+    <label id="performanceSettingsLearnMore" class="learnMore text-link">&performanceSettingsLearnMore.label;</label>
+  </hbox>
   <description class="indent">&useRecommendedPerformanceSettings.description;</description>
 
   <vbox id="performanceSettings" class="indent" hidden="true">
     <checkbox id="allowHWAccel"
               label="&allowHWAccel.label;"
               accesskey="&allowHWAccel.accesskey;"
               preference="layers.acceleration.disabled"/>
     <hbox align="center">
--- a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
@@ -127,14 +127,16 @@
 
 <!ENTITY performance.label               "Performance">
 <!ENTITY useRecommendedPerformanceSettings.label
                                          "Use recommended performance settings">
 <!ENTITY useRecommendedPerformanceSettings.description
                                          "Recommended performance settings are tailored to your computer.">
 <!ENTITY useRecommendedPerformanceSettings.accesskey
                                          "U">
+<!ENTITY performanceSettingsLearnMore.label
+                                         "Learn More">                                
 <!ENTITY limitContentProcess.label       "Content process limit">
 <!ENTITY limitContentProcess.description
                                          "More content processes can make &brandShortName; more responsive when using multiple tabs, but will also consume more memory.">
 <!ENTITY limitContentProcess.accesskey   "L">
 <!ENTITY allowHWAccel.label              "Use hardware acceleration when available">
 <!ENTITY allowHWAccel.accesskey          "r">