From a15b64b33331b16f69761fe98f2f12c4af33e112 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 19 May 2015 17:08:35 -0400 Subject: [PATCH] Bug 1165513 - Translate GTK3 widgets with snapped pixel coordinates into identity space. r=jrmuizel --- widget/gtk/nsNativeThemeGTK.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp index 5f1a242bf47..6d4f2383cc2 100644 --- a/widget/gtk/nsNativeThemeGTK.cpp +++ b/widget/gtk/nsNativeThemeGTK.cpp @@ -848,7 +848,8 @@ DrawThemeWithCairo(gfxContext* aContext, DrawTarget* aDrawTarget, if (needClip || aTransparency != nsITheme::eOpaque) { // The widget either needs to be masked or has transparency, so use the slower drawing path. aDrawTarget->DrawSurface(dataSurface, - Rect(aDrawOrigin, Size(aDrawSize)), + Rect(aSnapped ? aDrawOrigin - aDrawTarget->GetTransform().GetTranslation() : aDrawOrigin, + Size(aDrawSize)), Rect(0, 0, aDrawSize.width, aDrawSize.height)); } else { // The widget is a simple opaque rectangle, so just copy it out.