Bug 1046101 part.6 Rename NS_COMPOSITION_EVENT to eCompositionEventClass r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 04 Aug 2014 14:28:48 +0900
changeset 220544 2b9d077a13aa5fc2e946ab1d6a5f5e5ade314b70
parent 220543 3e94b93c2c622e5f0f883689294ddf565785198b
child 220545 4e0084fdadf1f7293db2d6c67569126e17009429
push id583
push userbhearsum@mozilla.com
push dateMon, 24 Nov 2014 19:04:58 +0000
treeherdermozilla-release@c107e74250f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1046101
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1046101 part.6 Rename NS_COMPOSITION_EVENT to eCompositionEventClass r=smaug
dom/events/CompositionEvent.cpp
dom/events/EventDispatcher.cpp
dom/events/EventNameList.h
dom/events/IMEStateManager.cpp
layout/base/nsPresShell.cpp
widget/BasicEvents.h
widget/TextEvents.h
widget/xpwidgets/PuppetWidget.cpp
--- a/dom/events/CompositionEvent.cpp
+++ b/dom/events/CompositionEvent.cpp
@@ -12,17 +12,17 @@ namespace mozilla {
 namespace dom {
 
 CompositionEvent::CompositionEvent(EventTarget* aOwner,
                                    nsPresContext* aPresContext,
                                    WidgetCompositionEvent* aEvent)
   : 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) {
     mEventIsInternal = false;
   } else {
     mEventIsInternal = true;
     mEvent->time = PR_Now();
 
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -694,17 +694,17 @@ EventDispatcher::CreateEvent(EventTarget
       return NS_NewDOMUIEvent(aDOMEvent, aOwner, aPresContext,
                               aEvent->AsGUIEvent());
     case NS_SCROLLAREA_EVENT:
       return NS_NewDOMScrollAreaEvent(aDOMEvent, aOwner, aPresContext,
                                       aEvent->AsScrollAreaEvent());
     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:
       return NS_NewDOMMouseEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsMouseEvent());
     case NS_FOCUS_EVENT:
       return NS_NewDOMFocusEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsFocusEvent());
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -653,25 +653,25 @@ NON_IDL_EVENT(speakerforcedchange,
 // Events that only have on* attributes on XUL elements
 NON_IDL_EVENT(text,
               NS_TEXT_TEXT,
               EventNameType_XUL,
               NS_TEXT_EVENT)
 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,
               eInputEventClass)
 NON_IDL_EVENT(close,
               NS_XUL_CLOSE,
               EventNameType_XUL,
               NS_EVENT)
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -128,18 +128,18 @@ GetIMEStateSetOpenName(IMEState::Open aO
       return "illegal value";
   }
 }
 
 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:
       return "unacceptable event struct type";
   }
 }
 
 static const char*
@@ -853,17 +853,17 @@ IMEStateManager::DispatchCompositionEven
      "aPresContext=0x%p, aEvent={ mClass=%s, message=%s, "
      " mFlags={ mIsTrusted=%s, mPropagationStopped=%s } })",
      aEventTargetNode, aPresContext,
      GetEventClassIDName(aEvent->mClass),
      GetEventMessageName(aEvent->message),
      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;
   }
 
   EnsureTextCompositionArray();
 
   WidgetGUIEvent* GUIEvent = aEvent->AsGUIEvent();
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -7778,17 +7778,17 @@ PresShell::HandleEventInternal(WidgetEve
             } else if (mDocument) {
               eventTarget = do_QueryInterface(mDocument);
               // If we don't have any content, the callback wouldn't probably
               // do nothing.
               eventCBPtr = nullptr;
             }
           }
           if (eventTarget) {
-            if (aEvent->mClass == NS_COMPOSITION_EVENT ||
+            if (aEvent->mClass == eCompositionEventClass ||
                 aEvent->mClass == NS_TEXT_EVENT) {
               IMEStateManager::DispatchCompositionEvent(eventTarget,
                 mPresContext, aEvent, aStatus, eventCBPtr);
             } else {
               EventDispatcher::Dispatch(eventTarget, mPresContext,
                                         aEvent, nullptr, aStatus, eventCBPtr);
             }
           }
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -28,17 +28,17 @@ enum EventClassID MOZ_ENUM_TYPE(EventCla
   // BasicEvents.h
   NS_EVENT,                          // WidgetEvent
   eGUIEventClass,                    // WidgetGUIEvent
   eInputEventClass,                  // WidgetInputEvent
   eUIEventClass,                     // InternalUIEvent
 
   // TextEvents.h
   eKeyboardEventClass,               // WidgetKeyboardEvent
-  NS_COMPOSITION_EVENT,              // WidgetCompositionEvent
+  eCompositionEventClass,            // WidgetCompositionEvent
   NS_TEXT_EVENT,                     // WidgetTextEvent
   NS_QUERY_CONTENT_EVENT,            // WidgetQueryContentEvent
   NS_SELECTION_EVENT,                // WidgetSelectionEvent
   NS_EDITOR_INPUT_EVENT,             // InternalEditorInputEvent
 
   // MouseEvents.h
   NS_MOUSE_EVENT,                    // WidgetMouseEvent
   NS_DRAG_EVENT,                     // WidgetDragEvent
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -297,28 +297,28 @@ public:
 public:
   virtual WidgetCompositionEvent* AsCompositionEvent() MOZ_OVERRIDE
   {
     return this;
   }
 
   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.
     //     However, it doesn't make sense for us, we cannot cancel composition
     //     when we send compositionstart event.
     mFlags.mCancelable = false;
   }
 
   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 =
       new WidgetCompositionEvent(false, message, nullptr);
     result->AssignCompositionEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
--- a/widget/xpwidgets/PuppetWidget.cpp
+++ b/widget/xpwidgets/PuppetWidget.cpp
@@ -286,17 +286,17 @@ PuppetWidget::DispatchEvent(WidgetGUIEve
 
   aStatus = nsEventStatus_eIgnore;
 
   if (event->message == NS_COMPOSITION_START) {
     mIMEComposing = true;
   }
   uint32_t seqno = kLatestSeqno;
   switch (event->mClass) {
-  case NS_COMPOSITION_EVENT:
+  case eCompositionEventClass:
     seqno = event->AsCompositionEvent()->mSeqno;
     break;
   case NS_TEXT_EVENT:
     seqno = event->AsTextEvent()->mSeqno;
     break;
   case NS_SELECTION_EVENT:
     seqno = event->AsSelectionEvent()->mSeqno;
     break;