Bug 1583572 - Return correct result when queueing touch events r=geckoview-reviewers,agi
authorJames Willcox <snorp@snorp.net>
Tue, 24 Sep 2019 23:01:58 +0000
changeset 494841 e61a4313ae33cac41e7828a0910e9cba84beee2a
parent 494840 ac0a69cbf49de19f0a71901d29daf306e156bdfa
child 494842 153482073368465845666344d84ec51d5b404f5c
push id114131
push userdluca@mozilla.com
push dateThu, 26 Sep 2019 09:47:34 +0000
treeherdermozilla-inbound@1dc1a755079a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, agi
bugs1583572
milestone71.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 1583572 - Return correct result when queueing touch events r=geckoview-reviewers,agi Differential Revision: https://phabricator.services.mozilla.com/D46963
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/PanZoomController.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/PanZoomController.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/PanZoomController.java
@@ -146,17 +146,17 @@ public class PanZoomController {
         }
     }
 
     /* package */ final NativeProvider mNative = new NativeProvider();
 
     private @InputResult int handleMotionEvent(final MotionEvent event) {
         if (!mAttached) {
             mQueuedEvents.add(new Pair<>(EVENT_SOURCE_MOTION, event));
-            return INPUT_RESULT_UNHANDLED;
+            return INPUT_RESULT_HANDLED;
         }
 
         final int action = event.getActionMasked();
         final int count = event.getPointerCount();
 
         if (action == MotionEvent.ACTION_DOWN) {
             mLastDownTime = event.getDownTime();
         } else if (mLastDownTime != event.getDownTime()) {
@@ -201,17 +201,17 @@ public class PanZoomController {
         return mNative.handleMotionEvent(action, event.getActionIndex(), event.getEventTime(),
                                          event.getMetaState(), screenX, screenY, pointerId, x, y,
                                          orientation, pressure, toolMajor, toolMinor);
     }
 
     private @InputResult int handleScrollEvent(final MotionEvent event) {
         if (!mAttached) {
             mQueuedEvents.add(new Pair<>(EVENT_SOURCE_SCROLL, event));
-            return INPUT_RESULT_UNHANDLED;
+            return INPUT_RESULT_HANDLED;
         }
 
         final int count = event.getPointerCount();
 
         if (count <= 0) {
             return INPUT_RESULT_UNHANDLED;
         }