Bug 633279 - 1px of checkerboarding between address bar and web page [r=stechz]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 02 Mar 2011 14:11:05 -0800
changeset 2862 5d299232e62a2bdb8d7f20cc9b962966385e47fd
parent 2861 0e52e83ae30aa83bbbcaa95dc9d5c9079d41ab0a
child 2863 5c6b6d4800c7547a8e64da397cf66d27d3106bf1
push id2407
push usermbrubeck@mozilla.com
push dateThu, 03 Mar 2011 02:22:34 +0000
reviewersstechz
bugs633279
Bug 633279 - 1px of checkerboarding between address bar and web page [r=stechz]
chrome/content/bindings/browser.xml
chrome/content/browser.js
--- a/chrome/content/bindings/browser.xml
+++ b/chrome/content/bindings/browser.xml
@@ -1002,18 +1002,18 @@
             // Bounding content rectangle is in device pixels
             let contentView = this._contentView;
             let viewportSize = this._getViewportSize();
             let contentSize = this._getContentSize();
             // Calculate document dimensions in device pixels
             let scrollRangeX = contentSize.width - viewportSize.width;
             let scrollRangeY = contentSize.height - viewportSize.height;
 
-            x = Math.floor(Math.max(0, Math.min(scrollRangeX, contentView.scrollX + x)) - contentView.scrollX);
-            y = Math.floor(Math.max(0, Math.min(scrollRangeY, contentView.scrollY + y)) - contentView.scrollY);
+            x = Math.floor(Math.max(0, Math.min(scrollRangeX, contentView.scrollX + x))) - contentView.scrollX;
+            y = Math.floor(Math.max(0, Math.min(scrollRangeY, contentView.scrollY + y))) - contentView.scrollY;
 
             if (x == 0 && y == 0)
               return;
 
             contentView.scrollBy(x, y);
 
             this._lastPanTime = Date.now();
 
--- a/chrome/content/browser.js
+++ b/chrome/content/browser.js
@@ -1186,20 +1186,20 @@ Browser.MainDragger.prototype = {
     // Do content panning
     this._panContentView(getBrowser().getRootView(), doffset);
 
     if (this._hitSidebar && aIsKinetic)
       return; // No kinetic panning after we've stopped at the sidebar.
 
     // Any leftover panning in doffset would bring controls into view. Add to sidebar
     // away panning for the total scroll offset.
-    let offsetX = Math.round(doffset.x);
+    let offsetX = doffset.x;
     if ((this._stopAtSidebar > 0 && offsetX > 0) ||
         (this._stopAtSidebar < 0 && offsetX < 0)) {
-      if (offsetX != Math.round(panOffset.x))
+      if (offsetX != panOffset.x)
         this._hitSidebar = true;
       doffset.x = panOffset.x;
     } else {
       doffset.add(panOffset);
     }
 
     Browser.tryFloatToolbar(doffset.x, 0);
     this._panScroller(Browser.controlsScrollboxScroller, doffset);