Bug 1046101 part.6 Rename NS_COMPOSITION_EVENT to eCompositionEventClass r=smaug

This commit is contained in:
Masayuki Nakano 2014-08-04 14:28:48 +09:00
parent aaf3fac323
commit b053dddf96
8 changed files with 13 additions and 13 deletions

View File

@ -17,7 +17,7 @@ CompositionEvent::CompositionEvent(EventTarget* aOwner,
: UIEvent(aOwner, aPresContext,
aEvent ? aEvent : new WidgetCompositionEvent(false, 0, nullptr))
{
NS_ASSERTION(mEvent->mClass == NS_COMPOSITION_EVENT,
NS_ASSERTION(mEvent->mClass == eCompositionEventClass,
"event type mismatch");
if (aEvent) {

View File

@ -699,7 +699,7 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
case eKeyboardEventClass:
return NS_NewDOMKeyboardEvent(aDOMEvent, aOwner, aPresContext,
aEvent->AsKeyboardEvent());
case NS_COMPOSITION_EVENT:
case eCompositionEventClass:
return NS_NewDOMCompositionEvent(aDOMEvent, aOwner, aPresContext,
aEvent->AsCompositionEvent());
case NS_MOUSE_EVENT:

View File

@ -658,15 +658,15 @@ NON_IDL_EVENT(text,
NON_IDL_EVENT(compositionstart,
NS_COMPOSITION_START,
EventNameType_XUL,
NS_COMPOSITION_EVENT)
eCompositionEventClass)
NON_IDL_EVENT(compositionupdate,
NS_COMPOSITION_UPDATE,
EventNameType_XUL,
NS_COMPOSITION_EVENT)
eCompositionEventClass)
NON_IDL_EVENT(compositionend,
NS_COMPOSITION_END,
EventNameType_XUL,
NS_COMPOSITION_EVENT)
eCompositionEventClass)
NON_IDL_EVENT(command,
NS_XUL_COMMAND,
EventNameType_XUL,

View File

@ -133,8 +133,8 @@ static const char*
GetEventClassIDName(EventClassID aEventClassID)
{
switch (aEventClassID) {
case NS_COMPOSITION_EVENT:
return "NS_COMPOSITION_EVENT";
case eCompositionEventClass:
return "eCompositionEventClass";
case NS_TEXT_EVENT:
return "NS_TEXT_EVENT";
default:
@ -858,7 +858,7 @@ IMEStateManager::DispatchCompositionEvent(nsINode* aEventTargetNode,
GetBoolName(aEvent->mFlags.mIsTrusted),
GetBoolName(aEvent->mFlags.mPropagationStopped)));
MOZ_ASSERT(aEvent->mClass == NS_COMPOSITION_EVENT ||
MOZ_ASSERT(aEvent->mClass == eCompositionEventClass ||
aEvent->mClass == NS_TEXT_EVENT);
if (!aEvent->mFlags.mIsTrusted || aEvent->mFlags.mPropagationStopped) {
return;

View File

@ -7783,7 +7783,7 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, nsEventStatus* aStatus)
}
}
if (eventTarget) {
if (aEvent->mClass == NS_COMPOSITION_EVENT ||
if (aEvent->mClass == eCompositionEventClass ||
aEvent->mClass == NS_TEXT_EVENT) {
IMEStateManager::DispatchCompositionEvent(eventTarget,
mPresContext, aEvent, aStatus, eventCBPtr);

View File

@ -33,7 +33,7 @@ enum EventClassID MOZ_ENUM_TYPE(EventClassIDType)
// TextEvents.h
eKeyboardEventClass, // WidgetKeyboardEvent
NS_COMPOSITION_EVENT, // WidgetCompositionEvent
eCompositionEventClass, // WidgetCompositionEvent
NS_TEXT_EVENT, // WidgetTextEvent
NS_QUERY_CONTENT_EVENT, // WidgetQueryContentEvent
NS_SELECTION_EVENT, // WidgetSelectionEvent

View File

@ -302,7 +302,7 @@ public:
WidgetCompositionEvent(bool aIsTrusted, uint32_t aMessage,
nsIWidget* aWidget)
: WidgetGUIEvent(aIsTrusted, aMessage, aWidget, NS_COMPOSITION_EVENT)
: WidgetGUIEvent(aIsTrusted, aMessage, aWidget, eCompositionEventClass)
, mSeqno(kLatestSeqno)
{
// XXX compositionstart is cancelable in draft of DOM3 Events.
@ -313,7 +313,7 @@ public:
virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
{
MOZ_ASSERT(mClass == NS_COMPOSITION_EVENT,
MOZ_ASSERT(mClass == eCompositionEventClass,
"Duplicate() must be overridden by sub class");
// Not copying widget, it is a weak reference.
WidgetCompositionEvent* result =

View File

@ -291,7 +291,7 @@ PuppetWidget::DispatchEvent(WidgetGUIEvent* event, nsEventStatus& aStatus)
}
uint32_t seqno = kLatestSeqno;
switch (event->mClass) {
case NS_COMPOSITION_EVENT:
case eCompositionEventClass:
seqno = event->AsCompositionEvent()->mSeqno;
break;
case NS_TEXT_EVENT: