зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 71445b7c3044 (bug 1292034) for GTest failing APZScrollHandoffTester.ScrollgrabFlingAcceleration1. r=backout
This commit is contained in:
Родитель
9b22c798f5
Коммит
44dd1f666b
|
@ -261,14 +261,9 @@ public class StackScroller {
|
|||
if (mFlywheel && !isFinished()) {
|
||||
float oldVelocityX = mScrollerX.mCurrVelocity;
|
||||
float oldVelocityY = mScrollerY.mCurrVelocity;
|
||||
boolean sameXDirection = (velocityX == 0) || (oldVelocityX == 0) ||
|
||||
((velocityX < 0) == (oldVelocityX < 0));
|
||||
boolean sameYDirection = (velocityY == 0) || (oldVelocityY == 0) ||
|
||||
((velocityY < 0) == (oldVelocityY < 0));
|
||||
if (sameXDirection) {
|
||||
if (Math.signum(velocityX) == Math.signum(oldVelocityX)
|
||||
&& Math.signum(velocityY) == Math.signum(oldVelocityY)) {
|
||||
velocityX += oldVelocityX;
|
||||
}
|
||||
if (sameYDirection) {
|
||||
velocityY += oldVelocityY;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче