Fixing bug 110798. Freezing nsIDOMEvent and related interfaces. r=harishd@netscape.com, sr=jband@netscape.com

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@109987 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%netscape.com
2001-12-07 08:22:02 +00:00
parent dc48d37b85
commit 7a4b830d2c
38 changed files with 558 additions and 264 deletions

View File

@@ -34,6 +34,7 @@
#include "nsIDOMAttr.h"
#include "nsIDocument.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOMNSEvent.h"
#include "nsIDOMKeyEvent.h"
#include "nsIDOMKeyListener.h"
#include "nsIDOMMouseListener.h"
@@ -923,8 +924,15 @@ NS_IMETHODIMP nsHTMLEditor::CanDrag(nsIDOMEvent *aDragEvent, PRBool *aCanDrag)
return NS_OK;
nsCOMPtr<nsIDOMEventTarget> eventTarget;
res = aDragEvent->GetOriginalTarget(getter_AddRefs(eventTarget));
if (NS_FAILED(res)) return res;
nsCOMPtr<nsIDOMNSEvent> nsevent(do_QueryInterface(aDragEvent));
if (nsevent) {
res = nsevent->GetOriginalTarget(getter_AddRefs(eventTarget));
if (NS_FAILED(res))
return res;
}
if ( eventTarget )
{
nsCOMPtr<nsIDOMNode> eventTargetDomNode = do_QueryInterface(eventTarget);
@@ -1056,7 +1064,11 @@ NS_IMETHODIMP nsHTMLEditor::DoDrag(nsIDOMEvent *aDragEvent)
rv = dragService->InvokeDragSession( domnode, transferableArray, nsnull, flags);
if (NS_FAILED(rv)) return rv;
aDragEvent->PreventBubble();
nsCOMPtr<nsIDOMNSEvent> nsevent(do_QueryInterface(aDragEvent));
if (nsevent) {
nsevent->PreventBubble();
}
}
}