Bug 1356183 - Let MousePosTracker use event.clientX instead of event.screenX - window.mozInnerScreenX to avoid flushing layout. r?florian
MozReview-Commit-ID: 5jULHMnWFBW
--- 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);