Bug 1298886 - Fire magnify gesture events in the parent process if APZ is enabled but APZ zooming is disabled. r=botond,dvander
MozReview-Commit-ID: 1yhJW7OhI0A
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "InputData.h" // for InputData
|
||||
#include "mozilla/dom/TabParent.h" // for TabParent
|
||||
#include "mozilla/layers/APZCCallbackHelper.h" // for APZCCallbackHelper
|
||||
#include "mozilla/layers/RemoteCompositorSession.h" // for RemoteCompositorSession
|
||||
|
||||
namespace mozilla {
|
||||
@@ -241,6 +242,26 @@ APZCTreeManagerChild::RecvHandleTap(const TapType& aType,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
APZCTreeManagerChild::RecvNotifyPinchGesture(const PinchGestureType& aType,
|
||||
const ScrollableLayerGuid& aGuid,
|
||||
const LayoutDeviceCoord& aSpanChange,
|
||||
const Modifiers& aModifiers)
|
||||
{
|
||||
// This will only get sent from the GPU process to the parent process, so
|
||||
// this function should never get called in the content process.
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// We want to handle it in this process regardless of what the target guid
|
||||
// of the pinch is. This may change in the future.
|
||||
if (mCompositorSession &&
|
||||
mCompositorSession->GetWidget()) {
|
||||
APZCCallbackHelper::NotifyPinchGesture(aType, aSpanChange, aModifiers, mCompositorSession->GetWidget());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
APZCTreeManagerChild::OnProcessingError(
|
||||
Result aCode,
|
||||
|
||||
Reference in New Issue
Block a user