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 208699 e057f4f45d357d1ebfdc69ed681f59f831211e3c
parent 208698 0dbe7877aaef0932c61140c3dadae32e37b45f18
child 208700 eaa8c62e29f650fd254241f11b0862d3473230ad
push id49984
push userkgupta@mozilla.com
push dateFri, 03 Oct 2014 17:39:58 +0000
treeherdermozilla-inbound@eaa8c62e29f6 [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) {