Convert the button rect to device coordinates correctly instead of casting CSS coordinates.

This should the correct fix for #559
This commit is contained in:
wolfbeast 2018-06-28 23:12:08 +02:00 committed by Roy Tam
commit f5d85dbba6

View file

@ -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();