diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp index 1658154cff1e..4533e8d05366 100644 --- a/dom/events/Event.cpp +++ b/dom/events/Event.cpp @@ -161,7 +161,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Event) case eMouseEventClass: case eMouseScrollEventClass: case eWheelEventClass: - case NS_SIMPLE_GESTURE_EVENT: + case eSimpleGestureEventClass: case ePointerEventClass: tmp->mEvent->AsMouseEventBase()->relatedTarget = nullptr; break; @@ -199,7 +199,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Event) 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); @@ -853,7 +853,7 @@ Event::GetScreenCoords(nsPresContext* aPresContext, aEvent->mClass != ePointerEventClass && aEvent->mClass != NS_TOUCH_EVENT && aEvent->mClass != eDragEventClass && - aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) { + aEvent->mClass != eSimpleGestureEventClass)) { return nsIntPoint(0, 0); } @@ -909,7 +909,7 @@ Event::GetClientCoords(nsPresContext* aPresContext, 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; diff --git a/dom/events/EventDispatcher.cpp b/dom/events/EventDispatcher.cpp index dc54c737af9d..1fa7b448ff6f 100644 --- a/dom/events/EventDispatcher.cpp +++ b/dom/events/EventDispatcher.cpp @@ -735,7 +735,7 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, 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: diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index 00ebc78e9a8e..3261c8784c96 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -822,63 +822,63 @@ NON_IDL_EVENT(gamepaddisconnected, 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, diff --git a/dom/events/MouseEvent.cpp b/dom/events/MouseEvent.cpp index 89df1da3a542..315abcded3c2 100644 --- a/dom/events/MouseEvent.cpp +++ b/dom/events/MouseEvent.cpp @@ -75,7 +75,7 @@ MouseEvent::InitMouseEvent(const nsAString& aType, case eWheelEventClass: case eDragEventClass: case ePointerEventClass: - case NS_SIMPLE_GESTURE_EVENT: { + case eSimpleGestureEventClass: { WidgetMouseEventBase* mouseEventBase = mEvent->AsMouseEventBase(); mouseEventBase->relatedTarget = aRelatedTarget; mouseEventBase->button = aButton; @@ -129,7 +129,7 @@ MouseEvent::InitMouseEvent(const nsAString& aType, case eWheelEventClass: case eDragEventClass: case ePointerEventClass: - case NS_SIMPLE_GESTURE_EVENT: + case eSimpleGestureEventClass: mEvent->AsInputEvent()->modifiers = modifiers; return NS_OK; default: @@ -160,7 +160,7 @@ MouseEvent::Constructor(const GlobalObject& aGlobal, case eWheelEventClass: case eDragEventClass: case ePointerEventClass: - case NS_SIMPLE_GESTURE_EVENT: + case eSimpleGestureEventClass: e->mEvent->AsMouseEventBase()->buttons = aParam.mButtons; break; default: @@ -219,7 +219,7 @@ MouseEvent::Button() 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!"); @@ -244,7 +244,7 @@ MouseEvent::Buttons() 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!"); @@ -269,7 +269,7 @@ MouseEvent::GetRelatedTarget() case eWheelEventClass: case eDragEventClass: case ePointerEventClass: - case NS_SIMPLE_GESTURE_EVENT: + case eSimpleGestureEventClass: relatedTarget = do_QueryInterface(mEvent->AsMouseEventBase()->relatedTarget); break; diff --git a/dom/events/SimpleGestureEvent.cpp b/dom/events/SimpleGestureEvent.cpp index f3d6747da443..2c81c4057c7b 100644 --- a/dom/events/SimpleGestureEvent.cpp +++ b/dom/events/SimpleGestureEvent.cpp @@ -17,7 +17,7 @@ SimpleGestureEvent::SimpleGestureEvent(EventTarget* aOwner, 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) { diff --git a/dom/events/UIEvent.cpp b/dom/events/UIEvent.cpp index 8f414e7f40ae..0a298ca29132 100644 --- a/dom/events/UIEvent.cpp +++ b/dom/events/UIEvent.cpp @@ -123,7 +123,7 @@ UIEvent::GetMovementPoint() 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); } @@ -302,7 +302,7 @@ UIEvent::GetLayerPoint() const mEvent->mClass != ePointerEventClass && mEvent->mClass != NS_TOUCH_EVENT && mEvent->mClass != eDragEventClass && - mEvent->mClass != NS_SIMPLE_GESTURE_EVENT) || + mEvent->mClass != eSimpleGestureEventClass) || !mPresContext || mEventIsInternal) { return mLayerPoint; diff --git a/dom/events/UIEvent.h b/dom/events/UIEvent.h index 4e821e153c35..876d9baecd0d 100644 --- a/dom/events/UIEvent.h +++ b/dom/events/UIEvent.h @@ -48,7 +48,7 @@ public: aEvent->mClass != eWheelEventClass && aEvent->mClass != eDragEventClass && aEvent->mClass != ePointerEventClass && - aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) { + aEvent->mClass != eSimpleGestureEventClass)) { return nsIntPoint(0, 0); } @@ -75,7 +75,7 @@ public: aEvent->mClass != eWheelEventClass && aEvent->mClass != eDragEventClass && aEvent->mClass != ePointerEventClass && - aEvent->mClass != NS_SIMPLE_GESTURE_EVENT) || + aEvent->mClass != eSimpleGestureEventClass) || !aPresContext || !aEvent->AsGUIEvent()->widget) { return aDefaultClientPoint diff --git a/dom/xbl/nsXBLEventHandler.cpp b/dom/xbl/nsXBLEventHandler.cpp index be5fbf84299d..f8585cb2caaa 100644 --- a/dom/xbl/nsXBLEventHandler.cpp +++ b/dom/xbl/nsXBLEventHandler.cpp @@ -153,7 +153,7 @@ NS_NewXBLEventHandler(nsXBLPrototypeHandler* aHandler, case eMouseEventClass: case eMouseScrollEventClass: case eWheelEventClass: - case NS_SIMPLE_GESTURE_EVENT: + case eSimpleGestureEventClass: *aResult = new nsXBLMouseEventHandler(aHandler); break; default: diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 618177338791..17c0b8e19d7f 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1873,7 +1873,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent, 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 && diff --git a/widget/BasicEvents.h b/widget/BasicEvents.h index d2fd0a132765..a3141ae2fe58 100644 --- a/widget/BasicEvents.h +++ b/widget/BasicEvents.h @@ -48,7 +48,7 @@ enum EventClassID MOZ_ENUM_TYPE(EventClassIDType) // TouchEvents.h eGestureNotifyEventClass, // WidgetGestureNotifyEvent - NS_SIMPLE_GESTURE_EVENT, // WidgetSimpleGestureEvent + eSimpleGestureEventClass, // WidgetSimpleGestureEvent NS_TOUCH_EVENT, // WidgetTouchEvent // ContentEvents.h diff --git a/widget/TouchEvents.h b/widget/TouchEvents.h index eee92e2fc2d5..fef7f51ea04a 100644 --- a/widget/TouchEvents.h +++ b/widget/TouchEvents.h @@ -97,7 +97,7 @@ public: WidgetSimpleGestureEvent(bool aIsTrusted, uint32_t aMessage, nsIWidget* aWidget) : WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, - NS_SIMPLE_GESTURE_EVENT) + eSimpleGestureEventClass) , allowedDirections(0) , direction(0) , delta(0.0) @@ -107,7 +107,7 @@ public: 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) @@ -117,7 +117,7 @@ public: 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 = diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp index 2deda1e4d1ff..c5bb5007a75e 100644 --- a/widget/gtk/nsGtkKeyUtils.cpp +++ b/widget/gtk/nsGtkKeyUtils.cpp @@ -651,7 +651,7 @@ KeymapWrapper::InitInputEvent(WidgetInputEvent& aInputEvent, case eMouseScrollEventClass: case eWheelEventClass: case eDragEventClass: - case NS_SIMPLE_GESTURE_EVENT: + case eSimpleGestureEventClass: break; default: return; diff --git a/widget/windows/KeyboardLayout.cpp b/widget/windows/KeyboardLayout.cpp index 025ed179dda0..e248235b9c7c 100644 --- a/widget/windows/KeyboardLayout.cpp +++ b/widget/windows/KeyboardLayout.cpp @@ -285,7 +285,7 @@ ModifierKeyState::InitInputEvent(WidgetInputEvent& aInputEvent) const case eMouseScrollEventClass: case eWheelEventClass: case eDragEventClass: - case NS_SIMPLE_GESTURE_EVENT: + case eSimpleGestureEventClass: InitMouseEvent(aInputEvent); break; default: @@ -299,7 +299,7 @@ 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) {