Bug 1046101 part.28 Rename NS_COMMAND_EVENT to eCommandEventClass r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 04 Aug 2014 14:28:56 +0900
changeset 219294 9d873dd5eea0ca6b7d5726b7af2ae969ea51594b
parent 219293 016c799315bbc34c48f08ea983c6281e6a198f9d
child 219295 ed8b6fe7bc44a62a82b955023de77ddd64df09e8
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [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.28 Rename NS_COMMAND_EVENT to eCommandEventClass r=smaug
dom/events/EventDispatcher.cpp
widget/BasicEvents.h
widget/MiscEvents.h
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -727,17 +727,17 @@ EventDispatcher::CreateEvent(EventTarget
       return NS_NewDOMClipboardEvent(aDOMEvent, aOwner, aPresContext,
                                      aEvent->AsClipboardEvent());
     case eSVGZoomEventClass:
       return NS_NewDOMSVGZoomEvent(aDOMEvent, aOwner, aPresContext,
                                    aEvent->AsSVGZoomEvent());
     case eSMILTimeEventClass:
       return NS_NewDOMTimeEvent(aDOMEvent, aOwner, aPresContext,
                                 aEvent->AsSMILTimeEvent());
-    case NS_COMMAND_EVENT:
+    case eCommandEventClass:
       return NS_NewDOMCommandEvent(aDOMEvent, aOwner, aPresContext,
                                    aEvent->AsCommandEvent());
     case eSimpleGestureEventClass:
       return NS_NewDOMSimpleGestureEvent(aDOMEvent, aOwner, aPresContext,
                                          aEvent->AsSimpleGestureEvent());
     case ePointerEventClass:
       return NS_NewDOMPointerEvent(aDOMEvent, aOwner, aPresContext,
                                    aEvent->AsPointerEvent());
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -58,17 +58,17 @@ enum EventClassID MOZ_ENUM_TYPE(EventCla
   eFocusEventClass,                  // InternalFocusEvent
   eClipboardEventClass,              // InternalClipboardEvent
   eTransitionEventClass,             // InternalTransitionEvent
   eAnimationEventClass,              // InternalAnimationEvent
   eSVGZoomEventClass,                // InternalSVGZoomEvent
   eSMILTimeEventClass,               // InternalSMILTimeEvent
 
   // MiscEvents.h
-  NS_COMMAND_EVENT,                  // WidgetCommandEvent
+  eCommandEventClass,                // WidgetCommandEvent
   NS_CONTENT_COMMAND_EVENT,          // WidgetContentCommandEvent
   NS_PLUGIN_EVENT,                   // WidgetPluginEvent
 
   // InternalMutationEvent.h (dom/events)
   NS_MUTATION_EVENT                  // InternalMutationEvent
 };
 
 } // namespace mozilla
--- a/widget/MiscEvents.h
+++ b/widget/MiscEvents.h
@@ -95,27 +95,27 @@ public:
  ******************************************************************************/
 
 class WidgetCommandEvent : public WidgetGUIEvent
 {
 public:
   virtual WidgetCommandEvent* AsCommandEvent() MOZ_OVERRIDE { return this; }
 
   WidgetCommandEvent(bool aIsTrusted, nsIAtom* aEventType,
-                     nsIAtom* aCommand, nsIWidget* aWidget) :
-    WidgetGUIEvent(aIsTrusted, NS_USER_DEFINED_EVENT, aWidget,
-                   NS_COMMAND_EVENT),
-    command(aCommand)
+                     nsIAtom* aCommand, nsIWidget* aWidget)
+    : WidgetGUIEvent(aIsTrusted, NS_USER_DEFINED_EVENT, aWidget,
+                     eCommandEventClass)
+    , command(aCommand)
   {
     userType = aEventType;
   }
 
   virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
   {
-    MOZ_ASSERT(mClass == NS_COMMAND_EVENT,
+    MOZ_ASSERT(mClass == eCommandEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetCommandEvent* result =
       new WidgetCommandEvent(false, userType, command, nullptr);
     result->AssignCommandEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }