зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
bb992fcdb0
Коммит
48f438e8a7
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче