Bug 895274 part.191 Rename NS_COMPOSITION_END to eCompositionEnd r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Sep 2015 21:21:27 +0900
changeset 296312 e6420651e2c9ae7f21b03ac38c1424776c8f2179
parent 296311 094135c410a51de44a0080a904e01928021e3a3f
child 296313 9f26179268e3b25496700f153b93365049dd2588
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.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 895274 part.191 Rename NS_COMPOSITION_END to eCompositionEnd r=smaug
dom/events/EventNameList.h
dom/events/IMEStateManager.cpp
dom/events/TextComposition.cpp
editor/libeditor/nsEditor.cpp
editor/libeditor/nsEditorEventListener.cpp
widget/ContentCache.cpp
widget/EventMessageList.h
widget/TextEvents.h
widget/WidgetEventImpl.cpp
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -679,17 +679,17 @@ NON_IDL_EVENT(compositionstart,
               eCompositionStart,
               EventNameType_XUL,
               eCompositionEventClass)
 NON_IDL_EVENT(compositionupdate,
               NS_COMPOSITION_UPDATE,
               EventNameType_XUL,
               eCompositionEventClass)
 NON_IDL_EVENT(compositionend,
-              NS_COMPOSITION_END,
+              eCompositionEnd,
               EventNameType_XUL,
               eCompositionEventClass)
 NON_IDL_EVENT(command,
               eXULCommand,
               EventNameType_XUL,
               eInputEventClass)
 NON_IDL_EVENT(close,
               eWindowClose,
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -134,18 +134,18 @@ GetIMEStateSetOpenName(IMEState::Open aO
 }
 
 static const char*
 GetEventMessageName(EventMessage aMessage)
 {
   switch (aMessage) {
     case eCompositionStart:
       return "eCompositionStart";
-    case NS_COMPOSITION_END:
-      return "NS_COMPOSITION_END";
+    case eCompositionEnd:
+      return "eCompositionEnd";
     case NS_COMPOSITION_UPDATE:
       return "NS_COMPOSITION_UPDATE";
     case NS_COMPOSITION_CHANGE:
       return "NS_COMPOSITION_CHANGE";
     case eCompositionCommitAsIs:
       return "eCompositionCommitAsIs";
     case NS_COMPOSITION_COMMIT:
       return "NS_COMPOSITION_COMMIT";
--- a/dom/events/TextComposition.cpp
+++ b/dom/events/TextComposition.cpp
@@ -279,17 +279,17 @@ TextComposition::DispatchCompositionEven
   // They typically tell us an IDEOGRAPHIC SPACE or empty string as composition
   // string.  Therefore, we should hack it only when:
   // 1. committing string is empty string at requesting commit but the last
   //    data isn't IDEOGRAPHIC SPACE.
   // 2. non-empty string is committed at requesting cancel.
   if (!aIsSynthesized && (mIsRequestingCommit || mIsRequestingCancel)) {
     nsString* committingData = nullptr;
     switch (aCompositionEvent->mMessage) {
-      case NS_COMPOSITION_END:
+      case eCompositionEnd:
       case NS_COMPOSITION_CHANGE:
       case eCompositionCommitAsIs:
       case NS_COMPOSITION_COMMIT:
         committingData = &aCompositionEvent->mData;
         break;
       default:
         NS_WARNING("Unexpected event comes during committing or "
                    "canceling composition");
@@ -361,18 +361,18 @@ TextComposition::DispatchCompositionEven
   // if no editor handles composition events.
   if (dispatchDOMTextEvent && !HasEditor()) {
     EditorWillHandleCompositionChangeEvent(aCompositionEvent);
     EditorDidHandleCompositionChangeEvent();
   }
 
   if (aCompositionEvent->CausesDOMCompositionEndEvent()) {
     // Dispatch a compositionend event if it's necessary.
-    if (aCompositionEvent->mMessage != NS_COMPOSITION_END) {
-      CloneAndDispatchAs(aCompositionEvent, NS_COMPOSITION_END);
+    if (aCompositionEvent->mMessage != eCompositionEnd) {
+      CloneAndDispatchAs(aCompositionEvent, eCompositionEnd);
     }
     MOZ_ASSERT(!mIsComposing, "Why is the editor still composing?");
     MOZ_ASSERT(!HasEditor(), "Why does the editor still keep to hold this?");
   }
 
   // Notify composition update to widget if possible
   NotityUpdateComposition(aCompositionEvent);
 }
--- a/editor/libeditor/nsEditor.cpp
+++ b/editor/libeditor/nsEditor.cpp
@@ -5155,17 +5155,17 @@ nsEditor::IsAcceptableInputEvent(nsIDOME
   bool needsWidget = false;
   WidgetGUIEvent* widgetGUIEvent = nullptr;
   switch (widgetEvent->mMessage) {
     case eUnidentifiedEvent:
       // If events are not created with proper event interface, their message
       // are initialized with eUnidentifiedEvent.  Let's ignore such event.
       return false;
     case eCompositionStart:
-    case NS_COMPOSITION_END:
+    case eCompositionEnd:
     case NS_COMPOSITION_UPDATE:
     case NS_COMPOSITION_CHANGE:
     case eCompositionCommitAsIs:
       // Don't allow composition events whose internal event are not
       // WidgetCompositionEvent.
       widgetGUIEvent = aEvent->GetInternalNSEvent()->AsCompositionEvent();
       needsWidget = true;
       break;
--- a/editor/libeditor/nsEditorEventListener.cpp
+++ b/editor/libeditor/nsEditorEventListener.cpp
@@ -461,17 +461,17 @@ nsEditorEventListener::HandleEvent(nsIDO
       return Blur(aEvent);
     // text
     case NS_COMPOSITION_CHANGE:
       return HandleText(aEvent);
     // compositionstart
     case eCompositionStart:
       return HandleStartComposition(aEvent);
     // compositionend
-    case NS_COMPOSITION_END:
+    case eCompositionEnd:
       HandleEndComposition(aEvent);
       return NS_OK;
     default:
       break;
   }
 
   nsAutoString eventType;
   aEvent->GetType(eventType);
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -24,18 +24,18 @@ GetBoolName(bool aBool)
 }
 
 static const char*
 GetEventMessageName(EventMessage aMessage)
 {
   switch (aMessage) {
     case eCompositionStart:
       return "eCompositionStart";
-    case NS_COMPOSITION_END:
-      return "NS_COMPOSITION_END";
+    case eCompositionEnd:
+      return "eCompositionEnd";
     case NS_COMPOSITION_UPDATE:
       return "NS_COMPOSITION_UPDATE";
     case NS_COMPOSITION_CHANGE:
       return "NS_COMPOSITION_CHANGE";
     case eCompositionCommitAsIs:
       return "eCompositionCommitAsIs";
     case NS_COMPOSITION_COMMIT:
       return "NS_COMPOSITION_COMMIT";
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -142,41 +142,41 @@ NS_EVENT_MESSAGE(eLegacyAttrModified,   
 NS_EVENT_MESSAGE(eLegacyCharacterDataModified,    eLegacyMutationEventFirst + 6)
 NS_EVENT_MESSAGE(eLegacyMutationEventLast,        eLegacyCharacterDataModified)
 
 NS_EVENT_MESSAGE(eUnidentifiedEvent,    2000)
  
 // composition events
 NS_EVENT_MESSAGE(eCompositionEventFirst, 2200)
 NS_EVENT_MESSAGE(eCompositionStart,      eCompositionEventFirst)
-// NS_COMPOSITION_END is the message for DOM compositionend event.
+// eCompositionEnd is the message for DOM compositionend event.
 // This event should NOT be dispatched from widget if NS_COMPOSITION_COMMIT
 // is available.
-NS_EVENT_MESSAGE(NS_COMPOSITION_END,     eCompositionEventFirst + 1)
+NS_EVENT_MESSAGE(eCompositionEnd,        eCompositionEventFirst + 1)
 // NS_COMPOSITION_UPDATE is the message for DOM compositionupdate event.
 // This event should NOT be dispatched from widget since it will be dispatched
 // by mozilla::TextComposition automatically if NS_COMPOSITION_CHANGE event
 // will change composition string.
 NS_EVENT_MESSAGE(NS_COMPOSITION_UPDATE,  eCompositionEventFirst + 2)
 // NS_COMPOSITION_CHANGE is the message for representing a change of
 // composition string.  This should be dispatched from widget even if
 // composition string isn't changed but the ranges are changed.  This causes
 // a DOM "text" event which is a non-standard DOM event.
 NS_EVENT_MESSAGE(NS_COMPOSITION_CHANGE,  eCompositionEventFirst + 3)
 // eCompositionCommitAsIs is the message for representing a commit of
 // composition string.  TextComposition will commit composition with the
 // last data.  TextComposition will dispatch this event to the DOM tree as
 // NS_COMPOSITION_CHANGE without clause information.  After that,
-// NS_COMPOSITION_END will be dispatched automatically.
+// eCompositionEnd will be dispatched automatically.
 // Its mData and mRanges should be empty and nullptr.
 NS_EVENT_MESSAGE(eCompositionCommitAsIs, eCompositionEventFirst + 4)
 // NS_COMPOSITION_COMMIT is the message for representing a commit of
 // composition string with its mData value.  TextComposition will dispatch this
 // event to the DOM tree as NS_COMPOSITION_CHANGE without clause information.
-// After that, NS_COMPOSITION_END will be dispatched automatically.
+// After that, eCompositionEnd will be dispatched automatically.
 // Its mRanges should be nullptr.
 NS_EVENT_MESSAGE(NS_COMPOSITION_COMMIT,  eCompositionEventFirst + 5)
 
 // Following events are defined for deprecated DOM events which are using
 // InternalUIEvent class.
 NS_EVENT_MESSAGE(eLegacyUIEventFirst,   2500)
 // DOMActivate (mapped with the DOM event and used internally)
 NS_EVENT_MESSAGE(eLegacyDOMActivate,    eLegacyUIEventFirst)
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -436,17 +436,17 @@ public:
   {
     return mMessage == NS_COMPOSITION_CHANGE ||
            mMessage == NS_COMPOSITION_COMMIT ||
            mMessage == eCompositionCommitAsIs;
   }
 
   bool CausesDOMCompositionEndEvent() const
   {
-    return mMessage == NS_COMPOSITION_END ||
+    return mMessage == eCompositionEnd ||
            mMessage == NS_COMPOSITION_COMMIT ||
            mMessage == eCompositionCommitAsIs;
   }
 
   bool IsFollowedByCompositionEnd() const
   {
     return mOriginalMessage == NS_COMPOSITION_COMMIT ||
            mOriginalMessage == eCompositionCommitAsIs;
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -132,17 +132,17 @@ WidgetEvent::HasKeyEventMessage() const
   }
 }
 
 bool
 WidgetEvent::HasIMEEventMessage() const
 {
   switch (mMessage) {
     case eCompositionStart:
-    case NS_COMPOSITION_END:
+    case eCompositionEnd:
     case NS_COMPOSITION_UPDATE:
     case NS_COMPOSITION_CHANGE:
     case eCompositionCommitAsIs:
     case NS_COMPOSITION_COMMIT:
       return true;
     default:
       return false;
   }