Bug 234455, Centralize event dispatch r=jst, sr=bz

git-svn-id: svn://10.0.0.236/trunk@191900 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Olli.Pettay%helsinki.fi
2006-03-07 17:08:51 +00:00
parent 309fb9de94
commit b6cdf7cb60
90 changed files with 2579 additions and 2253 deletions

View File

@@ -56,6 +56,9 @@
#include "nsEscape.h"
#include "nsPIDOMWindow.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOMEventReceiver.h"
#include "nsIPrivateDOMEvent.h"
#include "nsIEventListenerManager.h"
#include "nsIDOMFocusListener.h"
#include "nsIWebNavigation.h"
#include "nsIWindowWatcher.h"
@@ -797,8 +800,8 @@ PRBool nsWebShellWindow::ExecuteCloseHandler()
nsMouseEvent event(PR_TRUE, NS_XUL_CLOSE, nsnull,
nsMouseEvent::eReal);
nsresult rv = window->HandleDOMEvent(presContext, &event, nsnull,
NS_EVENT_FLAG_INIT, &status);
nsresult rv =
window->DispatchDOMEvent(&event, nsnull, presContext, &status);
if (NS_SUCCEEDED(rv) && status == nsEventStatus_eConsumeNoDefault)
return PR_TRUE;
// else fall through and return PR_FALSE