Bug 1191539 - Don't further increase the size of the displayport when rounding up. r=kats
authorBenoit Girard <b56girard@gmail.com>
Tue, 15 Sep 2015 16:45:02 -0400
changeset 295535 61baabe617c9786b3ce315709a39fa17e78b15fc
parent 295534 c5b25c30befc555a669338a15badd715744923ab
child 295536 c83c2741197af887a19179a24f1ed1ba6f25a661
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1191539
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1191539 - Don't further increase the size of the displayport when rounding up. r=kats
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -956,18 +956,18 @@ GetDisplayPortFromMarginsData(nsIContent
 
     ScreenPoint scrollPosScreen = LayoutDevicePoint::FromAppUnits(scrollPos, auPerDevPixel)
                                 * res;
 
     screenRect += scrollPosScreen;
     // Round-out the display port to the nearest alignment (tiles)
     float x = alignmentX * floor(screenRect.x / alignmentX);
     float y = alignmentY * floor(screenRect.y / alignmentY);
-    float w = alignmentX * ceil(screenRect.width / alignmentX + 1);
-    float h = alignmentY * ceil(screenRect.height / alignmentY + 1);
+    float w = alignmentX * ceil(screenRect.width / alignmentX);
+    float h = alignmentY * ceil(screenRect.height / alignmentY);
     screenRect = ScreenRect(x, y, w, h);
     screenRect -= scrollPosScreen;
 
     ScreenRect screenExpScrollableRect =
       LayoutDeviceRect::FromAppUnits(expandedScrollableRect,
                                      auPerDevPixel) * res;
 
     // Make sure the displayport remains within the scrollable rect.