Bug 895274 part.79 Rename NS_DRAGDROP_END to eDragEnd r=smaug

This commit is contained in:
Masayuki Nakano 2015-09-02 15:08:02 +09:00
parent 4d11a6026b
commit 1aec683604
8 changed files with 11 additions and 10 deletions

View File

@ -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

View File

@ -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) {

View File

@ -183,7 +183,7 @@ EVENT(drag,
EventNameType_HTMLXUL,
eDragEventClass)
EVENT(dragend,
NS_DRAGDROP_END,
eDragEnd,
EventNameType_HTMLXUL,
eDragEventClass)
EVENT(dragenter,

View File

@ -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)

View File

@ -324,7 +324,7 @@ public:
mFlags.mCancelable =
(aMessage != NS_DRAGDROP_EXIT &&
aMessage != eDragLeave &&
aMessage != NS_DRAGDROP_END);
aMessage != eDragEnd);
}
virtual WidgetEvent* Duplicate() const override

View File

@ -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:

View File

@ -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<nsDragService*>(user_data);
dragService->SetDragEndPoint(nsIntPoint(event->motion.x_root,
event->motion.y_root));

View File

@ -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<EventMessage>(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;