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
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 03 Oct 2014 13:39:37 -0400
changeset 231985 e057f4f45d357d1ebfdc69ed681f59f831211e3c
parent 231984 0dbe7877aaef0932c61140c3dadae32e37b45f18
child 231986 eaa8c62e29f650fd254241f11b0862d3473230ad
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1063138
milestone35.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 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
gfx/layers/apz/src/GestureEventListener.cpp
--- a/gfx/layers/apz/src/GestureEventListener.cpp
+++ b/gfx/layers/apz/src/GestureEventListener.cpp
@@ -250,16 +250,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) {