Bug 1474196 - Don't cancel fling animations when we receive a scroll update. r=botond
authorRyan Hunt <rhunt@eqrion.net>
Tue, 22 Jan 2019 19:33:58 +0000
changeset 514859 2b0f0d220a7cc3d6262706c160cc1900148dbe79
parent 514858 a28a76c23e86c7b3e59bf5dc44c5f04f730c3928
child 514860 ec6834457f75cb4ba703a5031eaa06529361d8a4
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1474196
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1474196 - Don't cancel fling animations when we receive a scroll update. r=botond A fling animation is computed using velocity and so it can continue with a relative or absolute scroll update. This seems to match other browser's behavior. Differential Revision: https://phabricator.services.mozilla.com/D17264
gfx/layers/apz/src/GenericFlingAnimation.h
--- a/gfx/layers/apz/src/GenericFlingAnimation.h
+++ b/gfx/layers/apz/src/GenericFlingAnimation.h
@@ -201,16 +201,21 @@ class GenericFlingAnimation : public Asy
       // Note that AdjustDisplacement() will have zeroed out the velocity
       // along the axes where we're overscrolled.
       return !IsZero(mApzc.GetVelocityVector());
     }
 
     return true;
   }
 
+  virtual bool HandleScrollOffsetUpdate(
+      const Maybe<CSSPoint>& aRelativeDelta) override {
+    return true;
+  }
+
  private:
   static bool SameDirection(float aVelocity1, float aVelocity2) {
     return (aVelocity1 == 0.0f) || (aVelocity2 == 0.0f) ||
            (IsNegative(aVelocity1) == IsNegative(aVelocity2));
   }
 
   static float Accelerate(float aBase, float aSupplemental) {
     return (aBase * gfxPrefs::APZFlingAccelBaseMultiplier()) +