Bug 480689 - DeCOMtamination patch breaks Qt build. r/sr=roc
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 09 Mar 2009 21:46:11 +0900
changeset 25866 5b3f64e0c7214928433e8f14472c0eecdd2305aa
parent 25865 2d6e148e8122b0d8b847bb2074f782b9e9ced5fa
child 25867 f8c83e876d37715e1f94860fc5f56a61592b2b10
push id5790
push userm_kato@ga2.so-net.ne.jp
push dateMon, 09 Mar 2009 12:47:32 +0000
treeherdermozilla-central@5b3f64e0c721 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs480689
milestone1.9.2a1pre
Bug 480689 - DeCOMtamination patch breaks Qt build. r/sr=roc
widget/src/photon/nsClipboard.cpp
widget/src/qt/nsClipboard.cpp
widget/src/qt/nsWindow.cpp
--- a/widget/src/photon/nsClipboard.cpp
+++ b/widget/src/photon/nsClipboard.cpp
@@ -130,17 +130,17 @@ NS_IMETHODIMP nsClipboard::SetData(nsITr
 		return NS_OK;
 	}
 
   nsresult rv;
   if (!mPrivacyHandler) {
     rv = NS_NewClipboardPrivacyHandler(getter_AddRefs(mPrivacyHandler));
     NS_ENSURE_SUCCESS(rv, rv);
   }
-  rv = mPrivacyHandler.PrepareDataForClipboard(aTransferable);
+  rv = mPrivacyHandler->PrepareDataForClipboard(aTransferable);
   NS_ENSURE_SUCCESS(rv, rv);
 
 	EmptyClipboard(aWhichClipboard);
 
 	switch (aWhichClipboard) 
 	{
 		case kSelectionClipboard:
 			mSelectionOwner = anOwner;
--- a/widget/src/qt/nsClipboard.cpp
+++ b/widget/src/qt/nsClipboard.cpp
@@ -308,17 +308,17 @@ nsClipboard::SetData(nsITransferable *aT
         return NS_OK;
     }
 
     nsresult rv;
     if (!mPrivacyHandler) {
       rv = NS_NewClipboardPrivacyHandler(getter_AddRefs(mPrivacyHandler));
       NS_ENSURE_SUCCESS(rv, rv);
     }
-    rv = mPrivacyHandler.PrepareDataForClipboard(aTransferable);
+    rv = mPrivacyHandler->PrepareDataForClipboard(aTransferable);
     NS_ENSURE_SUCCESS(rv, rv);
 
     EmptyClipboard(aWhichClipboard);
 
     QClipboard::Mode mode;
 
     if (kGlobalClipboard == aWhichClipboard)
     {
--- a/widget/src/qt/nsWindow.cpp
+++ b/widget/src/qt/nsWindow.cpp
@@ -411,18 +411,18 @@ nsWindow::Move(PRInt32 aX, PRInt32 aY)
 
 
     if (!mDrawingArea)
         return NS_OK;
 
     QPoint pos(aX, aY);
     if (mDrawingArea) {
         if (mParent && mDrawingArea->windowType() == Qt::Popup) {
-            if (mParent->mDrawingArea)
-                pos = mParent->mDrawingArea->mapToGlobal(pos);
+            nsIntPoint screenPos = mParent->WidgetToScreenOffset();
+            pos += QPoint(screenPos.x, screenPos.y);
 #ifdef DEBUG_WIDGETS
             qDebug("pos is [%d,%d]", pos.x(), pos.y());
 #endif
         } else {
             qDebug("Widget within another? (%p)", (void*)mDrawingArea);
         }
     }
 
@@ -1866,33 +1866,32 @@ nsWindow::NativeResize(PRInt32 aWidth, P
 void
 nsWindow::NativeResize(PRInt32 aX, PRInt32 aY,
                        PRInt32 aWidth, PRInt32 aHeight,
                        PRBool  aRepaint)
 {
     LOG(("nsWindow::NativeResize [%p] %d %d %d %d\n", (void *)this,
          aX, aY, aWidth, aHeight));
 
-    QPoint pos(aX, aY);
+    nsIntPoint pos(aX, aY);
     if (mDrawingArea)
     {
         if (mParent && mDrawingArea->windowType() == Qt::Popup) {
-            if (mParent->mDrawingArea)
-                pos = mParent->mDrawingArea->mapToGlobal(pos);
+            pos += mParent->WidgetToScreenOffset();
 #ifdef DEBUG_WIDGETS
-            qDebug("pos is [%d,%d]", pos.x(), pos.y());
+            qDebug("pos is [%d,%d]", pos.x, pos.y);
 #endif
         } else {
 #ifdef DEBUG_WIDGETS
             qDebug("Widget with original position? (%p)", mDrawingArea);
 #endif
         }
     }
 
-    mDrawingArea->setGeometry(pos.x(), pos.y(), aWidth, aHeight);
+    mDrawingArea->setGeometry(pos.x, pos.y, aWidth, aHeight);
 
     if (aRepaint)
         mDrawingArea->update();
 }
 
 NS_IMETHODIMP
 nsWindow::SetHasTransparentBackground(PRBool aTransparent)
 {