Bug 623868 - Qt popup menu content is not positioned correctly r=romaxa a=npodb
authorTatiana Meshkova <tanya.meshkova@gmail.com>
Thu, 20 Jan 2011 08:27:49 +0200
changeset 60918 a32b4edf277ae93b0c228f5ad81c87e15154fa82
parent 60917 3a9a6b749df64db06ec671278c86af6cdb29c55f
child 60919 3b6ff0e5ecffdb5b69d2d5ed8c4ffc5b417862e4
push id18163
push userromaxa@gmail.com
push dateThu, 20 Jan 2011 06:28:04 +0000
treeherdermozilla-central@3b6ff0e5ecff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersromaxa, npodb
bugs623868
milestone2.0b10pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 623868 - Qt popup menu content is not positioned correctly r=romaxa a=npodb
widget/src/qt/nsWindow.cpp
--- a/widget/src/qt/nsWindow.cpp
+++ b/widget/src/qt/nsWindow.cpp
@@ -1056,31 +1056,31 @@ nsWindow::DoPaint(QPainter* aPainter, co
         return nsEventStatus_eIgnore;
 
     nsRefPtr<gfxContext> ctx = new gfxContext(targetSurface);
 
     // We will paint to 0, 0 position in offscrenn buffer
     if (renderMode == gfxQtPlatform::RENDER_BUFFERED) {
         ctx->Translate(gfxPoint(-r.x(), -r.y()));
     }
+    else if (renderMode == gfxQtPlatform::RENDER_DIRECT) {
+      gfxMatrix matr;
+      matr.Translate(gfxPoint(aPainter->transform().dx(), aPainter->transform().dy()));
 #ifdef MOZ_ENABLE_MEEGOTOUCH
-    else if (renderMode == gfxQtPlatform::RENDER_DIRECT) {
       MWindow* window = MApplication::activeWindow();
       if (window) {
         // This is needed for rotate transformation on MeeGo
         // This will work very slow if pixman does not handle rotation very well
-        gfxMatrix matr;
         M::OrientationAngle angle = window->orientationAngle();
-        matr.Translate(gfxPoint(aPainter->transform().dx(), aPainter->transform().dy()));
         matr.Rotate((M_PI/180)*angle);
-        ctx->SetMatrix(matr);
         NS_ASSERTION(PIXMAN_VERSION > PIXMAN_VERSION_ENCODE(0, 21, 2) || !angle, "Old pixman and rotate transform, it is going to be slow");
       }
+#endif
+      ctx->SetMatrix(matr);
     }
-#endif
 
     nsPaintEvent event(PR_TRUE, NS_PAINT, this);
     event.refPoint.x = rect.x;
     event.refPoint.y = rect.y;
     event.region = nsIntRegion(rect);
     {
         AutoLayerManagerSetup
             setupLayerManager(this, ctx, BasicLayerManager::BUFFER_NONE);