Bug 667529 - Don't use the "Other" entry in View > Zoom if a matching menu item is available. r=Neil
authorrsx11m <rsx11m.pub@gmail.com>
Mon, 27 Jun 2011 11:21:00 +0200
changeset 8099 c8093f8d23e173a368446b8a8c3abbb67a54390c
parent 8098 77c0f9cf803d31e7b60f527740a2e8684df9db22
child 8100 c4d0fb70b99a082988a33b8a969fc353ff10c591
push id6227
push userjh@junetz.de
push dateTue, 12 Jul 2011 17:13:05 +0000
treeherdercomm-central@c8093f8d23e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs667529
Bug 667529 - Don't use the "Other" entry in View > Zoom if a matching menu item is available. r=Neil
suite/common/viewZoomOverlay.js
--- a/suite/common/viewZoomOverlay.js
+++ b/suite/common/viewZoomOverlay.js
@@ -410,25 +410,25 @@ function updateZoomMenu() {
   var zoomOther = document.getElementById("menu_zoomOther");
   var label = zoomBundle.getString("labelOther");
   var factorOther = zoomOther.getAttribute("value") ||
                     Math.round(ZoomManager.MAX * 100);
   zoomOther.setAttribute("label", label.replace(/%zoom%/, factorOther));
   zoomOther.setAttribute("value", factorOther);
 
   var popup = document.getElementById("menu_zoomPopup");
-  var item = popup.firstChild;
+  var item = popup.lastChild;
   while (item) {
     if (item.getAttribute("name") == "zoom") {
       if (item.getAttribute("value") == Math.round(ZoomManager.zoom * 100))
         item.setAttribute("checked","true");
       else
         item.removeAttribute("checked");
     }
-    item = item.nextSibling;
+    item = item.previousSibling;
   }
 }
 
 function setZoomOther() {
   var zoomOther = document.getElementById("menu_zoomOther");
   // open dialog and ask for new value
   var o = {value: zoomOther.getAttribute("value"),
            zoomMin: ZoomManager.MIN * 100,