Bug 517518: panning left always brings in the titlebar, r=bcombee, r=mfinkle
authorBenjamin Stover <bstover@mozilla.com>
Mon, 21 Sep 2009 18:01:33 -0400
changeset 65588 6c872b335828ccc454ac70d786599cf0a5f90a25
parent 65587 fb6ec37385b945d657b407451455a4cc8fb9baf0
child 65589 aa0b0596c01f531e6374bb412b3811041d97baab
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbcombee, mfinkle
bugs517518
Bug 517518: panning left always brings in the titlebar, r=bcombee, r=mfinkle
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1292,16 +1292,17 @@ Browser.MainDragger.prototype = {
     let leftLock = document.getElementById("tabs-container").getBoundingClientRect().right + scrollLeft;
     let rightLock = document.getElementById("browser-controls").getBoundingClientRect().left + scrollLeft;
     let amount = 0;
     if (doffset[0] > 0 && scrollLeft < leftLock) {
       amount = Math.min(doffset[0], leftLock - scrollLeft);
     } else if (doffset[0] < 0 && scrollRight > rightLock) {
       amount = Math.max(doffset[0], rightLock - scrollRight);
     }
+    amount = Math.round(amount);
     doffset[0] -= amount;
     return amount;
   },
 
   /** Pan scroller by the given amount. Updates doffset with leftovers. */
   _panScroller: function _panScroller(scroller, doffset) {
     let [x0, y0] = Browser.getScrollboxPosition(scroller);
     scroller.scrollBy(doffset[0], doffset[1]);