Bug 1242690 - Squash together DispatchAPZAwareEvent and DispatchInputEvent. r=dvander
MozReview-Commit-ID: 2cou0cK4Yw8
This commit is contained in:
@@ -353,29 +353,6 @@ PuppetWidget::DispatchEvent(WidgetGUIEvent* event, nsEventStatus& aStatus)
|
||||
|
||||
nsEventStatus
|
||||
PuppetWidget::DispatchInputEvent(WidgetInputEvent* aEvent)
|
||||
{
|
||||
if (!mTabChild) {
|
||||
return nsEventStatus_eIgnore;
|
||||
}
|
||||
|
||||
switch (aEvent->mClass) {
|
||||
case eMouseEventClass:
|
||||
Unused <<
|
||||
mTabChild->SendDispatchMouseEvent(*aEvent->AsMouseEvent());
|
||||
break;
|
||||
case eKeyboardEventClass:
|
||||
Unused <<
|
||||
mTabChild->SendDispatchKeyboardEvent(*aEvent->AsKeyboardEvent());
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("unsupported event type");
|
||||
}
|
||||
|
||||
return nsEventStatus_eIgnore;
|
||||
}
|
||||
|
||||
nsEventStatus
|
||||
PuppetWidget::DispatchAPZAwareEvent(WidgetInputEvent* aEvent)
|
||||
{
|
||||
if (!AsyncPanZoomEnabled()) {
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
@@ -392,6 +369,14 @@ PuppetWidget::DispatchAPZAwareEvent(WidgetInputEvent* aEvent)
|
||||
Unused <<
|
||||
mTabChild->SendDispatchWheelEvent(*aEvent->AsWheelEvent());
|
||||
break;
|
||||
case eMouseEventClass:
|
||||
Unused <<
|
||||
mTabChild->SendDispatchMouseEvent(*aEvent->AsMouseEvent());
|
||||
break;
|
||||
case eKeyboardEventClass:
|
||||
Unused <<
|
||||
mTabChild->SendDispatchKeyboardEvent(*aEvent->AsKeyboardEvent());
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("unsupported event type");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user