diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index d6342981439c..0603824921da 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -961,8 +961,8 @@ GetDisplayPortFromMarginsData(nsIContent* aContent, // 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;