Bug 1046101 part.15 Rename NS_POINTER_EVENT to ePointerEventClass r=smaug

This commit is contained in:
Masayuki Nakano 2014-08-04 14:28:52 +09:00
parent c19caaece3
commit 29273d4088
13 changed files with 36 additions and 36 deletions

View File

@ -162,7 +162,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Event)
case eMouseScrollEventClass:
case eWheelEventClass:
case NS_SIMPLE_GESTURE_EVENT:
case NS_POINTER_EVENT:
case ePointerEventClass:
tmp->mEvent->AsMouseEventBase()->relatedTarget = nullptr;
break;
case eDragEventClass: {
@ -200,7 +200,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Event)
case eMouseScrollEventClass:
case eWheelEventClass:
case NS_SIMPLE_GESTURE_EVENT:
case NS_POINTER_EVENT:
case ePointerEventClass:
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mEvent->relatedTarget");
cb.NoteXPCOMChild(tmp->mEvent->AsMouseEventBase()->relatedTarget);
break;
@ -850,7 +850,7 @@ Event::GetScreenCoords(nsPresContext* aPresContext,
(aEvent->mClass != eMouseEventClass &&
aEvent->mClass != eMouseScrollEventClass &&
aEvent->mClass != eWheelEventClass &&
aEvent->mClass != NS_POINTER_EVENT &&
aEvent->mClass != ePointerEventClass &&
aEvent->mClass != NS_TOUCH_EVENT &&
aEvent->mClass != eDragEventClass &&
aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) {
@ -908,7 +908,7 @@ Event::GetClientCoords(nsPresContext* aPresContext,
aEvent->mClass != eWheelEventClass &&
aEvent->mClass != NS_TOUCH_EVENT &&
aEvent->mClass != eDragEventClass &&
aEvent->mClass != NS_POINTER_EVENT &&
aEvent->mClass != ePointerEventClass &&
aEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
!aPresContext ||
!aEvent->AsGUIEvent()->widget) {

View File

@ -738,7 +738,7 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
case NS_SIMPLE_GESTURE_EVENT:
return NS_NewDOMSimpleGestureEvent(aDOMEvent, aOwner, aPresContext,
aEvent->AsSimpleGestureEvent());
case NS_POINTER_EVENT:
case ePointerEventClass:
return NS_NewDOMPointerEvent(aDOMEvent, aOwner, aPresContext,
aEvent->AsPointerEvent());
case NS_TOUCH_EVENT:

View File

@ -296,43 +296,43 @@ EVENT(mozpointerlockerror,
EVENT(pointerdown,
NS_POINTER_DOWN,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(pointermove,
NS_POINTER_MOVE,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(pointerup,
NS_POINTER_UP,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(pointercancel,
NS_POINTER_CANCEL,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(pointerover,
NS_POINTER_OVER,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(pointerout,
NS_POINTER_OUT,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(pointerenter,
NS_POINTER_ENTER,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(pointerleave,
NS_POINTER_LEAVE,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(gotpointercapture,
NS_POINTER_GOT_CAPTURE,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
EVENT(lostpointercapture,
NS_POINTER_LOST_CAPTURE,
EventNameType_All,
NS_POINTER_EVENT)
ePointerEventClass)
// Not supported yet; probably never because "wheel" is a better idea.
// EVENT(mousewheel)

View File

@ -3787,7 +3787,7 @@ EventStateManager::NotifyMouseOut(WidgetMouseEvent* aMouseEvent,
// hover state itself, and we have optimizations for hover switching between
// two nearby elements both deep in the DOM tree that would be defeated by
// switching the hover state to null here.
bool isPointer = aMouseEvent->mClass == NS_POINTER_EVENT;
bool isPointer = aMouseEvent->mClass == ePointerEventClass;
if (!aMovingInto && !isPointer) {
// Unset :hover
SetContentState(nullptr, NS_EVENT_STATE_HOVER);
@ -3850,7 +3850,7 @@ EventStateManager::NotifyMouseOver(WidgetMouseEvent* aMouseEvent,
// DispatchMouseOrPointerEvent() call below, since NotifyMouseOut() resets it, bug 298477.
nsCOMPtr<nsIContent> lastOverElement = wrapper->mLastOverElement;
bool isPointer = aMouseEvent->mClass == NS_POINTER_EVENT;
bool isPointer = aMouseEvent->mClass == ePointerEventClass;
Maybe<EnterLeaveDispatcher> enterDispatcher;
if (dispatch) {

View File

@ -74,7 +74,7 @@ MouseEvent::InitMouseEvent(const nsAString& aType,
case eMouseScrollEventClass:
case eWheelEventClass:
case eDragEventClass:
case NS_POINTER_EVENT:
case ePointerEventClass:
case NS_SIMPLE_GESTURE_EVENT: {
WidgetMouseEventBase* mouseEventBase = mEvent->AsMouseEventBase();
mouseEventBase->relatedTarget = aRelatedTarget;
@ -128,7 +128,7 @@ MouseEvent::InitMouseEvent(const nsAString& aType,
case eMouseScrollEventClass:
case eWheelEventClass:
case eDragEventClass:
case NS_POINTER_EVENT:
case ePointerEventClass:
case NS_SIMPLE_GESTURE_EVENT:
mEvent->AsInputEvent()->modifiers = modifiers;
return NS_OK;
@ -159,7 +159,7 @@ MouseEvent::Constructor(const GlobalObject& aGlobal,
case eMouseScrollEventClass:
case eWheelEventClass:
case eDragEventClass:
case NS_POINTER_EVENT:
case ePointerEventClass:
case NS_SIMPLE_GESTURE_EVENT:
e->mEvent->AsMouseEventBase()->buttons = aParam.mButtons;
break;
@ -218,7 +218,7 @@ MouseEvent::Button()
case eMouseScrollEventClass:
case eWheelEventClass:
case eDragEventClass:
case NS_POINTER_EVENT:
case ePointerEventClass:
case NS_SIMPLE_GESTURE_EVENT:
return mEvent->AsMouseEventBase()->button;
default:
@ -243,7 +243,7 @@ MouseEvent::Buttons()
case eMouseScrollEventClass:
case eWheelEventClass:
case eDragEventClass:
case NS_POINTER_EVENT:
case ePointerEventClass:
case NS_SIMPLE_GESTURE_EVENT:
return mEvent->AsMouseEventBase()->buttons;
default:
@ -268,7 +268,7 @@ MouseEvent::GetRelatedTarget()
case eMouseScrollEventClass:
case eWheelEventClass:
case eDragEventClass:
case NS_POINTER_EVENT:
case ePointerEventClass:
case NS_SIMPLE_GESTURE_EVENT:
relatedTarget =
do_QueryInterface(mEvent->AsMouseEventBase()->relatedTarget);

View File

@ -18,8 +18,8 @@ PointerEvent::PointerEvent(EventTarget* aOwner,
: MouseEvent(aOwner, aPresContext,
aEvent ? aEvent : new WidgetPointerEvent(false, 0, nullptr))
{
NS_ASSERTION(mEvent->mClass == NS_POINTER_EVENT,
"event type mismatch NS_POINTER_EVENT");
NS_ASSERTION(mEvent->mClass == ePointerEventClass,
"event type mismatch ePointerEventClass");
WidgetMouseEvent* mouseEvent = mEvent->AsMouseEvent();
if (aEvent) {

View File

@ -122,7 +122,7 @@ UIEvent::GetMovementPoint()
mEvent->mClass != eMouseScrollEventClass &&
mEvent->mClass != eWheelEventClass &&
mEvent->mClass != eDragEventClass &&
mEvent->mClass != NS_POINTER_EVENT &&
mEvent->mClass != ePointerEventClass &&
mEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
!mEvent->AsGUIEvent()->widget) {
return nsIntPoint(0, 0);
@ -299,7 +299,7 @@ UIEvent::GetLayerPoint() const
(mEvent->mClass != eMouseEventClass &&
mEvent->mClass != eMouseScrollEventClass &&
mEvent->mClass != eWheelEventClass &&
mEvent->mClass != NS_POINTER_EVENT &&
mEvent->mClass != ePointerEventClass &&
mEvent->mClass != NS_TOUCH_EVENT &&
mEvent->mClass != eDragEventClass &&
mEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||

View File

@ -47,7 +47,7 @@ public:
aEvent->mClass != eMouseScrollEventClass &&
aEvent->mClass != eWheelEventClass &&
aEvent->mClass != eDragEventClass &&
aEvent->mClass != NS_POINTER_EVENT &&
aEvent->mClass != ePointerEventClass &&
aEvent->mClass != NS_SIMPLE_GESTURE_EVENT)) {
return nsIntPoint(0, 0);
}
@ -74,7 +74,7 @@ public:
aEvent->mClass != eMouseScrollEventClass &&
aEvent->mClass != eWheelEventClass &&
aEvent->mClass != eDragEventClass &&
aEvent->mClass != NS_POINTER_EVENT &&
aEvent->mClass != ePointerEventClass &&
aEvent->mClass != NS_SIMPLE_GESTURE_EVENT) ||
!aPresContext ||
!aEvent->AsGUIEvent()->widget) {

View File

@ -1874,7 +1874,7 @@ nsLayoutUtils::GetEventCoordinatesRelativeTo(const WidgetEvent* aEvent,
aEvent->mClass != eWheelEventClass &&
aEvent->mClass != eDragEventClass &&
aEvent->mClass != NS_SIMPLE_GESTURE_EVENT &&
aEvent->mClass != NS_POINTER_EVENT &&
aEvent->mClass != ePointerEventClass &&
aEvent->mClass != NS_GESTURENOTIFY_EVENT &&
aEvent->mClass != NS_TOUCH_EVENT &&
aEvent->mClass != eQueryContentEventClass))

View File

@ -7183,7 +7183,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
}
}
if (aEvent->mClass == NS_POINTER_EVENT &&
if (aEvent->mClass == ePointerEventClass &&
aEvent->message != NS_POINTER_DOWN) {
if (WidgetPointerEvent* pointerEvent = aEvent->AsPointerEvent()) {
uint32_t pointerId = pointerEvent->pointerId;

View File

@ -44,7 +44,7 @@ enum EventClassID MOZ_ENUM_TYPE(EventClassIDType)
eDragEventClass, // WidgetDragEvent
eMouseScrollEventClass, // WidgetMouseScrollEvent
eWheelEventClass, // WidgetWheelEvent
NS_POINTER_EVENT, // PointerEvent
ePointerEventClass, // PointerEvent
// TouchEvents.h
NS_GESTURENOTIFY_EVENT, // WidgetGestureNotifyEvent

View File

@ -577,7 +577,7 @@ public:
virtual WidgetPointerEvent* AsPointerEvent() MOZ_OVERRIDE { return this; }
WidgetPointerEvent(bool aIsTrusted, uint32_t aMsg, nsIWidget* w)
: WidgetMouseEvent(aIsTrusted, aMsg, w, NS_POINTER_EVENT, eReal)
: WidgetMouseEvent(aIsTrusted, aMsg, w, ePointerEventClass, eReal)
, width(0)
, height(0)
, isPrimary(true)
@ -591,7 +591,7 @@ public:
, height(0)
, isPrimary(true)
{
mClass = NS_POINTER_EVENT;
mClass = ePointerEventClass;
UpdateFlags();
}
@ -615,7 +615,7 @@ public:
virtual WidgetEvent* Duplicate() const MOZ_OVERRIDE
{
MOZ_ASSERT(mClass == NS_POINTER_EVENT,
MOZ_ASSERT(mClass == ePointerEventClass,
"Duplicate() must be overridden by sub class");
// Not copying widget, it is a weak reference.
WidgetPointerEvent* result =

View File

@ -217,7 +217,7 @@ WidgetEvent::IsAllowedToDispatchDOMEvent() const
{
switch (mClass) {
case eMouseEventClass:
case NS_POINTER_EVENT:
case ePointerEventClass:
// We want synthesized mouse moves to cause mouseover and mouseout
// DOM events (EventStateManager::PreHandleEvent), but not mousemove
// DOM events.