Bug 830926 - AZPC TrackTouch x/y displacement should not be rounded to int. r=ajones,drs

This commit is contained in:
Oleg Romashin 2013-01-19 15:33:09 -08:00
parent b9cdaea30b
commit e02d7ce64e

View File

@ -756,11 +756,11 @@ void AsyncPanZoomController::TrackTouch(const MultiTouchInput& aEvent) {
// larger swipe should move you a shorter distance.
gfxFloat inverseResolution = 1 / CalculateResolution(mFrameMetrics).width;
int32_t xDisplacement = mX.GetDisplacementForDuration(inverseResolution,
timeDelta);
int32_t yDisplacement = mY.GetDisplacementForDuration(inverseResolution,
timeDelta);
if (!xDisplacement && !yDisplacement) {
float xDisplacement = mX.GetDisplacementForDuration(inverseResolution,
timeDelta);
float yDisplacement = mY.GetDisplacementForDuration(inverseResolution,
timeDelta);
if (fabs(xDisplacement) <= EPSILON && fabs(yDisplacement) <= EPSILON) {
return;
}