summaryrefslogtreecommitdiffstats
path: root/gfx/layers/ipc/APZCTreeManagerChild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/ipc/APZCTreeManagerChild.cpp')
-rw-r--r--gfx/layers/ipc/APZCTreeManagerChild.cpp42
1 files changed, 3 insertions, 39 deletions
diff --git a/gfx/layers/ipc/APZCTreeManagerChild.cpp b/gfx/layers/ipc/APZCTreeManagerChild.cpp
index b7f50c1c92..5dec4ca065 100644
--- a/gfx/layers/ipc/APZCTreeManagerChild.cpp
+++ b/gfx/layers/ipc/APZCTreeManagerChild.cpp
@@ -31,6 +31,9 @@ void APZCTreeManagerChild::SetCompositorSession(
// we're setting mCompositorSession or we're clearing it).
MOZ_ASSERT(!mCompositorSession ^ !aSession);
mCompositorSession = aSession;
+ if (mInputBridge) {
+ mInputBridge->SetCompositorSession(aSession);
+ }
}
void APZCTreeManagerChild::SetInputBridge(APZInputBridgeChild* aInputBridge) {
@@ -143,45 +146,6 @@ void APZCTreeManagerChild::ActorDestroy(ActorDestroyReason aWhy) {
mIPCOpen = false;
}
-mozilla::ipc::IPCResult APZCTreeManagerChild::RecvHandleTap(
- const TapType& aType, const LayoutDevicePoint& aPoint,
- const Modifiers& aModifiers, const ScrollableLayerGuid& aGuid,
- const uint64_t& aInputBlockId,
- const Maybe<DoubleTapToZoomMetrics>& aDoubleTapToZoomMetrics) {
- MOZ_ASSERT(XRE_IsParentProcess());
- if (mCompositorSession &&
- mCompositorSession->RootLayerTreeId() == aGuid.mLayersId &&
- mCompositorSession->GetContentController()) {
- RefPtr<GeckoContentController> controller =
- mCompositorSession->GetContentController();
- controller->HandleTap(aType, aPoint, aModifiers, aGuid, aInputBlockId,
- aDoubleTapToZoomMetrics);
- return IPC_OK();
- }
- dom::BrowserParent* tab =
- dom::BrowserParent::GetBrowserParentFromLayersId(aGuid.mLayersId);
- if (tab) {
-#ifdef MOZ_WIDGET_ANDROID
- // On Android, touch events are dispatched from the UI thread to the main
- // thread using the Android priority queue. It is possible that this tap has
- // made it to the GPU process and back before they have been processed. We
- // must therefore dispatch this message to the same queue, otherwise the tab
- // may receive the tap event before the touch events that synthesized it.
- mozilla::jni::DispatchToGeckoPriorityQueue(
- NewRunnableMethod<TapType, LayoutDevicePoint, Modifiers,
- ScrollableLayerGuid, uint64_t,
- Maybe<DoubleTapToZoomMetrics>>(
- "dom::BrowserParent::SendHandleTap", tab,
- &dom::BrowserParent::SendHandleTap, aType, aPoint, aModifiers,
- aGuid, aInputBlockId, aDoubleTapToZoomMetrics));
-#else
- tab->SendHandleTap(aType, aPoint, aModifiers, aGuid, aInputBlockId,
- aDoubleTapToZoomMetrics);
-#endif
- }
- return IPC_OK();
-}
-
mozilla::ipc::IPCResult APZCTreeManagerChild::RecvNotifyPinchGesture(
const PinchGestureType& aType, const ScrollableLayerGuid& aGuid,
const LayoutDevicePoint& aFocusPoint, const LayoutDeviceCoord& aSpanChange,