Bug 1063138 - Don't forward move events from the GEL to the APZC when two fingers are down but the pinch hasn't been activated. r=botond, a=bajaj
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 03 Oct 2014 13:39:37 -0400
changeset 225630 6f41ec3f30e488241fd5190988152afbd0343162
parent 225629 6e9389570e3fceb475e7af366552613e83774d8c
child 225631 1d702b495ca88325c114d4b925a9fc4fdbca8303
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, bajaj
bugs1063138
milestone34.0a2
Bug 1063138 - Don't forward move events from the GEL to the APZC when two fingers are down but the pinch hasn't been activated. r=botond, a=bajaj
gfx/layers/apz/src/GestureEventListener.cpp
--- a/gfx/layers/apz/src/GestureEventListener.cpp
+++ b/gfx/layers/apz/src/GestureEventListener.cpp
@@ -245,16 +245,20 @@ nsEventStatus GestureEventListener::Hand
                                    mLastTouchInput.mTime,
                                    mLastTouchInput.mTimeStamp,
                                    GetCurrentFocus(mLastTouchInput),
                                    currentSpan,
                                    currentSpan,
                                    mLastTouchInput.modifiers);
 
       rv = mAsyncPanZoomController->HandleGestureEvent(pinchEvent);
+    } else {
+      // Prevent APZC::OnTouchMove from processing a move event when two
+      // touches are active
+      rv = nsEventStatus_eConsumeNoDefault;
     }
 
     mPreviousSpan = currentSpan;
     break;
   }
 
   case GESTURE_PINCH: {
     if (mLastTouchInput.mTouches.Length() < 2) {