Backout 758f3df6c016 (bug 1191539) for causing checkerboarding on android

This commit is contained in:
Benoit Girard
2015-09-03 14:24:56 -04:00
parent f188be7972
commit aa6407d65f

View File

@@ -920,12 +920,6 @@ GetDisplayPortFromMarginsData(nsIContent* aContent,
ScreenRect screenRect = LayoutDeviceRect::FromAppUnits(base, auPerDevPixel)
* parentRes;
nsRect expandedScrollableRect =
nsLayoutUtils::CalculateExpandedScrollableRect(frame);
ScreenRect screenExpScrollableRect =
LayoutDeviceRect::FromAppUnits(expandedScrollableRect - scrollPos,
auPerDevPixel) * parentRes;
if (gfxPrefs::LayersTilesEnabled()) {
// Note on the correctness of applying the alignment in Screen space:
// The correct space to apply the alignment in would be Layer space, but
@@ -949,9 +943,6 @@ GetDisplayPortFromMarginsData(nsIContent* aContent,
// up to tile boundaries.
screenRect.Inflate(1);
// Make sure the displayport remains within the scrollable rect.
screenRect = screenRect.ForceInside(screenExpScrollableRect);
// Avoid division by zero.
if (alignmentX == 0) {
alignmentX = 1;
@@ -1001,9 +992,6 @@ GetDisplayPortFromMarginsData(nsIContent* aContent,
screenRect.x -= left;
screenRect.width += left + right;
}
// Make sure the displayport remains within the scrollable rect.
screenRect = screenRect.ForceInside(screenExpScrollableRect);
}
// Convert the aligned rect back into app units.
@@ -1013,6 +1001,7 @@ GetDisplayPortFromMarginsData(nsIContent* aContent,
result = ApplyRectMultiplier(result, aMultiplier);
// Finally, clamp it to the expanded scrollable rect.
nsRect expandedScrollableRect = nsLayoutUtils::CalculateExpandedScrollableRect(frame);
result = expandedScrollableRect.Intersect(result + scrollPos) - scrollPos;
return result;