From f225167cfe3d8a777a4bb5c6b2f221175a2ba3e9 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Wed, 18 Feb 2015 16:00:46 -0500 Subject: [PATCH] Backed out changeset 25a4a1aecec4 (bug 1131749) for gtest failures. CLOSED TREE --- gfx/layers/apz/src/Axis.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/gfx/layers/apz/src/Axis.cpp b/gfx/layers/apz/src/Axis.cpp index f87f78193224..5f05569b4008 100644 --- a/gfx/layers/apz/src/Axis.cpp +++ b/gfx/layers/apz/src/Axis.cpp @@ -263,23 +263,6 @@ void Axis::StepOverscrollAnimation(double aStepDurationMilliseconds) { // Adjust the amount of overscroll based on the velocity. // Note that we allow for oscillations. mOverscroll += (mVelocity * aStepDurationMilliseconds); - - // Our mechanism for translating a set of mOverscroll values that oscillate - // around zero to a set of GetOverscroll() values that have the same sign - // (so content is always stretched, never compressed) assumes that - // mOverscroll does not exceed mFirstOverscrollAnimationSample in magnitude. - // If our calculations were exact, this would be the case, as - // mFirstOverscrollAnimationSample is the value of mOverscroll at the first - // peak of the oscillation, and a dampened spring should never attain a - // displacement greater in magnitude than a previous peak. In our - // approximation calculations, however, this may not hold exactly. To ensure - // the assumption is not violated, we clamp the magnitude of mOverscroll. - if (fabs(mOverscroll) > fabs(mFirstOverscrollAnimationSample)) { - mOverscroll = (mOverscroll >= 0) - ? fabs(mFirstOverscrollAnimationSample) - : -fabs(mFirstOverscrollAnimationSample); - - } } bool Axis::SampleOverscrollAnimation(const TimeDuration& aDelta) {