Bug 1420241 - fix positioning of autoscroll popup on macOS, r=dao
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 20 Dec 2017 16:06:23 +0000
changeset 448909 4469bfc6aff543976a003eb81c66404347f80d19
parent 448908 929eea667f6a18f525c64a4b3f92f288dc5869b4
child 448910 6b13649d3b450327e34edfa9d7f4ff6df688ee08
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1420241
milestone59.0a1
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
Bug 1420241 - fix positioning of autoscroll popup on macOS, r=dao MozReview-Commit-ID: HM0n4fJJnQO
toolkit/content/widgets/browser.xml
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -1324,17 +1324,17 @@
             this._autoScrollPopup.setAttribute("scrolldir", scrolldir);
             this._autoScrollPopup.addEventListener("popuphidden", this, true);
 
             // Sanitize screenX/screenY for available screen size with half the size
             // of the popup removed. The popup uses negative margins to center on the
             // coordinates we pass. Unfortunately `window.screen.availLeft` can be negative
             // on Windows in multi-monitor setups, so we use nsIScreenManager instead:
             let left = {}, top = {}, width = {}, height = {};
-            screen.GetAvailRectDisplayPix(left, top, width, height);
+            screen.GetAvailRect(left, top, width, height);
 
             // We need to get screen CSS-pixel (rather than display-pixel) coordinates.
             // With 175% DPI, the actual ratio of display pixels to CSS pixels is
             // 1.7647 because of rounding inside gecko. Unfortunately defaultCSSScaleFactor
             // returns the original 1.75 dpi factor. While window.devicePixelRatio would
             // get us the correct ratio, if the window is split between 2 screens,
             // window.devicePixelRatio isn't guaranteed to match the screen we're
             // autoscrolling on. So instead we do the same math as Gecko.