Bug 1046101 part.29 Rename NS_CONTENT_COMMAND_EVENT to eContentCommandEventClass r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 04 Aug 2014 14:28:56 +0900
changeset 197669 ed8b6fe7bc44a62a82b955023de77ddd64df09e8
parent 197668 9d873dd5eea0ca6b7d5726b7af2ae969ea51594b
child 197670 17473a495afbe09ba031b4bbf97d0fbff0e975ec
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs1046101
milestone34.0a1
Bug 1046101 part.29 Rename NS_CONTENT_COMMAND_EVENT to eContentCommandEventClass r=smaug
widget/BasicEvents.h
widget/MiscEvents.h
widget/shared/WidgetEventImpl.cpp
widget/windows/winrt/MetroWidget.cpp
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -59,17 +59,17 @@ enum EventClassID MOZ_ENUM_TYPE(EventCla
   eClipboardEventClass,              // InternalClipboardEvent
   eTransitionEventClass,             // InternalTransitionEvent
   eAnimationEventClass,              // InternalAnimationEvent
   eSVGZoomEventClass,                // InternalSVGZoomEvent
   eSMILTimeEventClass,               // InternalSMILTimeEvent
 
   // MiscEvents.h
   eCommandEventClass,                // WidgetCommandEvent
-  NS_CONTENT_COMMAND_EVENT,          // WidgetContentCommandEvent
+  eContentCommandEventClass,         // WidgetContentCommandEvent
   NS_PLUGIN_EVENT,                   // WidgetPluginEvent
 
   // InternalMutationEvent.h (dom/events)
   NS_MUTATION_EVENT                  // InternalMutationEvent
 };
 
 } // namespace mozilla
 
--- a/widget/MiscEvents.h
+++ b/widget/MiscEvents.h
@@ -24,19 +24,21 @@ class WidgetContentCommandEvent : public
 public:
   virtual WidgetContentCommandEvent* AsContentCommandEvent() MOZ_OVERRIDE
   {
     return this;
   }
 
   WidgetContentCommandEvent(bool aIsTrusted, uint32_t aMessage,
                             nsIWidget* aWidget,
-                            bool aOnlyEnabledCheck = false) :
-    WidgetGUIEvent(aIsTrusted, aMessage, aWidget, NS_CONTENT_COMMAND_EVENT),
-    mOnlyEnabledCheck(aOnlyEnabledCheck), mSucceeded(false), mIsEnabled(false)
+                            bool aOnlyEnabledCheck = false)
+    : WidgetGUIEvent(aIsTrusted, aMessage, aWidget, eContentCommandEventClass)
+    , mOnlyEnabledCheck(aOnlyEnabledCheck)
+    , mSucceeded(false)
+    , mIsEnabled(false)
   {
   }
 
   virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
   {
     // This event isn't an internal event of any DOM event.
     NS_ASSERTION(!IsAllowedToDispatchDOMEvent(),
       "WidgetQueryContentEvent needs to support Duplicate()");
--- a/widget/shared/WidgetEventImpl.cpp
+++ b/widget/shared/WidgetEventImpl.cpp
@@ -53,17 +53,17 @@ bool
 WidgetEvent::IsSelectionEvent() const
 {
   return mClass == eSelectionEventClass;
 }
 
 bool
 WidgetEvent::IsContentCommandEvent() const
 {
-  return mClass == NS_CONTENT_COMMAND_EVENT;
+  return mClass == eContentCommandEventClass;
 }
 
 bool
 WidgetEvent::IsNativeEventDelivererForPlugin() const
 {
   return mClass == NS_PLUGIN_EVENT;
 }
 
@@ -232,17 +232,17 @@ WidgetEvent::IsAllowedToDispatchDOMEvent
       return wheelEvent->deltaX != 0.0 || wheelEvent->deltaY != 0.0 ||
              wheelEvent->deltaZ != 0.0;
     }
 
     // Following events are handled in EventStateManager, so, we don't need to
     // dispatch DOM event for them into the DOM tree.
     case eQueryContentEventClass:
     case eSelectionEventClass:
-    case NS_CONTENT_COMMAND_EVENT:
+    case eContentCommandEventClass:
       return false;
 
     default:
       return true;
   }
 }
 
 /******************************************************************************
--- a/widget/windows/winrt/MetroWidget.cpp
+++ b/widget/windows/winrt/MetroWidget.cpp
@@ -656,17 +656,17 @@ MetroWidget::DispatchScrollEvent(mozilla
     {
       WidgetWheelEvent* oldEvent = aEvent->AsWheelEvent();
       WidgetWheelEvent* wheelEvent =
         new WidgetWheelEvent(oldEvent->mFlags.mIsTrusted, oldEvent->message, oldEvent->widget);
       wheelEvent->AssignWheelEventData(*oldEvent, true);
       newEvent = static_cast<WidgetGUIEvent*>(wheelEvent);
     }
     break;
-    case NS_CONTENT_COMMAND_EVENT:
+    case eContentCommandEventClass:
     {
       WidgetContentCommandEvent* oldEvent = aEvent->AsContentCommandEvent();
       WidgetContentCommandEvent* cmdEvent =
         new WidgetContentCommandEvent(oldEvent->mFlags.mIsTrusted, oldEvent->message, oldEvent->widget);
       cmdEvent->AssignContentCommandEventData(*oldEvent, true);
       newEvent = static_cast<WidgetGUIEvent*>(cmdEvent);
     }
     break;