Backed out changeset 6bf1863c97a5 (bug 1009306) for m6 and m7 android test failures on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2014-06-30 12:30:57 +02:00
parent bb725431e9
commit 95c5ed5683

View File

@ -1912,17 +1912,12 @@ ClampAndAlignWithPixels(nscoord aDesired,
nscoord aAppUnitsPerPixel, double aRes,
nscoord aCurrent)
{
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
// On mobile ignore the allowed bounds and always align to pixels
nscoord desired = aDesired;
#else
// Intersect scroll range with allowed range, by clamping the ends
// of aRange to be within bounds
nscoord destLower = clamped(aDestLower, aBoundLower, aBoundUpper);
nscoord destUpper = clamped(aDestUpper, aBoundLower, aBoundUpper);
nscoord desired = clamped(aDesired, destLower, destUpper);
#endif
double currentLayerVal = (aRes*aCurrent)/aAppUnitsPerPixel;
double desiredLayerVal = (aRes*desired)/aAppUnitsPerPixel;
@ -1934,10 +1929,6 @@ ClampAndAlignWithPixels(nscoord aDesired,
nscoord aligned =
NSToCoordRoundWithClamp(nearestLayerVal*aAppUnitsPerPixel/aRes);
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
return aligned;
#else
// Use a bound if it is within the allowed range and closer to desired than
// the nearest pixel-aligned value.
if (aBoundUpper == destUpper &&
@ -1965,7 +1956,6 @@ ClampAndAlignWithPixels(nscoord aDesired,
// No alignment available.
return desired;
#endif
}
/**