Bug 1445662 - Remove ProcessTouchVelocity from PAPZCTreeManager.ipdl. r?rhunt draft
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 14 Mar 2018 16:57:41 -0400
changeset 767605 6c870292c2083f2a4399a61ad948864a6b71cfd8
parent 767604 969b5dadb27639e76242e36c5508df373c46a918
child 767606 0a18bb0b98ff2cbe16cf552e431d837dad1fd1ef
push id102649
push userkgupta@mozilla.com
push dateWed, 14 Mar 2018 20:58:42 +0000
reviewersrhunt
bugs1445662
milestone61.0a1
Bug 1445662 - Remove ProcessTouchVelocity from PAPZCTreeManager.ipdl. r?rhunt This function is never actually called over IPDL. It is called directly on the concrete APZCTreeManager instance by the AndroidDynamicToolbarAnimator code, both of which live in the compositor. So we don't need to expose this method on IAPZCTreeManager or over PAPZCTreeManager. MozReview-Commit-ID: 6fEkJpDDvhl
gfx/layers/apz/public/IAPZCTreeManager.h
gfx/layers/apz/src/APZCTreeManager.h
gfx/layers/ipc/APZCTreeManagerChild.cpp
gfx/layers/ipc/APZCTreeManagerChild.h
gfx/layers/ipc/APZCTreeManagerParent.cpp
gfx/layers/ipc/APZCTreeManagerParent.h
gfx/layers/ipc/PAPZCTreeManager.ipdl
--- a/gfx/layers/apz/public/IAPZCTreeManager.h
+++ b/gfx/layers/apz/public/IAPZCTreeManager.h
@@ -185,23 +185,16 @@ public:
   /**
    * Function used to disable LongTap gestures.
    *
    * On slow running tests, drags and touch events can be misinterpreted
    * as a long tap. This allows tests to disable long tap gesture detection.
    */
   virtual void SetLongTapEnabled(bool aTapGestureEnabled) = 0;
 
-  /**
-   * Process touch velocity.
-   * Sometimes the touch move event will have a velocity even though no scrolling
-   * is occurring such as when the toolbar is being hidden/shown in Fennec.
-   * This function can be called to have the y axis' velocity queue updated.
-   */
-  virtual void ProcessTouchVelocity(uint32_t aTimestampMs, float aSpeedY) = 0;
 
   // Returns whether or not a wheel event action will be (or was) performed by
   // APZ. If this returns true, the event must not perform a synchronous
   // scroll.
   //
   // Even if this returns false, all wheel events in APZ-aware widgets must
   // be sent through APZ so they are transformed correctly for TabParent.
   static bool WillHandleWheelEvent(WidgetWheelEvent* aEvent);
--- a/gfx/layers/apz/src/APZCTreeManager.h
+++ b/gfx/layers/apz/src/APZCTreeManager.h
@@ -547,17 +547,17 @@ public:
   ScreenPoint GetCurrentMousePosition() const;
 
   /**
    * Process touch velocity.
    * Sometimes the touch move event will have a velocity even though no scrolling
    * is occurring such as when the toolbar is being hidden/shown in Fennec.
    * This function can be called to have the y axis' velocity queue updated.
    */
