Bug 519231: Backing out bug 501566, r=stechz
authorMark Finkle <mfinkle@mozilla.com>
Mon, 28 Sep 2009 14:16:55 -0400
changeset 65616 3062d6e242c220efb0c3576539fe91e92d816be7
parent 65615 860abdf603de697aa765ddf6e8ece13fc938d00d
child 65617 80f5930de5bc628aede6d71c5974bd5167e4da5a
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstechz
bugs519231, 501566
Bug 519231: Backing out bug 501566, r=stechz
mobile/chrome/content/InputHandler.js
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/InputHandler.js
+++ b/mobile/chrome/content/InputHandler.js
@@ -505,17 +505,16 @@ MouseModule.prototype = {
 
     let [sX, sY] = dragData.lockAxis(evInfo.event.screenX, evInfo.event.screenY);
 
     this._movedOutOfRadius = this._movedOutOfRadius || dragData.isPointOutsideRadius(sX, sY);
 
     if (dragData.dragging)       // XXX same check as this._dragger but we
       this._doDragStop(sX, sY);  //  are using both, no good reason
 
-
     if (this._clicker)
       this._clicker.mouseUp(evInfo.event.clientX, evInfo.event.clientY);
 
     if (this._targetIsContent(evInfo.event)) {
       this._recordEvent(evInfo);
       this._doClick(this._movedOutOfRadius);
     }
     else if (this._dragger && this._movedOutOfRadius && evInfo.event.detail)
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1490,42 +1490,32 @@ const BrowserSearch = {
       button.engine = engine;
     }
   }
 }
 
 /** Watches for mouse events in chrome and sends them to content. */
 function ContentCustomClicker(browserView) {
   this._browserView = browserView;
-  this._fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
 }
 
 ContentCustomClicker.prototype = {
     /** Dispatch a mouse event with chrome client coordinates. */
     _dispatchMouseEvent: function _dispatchMouseEvent(name, cX, cY) {
       let browser = this._browserView.getBrowser();
-      let [x, y] = Browser.transformClientToBrowser(cX, cY);
-      let cwu = BrowserView.Util.getBrowserDOMWindowUtils(browser);
-      let scrollX = {}, scrollY = {};
       if (browser) {
+        let [x, y] = Browser.transformClientToBrowser(cX, cY);
+        let cwu = BrowserView.Util.getBrowserDOMWindowUtils(browser);
+        let scrollX = {}, scrollY = {};
         cwu.getScrollXY(false, scrollX, scrollY);
         cwu.sendMouseEvent(name, x - scrollX.value, y - scrollY.value, 0, 1, 0, true);
       }
     },
 
     mouseDown: function mouseDown(cX, cY) {
-      // if something is targeted by the mousedown, focus it and re-render
-      // the canvas now
-      let [x, y] = Browser.transformClientToBrowser(cX, cY);
-      let element = Browser.elementFromPoint(x, y);
-      if (!element)
-        return;
-
-      this._fm.setFocus(element, Ci.nsIFocusManager.FLAG_NOSCROLL);
-      Util.executeSoon(this._browserView.renderNow);
     },
 
     mouseUp: function mouseUp(cX, cY) {
     },
 
     singleClick: function singleClick(cX, cY) {
       this._dispatchMouseEvent("mousedown", cX, cY);
       this._dispatchMouseEvent("mouseup", cX, cY);