Bug 895274 part.82 Rename NS_DRAGDROP_ENTER to eDragEnter r=smaug

This commit is contained in:
Masayuki Nakano 2015-09-02 15:08:02 +09:00
Родитель 811d0fac7e
Коммит a07c726a8f
11 изменённых файлов: 17 добавлений и 19 удалений

Просмотреть файл

@ -5507,8 +5507,7 @@ nsContentUtils::SetDataTransferInEvent(WidgetDragEvent* aDragEvent)
// for the dragenter and dragover events, initialize the drop effect
// from the drop action, which platform specific widget code sets before
// the event is fired based on the keyboard state.
if (aDragEvent->mMessage == NS_DRAGDROP_ENTER ||
aDragEvent->mMessage == eDragOver) {
if (aDragEvent->mMessage == eDragEnter || aDragEvent->mMessage == eDragOver) {
uint32_t action, effectAllowed;
dragSession->GetDragAction(&action);
aDragEvent->dataTransfer->GetEffectAllowedInt(&effectAllowed);

Просмотреть файл

@ -187,7 +187,7 @@ EVENT(dragend,
EventNameType_HTMLXUL,
eDragEventClass)
EVENT(dragenter,
NS_DRAGDROP_ENTER,
eDragEnter,
EventNameType_HTMLXUL,
eDragEventClass)
EVENT(dragleave,

Просмотреть файл

@ -3171,7 +3171,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
}
break;
case NS_DRAGDROP_ENTER:
case eDragEnter:
case eDragOver:
{
NS_ASSERTION(aEvent->mClass == eDragEventClass, "Expected a drag event");
@ -4320,7 +4320,7 @@ EventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
targetContent, lastContent, sLastDragOverFrame);
}
FireDragEnterOrExit(aPresContext, aDragEvent, NS_DRAGDROP_ENTER,
FireDragEnterOrExit(aPresContext, aDragEvent, eDragEnter,
lastContent, targetContent, mCurrentTarget);
if (sLastDragOverFrame) {
@ -4395,15 +4395,14 @@ EventStateManager::FireDragEnterOrExit(nsPresContext* aPresContext,
// adjust the drag hover if the dragenter event was cancelled or this is a drag exit
if (status == nsEventStatus_eConsumeNoDefault ||
aMessage == NS_DRAGDROP_EXIT) {
SetContentState((aMessage == NS_DRAGDROP_ENTER) ?
aTargetContent : nullptr,
SetContentState((aMessage == eDragEnter) ? aTargetContent : nullptr,
NS_EVENT_STATE_DRAGOVER);
}
// collect any changes to moz cursor settings stored in the event's
// data transfer.
if (aMessage == eDragLeave || aMessage == NS_DRAGDROP_EXIT ||
aMessage == NS_DRAGDROP_ENTER) {
aMessage == eDragEnter) {
UpdateDragDataTransfer(&event);
}
}

Просмотреть файл

@ -1749,8 +1749,7 @@ nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent)
if (dragEvent && mInstance) {
WidgetEvent* ievent = aEvent->GetInternalNSEvent();
if (ievent && ievent->mFlags.mIsTrusted &&
ievent->mMessage != NS_DRAGDROP_ENTER &&
ievent->mMessage != eDragOver) {
ievent->mMessage != eDragEnter && ievent->mMessage != eDragOver) {
aEvent->PreventDefault();
}

Просмотреть файл

@ -371,7 +371,7 @@ nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
// you don't need to check if the QI succeeded before each call.
switch (internalEvent->mMessage) {
// dragenter
case NS_DRAGDROP_ENTER: {
case eDragEnter: {
nsCOMPtr<nsIDOMDragEvent> dragEvent = do_QueryInterface(aEvent);
return DragEnter(dragEvent);
}

Просмотреть файл

@ -2581,7 +2581,7 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
InvalidateRow(mMouseOverRow);
mMouseOverRow = -1;
}
} else if (aEvent->mMessage == NS_DRAGDROP_ENTER) {
} else if (aEvent->mMessage == eDragEnter) {
if (!mSlots)
mSlots = new Slots();

Просмотреть файл

@ -102,7 +102,7 @@ NS_EVENT_MESSAGE(eFocus, eFocusEventFirst)
NS_EVENT_MESSAGE(eBlur, eFocusEventFirst + 1)
NS_EVENT_MESSAGE(eDragDropEventFirst, 1400)
NS_EVENT_MESSAGE(NS_DRAGDROP_ENTER, eDragDropEventFirst)
NS_EVENT_MESSAGE(eDragEnter, eDragDropEventFirst)
NS_EVENT_MESSAGE(eDragOver, eDragDropEventFirst + 1)
NS_EVENT_MESSAGE(NS_DRAGDROP_EXIT, eDragDropEventFirst + 2)
NS_EVENT_MESSAGE(NS_DRAGDROP_DRAGDROP, eDragDropEventFirst + 3)

Просмотреть файл

@ -99,7 +99,7 @@ bool
WidgetEvent::HasDragEventMessage() const
{
switch (mMessage) {
case NS_DRAGDROP_ENTER:
case eDragEnter:
case eDragOver:
case NS_DRAGDROP_EXIT:
case NS_DRAGDROP_DRAGDROP:

Просмотреть файл

@ -5735,8 +5735,9 @@ PanGestureTypeForEvent(NSEvent* aEvent)
return NSDragOperationNone;
}
if (aMessage == NS_DRAGDROP_ENTER)
if (aMessage == eDragEnter) {
mDragService->StartDragSession();
}
nsCOMPtr<nsIDragSession> dragSession;
mDragService->GetCurrentSession(getter_AddRefs(dragSession));
@ -5792,7 +5793,7 @@ PanGestureTypeForEvent(NSEvent* aEvent)
if (dragSession) {
switch (aMessage) {
case NS_DRAGDROP_ENTER:
case eDragEnter:
case eDragOver: {
uint32_t dragAction;
dragSession->GetDragAction(&dragAction);
@ -5847,7 +5848,7 @@ PanGestureTypeForEvent(NSEvent* aEvent)
globalDragPboard =
[[NSPasteboardWrapper alloc] initWithPasteboard:[sender draggingPasteboard]];
return [self doDragAction:NS_DRAGDROP_ENTER sender:sender];
return [self doDragAction:eDragEnter sender:sender];
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(NSDragOperationNone);
}

Просмотреть файл

@ -2634,7 +2634,7 @@ case _value: eventName.AssignLiteral(_name) ; break
_ASSIGN_eventName(eBlur,"eBlur");
_ASSIGN_eventName(NS_DRAGDROP_GESTURE,"NS_DND_GESTURE");
_ASSIGN_eventName(eDrop,"eDrop");
_ASSIGN_eventName(NS_DRAGDROP_ENTER,"NS_DND_ENTER");
_ASSIGN_eventName(eDragEnter,"eDragEnter");
_ASSIGN_eventName(NS_DRAGDROP_EXIT,"NS_DND_EXIT");
_ASSIGN_eventName(eDragOver,"eDragOver");
_ASSIGN_eventName(NS_EDITOR_INPUT,"NS_EDITOR_INPUT");

Просмотреть файл

@ -295,7 +295,7 @@ nsNativeDragTarget::DragEnter(LPDATAOBJECT pIDataSource,
winDragService->SetIDataObject(pIDataSource);
// Now process the native drag state and then dispatch the event
ProcessDrag(NS_DRAGDROP_ENTER, grfKeyState, ptl, pdwEffect);
ProcessDrag(eDragEnter, grfKeyState, ptl, pdwEffect);
return S_OK;
}