345425 onDragExit in tabbrowser.xml is called with aDragSession.sourceNode null when a tab is dropped on itself. Eliminate extra call to EndDragSession. r=josh sr=pink

This commit is contained in:
mark%moxienet.com 2006-07-23 15:22:16 +00:00
parent f41b9c5029
commit 5294628a7b
4 changed files with 3 additions and 30 deletions

View File

@ -239,10 +239,6 @@ nsDragHelperService::Drop(DragReference inDragRef, nsIEventSink *inSink,
result = dragNotAcceptedErr;
} // if a valid drag session
// we don't need the drag session anymore, the user has released the
// mouse and the event has already gone to gecko.
mDragService->EndDragSession();
// if there was any kind of error, the drag wasn't accepted
*outAccepted = (result == noErr);

View File

@ -236,7 +236,7 @@ nsDragService::ComputeGlobalRectFromFrame ( nsIDOMNode* aDOMNode, Rect & outScre
//
// StartDragSession
// InvokeDragSession
//
// Do all the work to kick it off.
//
@ -326,7 +326,7 @@ nsDragService::InvokeDragSession (nsIDOMNode *aDOMNode, nsISupportsArray * aTran
return NS_OK;
} // StartDragSession
} // InvokeDragSession
//
@ -1163,26 +1163,6 @@ nsDragService::ExtractDataFromOS ( DragReference inDragRef, ItemReference inItem
} // ExtractDataFromOS
//
// StartDragSession
// EndDragSession
//
// Override the defaults to disable/enable the watch cursor while we're dragging
//
nsresult
nsDragService::StartDragSession ( )
{
return nsBaseDragService::StartDragSession();
}
nsresult
nsDragService::EndDragSession ( )
{
return nsBaseDragService::EndDragSession();
}
//
// SetDragAction
//

View File

@ -79,9 +79,6 @@ public:
private:
NS_IMETHOD StartDragSession ( ) ;
NS_IMETHOD EndDragSession ( ) ;
char* LookupMimeMappingsForItem ( DragReference inDragRef, ItemReference itemRef ) ;
void RegisterDragItemsAndFlavors ( nsISupportsArray * inArray, RgnHandle inDragRgn ) ;

View File

@ -574,7 +574,7 @@ PRBool nsMacEventHandler::DragEvent(unsigned int aMessage,
// done when aMessage == NS_DRAGDROP_EXIT, because that indicates
// that the drag is leaving the window.
nsMouseEvent enterEvent(PR_TRUE, NS_DRAGDROP_EXIT, widgetHit,
nsMouseEvent enterEvent(PR_TRUE, NS_DRAGDROP_ENTER, widgetHit,
nsMouseEvent::eReal);
InitializeMouseEvent(enterEvent, widgetHitPoint, aKeyModifiers, 1);
widgetHit->DispatchMouseEvent(enterEvent);