Bug 1016035 - Also mark widgetWheelEvents that are handled by APZ with mCanStartSwipe. r=kats
authorMarkus Stange <mstange@themasta.com>
Fri, 28 Aug 2015 00:04:53 -0400
changeset 259982 f452ca4f5353f7bd1a277310b567affac2600864
parent 259981 9a65e885bf4fad951de6e29c4a7f12e18e44274b
child 259983 5030ce0ef9b05c54f8226d75fe6373d89cb40ecd
push id29296
push userryanvm@gmail.com
push dateSun, 30 Aug 2015 19:45:10 +0000
treeherdermozilla-central@2ad5077d86ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1016035
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1016035 - Also mark widgetWheelEvents that are handled by APZ with mCanStartSwipe. r=kats
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2733,17 +2733,23 @@ nsChildView::DispatchAPZWheelInputEvent(
 
     nsEventStatus result = mAPZC->ReceiveInputEvent(aEvent, &guid, &inputBlockId);
     if (result == nsEventStatus_eConsumeNoDefault) {
       return;
     }
 
     switch(aEvent.mInputType) {
       case PANGESTURE_INPUT: {
-        event = aEvent.AsPanGestureInput().ToWidgetWheelEvent(this);
+        PanGestureInput& panInput = aEvent.AsPanGestureInput();
+
+        event = panInput.ToWidgetWheelEvent(this);
+        if (aCanTriggerSwipe) {
+          SwipeInfo swipeInfo = SendMayStartSwipe(panInput);
+          event.mCanTriggerSwipe = swipeInfo.wantsSwipe;
+        }
         break;
       }
       case SCROLLWHEEL_INPUT: {
         event = aEvent.AsScrollWheelInput().ToWidgetWheelEvent(this);
         break;
       };
       default:
         MOZ_CRASH("unsupported event type");