Bug 895274 part.192 Rename NS_COMPOSITION_UPDATE to eCompositionUpdate r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Sep 2015 21:21:27 +0900
changeset 262009 9f26179268e3b25496700f153b93365049dd2588
parent 262008 e6420651e2c9ae7f21b03ac38c1424776c8f2179
child 262010 4802505f05ad9a02184bb5ffdd541057f51ebe28
push id29359
push userphilringnalda@gmail.com
push dateSat, 12 Sep 2015 15:57:02 +0000
treeherdermozilla-central@cffdd225055e [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.192 Rename NS_COMPOSITION_UPDATE to eCompositionUpdate r=smaug
dom/events/EventNameList.h
dom/events/IMEStateManager.cpp
dom/events/TextComposition.cpp
editor/libeditor/nsEditor.cpp
widget/ContentCache.cpp
widget/EventMessageList.h
widget/WidgetEventImpl.cpp
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -675,17 +675,17 @@ NON_IDL_EVENT(text,
               NS_COMPOSITION_CHANGE,
               EventNameType_XUL,
               eCompositionEventClass)
 NON_IDL_EVENT(compositionstart,
               eCompositionStart,
               EventNameType_XUL,
               eCompositionEventClass)
 NON_IDL_EVENT(compositionupdate,
-              NS_COMPOSITION_UPDATE,
+              eCompositionUpdate,
               EventNameType_XUL,
               eCompositionEventClass)
 NON_IDL_EVENT(compositionend,
               eCompositionEnd,
               EventNameType_XUL,
               eCompositionEventClass)
 NON_IDL_EVENT(command,
               eXULCommand,
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -136,18 +136,18 @@ GetIMEStateSetOpenName(IMEState::Open aO
 static const char*
 GetEventMessageName(EventMessage aMessage)
 {
   switch (aMessage) {
     case eCompositionStart:
       return "eCompositionStart";
     case eCompositionEnd:
       return "eCompositionEnd";
-    case NS_COMPOSITION_UPDATE:
-      return "NS_COMPOSITION_UPDATE";
+    case eCompositionUpdate:
+      return "eCompositionUpdate";
     case NS_COMPOSITION_CHANGE:
       return "NS_COMPOSITION_CHANGE";
     case eCompositionCommitAsIs:
       return "eCompositionCommitAsIs";
     case NS_COMPOSITION_COMMIT:
       return "NS_COMPOSITION_COMMIT";
     case eSetSelection:
       return "eSetSelection";
@@ -1142,17 +1142,17 @@ IMEStateManager::DispatchCompositionEven
      GetBoolName(aCompositionEvent->mFlags.mPropagationStopped),
      GetBoolName(aIsSynthesized), tabParent.get()));
 
   if (!aCompositionEvent->mFlags.mIsTrusted ||
       aCompositionEvent->mFlags.mPropagationStopped) {
     return;
   }
 
-  MOZ_ASSERT(aCompositionEvent->mMessage != NS_COMPOSITION_UPDATE,
+  MOZ_ASSERT(aCompositionEvent->mMessage != eCompositionUpdate,
              "compositionupdate event shouldn't be dispatched manually");
 
   EnsureTextCompositionArray();
 
   nsRefPtr<TextComposition> composition =
     sTextCompositions->GetCompositionFor(aCompositionEvent->widget);
   if (!composition) {
     // If synthesized event comes after delayed native composition events
--- a/dom/events/TextComposition.cpp
+++ b/dom/events/TextComposition.cpp
@@ -88,17 +88,17 @@ TextComposition::MaybeDispatchCompositio
 
   if (!IsValidStateForComposition(aCompositionEvent->widget)) {
     return false;
   }
 
   if (mLastData == aCompositionEvent->mData) {
     return true;
   }
-  CloneAndDispatchAs(aCompositionEvent, NS_COMPOSITION_UPDATE);
+  CloneAndDispatchAs(aCompositionEvent, eCompositionUpdate);
   return IsValidStateForComposition(aCompositionEvent->widget);
 }
 
 BaseEventFlags
 TextComposition::CloneAndDispatchAs(
                    const WidgetCompositionEvent* aCompositionEvent,
                    EventMessage aMessage,
                    nsEventStatus* aStatus,
@@ -115,17 +115,17 @@ TextComposition::CloneAndDispatchAs(
   compositionEvent.timeStamp = aCompositionEvent->timeStamp;
   compositionEvent.mData = aCompositionEvent->mData;
   compositionEvent.mOriginalMessage = aCompositionEvent->mMessage;
   compositionEvent.mFlags.mIsSynthesizedForTests =
     aCompositionEvent->mFlags.mIsSynthesizedForTests;
 
   nsEventStatus dummyStatus = nsEventStatus_eConsumeNoDefault;
   nsEventStatus* status = aStatus ? aStatus : &dummyStatus;
-  if (aMessage == NS_COMPOSITION_UPDATE) {
+  if (aMessage == eCompositionUpdate) {
     mLastData = compositionEvent.mData;
   }
   EventDispatcher::Dispatch(mNode, mPresContext,
                             &compositionEvent, nullptr, status, aCallBack);
   return compositionEvent.mFlags;
 }
 
 void
--- a/editor/libeditor/nsEditor.cpp
+++ b/editor/libeditor/nsEditor.cpp
@@ -5156,17 +5156,17 @@ nsEditor::IsAcceptableInputEvent(nsIDOME
   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 eCompositionEnd:
-    case NS_COMPOSITION_UPDATE:
+    case eCompositionUpdate:
     case NS_COMPOSITION_CHANGE:
     case eCompositionCommitAsIs:
       // Don't allow composition events whose internal event are not
       // WidgetCompositionEvent.
       widgetGUIEvent = aEvent->GetInternalNSEvent()->AsCompositionEvent();
       needsWidget = true;
       break;
     default:
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -26,18 +26,18 @@ GetBoolName(bool aBool)
 static const char*
 GetEventMessageName(EventMessage aMessage)
 {
   switch (aMessage) {
     case eCompositionStart:
       return "eCompositionStart";
     case eCompositionEnd:
       return "eCompositionEnd";
-    case NS_COMPOSITION_UPDATE:
-      return "NS_COMPOSITION_UPDATE";
+    case eCompositionUpdate:
+      return "eCompositionUpdate";
     case NS_COMPOSITION_CHANGE:
       return "NS_COMPOSITION_CHANGE";
     case eCompositionCommitAsIs:
       return "eCompositionCommitAsIs";
     case NS_COMPOSITION_COMMIT:
       return "NS_COMPOSITION_COMMIT";
     case eSetSelection:
       return "eSetSelection";
--- a/widget/EventMessageList.h
+++ b/widget/EventMessageList.h
@@ -146,21 +146,21 @@ NS_EVENT_MESSAGE(eUnidentifiedEvent,    
  
 // composition events
 NS_EVENT_MESSAGE(eCompositionEventFirst, 2200)
 NS_EVENT_MESSAGE(eCompositionStart,      eCompositionEventFirst)
 // 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(eCompositionEnd,        eCompositionEventFirst + 1)
-// NS_COMPOSITION_UPDATE is the message for DOM compositionupdate event.
+// eCompositionUpdate 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_EVENT_MESSAGE(eCompositionUpdate,     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
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -133,17 +133,17 @@ WidgetEvent::HasKeyEventMessage() const
 }
 
 bool
 WidgetEvent::HasIMEEventMessage() const
 {
   switch (mMessage) {
     case eCompositionStart:
     case eCompositionEnd:
-    case NS_COMPOSITION_UPDATE:
+    case eCompositionUpdate:
     case NS_COMPOSITION_CHANGE:
     case eCompositionCommitAsIs:
     case NS_COMPOSITION_COMMIT:
       return true;
     default:
       return false;
   }
 }