Bug 1356183 - Let MousePosTracker use event.clientX instead of event.screenX - window.mozInnerScreenX to avoid flushing layout. r?florian draft
authorDão Gottwald <dao@mozilla.com>
Thu, 13 Apr 2017 11:44:56 +0200
changeset 561970 f83b635bf536a001ed53c7d0cea1a8a57d2becb7
parent 561690 aca6b2a5a2ab3338436c9e819dc2244a022b6425
child 624138 ab750c888e3a53e074e72dad57155799caab41cd
push id53920
push userdgottwald@mozilla.com
push dateThu, 13 Apr 2017 09:46:53 +0000
reviewersflorian
bugs1356183
milestone55.0a1
Bug 1356183 - Let MousePosTracker use event.clientX instead of event.screenX - window.mozInnerScreenX to avoid flushing layout. r?florian MozReview-Commit-ID: 5jULHMnWFBW
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -8218,18 +8218,18 @@ var MousePosTracker = {
   },
 
   removeListener(listener) {
     this._listeners.delete(listener);
   },
 
   handleEvent(event) {
     var fullZoom = this._windowUtils.fullZoom;
-    this._x = event.screenX / fullZoom - window.mozInnerScreenX;
-    this._y = event.screenY / fullZoom - window.mozInnerScreenY;
+    this._x = event.clientX / fullZoom;
+    this._y = event.clientY / fullZoom;
 
     this._listeners.forEach(function(listener) {
       try {
         this._callListener(listener);
       } catch (e) {
         Cu.reportError(e);
       }
     }, this);