Bug 1420241 - fix positioning of autoscroll popup on macOS, r?dao draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 20 Dec 2017 16:06:23 +0000
changeset 713561 f4c4c67fb4ba6c582cfa3b77e288ee7ac3cb8b02
parent 713481 a235bf4868ab9e48c7b2f4bf4cc9bd949ca23c35
child 744363 9b9d911ff49d7ede4fd1c3ec59551b4590644823
push id93675
push userbmo:gijskruitbosch+bugs@gmail.com
push dateWed, 20 Dec 2017 16:07:13 +0000
reviewersdao
bugs1420241
milestone59.0a1
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.