diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-06-28 23:12:08 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-28 23:12:08 +0200 |
commit | 5dd272f43b8714b6816bb7a31c8f642d8d78315a (patch) | |
tree | 2846c74d8872dc4cac2e6ddc2cf2ccbc0dee8434 /dom/base | |
parent | 260cba24db7a539cc752d2c257684d5d9dee1bd1 (diff) | |
download | UXP-5dd272f43b8714b6816bb7a31c8f642d8d78315a.tar UXP-5dd272f43b8714b6816bb7a31c8f642d8d78315a.tar.gz UXP-5dd272f43b8714b6816bb7a31c8f642d8d78315a.tar.lz UXP-5dd272f43b8714b6816bb7a31c8f642d8d78315a.tar.xz UXP-5dd272f43b8714b6816bb7a31c8f642d8d78315a.zip |
Convert the button rect to device coordinates correctly instead of casting CSS coordinates.
This should the correct fix for #559
Diffstat (limited to 'dom/base')
-rw-r--r-- | dom/base/nsGlobalWindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |