Bug 1335895 - part 17: Remove SetScrollingRootContent from PAPZ, GeckoContentControlle, RemoteContentController, and AndroidContentController r=kats,botond draft
authorRandall Barker <rbarker@mozilla.com>
Mon, 27 Mar 2017 13:52:07 -0700
changeset 561583 26bb19d03f0f6f561f76840973461ce056da9d1b
parent 561582 766ef1f2ffd4d2069a1850bd7ca4780f77606ee0
child 561584 90e1853062c65689cec5d675aa253a03c10911d9
push id53787
push userbmo:rbarker@mozilla.com
push dateWed, 12 Apr 2017 22:56:58 +0000
reviewerskats, botond
bugs1335895
milestone55.0a1
Bug 1335895 - part 17: Remove SetScrollingRootContent from PAPZ, GeckoContentControlle, RemoteContentController, and AndroidContentController r=kats,botond
gfx/layers/apz/public/GeckoContentController.h
gfx/layers/ipc/APZChild.cpp
gfx/layers/ipc/APZChild.h
gfx/layers/ipc/PAPZ.ipdl
gfx/layers/ipc/RemoteContentController.cpp
gfx/layers/ipc/RemoteContentController.h
widget/android/AndroidContentController.cpp
widget/android/AndroidContentController.h
--- a/gfx/layers/apz/public/GeckoContentController.h
+++ b/gfx/layers/apz/public/GeckoContentController.h
@@ -156,17 +156,16 @@ public:
    * Notify content that the repaint requests have been flushed.
    */
   virtual void NotifyFlushComplete() = 0;
 
   virtual void NotifyAsyncScrollbarDragRejected(const FrameMetrics::ViewID& aScrollId) = 0;
 
   virtual void UpdateOverscrollVelocity(float aX, float aY, bool aIsRootContent) {}
   virtual void UpdateOverscrollOffset(float aX, float aY, bool aIsRootContent) {}
-  virtual void SetScrollingRootContent(bool isRootContent) {}
 
   GeckoContentController() {}
 
   /**
    * Needs to be called on the main thread.
    */
   virtual void Destroy() {}
 
