mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Add helper for applying async transforms to widget input events. (bug 1143567 part 1, r=kats)
--HG-- extra : rebase_source : 98eece05d50dee335273b874d9f42aad949c658d
This commit is contained in:
parent
7fabed0618
commit
acced07338
@ -1015,6 +1015,21 @@ nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent,
|
||||
return status;
|
||||
}
|
||||
|
||||
nsEventStatus
|
||||
nsBaseWidget::DispatchInputEvent(WidgetInputEvent* aEvent)
|
||||
{
|
||||
if (mAPZC) {
|
||||
nsEventStatus result = mAPZC->ReceiveInputEvent(*aEvent, nullptr, nullptr);
|
||||
if (result == nsEventStatus_eConsumeNoDefault) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
nsEventStatus status;
|
||||
DispatchEvent(aEvent, status);
|
||||
return status;
|
||||
}
|
||||
|
||||
nsEventStatus
|
||||
nsBaseWidget::DispatchAPZAwareEvent(WidgetInputEvent* aEvent)
|
||||
{
|
||||
|
@ -231,6 +231,10 @@ public:
|
||||
NS_IMETHOD UnregisterTouchWindow() MOZ_OVERRIDE;
|
||||
NS_IMETHOD_(TextEventDispatcher*) GetTextEventDispatcher() MOZ_OVERRIDE MOZ_FINAL;
|
||||
|
||||
// Helper function for dispatching events which are not processed by APZ,
|
||||
// but need to be transformed by APZ.
|
||||
nsEventStatus DispatchInputEvent(mozilla::WidgetInputEvent* aEvent);
|
||||
|
||||
// Dispatch an event that must be first be routed through APZ.
|
||||
nsEventStatus DispatchAPZAwareEvent(mozilla::WidgetInputEvent* aEvent) MOZ_OVERRIDE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user