Bug 851898 - Preemptively extend range of zoom levels to 20-800%. r=IanN, ui-r=Ratty
authorrsx11m <rsx11m.pub@gmail.com>
Tue, 29 Mar 2016 08:45:02 -0500
changeset 24724 b40a24089cd3525891b6c08320ef37ce1299a68e
parent 24723 71fc89a6bae956049e4153d871a77ff407443572
child 24725 b654ace3f360c939b4ee6aadde86425180dc416a
push id1657
push userclokep@gmail.com
push dateMon, 06 Jun 2016 19:50:21 +0000
treeherdercomm-beta@9fac989284b5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, Ratty
bugs851898
Bug 851898 - Preemptively extend range of zoom levels to 20-800%. r=IanN, ui-r=Ratty
suite/browser/browser-prefs.js
suite/common/viewZoomOverlay.js
suite/locales/en-US/chrome/common/viewZoomOverlay.properties
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -312,17 +312,17 @@ pref("browser.zoom.full", true);
 // Whether or not to save and restore zoom levels on a per-site basis.
 pref("browser.zoom.siteSpecific", true);
 
 // Whether or not to update background tabs to the current zoom level
 // once they come to the foreground (i.e. get activated).
 pref("browser.zoom.updateBackgroundTabs", true);
 
 // Zoom levels for View > Zoom and Ctrl +/- keyboard shortcuts
-pref("toolkit.zoomManager.zoomValues", "0.5,0.67,0.8,0.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4");
+pref("toolkit.zoomManager.zoomValues", "0.2,0.3,0.5,0.67,0.8,0.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3,4,5,6,7,8");
 
 pref("javascript.options.showInConsole",    true);
 
 pref("suite.manager.addons.openAsDialog", false);
 pref("suite.manager.dataman.openAsDialog", true);
 
 pref("offline.startup_state",            0);
 pref("offline.send.unsent_messages",            0);
--- a/suite/common/viewZoomOverlay.js
+++ b/suite/common/viewZoomOverlay.js
@@ -360,16 +360,26 @@ function registerZoomManager() {
       label = zoomBundle.getString("zoom.100.label");
       accessKey = zoomBundle.getString("zoom.100.accesskey");
       menuItem.setAttribute("key", "key_zoomReset");
     }
     else if (thisFactor == 200) {
       label = zoomBundle.getString("zoom.200.label");
       accessKey = zoomBundle.getString("zoom.200.accesskey");
     }
+    else if (thisFactor == Math.round(ZoomManager.MIN * 100)) {
+      label = zoomBundle.getString("zoom.min.label")
+                        .replace(/%zoom%/, thisFactor);
+      accessKey = zoomBundle.getString("zoom.min.accesskey");
+    }
+    else if (thisFactor == Math.round(ZoomManager.MAX * 100)) {
+      label = zoomBundle.getString("zoom.max.label")
+                        .replace(/%zoom%/, thisFactor);
+      accessKey = zoomBundle.getString("zoom.max.accesskey");
+    }
     else {
       label = zoomBundle.getString("zoom.value.label")
                         .replace(/%zoom%/, thisFactor);
       for (var j = 0; j < label.length; ++j) {
         var testKey = label[j];
         var indexKey = freeKeys.indexOf(testKey);
         if (indexKey >= 0) {
           accessKey = testKey;
--- a/suite/locales/en-US/chrome/common/viewZoomOverlay.properties
+++ b/suite/locales/en-US/chrome/common/viewZoomOverlay.properties
@@ -14,13 +14,19 @@ textZoom.label=Text Zoom (%zoom% %)
 textZoom.accesskey=Z
 
 # labels and accesskeys to emphasize the 100 % and 200 % entries
 zoom.100.label=100 % (Original Size)
 zoom.100.accesskey=z
 zoom.200.label=200 % (Double Size)
 zoom.200.accesskey=D
 
+# labels and accesskeys to emphasize the minimum and maximum boundaries
+zoom.min.label=%zoom% % (Minimum)
+zoom.min.accesskey=n
+zoom.max.label=%zoom% % (Maximum)
+zoom.max.accesskey=x
+
 # label pattern for remaining values, accesskeys are assigned dynamically
 zoom.value.label=%zoom% %
 
 zoom.other.label=Other (%zoom% %) …
 zoom.other.accesskey=O