Backed out changeset a43a33ddd2b3
authorWes Johnston <>
Tue, 17 Apr 2012 09:29:18 -0700
changeset 95182 200d81544f0253301aa7c1bb107bc2b4d819e4ab
parent 95181 a43a33ddd2b3d64d7e5b098ec523437d5f2a439a
child 95183 f636d62d59209cfe5c03c0668dedbf7b9d7965a2
push id886
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
backs outa43a33ddd2b3d64d7e5b098ec523437d5f2a439a
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
Backed out changeset a43a33ddd2b3
--- a/mobile/android/base/gfx/
+++ b/mobile/android/base/gfx/
@@ -63,21 +63,16 @@ public final class TouchEventHandler imp
     // the listener we use to notify gecko of touch events
     private OnTouchListener mOnTouchListener;
     // whether or not we should wait for touch listeners to respond (this state is
     // per-tab and is updated when we switch tabs).
     private boolean mWaitForTouchListeners;
-    // true if we should send the current block of events to gecko. this
-    // is false if mWaitForTouchListeners was false when we received the
-    // touchstart event.
-    private boolean mSendBlockToListeners;
     // true if we should hold incoming events in our queue. this is re-set for every
     // block of events, this is cleared once we find out if the block has been
     // default-prevented or not (or we time out waiting for that).
     private boolean mHoldInQueue;
     // true if we should dispatch incoming events to the gesture detector and the pan/zoom
     // controller. if this is false, then the current block of events has been
     // default-prevented, and we should not dispatch these events (although we'll still send
@@ -144,43 +139,43 @@ public final class TouchEventHandler imp
         // and be done with it, no extra work needed.
         if (mOnTouchListener == null) {
             return true;
         if (isDownEvent(event)) {
             // this is the start of a new block of events! whee!
-            mSendBlockToListeners = mWaitForTouchListeners;
             mHoldInQueue = mWaitForTouchListeners;
             if (mHoldInQueue) {
                 // if we're holding the events in the queue, set the timeout so that
                 // we dispatch these events if we don't get a default-prevented notification
                 mView.postDelayed(mListenerTimeoutProcessor, EVENT_LISTENER_TIMEOUT);
+            } else {
+                // if we're not holding these events, then we still need to pretend like
+                // we did and had a ListenerTimeoutProcessor fire so that when we get
+                // the default-prevented notification for this block, it doesn't accidentally
+                // act upon some other block
+                mProcessingBalance++;
-            // if mSendBlockToListeners is false, then we're neither going to hold it
-            // in the queue nor send it to the listeners, so we don't need to update
-            // the mProcessingBalance here.
         // if we need to hold the events, add it to the queue. if we need to dispatch
         // it directly, do that. it is possible that both mHoldInQueue and mDispatchEvents
         // are false, in which case we are processing a block of events that we know
         // has been default-prevented. in that case we don't keep the events as we don't
         // need them (but we still pass them to the gecko listener).
         if (mHoldInQueue) {
         } else if (mDispatchEvents) {
-        if (mSendBlockToListeners) {
-            // notify gecko of the event
-            mOnTouchListener.onTouch(mView, event);
-        }
+        // notify gecko of the event
+        mOnTouchListener.onTouch(mView, event);
         return true;
      * This function is how gecko sends us a default-prevented notification. It is called
      * once gecko knows definitively whether the block of events has had preventDefault
      * called on it (either on the initial down event that starts the block, or on