Bug 1046101 part.28 Rename NS_COMMAND_EVENT to eCommandEventClass r=smaug

This commit is contained in:
Masayuki Nakano 2014-08-04 14:28:56 +09:00
parent 165587969b
commit 59cdca4ea4
3 changed files with 7 additions and 7 deletions

View File

@ -732,7 +732,7 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
case eSMILTimeEventClass:
return NS_NewDOMTimeEvent(aDOMEvent, aOwner, aPresContext,
aEvent->AsSMILTimeEvent());
case NS_COMMAND_EVENT:
case eCommandEventClass:
return NS_NewDOMCommandEvent(aDOMEvent, aOwner, aPresContext,
aEvent->AsCommandEvent());
case eSimpleGestureEventClass:

View File

@ -63,7 +63,7 @@ enum EventClassID MOZ_ENUM_TYPE(EventClassIDType)
eSMILTimeEventClass, // InternalSMILTimeEvent
// MiscEvents.h
NS_COMMAND_EVENT, // WidgetCommandEvent
eCommandEventClass, // WidgetCommandEvent
NS_CONTENT_COMMAND_EVENT, // WidgetContentCommandEvent
NS_PLUGIN_EVENT, // WidgetPluginEvent

View File

@ -100,17 +100,17 @@ public:
virtual WidgetCommandEvent* AsCommandEvent() MOZ_OVERRIDE { return this; }
WidgetCommandEvent(bool aIsTrusted, nsIAtom* aEventType,
nsIAtom* aCommand, nsIWidget* aWidget) :
WidgetGUIEvent(aIsTrusted, NS_USER_DEFINED_EVENT, aWidget,
NS_COMMAND_EVENT),
command(aCommand)
nsIAtom* aCommand, nsIWidget* aWidget)
: WidgetGUIEvent(aIsTrusted, NS_USER_DEFINED_EVENT, aWidget,
eCommandEventClass)
, command(aCommand)
{
userType = aEventType;
}
virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
{
MOZ_ASSERT(mClass == NS_COMMAND_EVENT,
MOZ_ASSERT(mClass == eCommandEventClass,
"Duplicate() must be overridden by sub class");
// Not copying widget, it is a weak reference.
WidgetCommandEvent* result =