From 174ccacffbfec1f1e8320bcecbd7b0544033313d Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Sat, 13 Apr 2013 08:53:47 +0100 Subject: [PATCH] bug 861112 - (widget/gtk2) scaling from display to device pixels should only apply to top-level windows/dialogs/popups, not to child or plugin windows. r=roc --- widget/gtk2/nsWindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp index ddeac25ecd4..f3f1cf8920d 100644 --- a/widget/gtk2/nsWindow.cpp +++ b/widget/gtk2/nsWindow.cpp @@ -995,7 +995,8 @@ nsWindow::Show(bool aState) NS_IMETHODIMP nsWindow::Resize(double aWidth, double aHeight, bool aRepaint) { - double scale = GetDefaultScale(); + double scale = + mWindowType <= eWindowType_popup ? GetDefaultScale() : 1.0; int32_t width = NSToIntRound(scale * aWidth); int32_t height = NSToIntRound(scale * aHeight); ConstrainSize(&width, &height); @@ -1075,7 +1076,8 @@ NS_IMETHODIMP nsWindow::Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) { - double scale = GetDefaultScale(); + double scale = + mWindowType <= eWindowType_popup ? GetDefaultScale() : 1.0; int32_t width = NSToIntRound(scale * aWidth); int32_t height = NSToIntRound(scale * aHeight); ConstrainSize(&width, &height); @@ -1163,7 +1165,8 @@ nsWindow::Move(double aX, double aY) LOG(("nsWindow::Move [%p] %f %f\n", (void *)this, aX, aY)); - double scale = GetDefaultScale(); + double scale = + mWindowType <= eWindowType_popup ? GetDefaultScale() : 1.0; int32_t x = NSToIntRound(aX * scale); int32_t y = NSToIntRound(aY * scale);