Bug 1361195 - Round the searchbar min-width to ensure one-off buttons are correctly sized on HiDPI. r=past, a=lizzard
authorFlorian Quèze <florian@queze.net>
Fri, 23 Jun 2017 16:25:45 +0200
changeset 414272 2a6eab6454318ba7690a40eb29b0ea9fc5aa75d1
parent 414271 214d63665fe952c20edf41cd322f6dbf276abc0e
child 414273 aae715e5060bcc675cb09113b3b1198bb0c94694
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast, lizzard
bugs1361195
milestone55.0
Bug 1361195 - Round the searchbar min-width to ensure one-off buttons are correctly sized on HiDPI. r=past, a=lizzard
browser/components/search/content/search.xml
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -1091,17 +1091,17 @@
         let DOMUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDOMWindowUtils);
         let textboxRect = DOMUtils.getBoundsWithoutFlushing(this.mInput);
         let inputRect = DOMUtils.getBoundsWithoutFlushing(this.mInput.inputField);
 
         // Ensure the panel is wide enough to fit at least 3 engines.
         let minWidth = Math.max(textboxRect.width,
                                 this.oneOffButtons.buttonWidth * 3);
-        this.style.minWidth = minWidth + "px";
+        this.style.minWidth = Math.round(minWidth) + "px";
         // Alignment of the panel with the searchbar is obtained with negative
         // margins.
         this.style.marginLeft = (textboxRect.left - inputRect.left) + "px";
         // This second margin is needed when the direction is reversed,
         // eg. when using command+shift+X.
         this.style.marginRight = (inputRect.right - textboxRect.right) + "px";
 
         // First handle deciding if we are showing the reduced version of the