From 8b32eff646e2751d08d26e96bf0a91fa8f7b5fa6 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Tue, 7 Jan 2020 09:48:00 -0500 Subject: [PATCH] Bug 1379728 part 1. Remove the double-definition of the 'close' event from EventNameList.h. Tag #1343 --- dom/events/EventNameList.h | 6 +----- xpfe/appshell/nsWebShellWindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index c299133e39..94e8a589bd 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -174,7 +174,7 @@ EVENT(click, eMouseEventClass) EVENT(close, eClose, - EventNameType_HTML, + EventNameType_HTMLXUL, eBasicEventClass) EVENT(contextmenu, eContextMenu, @@ -777,10 +777,6 @@ NON_IDL_EVENT(command, eXULCommand, EventNameType_XUL, eInputEventClass) -NON_IDL_EVENT(close, - eWindowClose, - EventNameType_XUL, - eBasicEventClass) NON_IDL_EVENT(popupshowing, eXULPopupShowing, EventNameType_XUL, diff --git a/xpfe/appshell/nsWebShellWindow.cpp b/xpfe/appshell/nsWebShellWindow.cpp index 288d947595..f703be7289 100644 --- a/xpfe/appshell/nsWebShellWindow.cpp +++ b/xpfe/appshell/nsWebShellWindow.cpp @@ -323,7 +323,7 @@ nsWebShellWindow::RequestWindowClose(nsIWidget* aWidget) RefPtr presContext = presShell->GetPresContext(); nsEventStatus status = nsEventStatus_eIgnore; - WidgetMouseEvent event(true, eWindowClose, nullptr, + WidgetMouseEvent event(true, eClose, nullptr, WidgetMouseEvent::eReal); if (NS_SUCCEEDED(eventTarget->DispatchDOMEvent(&event, nullptr, presContext, &status)) && status == nsEventStatus_eConsumeNoDefault) @@ -759,7 +759,7 @@ bool nsWebShellWindow::ExecuteCloseHandler() contentViewer->GetPresContext(getter_AddRefs(presContext)); nsEventStatus status = nsEventStatus_eIgnore; - WidgetMouseEvent event(true, eWindowClose, nullptr, + WidgetMouseEvent event(true, eClose, nullptr, WidgetMouseEvent::eReal); nsresult rv =