Backed out changeset 0f1efa209f53 (bug 863702) for B2G mochitest-2 failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 11 Oct 2013 14:41:22 -0400
changeset 164349 eb0f1d1bd9ca4ed2cf822d51c699571e350f6b41
parent 164348 7d0d6326133f7f6df06d7791b4a85b1e53d4e55f
child 164350 5dc3c476f55ef746d66d5e0d273961753cc5a82d
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs863702
milestone27.0a1
backs out0f1efa209f534408d2188a55573e269c3a391dce
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 0f1efa209f53 (bug 863702) for B2G mochitest-2 failures.
dom/browser-element/BrowserElementPanning.js
--- a/dom/browser-element/BrowserElementPanning.js
+++ b/dom/browser-element/BrowserElementPanning.js
@@ -19,26 +19,20 @@ const ContentPanning = {
   // Are we listening to touch or mouse events?
   watchedEventsType: '',
 
   // Are mouse events being delivered to this content along with touch
   // events, in violation of spec?
   hybridEvents: false,
 
   init: function cp_init() {
-    let els = Cc["@mozilla.org/eventlistenerservice;1"]
-                .getService(Ci.nsIEventListenerService);
-
     var events;
     try {
       content.document.createEvent('TouchEvent');
       events = ['touchstart', 'touchend', 'touchmove'];
-      els.addSystemEventListener(global, 'mousedown',
-                                 this.handleEvent.bind(this),
-                                 /* useCapture = */ true);
       this.watchedEventsType = 'touch';
 #ifdef MOZ_WIDGET_GONK
       // The gonk widget backend does not deliver mouse events per
       // spec.  Third-party content isn't exposed to this behavior,
       // but that behavior creates some extra work for us here.
       let appInfo = Cc["@mozilla.org/xre/app-info;1"];
       let isParentProcess =
         !appInfo || appInfo.getService(Ci.nsIXULRuntime)
@@ -50,16 +44,19 @@ const ContentPanning = {
       events = ['mousedown', 'mouseup', 'mousemove'];
       this.watchedEventsType = 'mouse';
     }
 
     // If we are using an AsyncPanZoomController for the parent frame,
     // it will handle subframe scrolling too. We don't need to listen for
     // these events.
     if (!this._asyncPanZoomForViewportFrame) {
+      let els = Cc["@mozilla.org/eventlistenerservice;1"]
+                  .getService(Ci.nsIEventListenerService);
+
       events.forEach(function(type) {
         // Using the system group for mouse/touch events to avoid
         // missing events if .stopPropagation() has been called.
         els.addSystemEventListener(global, type,
                                    this.handleEvent.bind(this),
                                    /* useCapture = */ false);
       }.bind(this));
     }
@@ -78,34 +75,16 @@ const ContentPanning = {
           this._finishPanning();
         }
       }
       return;
     }
 
     switch (evt.type) {
       case 'mousedown':
-        // Touch events will generate a quick sequence of mouse events
-        // (mousemove, mousedown, mouseup) right after touchend. But
-        // the :active pseudo state is set during mousedown and is
-        // cleared during mouseup. The above code will delay the
-        // mouseup for a small amount of ms.
-        if (this.watchedEventsType == 'touch' && !this.hybridEvents) {
-          this._setActive(evt.target);
-
-          var start = Date.now();
-          var thread = Services.tm.currentThread;
-          while ((Date.now() - start) < 100) {
-            thread.processNextEvent(true);
-          }
-
-          // Don't consider this mousedown as the beginning of a
-          // panning sequence and just bail out.
-          return;
-        }
       case 'touchstart':
         this.onTouchStart(evt);
         break;
       case 'mousemove':
       case 'touchmove':
         this.onTouchMove(evt);
         break;
       case 'mouseup':