--- a/gfx/layers/ipc/APZChild.cpp
+++ b/gfx/layers/ipc/APZChild.cpp
@@ -48,23 +48,16 @@ APZChild::RecvUpdateOverscrollVelocity(c
 mozilla::ipc::IPCResult
 APZChild::RecvUpdateOverscrollOffset(const float& aX, const float& aY, const bool& aIsRootContent)
 {
   mController->UpdateOverscrollOffset(aX, aY, aIsRootContent);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
-APZChild::RecvSetScrollingRootContent(const bool& aIsRootContent)
-{
-  mController->SetScrollingRootContent(aIsRootContent);
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
 APZChild::RecvNotifyMozMouseScrollEvent(const ViewID& aScrollId,
                                         const nsString& aEvent)
 {
   mController->NotifyMozMouseScrollEvent(aScrollId, aEvent);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
--- a/gfx/layers/ipc/APZChild.h
+++ b/gfx/layers/ipc/APZChild.h
@@ -26,18 +26,16 @@ public:
   ~APZChild();
 
   mozilla::ipc::IPCResult RecvRequestContentRepaint(const FrameMetrics& frame) override;
 
   mozilla::ipc::IPCResult RecvUpdateOverscrollVelocity(const float& aX, const float& aY, const bool& aIsRootContent) override;
 
   mozilla::ipc::IPCResult RecvUpdateOverscrollOffset(const float& aX, const float& aY, const bool& aIsRootContent) override;
 
-  mozilla::ipc::IPCResult RecvSetScrollingRootContent(const bool& aIsRootContent) override;
-
   mozilla::ipc::IPCResult RecvNotifyMozMouseScrollEvent(const ViewID& aScrollId,
                                                         const nsString& aEvent) override;
 
   mozilla::ipc::IPCResult RecvNotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
                                                    const APZStateChange& aChange,
                                                    const int& aArg) override;
 
   mozilla::ipc::IPCResult RecvNotifyFlushComplete() override;
--- a/gfx/layers/ipc/PAPZ.ipdl
+++ b/gfx/layers/ipc/PAPZ.ipdl
@@ -51,18 +51,16 @@ parent:
 child:
 
   async RequestContentRepaint(FrameMetrics frame);
 
   async UpdateOverscrollVelocity(float aX, float aY, bool aIsRootContent);
 
   async UpdateOverscrollOffset(float aX, float aY, bool aIsRootContent);
 
-  async SetScrollingRootContent(bool aIsRootContent);
-
   async NotifyMozMouseScrollEvent(ViewID aScrollId, nsString aEvent);
 
   async NotifyAPZStateChange(ScrollableLayerGuid aGuid, APZStateChange aChange, int aArg);
 
   async NotifyFlushComplete();
 
   async NotifyAsyncScrollbarDragRejected(ViewID aScrollId);
 
--- a/gfx/layers/ipc/RemoteContentController.cpp
+++ b/gfx/layers/ipc/RemoteContentController.cpp
@@ -198,30 +198,16 @@ RemoteContentController::UpdateOverscrol
     return;
   }
   if (mCanSend) {
     Unused << SendUpdateOverscrollOffset(aX, aY, aIsRootContent);
   }
 }
 
 void
-RemoteContentController::SetScrollingRootContent(bool aIsRootContent)
-{
-  if (MessageLoop::current() != mCompositorThread) {
-    mCompositorThread->PostTask(NewRunnableMethod<bool>(this,
-                                             &RemoteContentController::SetScrollingRootContent,
-                                             aIsRootContent));
-    return;
-  }
-  if (mCanSend) {
-    Unused << SendSetScrollingRootContent(aIsRootContent);
-  }
-}
-
-void
 RemoteContentController::NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId,
                                                    const nsString& aEvent)
 {
   if (MessageLoop::current() != mCompositorThread) {
     // We have to send messages from the compositor thread
     mCompositorThread->PostTask(NewRunnableMethod<FrameMetrics::ViewID,
                                         nsString>(this,
                                                   &RemoteContentController::NotifyMozMouseScrollEvent,
--- a/gfx/layers/ipc/RemoteContentController.h
+++ b/gfx/layers/ipc/RemoteContentController.h
@@ -62,18 +62,16 @@ public:
   virtual void NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
                                     APZStateChange aChange,
                                     int aArg) override;
 
   virtual void UpdateOverscrollVelocity(float aX, float aY, bool aIsRootContent) override;
 
   virtual void UpdateOverscrollOffset(float aX, float aY, bool aIsRootContent) override;
 
-  virtual void SetScrollingRootContent(bool aIsRootContent) override;
-
   virtual void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId,
                                          const nsString& aEvent) override;
 
   virtual void NotifyFlushComplete() override;
 
   virtual void NotifyAsyncScrollbarDragRejected(const FrameMetrics::ViewID& aScrollId) override;
 
   virtual void ActorDestroy(ActorDestroyReason aWhy) override;
--- a/widget/android/AndroidContentController.cpp
+++ b/widget/android/AndroidContentController.cpp
@@ -95,24 +95,16 @@ void
 AndroidContentController::UpdateOverscrollOffset(const float aX, const float aY, const bool aIsRootContent)
 {
   if (aIsRootContent && mAndroidWindow) {
     mAndroidWindow->UpdateOverscrollOffset(aX, aY);
   }
 }
 
 void
-AndroidContentController::SetScrollingRootContent(const bool isRootContent)
-{
-  if (mAndroidWindow) {
-    mAndroidWindow->SetScrollingRootContent(isRootContent);
-  }
-}
-
-void
 AndroidContentController::NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
                                                APZStateChange aChange,
                                                int aArg)
 {
   // This function may get invoked twice, if the first invocation is not on
   // the main thread then the ChromeProcessController version of this function
   // will redispatch to the main thread. We want to make sure that our handling
   // only happens on the main thread.
--- a/widget/android/AndroidContentController.h
+++ b/widget/android/AndroidContentController.h
@@ -33,17 +33,16 @@ public:
     {}
 
     // ChromeProcessController methods
     virtual void Destroy() override;
     void HandleTap(TapType aType, const LayoutDevicePoint& aPoint, Modifiers aModifiers,
                    const ScrollableLayerGuid& aGuid, uint64_t aInputBlockId) override;
     void UpdateOverscrollVelocity(const float aX, const float aY, const bool aIsRootContent) override;
     void UpdateOverscrollOffset(const float aX, const float aY, const bool aIsRootContent) override;
-    void SetScrollingRootContent(const bool isRootContent) override;
     void NotifyAPZStateChange(const ScrollableLayerGuid& aGuid,
                               APZStateChange aChange,
                               int aArg) override;
 private:
     nsWindow* mAndroidWindow;
 
     void DispatchSingleTapToObservers(const LayoutDevicePoint& aPoint,
                                       const ScrollableLayerGuid& aGuid) const;