Bug 1046101 part.17 Rename NS_SIMPLE_GESTURE_EVENT to eSimpleGestureEventClass r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 04 Aug 2014 14:28:53 +0900
changeset 197657 eba87b3656a5263006fdf596fcf7e05e6d88bbf8
parent 197656 489398167822d6c7c4edac01a06cc4287b0ef118
child 197658 cf0c9fbd6cb2fea36b2937f24702af55fe942f1d
push id27249
push userryanvm@gmail.com
push dateMon, 04 Aug 2014 20:14:35 +0000
treeherdermozilla-central@7f81be7db528 [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.17 Rename NS_SIMPLE_GESTURE_EVENT to eSimpleGestureEventClass r=smaug
dom/events/Event.cpp
dom/events/EventDispatcher.cpp
dom/events/EventNameList.h
dom/events/MouseEvent.cpp
dom/events/SimpleGestureEvent.cpp
dom/events/UIEvent.cpp
dom/events/UIEvent.h
dom/xbl/nsXBLEventHandler.cpp
layout/base/nsLayoutUtils.cpp
widget/BasicEvents.h
widget/TouchEvents.h
widget/gtk/nsGtkKeyUtils.cpp
widget/windows/KeyboardLayout.cpp
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -156,17 +156,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Ev
   if (tmp->mEventIsInternal) {
     tmp->mEvent->target = nullptr;
     tmp->mEvent->currentTarget = nullptr;
     tmp->mEvent->originalTarget = nullptr;
     switch (tmp->mEvent->mClass) {
       case eMouseEventClass:
       case eMouseScrollEventClass:
       case eWheelEventClass:
-      case NS_SIMPLE_GESTURE_EVENT:
+      case eSimpleGestureEventClass:
       case ePointerEventClass:
         tmp->mEvent->AsMouseEventBase()->relatedTarget = nullptr;
         break;
       case eDragEventClass: {
         WidgetDragEvent* dragEvent = tmp->mEvent->AsDragEvent();
         dragEvent->dataTransfer = nullptr;
         dragEvent->relatedTarget = nullptr;
         break;
@@ -194,17 +194,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
   if (tmp->mEventIsInternal) {
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->target)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->currentTarget)
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mEvent->originalTarget)
     switch (tmp->mEvent->mClass) {
       case eMouseEventClass:
       case eMouseScrollEventClass:
       case eWheelEventClass:
-      case NS_SIMPLE_GESTURE_EVENT:
+      case eSimpleGestureEventClass:
       case ePointerEventClass:
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
         cb.NoteXPCOMChild(tmp->mEvent->AsMouseEventBase()->relatedTarget);
         break;
       case eDragEventClass: {
         WidgetDragEvent* dragEvent = tmp->mEvent->AsDragEvent();
         NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->dataTransfer");
         cb.NoteXPCOMChild(dragEvent->dataTransfer);
@@ -848,17 +848,17 @@ Event::GetScreenCoords(nsPresContext* aP
 
   if (!aEvent || 
        (aEvent->mClass != eMouseEventClass &&
         aEvent->mClass != eMouseScrollEventClass &&
         aEvent->mClass != eWheelEventClass &&
         aEvent->mClass != ePointerEventClass &&
         aEvent->mClass != NS_TOUCH_EVENT &&
         aEvent->mClass != eDragEventClass &&
-        aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) {
+        aEvent->mClass != eSimpleGestureEventClass)) {
     return nsIntPoint(0, 0);
   }
 
   WidgetGUIEvent* guiEvent = aEvent->AsGUIEvent();
   if (!guiEvent->widget) {
     return LayoutDeviceIntPoint::ToUntyped(aPoint);
   }
 
@@ -904,17 +904,17 @@ Event::GetClientCoords(nsPresContext* aP
 
   if (!aEvent ||
       (aEvent->mClass != eMouseEventClass &&
        aEvent->mClass != eMouseScrollEventClass &&
        aEvent->mClass != eWheelEventClass &&
        aEvent->mClass != NS_TOUCH_EVENT &&
        aEvent->mClass != eDragEventClass &&
        aEvent->mClass != ePointerEventClass &&
-       aEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
+       aEvent->mClass != eSimpleGestureEventClass) ||
       !aPresContext ||
       !aEvent->AsGUIEvent()->widget) {
     return aDefaultPoint;
   }
 
   nsIPresShell* shell = aPresContext->GetPresShell();
   if (!shell) {
     return CSSIntPoint(0, 0);
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -730,17 +730,17 @@ EventDispatcher::CreateEvent(EventTarget
       return NS_NewDOMSVGZoomEvent(aDOMEvent, aOwner, aPresContext,
                                    aEvent->AsSVGZoomEvent());
     case NS_SMIL_TIME_EVENT:
       return NS_NewDOMTimeEvent(aDOMEvent, aOwner, aPresContext,
                                 aEvent->AsSMILTimeEvent());
     case NS_COMMAND_EVENT:
       return NS_NewDOMCommandEvent(aDOMEvent, aOwner, aPresContext,
                                    aEvent->AsCommandEvent());
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       return NS_NewDOMSimpleGestureEvent(aDOMEvent, aOwner, aPresContext,
                                          aEvent->AsSimpleGestureEvent());
     case ePointerEventClass:
       return NS_NewDOMPointerEvent(aDOMEvent, aOwner, aPresContext,
                                    aEvent->AsPointerEvent());
     case NS_TOUCH_EVENT:
       return NS_NewDOMTouchEvent(aDOMEvent, aOwner, aPresContext,
                                  aEvent->AsTouchEvent());
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -817,73 +817,73 @@ NON_IDL_EVENT(gamepaddisconnected,
               EventNameType_None,
               NS_EVENT)
 #endif
 
 // Simple gesture events
 NON_IDL_EVENT(MozSwipeGestureStart,
               NS_SIMPLE_GESTURE_SWIPE_START,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozSwipeGestureUpdate,
               NS_SIMPLE_GESTURE_SWIPE_UPDATE,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozSwipeGestureEnd,
               NS_SIMPLE_GESTURE_SWIPE_END,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozSwipeGesture,
               NS_SIMPLE_GESTURE_SWIPE,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozMagnifyGestureStart,
               NS_SIMPLE_GESTURE_MAGNIFY_START,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozMagnifyGestureUpdate,
               NS_SIMPLE_GESTURE_MAGNIFY_UPDATE,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozMagnifyGesture,
               NS_SIMPLE_GESTURE_MAGNIFY,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozRotateGestureStart,
               NS_SIMPLE_GESTURE_ROTATE_START,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozRotateGestureUpdate,
               NS_SIMPLE_GESTURE_ROTATE_UPDATE,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozRotateGesture,
               NS_SIMPLE_GESTURE_ROTATE,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozTapGesture,
               NS_SIMPLE_GESTURE_TAP,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozPressTapGesture,
               NS_SIMPLE_GESTURE_PRESSTAP,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozEdgeUIStarted,
               NS_SIMPLE_GESTURE_EDGE_STARTED,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozEdgeUICanceled,
               NS_SIMPLE_GESTURE_EDGE_CANCELED,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 NON_IDL_EVENT(MozEdgeUICompleted,
               NS_SIMPLE_GESTURE_EDGE_COMPLETED,
               EventNameType_None,
-              NS_SIMPLE_GESTURE_EVENT)
+              eSimpleGestureEventClass)
 
 NON_IDL_EVENT(transitionend,
               NS_TRANSITION_END,
               EventNameType_None,
               NS_TRANSITION_EVENT)
 NON_IDL_EVENT(animationstart,
               NS_ANIMATION_START,
               EventNameType_None,
--- a/dom/events/MouseEvent.cpp
+++ b/dom/events/MouseEvent.cpp
@@ -70,17 +70,17 @@ MouseEvent::InitMouseEvent(const nsAStri
   NS_ENSURE_SUCCESS(rv, rv);
 
   switch(mEvent->mClass) {
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
     case eDragEventClass:
     case ePointerEventClass:
-    case NS_SIMPLE_GESTURE_EVENT: {
+    case eSimpleGestureEventClass: {
       WidgetMouseEventBase* mouseEventBase = mEvent->AsMouseEventBase();
       mouseEventBase->relatedTarget = aRelatedTarget;
       mouseEventBase->button = aButton;
       mouseEventBase->InitBasicModifiers(aCtrlKey, aAltKey, aShiftKey, aMetaKey);
       mClientPoint.x = aClientX;
       mClientPoint.y = aClientY;
       mouseEventBase->refPoint.x = aScreenX;
       mouseEventBase->refPoint.y = aScreenY;
@@ -124,17 +124,17 @@ MouseEvent::InitMouseEvent(const nsAStri
   NS_ENSURE_SUCCESS(rv, rv);
 
   switch(mEvent->mClass) {
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
     case eDragEventClass:
     case ePointerEventClass:
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       mEvent->AsInputEvent()->modifiers = modifiers;
       return NS_OK;
     default:
       MOZ_CRASH("There is no space to store the modifiers");
   }
 }
 
 already_AddRefed<MouseEvent>
@@ -155,17 +155,17 @@ MouseEvent::Constructor(const GlobalObje
   e->SetTrusted(trusted);
 
   switch (e->mEvent->mClass) {
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
     case eDragEventClass:
     case ePointerEventClass:
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       e->mEvent->AsMouseEventBase()->buttons = aParam.mButtons;
       break;
     default:
       break;
   }
 
   return e.forget();
 }
@@ -214,17 +214,17 @@ int16_t
 MouseEvent::Button()
 {
   switch(mEvent->mClass) {
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
     case eDragEventClass:
     case ePointerEventClass:
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       return mEvent->AsMouseEventBase()->button;
     default:
       NS_WARNING("Tried to get mouse button for non-mouse event!");
       return WidgetMouseEvent::eLeftButton;
   }
 }
 
 NS_IMETHODIMP
@@ -239,17 +239,17 @@ uint16_t
 MouseEvent::Buttons()
 {
   switch(mEvent->mClass) {
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
     case eDragEventClass:
     case ePointerEventClass:
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       return mEvent->AsMouseEventBase()->buttons;
     default:
       MOZ_CRASH("Tried to get mouse buttons for non-mouse event!");
   }
 }
 
 NS_IMETHODIMP
 MouseEvent::GetRelatedTarget(nsIDOMEventTarget** aRelatedTarget)
@@ -264,17 +264,17 @@ MouseEvent::GetRelatedTarget()
 {
   nsCOMPtr<EventTarget> relatedTarget;
   switch(mEvent->mClass) {
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
     case eDragEventClass:
     case ePointerEventClass:
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       relatedTarget =
         do_QueryInterface(mEvent->AsMouseEventBase()->relatedTarget);
       break;
     default:
       break;
   }
 
   if (relatedTarget) {
--- a/dom/events/SimpleGestureEvent.cpp
+++ b/dom/events/SimpleGestureEvent.cpp
@@ -12,17 +12,17 @@ namespace dom {
 
 SimpleGestureEvent::SimpleGestureEvent(EventTarget* aOwner,
                                        nsPresContext* aPresContext,
                                        WidgetSimpleGestureEvent* aEvent)
   : MouseEvent(aOwner, aPresContext,
                aEvent ? aEvent :
                         new WidgetSimpleGestureEvent(false, 0, nullptr))
 {
-  NS_ASSERTION(mEvent->mClass == NS_SIMPLE_GESTURE_EVENT,
+  NS_ASSERTION(mEvent->mClass == eSimpleGestureEventClass,
                "event type mismatch");
 
   if (aEvent) {
     mEventIsInternal = false;
   } else {
     mEventIsInternal = true;
     mEvent->time = PR_Now();
     mEvent->refPoint.x = mEvent->refPoint.y = 0;
--- a/dom/events/UIEvent.cpp
+++ b/dom/events/UIEvent.cpp
@@ -118,17 +118,17 @@ UIEvent::GetMovementPoint()
   }
 
   if (!mEvent ||
       (mEvent->mClass != eMouseEventClass &&
        mEvent->mClass != eMouseScrollEventClass &&
        mEvent->mClass != eWheelEventClass &&
        mEvent->mClass != eDragEventClass &&
        mEvent->mClass != ePointerEventClass &&
-       mEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
+       mEvent->mClass != eSimpleGestureEventClass) ||
        !mEvent->AsGUIEvent()->widget) {
     return nsIntPoint(0, 0);
   }
 
   // Calculate the delta between the last screen point and the current one.
   nsIntPoint current = DevPixelsToCSSPixels(mEvent->refPoint, mPresContext);
   nsIntPoint last = DevPixelsToCSSPixels(mEvent->lastRefPoint, mPresContext);
   return current - last;
@@ -297,17 +297,17 @@ UIEvent::GetLayerPoint() const
 {
   if (!mEvent ||
       (mEvent->mClass != eMouseEventClass &&
        mEvent->mClass != eMouseScrollEventClass &&
        mEvent->mClass != eWheelEventClass &&
        mEvent->mClass != ePointerEventClass &&
        mEvent->mClass != NS_TOUCH_EVENT &&
        mEvent->mClass != eDragEventClass &&
-       mEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
+       mEvent->mClass != eSimpleGestureEventClass) ||
       !mPresContext ||
       mEventIsInternal) {
     return mLayerPoint;
   }
   // XXX I'm not really sure this is correct; it's my best shot, though
   nsIFrame* targetFrame = mPresContext->EventStateManager()->GetEventTarget();
   if (!targetFrame)
     return mLayerPoint;
--- a/dom/events/UIEvent.h
+++ b/dom/events/UIEvent.h
@@ -43,17 +43,17 @@ public:
                                          WidgetEvent* aEvent)
   {
     if (!aEvent ||
         (aEvent->mClass != eMouseEventClass &&
          aEvent->mClass != eMouseScrollEventClass &&
          aEvent->mClass != eWheelEventClass &&
          aEvent->mClass != eDragEventClass &&
          aEvent->mClass != ePointerEventClass &&
-         aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) {
+         aEvent->mClass != eSimpleGestureEventClass)) {
       return nsIntPoint(0, 0);
     }
 
     WidgetGUIEvent* event = aEvent->AsGUIEvent();
     if (!event->widget) {
       return LayoutDeviceIntPoint::ToUntyped(aEvent->refPoint);
     }
 
@@ -70,17 +70,17 @@ public:
                                           CSSIntPoint* aDefaultClientPoint)
   {
     if (!aEvent ||
         (aEvent->mClass != eMouseEventClass &&
          aEvent->mClass != eMouseScrollEventClass &&
          aEvent->mClass != eWheelEventClass &&
          aEvent->mClass != eDragEventClass &&
          aEvent->mClass != ePointerEventClass &&
-         aEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
+         aEvent->mClass != eSimpleGestureEventClass) ||
         !aPresContext ||
         !aEvent->AsGUIEvent()->widget) {
       return aDefaultClientPoint
              ? *aDefaultClientPoint
              : CSSIntPoint(0, 0);
     }
 
     nsIPresShell* shell = aPresContext->GetPresShell();
--- a/dom/xbl/nsXBLEventHandler.cpp
+++ b/dom/xbl/nsXBLEventHandler.cpp
@@ -148,17 +148,17 @@ NS_NewXBLEventHandler(nsXBLPrototypeHand
                       nsIAtom* aEventType,
                       nsXBLEventHandler** aResult)
 {
   switch (nsContentUtils::GetEventCategory(nsDependentAtomString(aEventType))) {
     case eDragEventClass:
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       *aResult = new nsXBLMouseEventHandler(aHandler);
       break;
     default:
       *aResult = new nsXBLEventHandler(aHandler);
       break;
   }
 
   if (!*aResult)
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1868,17 +1868,17 @@ nsLayoutUtils::GetDOMEventCoordinatesRel
 nsPoint
 nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
                                              nsIFrame* aFrame)
 {
   if (!aEvent || (aEvent->mClass != eMouseEventClass &&
                   aEvent->mClass != eMouseScrollEventClass &&
                   aEvent->mClass != eWheelEventClass &&
                   aEvent->mClass != eDragEventClass &&
-                  aEvent->mClass != NS_SIMPLE_GESTURE_EVENT &&
+                  aEvent->mClass != eSimpleGestureEventClass &&
                   aEvent->mClass != ePointerEventClass &&
                   aEvent->mClass != eGestureNotifyEventClass &&
                   aEvent->mClass != NS_TOUCH_EVENT &&
                   aEvent->mClass != eQueryContentEventClass))
     return nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
 
   return GetEventCoordinatesRelativeTo(aEvent,
            LayoutDeviceIntPoint::ToUntyped(aEvent->AsGUIEvent()->refPoint),
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -43,17 +43,17 @@ enum EventClassID MOZ_ENUM_TYPE(EventCla
   eMouseEventClass,                  // WidgetMouseEvent
   eDragEventClass,                   // WidgetDragEvent
   eMouseScrollEventClass,            // WidgetMouseScrollEvent
   eWheelEventClass,                  // WidgetWheelEvent
   ePointerEventClass,                // PointerEvent
 
   // TouchEvents.h
   eGestureNotifyEventClass,          // WidgetGestureNotifyEvent
-  NS_SIMPLE_GESTURE_EVENT,           // WidgetSimpleGestureEvent
+  eSimpleGestureEventClass,          // WidgetSimpleGestureEvent
   NS_TOUCH_EVENT,                    // WidgetTouchEvent
 
   // ContentEvents.h
   NS_SCROLLPORT_EVENT,               // InternalScrollPortEvent
   NS_SCROLLAREA_EVENT,               // InternalScrollAreaEvent
   NS_FORM_EVENT,                     // InternalFormEvent
   NS_FOCUS_EVENT,                    // InternalFocusEvent
   NS_CLIPBOARD_EVENT,                // InternalClipboardEvent
--- a/widget/TouchEvents.h
+++ b/widget/TouchEvents.h
@@ -92,37 +92,37 @@ public:
   virtual WidgetSimpleGestureEvent* AsSimpleGestureEvent() MOZ_OVERRIDE
   {
     return this;
   }
 
   WidgetSimpleGestureEvent(bool aIsTrusted, uint32_t aMessage,
                            nsIWidget* aWidget)
     : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget,
-                           NS_SIMPLE_GESTURE_EVENT)
+                           eSimpleGestureEventClass)
     , allowedDirections(0)
     , direction(0)
     , delta(0.0)
     , clickCount(0)
   {
   }
 
   WidgetSimpleGestureEvent(const WidgetSimpleGestureEvent& aOther)
     : WidgetMouseEventBase(aOther.mFlags.mIsTrusted, aOther.message,
-                           aOther.widget, NS_SIMPLE_GESTURE_EVENT)
+                           aOther.widget, eSimpleGestureEventClass)
     , allowedDirections(aOther.allowedDirections)
     , direction(aOther.direction)
     , delta(aOther.delta)
     , clickCount(0)
   {
   }
 
   virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
   {
-    MOZ_ASSERT(mClass == NS_SIMPLE_GESTURE_EVENT,
+    MOZ_ASSERT(mClass == eSimpleGestureEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetSimpleGestureEvent* result =
       new WidgetSimpleGestureEvent(false, message, nullptr);
     result->AssignSimpleGestureEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
--- a/widget/gtk/nsGtkKeyUtils.cpp
+++ b/widget/gtk/nsGtkKeyUtils.cpp
@@ -646,17 +646,17 @@ KeymapWrapper::InitInputEvent(WidgetInpu
          GetBoolName(aInputEvent.modifiers & MODIFIER_NUMLOCK),
          GetBoolName(aInputEvent.modifiers & MODIFIER_SCROLLLOCK)));
 
     switch(aInputEvent.mClass) {
         case eMouseEventClass:
         case eMouseScrollEventClass:
         case eWheelEventClass:
         case eDragEventClass:
-        case NS_SIMPLE_GESTURE_EVENT:
+        case eSimpleGestureEventClass:
             break;
         default:
             return;
     }
 
     WidgetMouseEventBase& mouseEvent = *aInputEvent.AsMouseEventBase();
     mouseEvent.buttons = 0;
     if (aModifierState & GDK_BUTTON1_MASK) {
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -280,31 +280,31 @@ ModifierKeyState::InitInputEvent(WidgetI
 {
   aInputEvent.modifiers = mModifiers;
 
   switch(aInputEvent.mClass) {
     case eMouseEventClass:
     case eMouseScrollEventClass:
     case eWheelEventClass:
     case eDragEventClass:
-    case NS_SIMPLE_GESTURE_EVENT:
+    case eSimpleGestureEventClass:
       InitMouseEvent(aInputEvent);
       break;
     default:
       break;
   }
 }
 
 void
 ModifierKeyState::InitMouseEvent(WidgetInputEvent& aMouseEvent) const
 {
   NS_ASSERTION(aMouseEvent.mClass == eMouseEventClass ||
                aMouseEvent.mClass == eWheelEventClass ||
                aMouseEvent.mClass == eDragEventClass ||
-               aMouseEvent.mClass == NS_SIMPLE_GESTURE_EVENT,
+               aMouseEvent.mClass == eSimpleGestureEventClass,
                "called with non-mouse event");
 
   if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Metro) {
     // Buttons for immersive mode are handled in MetroInput.
     return;
   }
 
   WidgetMouseEventBase& mouseEvent = *aMouseEvent.AsMouseEventBase();