diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index a802d536a9b..ef23b652a82 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -5465,7 +5465,7 @@ nsContentUtils::SetDataTransferInEvent(WidgetDragEvent* aDragEvent) // 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 && - aDragEvent->mMessage != NS_DRAGDROP_START, + aDragEvent->mMessage != eDragStart, "draggesture event created without a dataTransfer"); nsCOMPtr dragSession = GetDragSession(); diff --git a/dom/events/DataTransfer.cpp b/dom/events/DataTransfer.cpp index bb15bec0243..b28548643c6 100644 --- a/dom/events/DataTransfer.cpp +++ b/dom/events/DataTransfer.cpp @@ -88,7 +88,7 @@ DataTransfer::DataTransfer(nsISupports* aParent, EventMessage aEventMessage, // external usage, cache the data from the native clipboard or drag. if (aEventMessage == NS_CUT || aEventMessage == NS_COPY || - aEventMessage == NS_DRAGDROP_START || + aEventMessage == eDragStart || aEventMessage == NS_DRAGDROP_GESTURE) { mReadOnly = false; } else if (mIsExternal) { @@ -135,7 +135,7 @@ DataTransfer::DataTransfer(nsISupports* aParent, // modifiable, but those events should have been using the first constructor // above. NS_ASSERTION(aEventMessage != NS_DRAGDROP_GESTURE && - aEventMessage != NS_DRAGDROP_START, + aEventMessage != eDragStart, "invalid event type for DataTransfer constructor"); } diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index 26810f772aa..76c25f632f3 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -199,7 +199,7 @@ EVENT(dragover, EventNameType_HTMLXUL, eDragEventClass) EVENT(dragstart, - NS_DRAGDROP_START, + eDragStart, EventNameType_HTMLXUL, eDragEventClass) EVENT(drop, diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index 930cc3addb3..4f49bd706fa 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -1637,7 +1637,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext, return; nsRefPtr dataTransfer = - new DataTransfer(window, NS_DRAGDROP_START, false, -1); + new DataTransfer(window, eDragStart, false, -1); nsCOMPtr selection; nsCOMPtr eventContent, targetContent; @@ -1663,7 +1663,7 @@ EventStateManager::GenerateDragGesture(nsPresContext* aPresContext, // get the widget from the target frame WidgetDragEvent startEvent(aEvent->mFlags.mIsTrusted, - NS_DRAGDROP_START, widget); + eDragStart, widget); FillInEventFromGestureDown(&startEvent); WidgetDragEvent gestureEvent(aEvent->mFlags.mIsTrusted, diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 964e7c14f82..c8c0fb79f39 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -2809,7 +2809,7 @@ ContentChild::RecvInvokeDragSession(nsTArray&& aTransfers, if (session) { session->SetDragAction(aAction); nsCOMPtr dataTransfer = - new DataTransfer(nullptr, NS_DRAGDROP_START, false, -1); + new DataTransfer(nullptr, eDragStart, false, -1); for (uint32_t i = 0; i < aTransfers.Length(); ++i) { auto& items = aTransfers[i].items(); for (uint32_t j = 0; j < items.Length(); ++j) { diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index 7ae3278012f..af447f87bac 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -1269,7 +1269,7 @@ nsXULElement::PreHandleEvent(EventChainPreVisitor& aVisitor) aVisitor.mEvent->mMessage == eMouseDoubleClick || aVisitor.mEvent->mMessage == NS_XUL_COMMAND || aVisitor.mEvent->mMessage == eContextMenu || - aVisitor.mEvent->mMessage == NS_DRAGDROP_START || + aVisitor.mEvent->mMessage == eDragStart || aVisitor.mEvent->mMessage == NS_DRAGDROP_GESTURE)) { // Don't propagate these events from native anonymous scrollbar. aVisitor.mCanHandle = true; diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index 75afb9124e5..e89e7542b91 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -109,7 +109,7 @@ NS_EVENT_MESSAGE(NS_DRAGDROP_DRAGDROP, eDragDropEventFirst + 3) NS_EVENT_MESSAGE(NS_DRAGDROP_GESTURE, eDragDropEventFirst + 4) NS_EVENT_MESSAGE(NS_DRAGDROP_DRAG, eDragDropEventFirst + 5) NS_EVENT_MESSAGE(NS_DRAGDROP_END, eDragDropEventFirst + 6) -NS_EVENT_MESSAGE(NS_DRAGDROP_START, eDragDropEventFirst + 7) +NS_EVENT_MESSAGE(eDragStart, eDragDropEventFirst + 7) NS_EVENT_MESSAGE(eDrop, eDragDropEventFirst + 8) NS_EVENT_MESSAGE(eDragLeave, eDragDropEventFirst + 9) NS_EVENT_MESSAGE(eDragDropEventLast, eDragLeave) diff --git a/widget/WidgetEventImpl.cpp b/widget/WidgetEventImpl.cpp index 947f34218ea..148b91d2c95 100644 --- a/widget/WidgetEventImpl.cpp +++ b/widget/WidgetEventImpl.cpp @@ -106,7 +106,7 @@ WidgetEvent::HasDragEventMessage() const case NS_DRAGDROP_GESTURE: case NS_DRAGDROP_DRAG: case NS_DRAGDROP_END: - case NS_DRAGDROP_START: + case eDragStart: case eDrop: case eDragLeave: return true;