From d194119036301252542cd0fe05211eae9c453a4f Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Wed, 2 Sep 2015 15:08:03 +0900 Subject: [PATCH] Bug 895274 part.85 Rename NS_DRAGDROP_GESTURE to eLegacyDragGesture r=smaug --- dom/base/nsContentUtils.cpp | 2 +- dom/events/DataTransfer.cpp | 4 ++-- dom/events/EventNameList.h | 2 +- dom/events/EventStateManager.cpp | 6 +++--- dom/xul/nsXULElement.cpp | 2 +- widget/EventMessageList.h | 2 +- widget/WidgetEventImpl.cpp | 2 +- widget/nsBaseWidget.cpp | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index d57349fa0d10..2b4f30c91b35 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -5464,7 +5464,7 @@ nsContentUtils::SetDataTransferInEvent(WidgetDragEvent* aDragEvent) // For draggesture and dragstart events, the data transfer object is // created before the event fires, so it should already be set. For other // drag events, get the object from the drag session. - NS_ASSERTION(aDragEvent->mMessage != NS_DRAGDROP_GESTURE && + NS_ASSERTION(aDragEvent->mMessage != eLegacyDragGesture && aDragEvent->mMessage != eDragStart, "draggesture event created without a dataTransfer"); diff --git a/dom/events/DataTransfer.cpp b/dom/events/DataTransfer.cpp index 28b5e424f1bd..5e8843343546 100644 --- a/dom/events/DataTransfer.cpp +++ b/dom/events/DataTransfer.cpp @@ -89,7 +89,7 @@ DataTransfer::DataTransfer(nsISupports* aParent, EventMessage aEventMessage, if (aEventMessage == NS_CUT || aEventMessage == NS_COPY || aEventMessage == eDragStart || - aEventMessage == NS_DRAGDROP_GESTURE) { + aEventMessage == eLegacyDragGesture) { mReadOnly = false; } else if (mIsExternal) { if (aEventMessage == NS_PASTE) { @@ -134,7 +134,7 @@ DataTransfer::DataTransfer(nsISupports* aParent, // draggesture and dragstart events are the only times when items are // modifiable, but those events should have been using the first constructor // above. - NS_ASSERTION(aEventMessage != NS_DRAGDROP_GESTURE && + NS_ASSERTION(aEventMessage != eLegacyDragGesture && aEventMessage != eDragStart, "invalid event type for DataTransfer constructor"); } diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index b120271c5d7b..368f97b16ac3 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -728,7 +728,7 @@ NON_IDL_EVENT(dragdrop, EventNameType_XUL, eDragEventClass) NON_IDL_EVENT(draggesture, - NS_DRAGDROP_GESTURE, + eLegacyDragGesture, EventNameType_XUL, eDragEventClass) NON_IDL_EVENT(overflow, diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index 6cfda720139e..61147b7d26b5 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -646,7 +646,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext, FlushPendingEvents(aPresContext); break; } - case NS_DRAGDROP_GESTURE: + case eLegacyDragGesture: if (Prefs::ClickHoldContextMenu()) { // an external drag gesture event came in, not generated internally // by Gecko. Make sure we get rid of the click-hold timer. @@ -1667,7 +1667,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext, FillInEventFromGestureDown(&startEvent); WidgetDragEvent gestureEvent(aEvent->mFlags.mIsTrusted, - NS_DRAGDROP_GESTURE, widget); + eLegacyDragGesture, widget); FillInEventFromGestureDown(&gestureEvent); startEvent.dataTransfer = gestureEvent.dataTransfer = dataTransfer; @@ -1726,7 +1726,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext, } } - // Note that frame event handling doesn't care about NS_DRAGDROP_GESTURE, + // Note that frame event handling doesn't care about eLegacyDragGesture, // which is just as well since we don't really know which frame to // send it to diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index af447f87bacb..3729c0185b8a 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -1270,7 +1270,7 @@ nsXULElement::PreHandleEvent(EventChainPreVisitor& aVisitor) aVisitor.mEvent->mMessage == NS_XUL_COMMAND || aVisitor.mEvent->mMessage == eContextMenu || aVisitor.mEvent->mMessage == eDragStart || - aVisitor.mEvent->mMessage == NS_DRAGDROP_GESTURE)) { + aVisitor.mEvent->mMessage == eLegacyDragGesture)) { // Don't propagate these events from native anonymous scrollbar. aVisitor.mCanHandle = true; aVisitor.mParentTarget = nullptr; diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index be0096721549..4163cf84782f 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -106,7 +106,7 @@ NS_EVENT_MESSAGE(eDragEnter, eDragDropEventFirst) NS_EVENT_MESSAGE(eDragOver, eDragDropEventFirst + 1) NS_EVENT_MESSAGE(eDragExit, eDragDropEventFirst + 2) NS_EVENT_MESSAGE(eLegacyDragDrop, eDragDropEventFirst + 3) -NS_EVENT_MESSAGE(NS_DRAGDROP_GESTURE, eDragDropEventFirst + 4) +NS_EVENT_MESSAGE(eLegacyDragGesture, eDragDropEventFirst + 4) NS_EVENT_MESSAGE(eDrag, eDragDropEventFirst + 5) NS_EVENT_MESSAGE(eDragEnd, eDragDropEventFirst + 6) NS_EVENT_MESSAGE(eDragStart, eDragDropEventFirst + 7) diff --git a/widget/WidgetEventImpl.cpp b/widget/WidgetEventImpl.cpp index d1ea4fe160a3..b309a86622ee 100644 --- a/widget/WidgetEventImpl.cpp +++ b/widget/WidgetEventImpl.cpp @@ -103,7 +103,7 @@ WidgetEvent::HasDragEventMessage() const case eDragOver: case eDragExit: case eLegacyDragDrop: - case NS_DRAGDROP_GESTURE: + case eLegacyDragGesture: case eDrag: case eDragEnd: case eDragStart: diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 493ee9ba02f3..8dcfbfbef6c1 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -2632,7 +2632,7 @@ case _value: eventName.AssignLiteral(_name) ; break switch(aGuiEvent->mMessage) { _ASSIGN_eventName(eBlur,"eBlur"); - _ASSIGN_eventName(NS_DRAGDROP_GESTURE,"NS_DND_GESTURE"); + _ASSIGN_eventName(eLegacyDragGesture,"eLegacyDragGesture"); _ASSIGN_eventName(eDrop,"eDrop"); _ASSIGN_eventName(eDragEnter,"eDragEnter"); _ASSIGN_eventName(eDragExit,"eDragExit");