From e040be3c13ba6286c4958d2e15f39ab6ad67209d Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Mon, 4 Aug 2014 14:28:47 +0900 Subject: [PATCH] Bug 1046101 part.3 Rename NS_INPUT_EVENT to eInputEventClass r=smaug --- content/xul/content/src/nsXULElement.cpp | 2 +- dom/events/Event.cpp | 2 +- dom/events/EventNameList.h | 2 +- widget/BasicEvents.h | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 7be32aea3e8..e77e4516a72 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -1289,7 +1289,7 @@ nsXULElement::PreHandleEvent(EventChainPreVisitor& aVisitor) return NS_OK; } if (aVisitor.mEvent->message == NS_XUL_COMMAND && - aVisitor.mEvent->mClass == NS_INPUT_EVENT && + aVisitor.mEvent->mClass == eInputEventClass && aVisitor.mEvent->originalTarget == static_cast(this) && tag != nsGkAtoms::command) { // Check that we really have an xul command event. That will be handled diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp index f61fbbe5884..f8102d99f43 100644 --- a/dom/events/Event.cpp +++ b/dom/events/Event.cpp @@ -695,7 +695,7 @@ Event::GetEventPopupControlState(WidgetEvent* aEvent) } } break; - case NS_INPUT_EVENT : + case eInputEventClass: // For this following event only allow popups if it's triggered // while handling user input. See // nsPresShell::HandleEventInternal() for details. diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index bb2293ebc40..054c395b2fb 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -670,7 +670,7 @@ NON_IDL_EVENT(compositionend, NON_IDL_EVENT(command, NS_XUL_COMMAND, EventNameType_XUL, - NS_INPUT_EVENT) + eInputEventClass) NON_IDL_EVENT(close, NS_XUL_CLOSE, EventNameType_XUL, diff --git a/widget/BasicEvents.h b/widget/BasicEvents.h index c78ea903409..16e689a6288 100644 --- a/widget/BasicEvents.h +++ b/widget/BasicEvents.h @@ -28,7 +28,7 @@ enum EventClassID MOZ_ENUM_TYPE(EventClassIDType) // BasicEvents.h NS_EVENT, // WidgetEvent eGUIEventClass, // WidgetGUIEvent - NS_INPUT_EVENT, // WidgetInputEvent + eInputEventClass, // WidgetInputEvent NS_UI_EVENT, // InternalUIEvent // TextEvents.h @@ -1018,15 +1018,15 @@ protected: public: virtual WidgetInputEvent* AsInputEvent() MOZ_OVERRIDE { return this; } - WidgetInputEvent(bool aIsTrusted, uint32_t aMessage, nsIWidget* aWidget) : - WidgetGUIEvent(aIsTrusted, aMessage, aWidget, NS_INPUT_EVENT), - modifiers(0) + WidgetInputEvent(bool aIsTrusted, uint32_t aMessage, nsIWidget* aWidget) + : WidgetGUIEvent(aIsTrusted, aMessage, aWidget, eInputEventClass) + , modifiers(0) { } virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE { - MOZ_ASSERT(mClass == NS_INPUT_EVENT, + MOZ_ASSERT(mClass == eInputEventClass, "Duplicate() must be overridden by sub class"); // Not copying widget, it is a weak reference. WidgetInputEvent* result = new WidgetInputEvent(false, message, nullptr);