Bug 1229125 - Correct velocity computation for pan gesture events. r=botond

When scrolling down, panInput.mLocalDisplacement.y will be positive, so
aAdditionalDelta will be positive, and newVelocity must be positive.

--HG--
extra : commitid : GlT0IqOWqiI
extra : rebase_source : 2fc0347d943ac7bf8eac2f2da6f7b6b217bdbe0d
This commit is contained in:
Markus Stange 2015-12-01 15:13:34 +01:00
Родитель bb992fcdb0
Коммит 48f438e8a7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -76,7 +76,7 @@ void Axis::UpdateWithTouchAtDevicePoint(ParentLayerCoord aPos, ParentLayerCoord
return;
}
float newVelocity = mAxisLocked ? 0.0f : (float)(mPos - aPos - aAdditionalDelta) / (float)(aTimestampMs - mPosTimeMs);
float newVelocity = mAxisLocked ? 0.0f : (float)(mPos - aPos + aAdditionalDelta) / (float)(aTimestampMs - mPosTimeMs);
if (gfxPrefs::APZMaxVelocity() > 0.0f) {
bool velocityIsNegative = (newVelocity < 0);
newVelocity = fabs(newVelocity);