Bug 1127661 - Disable long tap event from APZ while dragging the touch caret. r=roc
authorJeremy Chen <jeremychen@mozilla.com>
Tue, 03 Feb 2015 02:41:00 +0100
changeset 227391 4dec145df0eed0648cd92be59dab121c1896893a
parent 227390 1fc4f2b9d8760c9ca3b69efd26dad7712b2d6d7c
child 227392 7aff0a0279a976eb874cc2ed01405c022ca10439
push id28229
push userryanvm@gmail.com
push dateWed, 04 Feb 2015 18:49:57 +0000
treeherdermozilla-central@35be56b517c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1127661
milestone38.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 1127661 - Disable long tap event from APZ while dragging the touch caret. r=roc
layout/base/TouchCaret.cpp
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -610,16 +610,22 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
     case NS_KEY_PRESS:
     case NS_WHEEL_WHEEL:
     case NS_WHEEL_START:
     case NS_WHEEL_STOP:
       // Disable touch caret while key/wheel event is received.
       TOUCHCARET_LOG("Receive key/wheel event %d", aEvent->message);
       SetVisibility(false);
       break;
+    case NS_MOUSE_MOZLONGTAP:
+      if (mState == TOUCHCARET_TOUCHDRAG_ACTIVE) {
+        // Disable long tap event from APZ while dragging the touch caret.
+        status = nsEventStatus_eConsumeNoDefault;
+      }
+      break;
     default:
       break;
   }
 
   return status;
 }
 
 nsPoint