Bug 1219296 - Remove StartSmoothScroll()'s argument, which is no longer used. r=kats
authorBotond Ballo <botond@mozilla.com>
Mon, 02 May 2016 13:29:33 -0400
changeset 324195 405420cecb4e0c37d12e800397d3c7cd5a0e8f3c
parent 324194 2b8a637fd08ea993233a9939b8e0eeec92fd93e5
child 324196 755eeaa096158783a551b25e8c150aefa9ba93e7
push id5934
push userkgupta@mozilla.com
push dateMon, 02 May 2016 17:31:31 +0000
treeherdermozilla-beta@3dd49ec94a57 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1219296
milestone47.0
Bug 1219296 - Remove StartSmoothScroll()'s argument, which is no longer used. r=kats MozReview-Commit-ID: DlnaEQLCvlf --HG-- extra : rebase_source : 95cc626bb6260fc11efa71db4e1e66a01d770508
gfx/layers/apz/src/AsyncPanZoomController.cpp
gfx/layers/apz/src/AsyncPanZoomController.h
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -703,17 +703,16 @@ public:
 
 private:
   AsyncPanZoomController& mApzc;
 };
 
 class SmoothScrollAnimation : public AsyncPanZoomAnimation {
 public:
   SmoothScrollAnimation(AsyncPanZoomController& aApzc,
-                        ScrollSource aSource,
                         const nsPoint &aInitialPosition,
                         const nsPoint &aInitialVelocity,
                         const nsPoint& aDestination, double aSpringConstant,
                         double aDampingRatio)
    : mApzc(aApzc)
    , mXAxisModel(aInitialPosition.x, aDestination.x, aInitialVelocity.x,
                  aSpringConstant, aDampingRatio)
    , mYAxisModel(aInitialPosition.y, aDestination.y, aInitialVelocity.y,
@@ -2556,27 +2555,26 @@ void AsyncPanZoomController::HandleFling
 }
 
 void AsyncPanZoomController::HandleSmoothScrollOverscroll(const ParentLayerPoint& aVelocity) {
   // We must call BuildOverscrollHandoffChain from this deferred callback
   // function in order to avoid a deadlock when acquiring the tree lock.
   HandleFlingOverscroll(aVelocity, BuildOverscrollHandoffChain(), nullptr);
 }
 
-void AsyncPanZoomController::StartSmoothScroll(ScrollSource aSource) {
+void AsyncPanZoomController::StartSmoothScroll() {
   SetState(SMOOTH_SCROLL);
   nsPoint initialPosition = CSSPoint::ToAppUnits(mFrameMetrics.GetScrollOffset());
   // Cast velocity from ParentLayerPoints/ms to CSSPoints/ms then convert to
   // appunits/second
   nsPoint initialVelocity = CSSPoint::ToAppUnits(CSSPoint(mX.GetVelocity(),
                                                           mY.GetVelocity())) * 1000.0f;
   nsPoint destination = CSSPoint::ToAppUnits(mFrameMetrics.GetSmoothScrollOffset());
 
   StartAnimation(new SmoothScrollAnimation(*this,
-                                           aSource,
                                            initialPosition, initialVelocity,
                                            destination,
                                            gfxPrefs::ScrollBehaviorSpringConstant(),
                                            gfxPrefs::ScrollBehaviorDampingRatio()));
 }
 
 void AsyncPanZoomController::StartOverscrollAnimation(const ParentLayerPoint& aVelocity) {
   SetState(OVERSCROLL_ANIMATION);
@@ -3449,17 +3447,17 @@ void AsyncPanZoomController::NotifyLayer
     if (mState == SMOOTH_SCROLL && mAnimation) {
       APZC_LOG("%p updating destination on existing animation\n", this);
       RefPtr<SmoothScrollAnimation> animation(
         static_cast<SmoothScrollAnimation*>(mAnimation.get()));
       animation->SetDestination(
         CSSPoint::ToAppUnits(aLayerMetrics.GetSmoothScrollOffset()));
     } else {
       CancelAnimation();
-      StartSmoothScroll(ScrollSource::DOM);
+      StartSmoothScroll();
     }
   }
 
   if (needContentRepaint) {
     RequestContentRepaint();
   }
   UpdateSharedCompositorFrameMetrics();
 }
--- a/gfx/layers/apz/src/AsyncPanZoomController.h
+++ b/gfx/layers/apz/src/AsyncPanZoomController.h
@@ -867,17 +867,17 @@ private:
   void HandleSmoothScrollOverscroll(const ParentLayerPoint& aVelocity);
 
   // Helper function used by AttemptFling().
   void AcceptFling(FlingHandoffState& aHandoffState);
 
   // Start an overscroll animation with the given initial velocity.
   void StartOverscrollAnimation(const ParentLayerPoint& aVelocity);
 
-  void StartSmoothScroll(ScrollSource aSource);
+  void StartSmoothScroll();
 
   // Returns whether overscroll is allowed during an event.
   bool AllowScrollHandoffInCurrentBlock() const;
 
   void AcknowledgeScrollUpdate() const;
 
   /* ===================================================================
    * The functions and members in this section are used to make ancestor chains