Bug 1046101 part.31 Rename NS_MUTATION_EVENT to eMutationEventClass r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 04 Aug 2014 14:28:57 +0900
changeset 197562 878f57134601c9e3b672f350a3af8efb5449d629
parent 197561 17473a495afbe09ba031b4bbf97d0fbff0e975ec
child 197563 a00fe3dedf677a331204206723d982bc8b1f86a1
push id47161
push usermasayuki@d-toybox.com
push dateMon, 04 Aug 2014 05:29:14 +0000
treeherdermozilla-inbound@c0cfff4ee625 [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.31 Rename NS_MUTATION_EVENT to eMutationEventClass r=smaug
content/base/src/FragmentOrElement.cpp
content/html/content/src/HTMLInputElement.cpp
dom/events/Event.cpp
dom/events/EventDispatcher.cpp
dom/events/EventNameList.h
dom/events/InternalMutationEvent.h
widget/BasicEvents.h
--- a/content/base/src/FragmentOrElement.cpp
+++ b/content/base/src/FragmentOrElement.cpp
@@ -809,17 +809,17 @@ nsIContent::PreHandleEvent(EventChainPre
   // Event may need to be retargeted if this is the root of a native
   // anonymous content subtree or event is dispatched somewhere inside XBL.
   if (isAnonForEvents) {
 #ifdef DEBUG
     // If a DOM event is explicitly dispatched using node.dispatchEvent(), then
     // all the events are allowed even in the native anonymous content..
     nsCOMPtr<nsIContent> t = do_QueryInterface(aVisitor.mEvent->originalTarget);
     NS_ASSERTION(!t || !t->ChromeOnlyAccess() ||
-                 aVisitor.mEvent->mClass != NS_MUTATION_EVENT ||
+                 aVisitor.mEvent->mClass != eMutationEventClass ||
                  aVisitor.mDOMEvent,
                  "Mutation event dispatched in native anonymous content!?!");
 #endif
     aVisitor.mEventTargetAtParent = parent;
   } else if (parent && aVisitor.mOriginalTargetIsInAnon) {
     nsCOMPtr<nsIContent> content(do_QueryInterface(aVisitor.mEvent->target));
     if (content && content->GetBindingParent() == parent) {
       aVisitor.mEventTargetAtParent = parent;
--- a/content/html/content/src/HTMLInputElement.cpp
+++ b/content/html/content/src/HTMLInputElement.cpp
@@ -3246,17 +3246,17 @@ HTMLInputElement::NeedToInitializeEditor
                     EventChainPreVisitor& aVisitor) const
 {
   // We only need to initialize the editor for single line input controls because they
   // are lazily initialized.  We don't need to initialize the control for
   // certain types of events, because we know that those events are safe to be
   // handled without the editor being initialized.  These events include:
   // mousein/move/out, overflow/underflow, and DOM mutation events.
   if (!IsSingleLineTextControl(false) ||
-      aVisitor.mEvent->mClass == NS_MUTATION_EVENT) {
+      aVisitor.mEvent->mClass == eMutationEventClass) {
     return false;
   }
 
   switch (aVisitor.mEvent->message) {
   case NS_MOUSE_MOVE:
   case NS_MOUSE_ENTER:
   case NS_MOUSE_EXIT:
   case NS_MOUSE_ENTER_SYNTH:
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -169,17 +169,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Ev
         WidgetDragEvent* dragEvent = tmp->mEvent->AsDragEvent();
         dragEvent->dataTransfer = nullptr;
         dragEvent->relatedTarget = nullptr;
         break;
       }
       case eClipboardEventClass:
         tmp->mEvent->AsClipboardEvent()->clipboardData = nullptr;
         break;
-      case NS_MUTATION_EVENT:
+      case eMutationEventClass:
         tmp->mEvent->AsMutationEvent()->mRelatedNode = nullptr;
         break;
       case eFocusEventClass:
         tmp->mEvent->AsFocusEvent()->relatedTarget = nullptr;
         break;
       default:
         break;
     }
@@ -211,17 +211,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
         cb.NoteXPCOMChild(dragEvent->relatedTarget);
         break;
       }
       case eClipboardEventClass:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->clipboardData");
         cb.NoteXPCOMChild(tmp->mEvent->AsClipboardEvent()->clipboardData);
         break;
-      case NS_MUTATION_EVENT:
+      case eMutationEventClass:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->mRelatedNode");
         cb.NoteXPCOMChild(tmp->mEvent->AsMutationEvent()->mRelatedNode);
         break;
       case eFocusEventClass:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
         cb.NoteXPCOMChild(tmp->mEvent->AsFocusEvent()->relatedTarget);
         break;
       default:
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -680,17 +680,17 @@ EventDispatcher::CreateEvent(EventTarget
                              WidgetEvent* aEvent,
                              const nsAString& aEventType,
                              nsIDOMEvent** aDOMEvent)
 {
   *aDOMEvent = nullptr;
 
   if (aEvent) {
     switch(aEvent->mClass) {
-    case NS_MUTATION_EVENT:
+    case eMutationEventClass:
       return NS_NewDOMMutationEvent(aDOMEvent, aOwner, aPresContext,
                                     aEvent->AsMutationEvent());
     case eGUIEventClass:
     case eScrollPortEventClass:
     case eUIEventClass:
       return NS_NewDOMUIEvent(aDOMEvent, aOwner, aPresContext,
                               aEvent->AsGUIEvent());
     case eScrollAreaEventClass:
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -572,41 +572,41 @@ DOCUMENT_ONLY_EVENT(readystatechange,
 NON_IDL_EVENT(MozMouseHittest,
               NS_MOUSE_MOZHITTEST,
               EventNameType_None,
               eMouseEventClass)
 
 NON_IDL_EVENT(DOMAttrModified,
               NS_MUTATION_ATTRMODIFIED,
               EventNameType_HTMLXUL,
-              NS_MUTATION_EVENT)
+              eMutationEventClass)
 NON_IDL_EVENT(DOMCharacterDataModified,
               NS_MUTATION_CHARACTERDATAMODIFIED,
               EventNameType_HTMLXUL,
-              NS_MUTATION_EVENT)
+              eMutationEventClass)
 NON_IDL_EVENT(DOMNodeInserted,
               NS_MUTATION_NODEINSERTED,
               EventNameType_HTMLXUL,
-              NS_MUTATION_EVENT)
+              eMutationEventClass)
 NON_IDL_EVENT(DOMNodeRemoved,
               NS_MUTATION_NODEREMOVED,
               EventNameType_HTMLXUL,
-              NS_MUTATION_EVENT)
+              eMutationEventClass)
 NON_IDL_EVENT(DOMNodeInsertedIntoDocument,
               NS_MUTATION_NODEINSERTEDINTODOCUMENT,
               EventNameType_HTMLXUL,
-              NS_MUTATION_EVENT)
+              eMutationEventClass)
 NON_IDL_EVENT(DOMNodeRemovedFromDocument,
               NS_MUTATION_NODEREMOVEDFROMDOCUMENT,
               EventNameType_HTMLXUL,
-              NS_MUTATION_EVENT)
+              eMutationEventClass)
 NON_IDL_EVENT(DOMSubtreeModified,
               NS_MUTATION_SUBTREEMODIFIED,
               EventNameType_HTMLXUL,
-              NS_MUTATION_EVENT)
+              eMutationEventClass)
 
 NON_IDL_EVENT(DOMActivate,
               NS_UI_ACTIVATE,
               EventNameType_HTMLXUL,
               eUIEventClass)
 NON_IDL_EVENT(DOMFocusIn,
               NS_UI_FOCUSIN,
               EventNameType_HTMLXUL,
--- a/dom/events/InternalMutationEvent.h
+++ b/dom/events/InternalMutationEvent.h
@@ -13,26 +13,26 @@
 
 namespace mozilla {
 
 class InternalMutationEvent : public WidgetEvent
 {
 public:
   virtual InternalMutationEvent* AsMutationEvent() MOZ_OVERRIDE { return this; }
 
-  InternalMutationEvent(bool aIsTrusted, uint32_t aMessage) :
-    WidgetEvent(aIsTrusted, aMessage, NS_MUTATION_EVENT),
-    mAttrChange(0)
+  InternalMutationEvent(bool aIsTrusted, uint32_t aMessage)
+    : WidgetEvent(aIsTrusted, aMessage, eMutationEventClass)
+    , mAttrChange(0)
   {
     mFlags.mCancelable = false;
   }
 
   virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
   {
-    MOZ_ASSERT(mClass == NS_MUTATION_EVENT,
+    MOZ_ASSERT(mClass == eMutationEventClass,
                "Duplicate() must be overridden by sub class");
     InternalMutationEvent* result = new InternalMutationEvent(false, message);
     result->AssignMutationEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   nsCOMPtr<nsIDOMNode> mRelatedNode;
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -63,17 +63,17 @@ enum EventClassID MOZ_ENUM_TYPE(EventCla
   eSMILTimeEventClass,               // InternalSMILTimeEvent
 
   // MiscEvents.h
   eCommandEventClass,                // WidgetCommandEvent
   eContentCommandEventClass,         // WidgetContentCommandEvent
   ePluginEventClass,                 // WidgetPluginEvent
 
   // InternalMutationEvent.h (dom/events)
-  NS_MUTATION_EVENT                  // InternalMutationEvent
+  eMutationEventClass                // InternalMutationEvent
 };
 
 } // namespace mozilla
 
 /******************************************************************************
  * Messages
  *
  * TODO: Make them enum.