firefox/mozilla-1634404.patch
Petr Šabata 268ae0028c RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/firefox#c8daf71be4963daab37d810024e0a6e7f04cf2dd
2020-10-15 00:23:49 +02:00

21 lines
764 B
Diff

diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1593,7 +1593,14 @@
// Get anchor rectangle
LayoutDeviceIntRect anchorRect(0, 0, 0, 0);
nsMenuPopupFrame* popupFrame = GetMenuPopupFrame(GetFrame());
- int32_t p2a = AppUnitsPerCSSPixel() / gfxPlatformGtk::GetFontScaleFactor();
+
+ int32_t p2a;
+ double devPixelsPerCSSPixel = StaticPrefs::layout_css_devPixelsPerPx();
+ if (devPixelsPerCSSPixel > 0.0) {
+ p2a = AppUnitsPerCSSPixel() / devPixelsPerCSSPixel * GdkScaleFactor();
+ } else {
+ p2a = AppUnitsPerCSSPixel() / gfxPlatformGtk::GetFontScaleFactor();
+ }
if (popupFrame) {
#ifdef MOZ_WAYLAND
anchorRect = LayoutDeviceIntRect::FromAppUnitsToOutside(