-  void ProcessTouchVelocity(uint32_t aTimestampMs, float aSpeedY) override;
+  void ProcessTouchVelocity(uint32_t aTimestampMs, float aSpeedY);
 private:
   typedef bool (*GuidComparator)(const ScrollableLayerGuid&, const ScrollableLayerGuid&);
 
   /* Helpers */
   template<class ScrollNode>
   void UpdateHitTestingTreeImpl(uint64_t aRootLayerTreeId,
                                 const ScrollNode& aRoot,
                                 bool aIsFirstPaint,
--- a/gfx/layers/ipc/APZCTreeManagerChild.cpp
+++ b/gfx/layers/ipc/APZCTreeManagerChild.cpp
@@ -217,22 +217,16 @@ APZCTreeManagerChild::StopAutoscroll(con
 
 void
 APZCTreeManagerChild::SetLongTapEnabled(bool aTapGestureEnabled)
 {
   SendSetLongTapEnabled(aTapGestureEnabled);
 }
 
 void
-APZCTreeManagerChild::ProcessTouchVelocity(uint32_t aTimestampMs, float aSpeedY)
-{
-  SendProcessTouchVelocity(aTimestampMs, aSpeedY);
-}
-
-void
 APZCTreeManagerChild::UpdateWheelTransaction(
     LayoutDeviceIntPoint aRefPoint,
     EventMessage aEventMessage)
 {
   SendUpdateWheelTransaction(aRefPoint, aEventMessage);
 }
 
 void APZCTreeManagerChild::ProcessUnhandledEvent(
--- a/gfx/layers/ipc/APZCTreeManagerChild.h
+++ b/gfx/layers/ipc/APZCTreeManagerChild.h
@@ -74,19 +74,16 @@ public:
 
   void
   StopAutoscroll(const ScrollableLayerGuid& aGuid) override;
 
   void
   SetLongTapEnabled(bool aTapGestureEnabled) override;
 
   void
-  ProcessTouchVelocity(uint32_t aTimestampMs, float aSpeedY) override;
-
-  void
   ProcessUnhandledEvent(
           LayoutDeviceIntPoint* aRefPoint,
           ScrollableLayerGuid*  aOutTargetGuid,
           uint64_t*             aOutFocusSequenceNumber) override;
 
   void
   UpdateWheelTransaction(
           LayoutDeviceIntPoint aRefPoint,
--- a/gfx/layers/ipc/APZCTreeManagerParent.cpp
+++ b/gfx/layers/ipc/APZCTreeManagerParent.cpp
@@ -335,25 +335,16 @@ APZCTreeManagerParent::RecvStopAutoscrol
 mozilla::ipc::IPCResult
 APZCTreeManagerParent::RecvSetLongTapEnabled(const bool& aTapGestureEnabled)
 {
   mTreeManager->SetLongTapEnabled(aTapGestureEnabled);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
-APZCTreeManagerParent::RecvProcessTouchVelocity(
-  const uint32_t& aTimestampMs,
-  const float& aSpeedY)
-{
-  mTreeManager->ProcessTouchVelocity(aTimestampMs, aSpeedY);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
 APZCTreeManagerParent::RecvUpdateWheelTransaction(
         const LayoutDeviceIntPoint& aRefPoint,
         const EventMessage& aEventMessage)
 {
   mTreeManager->UpdateWheelTransaction(aRefPoint, aEventMessage);
   return IPC_OK();
 }
 
--- a/gfx/layers/ipc/APZCTreeManagerParent.h
+++ b/gfx/layers/ipc/APZCTreeManagerParent.h
@@ -130,21 +130,16 @@ public:
 
   mozilla::ipc::IPCResult
   RecvStopAutoscroll(const ScrollableLayerGuid& aGuid) override;
 
   mozilla::ipc::IPCResult
   RecvSetLongTapEnabled(const bool& aTapGestureEnabled) override;
 
   mozilla::ipc::IPCResult
-  RecvProcessTouchVelocity(
-          const uint32_t& aTimestampMs,
-          const float& aSpeedY) override;
-
-  mozilla::ipc::IPCResult
   RecvUpdateWheelTransaction(
           const LayoutDeviceIntPoint& aRefPoint,
           const EventMessage& aEventMessage) override;
 
   mozilla::ipc::IPCResult
   RecvProcessUnhandledEvent(
           const LayoutDeviceIntPoint& aRefPoint,
           LayoutDeviceIntPoint* aOutRefPoint,
--- a/gfx/layers/ipc/PAPZCTreeManager.ipdl
+++ b/gfx/layers/ipc/PAPZCTreeManager.ipdl
@@ -80,18 +80,16 @@ parent:
   async StartScrollbarDrag(ScrollableLayerGuid aGuid, AsyncDragMetrics aDragMetrics);
 
   async StartAutoscroll(ScrollableLayerGuid aGuid, ScreenPoint aAnchorLocation);
 
   async StopAutoscroll(ScrollableLayerGuid aGuid);
 
   async SetLongTapEnabled(bool aTapGestureEnabled);
 
-  async ProcessTouchVelocity(uint32_t aTimestampMs, float aSpeedY);
-
   // The following messages are used to
   // implement the ReceiveInputEvent methods
 
   sync ReceiveMultiTouchInputEvent(MultiTouchInput aEvent)
     returns (nsEventStatus       aOutStatus,
              MultiTouchInput     aOutEvent,
              ScrollableLayerGuid aOutTargetGuid,
              uint64_t            aOutInputBlockId);