Bug 1420241 - fix positioning of autoscroll popup on macOS, r?dao
MozReview-Commit-ID: HM0n4fJJnQO
--- 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.