From 3819af939b2ed3ce6a682ea8fbdbe0ec72fdffbd Mon Sep 17 00:00:00 2001 From: "mark%moxienet.com" Date: Sun, 23 Jul 2006 15:22:16 +0000 Subject: [PATCH] 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 git-svn-id: svn://10.0.0.236/trunk@203469 18797224-902f-48f8-a5cc-f745e15eee43 --- .../widget/src/mac/nsDragHelperService.cpp | 4 ---- mozilla/widget/src/mac/nsDragService.cpp | 24 ++----------------- mozilla/widget/src/mac/nsDragService.h | 3 --- mozilla/widget/src/mac/nsMacEventHandler.cpp | 2 +- 4 files changed, 3 insertions(+), 30 deletions(-) diff --git a/mozilla/widget/src/mac/nsDragHelperService.cpp b/mozilla/widget/src/mac/nsDragHelperService.cpp index b4eece83a89..25d4a208e48 100644 --- a/mozilla/widget/src/mac/nsDragHelperService.cpp +++ b/mozilla/widget/src/mac/nsDragHelperService.cpp @@ -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); diff --git a/mozilla/widget/src/mac/nsDragService.cpp b/mozilla/widget/src/mac/nsDragService.cpp index ebbd5dea56a..511e67d2ad8 100644 --- a/mozilla/widget/src/mac/nsDragService.cpp +++ b/mozilla/widget/src/mac/nsDragService.cpp @@ -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 // diff --git a/mozilla/widget/src/mac/nsDragService.h b/mozilla/widget/src/mac/nsDragService.h index 5e28030c126..3f42e4a3b6a 100644 --- a/mozilla/widget/src/mac/nsDragService.h +++ b/mozilla/widget/src/mac/nsDragService.h @@ -79,9 +79,6 @@ public: private: - NS_IMETHOD StartDragSession ( ) ; - NS_IMETHOD EndDragSession ( ) ; - char* LookupMimeMappingsForItem ( DragReference inDragRef, ItemReference itemRef ) ; void RegisterDragItemsAndFlavors ( nsISupportsArray * inArray, RgnHandle inDragRgn ) ; diff --git a/mozilla/widget/src/mac/nsMacEventHandler.cpp b/mozilla/widget/src/mac/nsMacEventHandler.cpp index 91be6a8d8de..b19dd8019e6 100644 --- a/mozilla/widget/src/mac/nsMacEventHandler.cpp +++ b/mozilla/widget/src/mac/nsMacEventHandler.cpp @@ -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);