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:
Kartikaya Gupta
2016-09-24 09:46:02 -04:00
parent 919bc63a4a
commit d5af77e8a9
20 changed files with 315 additions and 22 deletions

View File

@@ -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,