From 5dd272f43b8714b6816bb7a31c8f642d8d78315a Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 28 Jun 2018 23:12:08 +0200 Subject: Convert the button rect to device coordinates correctly instead of casting CSS coordinates. This should the correct fix for #559 --- dom/base/nsGlobalWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dom/base') diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 4e384c4d2..884ad69ca 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -14633,7 +14633,9 @@ nsGlobalWindow::NotifyDefaultButtonLoaded(Element& aDefaultButton, return; } LayoutDeviceIntRect buttonRect = - LayoutDeviceIntRect::FromUnknownRect(frame->GetScreenRect()); + LayoutDeviceIntRect::FromAppUnitsToNearest( + frame->GetScreenRectInAppUnits(), + frame->PresContext()->AppUnitsPerDevPixel()); // Get the widget rect in screen coordinates. nsIWidget *widget = GetNearestWidget(); -- cgit v1.2.3