diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index ef23b652a82..f4ce8a5be55 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -5516,7 +5516,7 @@ nsContentUtils::SetDataTransferInEvent(WidgetDragEvent* aDragEvent) } else if (aDragEvent->mMessage == eDrop || aDragEvent->mMessage == NS_DRAGDROP_DRAGDROP || - aDragEvent->mMessage == NS_DRAGDROP_END) { + aDragEvent->mMessage == eDragEnd) { // For the drop and dragend events, set the drop effect based on the // last value that the dropEffect had. This will have been set in // EventStateManager::PostHandleEvent for the last dragenter or diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 126bfa4f777..54047d6aedc 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -3086,7 +3086,7 @@ nsGlobalWindow::PreHandleEvent(EventChainPreVisitor& aVisitor) } } else if (msg == eMouseDown && aVisitor.mEvent->mFlags.mIsTrusted) { gMouseDown = true; - } else if ((msg == eMouseUp || msg == NS_DRAGDROP_END) && + } else if ((msg == eMouseUp || msg == eDragEnd) && aVisitor.mEvent->mFlags.mIsTrusted) { gMouseDown = false; if (gDragServiceDisabled) { diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index 76c25f632f3..0d59673e832 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -183,7 +183,7 @@ EVENT(drag, EventNameType_HTMLXUL, eDragEventClass) EVENT(dragend, - NS_DRAGDROP_END, + eDragEnd, EventNameType_HTMLXUL, eDragEventClass) EVENT(dragenter, diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index e89e7542b91..e1817aa57f7 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -108,7 +108,7 @@ NS_EVENT_MESSAGE(NS_DRAGDROP_EXIT, eDragDropEventFirst + 2) 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(eDragEnd, eDragDropEventFirst + 6) NS_EVENT_MESSAGE(eDragStart, eDragDropEventFirst + 7) NS_EVENT_MESSAGE(eDrop, eDragDropEventFirst + 8) NS_EVENT_MESSAGE(eDragLeave, eDragDropEventFirst + 9) diff --git a/widget/MouseEvents.h b/widget/MouseEvents.h index dd9cdea54b1..814f13a14c5 100644 --- a/widget/MouseEvents.h +++ b/widget/MouseEvents.h @@ -324,7 +324,7 @@ public: mFlags.mCancelable = (aMessage != NS_DRAGDROP_EXIT && aMessage != eDragLeave && - aMessage != NS_DRAGDROP_END); + aMessage != eDragEnd); } virtual WidgetEvent* Duplicate() const override diff --git a/widget/WidgetEventImpl.cpp b/widget/WidgetEventImpl.cpp index 148b91d2c95..330a89c9633 100644 --- a/widget/WidgetEventImpl.cpp +++ b/widget/WidgetEventImpl.cpp @@ -105,7 +105,7 @@ WidgetEvent::HasDragEventMessage() const case NS_DRAGDROP_DRAGDROP: case NS_DRAGDROP_GESTURE: case NS_DRAGDROP_DRAG: - case NS_DRAGDROP_END: + case eDragEnd: case eDragStart: case eDrop: case eDragLeave: diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp index 6cbafec16b9..07521a3c88a 100644 --- a/widget/gtk/nsDragService.cpp +++ b/widget/gtk/nsDragService.cpp @@ -235,7 +235,7 @@ OnSourceGrabEventAfter(GtkWidget *widget, GdkEvent *event, gpointer user_data) sMotionEvent = gdk_event_copy(event); // Update the cursor position. The last of these recorded gets used for - // the NS_DRAGDROP_END event. + // the eDragEnd event. nsDragService *dragService = static_cast(user_data); dragService->SetDragEndPoint(nsIntPoint(event->motion.x_root, event->motion.y_root)); diff --git a/widget/nsBaseDragService.cpp b/widget/nsBaseDragService.cpp index 85d7cbb5b45..cfa7a009ee7 100644 --- a/widget/nsBaseDragService.cpp +++ b/widget/nsBaseDragService.cpp @@ -356,8 +356,9 @@ nsBaseDragService::EndDragSession(bool aDoneDrag) return NS_ERROR_FAILURE; } - if (aDoneDrag && !mSuppressLevel) - FireDragEventAtSource(NS_DRAGDROP_END); + if (aDoneDrag && !mSuppressLevel) { + FireDragEventAtSource(eDragEnd); + } if (mDragPopup) { nsXULPopupManager* pm = nsXULPopupManager::GetInstance(); @@ -405,7 +406,7 @@ nsBaseDragService::FireDragEventAtSource(uint32_t aMsg) nsEventStatus status = nsEventStatus_eIgnore; WidgetDragEvent event(true, static_cast(aMsg), nullptr); event.inputSource = mInputSource; - if (aMsg == NS_DRAGDROP_END) { + if (aMsg == eDragEnd) { event.refPoint.x = mEndDragPoint.x; event.refPoint.y = mEndDragPoint.y; event.userCancelled = mUserCancelled;