Bug 570467. For the clip region of drag feedback, if we were given an null clip region don't pass an empty clip region, pass null. r=mats
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 08 Jun 2010 14:18:10 -0500
changeset 43322 12ea060fa735e65799cc40bfebcf49369a1960a1
parent 43321 2f539cc84d9750e6de1de5d44f8ade2b82cad024
child 43323 fbea64d460810489b9215f00d0bfd50383217b04
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs570467
milestone1.9.3a5pre
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 570467. For the clip region of drag feedback, if we were given an null clip region don't pass an empty clip region, pass null. r=mats
widget/src/xpwidgets/nsBaseDragService.cpp
--- a/widget/src/xpwidgets/nsBaseDragService.cpp
+++ b/widget/src/xpwidgets/nsBaseDragService.cpp
@@ -525,18 +525,19 @@ nsBaseDragService::DrawDrag(nsIDOMNode* 
     nsCOMPtr<nsIRegion> clipIRegion;
     aRegion->GetRegion(getter_AddRefs(clipIRegion));
     if (clipIRegion) {
       clipRegion = clipIRegion->GetUnderlyingRegion();
     }
   }
 
   nsIntPoint pnt(aScreenDragRect->x, aScreenDragRect->y);
-  nsRefPtr<gfxASurface> surface = presShell->RenderNode(dragNode, &clipRegion,
-                                                        pnt, aScreenDragRect);
+  nsRefPtr<gfxASurface> surface =
+    presShell->RenderNode(dragNode, aRegion ? &clipRegion : nsnull,
+                          pnt, aScreenDragRect);
 
   // if an image was specified, reposition the drag rectangle to
   // the supplied offset in mImageX and mImageY.
   if (mImage) {
     aScreenDragRect->x = aScreenX - mImageX;
     aScreenDragRect->y = aScreenY - mImageY;
   }