Bug 895274 part.165 Rename NS_CONTENT_COMMAND_PASTE to eContentCommandPaste r=smaug

This commit is contained in:
Masayuki Nakano 2015-09-11 01:59:52 +09:00
parent 45c425c6fb
commit 62ac576782
7 changed files with 9 additions and 9 deletions

View File

@ -2060,7 +2060,7 @@ nsDOMWindowUtils::SendContentCommandEvent(const nsAString& aType,
else if (aType.EqualsLiteral("copy"))
msg = eContentCommandCopy;
else if (aType.EqualsLiteral("paste"))
msg = NS_CONTENT_COMMAND_PASTE;
msg = eContentCommandPaste;
else if (aType.EqualsLiteral("delete"))
msg = NS_CONTENT_COMMAND_DELETE;
else if (aType.EqualsLiteral("undo"))

View File

@ -749,7 +749,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
break;
case eContentCommandCut:
case eContentCommandCopy:
case NS_CONTENT_COMMAND_PASTE:
case eContentCommandPaste:
case NS_CONTENT_COMMAND_DELETE:
case NS_CONTENT_COMMAND_UNDO:
case NS_CONTENT_COMMAND_REDO:
@ -5043,7 +5043,7 @@ EventStateManager::DoContentCommandEvent(WidgetContentCommandEvent* aEvent)
case eContentCommandCopy:
cmd = "cmd_copy";
break;
case NS_CONTENT_COMMAND_PASTE:
case eContentCommandPaste:
cmd = "cmd_paste";
break;
case NS_CONTENT_COMMAND_DELETE:

View File

@ -302,7 +302,7 @@ NS_EVENT_MESSAGE(eSetSelection, eSelectionEventFirst)
NS_EVENT_MESSAGE(eContentCommandEventFirst, 3800)
NS_EVENT_MESSAGE(eContentCommandCut, eContentCommandEventFirst)
NS_EVENT_MESSAGE(eContentCommandCopy, eContentCommandEventFirst + 1)
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_PASTE, eContentCommandEventFirst + 2)
NS_EVENT_MESSAGE(eContentCommandPaste, eContentCommandEventFirst + 2)
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_DELETE, eContentCommandEventFirst + 3)
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_UNDO, eContentCommandEventFirst + 4)
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_REDO, eContentCommandEventFirst + 5)

View File

@ -3043,7 +3043,7 @@ nsWindow::OnKeyPressEvent(GdkEventKey *aEvent)
return DispatchContentCommandEvent(eContentCommandCut);
case XF86XK_Paste:
case GDK_F18:
return DispatchContentCommandEvent(NS_CONTENT_COMMAND_PASTE);
return DispatchContentCommandEvent(eContentCommandPaste);
case GDK_Redo:
return DispatchContentCommandEvent(NS_CONTENT_COMMAND_REDO);
case GDK_Undo:

View File

@ -1209,7 +1209,7 @@ nsWindow::keyPressEvent(QKeyEvent* aEvent)
case Qt::Key_Paste:
case Qt::Key_F18:
case Qt::Key_F9:
return DispatchContentCommandEvent(NS_CONTENT_COMMAND_PASTE);
return DispatchContentCommandEvent(eContentCommandPaste);
case Qt::Key_F14:
return DispatchContentCommandEvent(NS_CONTENT_COMMAND_UNDO);
}

View File

@ -1360,7 +1360,7 @@ NativeKey::HandleAppCommandMessage() const
contentCommandMessage = eContentCommandCut;
break;
case APPCOMMAND_PASTE:
contentCommandMessage = NS_CONTENT_COMMAND_PASTE;
contentCommandMessage = eContentCommandPaste;
break;
case APPCOMMAND_REDO:
contentCommandMessage = NS_CONTENT_COMMAND_REDO;

View File

@ -5672,7 +5672,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
case WM_PASTE:
{
WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_PASTE, this);
WidgetContentCommandEvent command(true, eContentCommandPaste, this);
DispatchWindowEvent(&command);
result = true;
}
@ -5701,7 +5701,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
// Support EM_CANPASTE message only when wParam isn't specified or
// is plain text format.
if (wParam == 0 || wParam == CF_TEXT || wParam == CF_UNICODETEXT) {
WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_PASTE,
WidgetContentCommandEvent command(true, eContentCommandPaste,
this, true);
DispatchWindowEvent(&command);
*aRetValue = (LRESULT)(command.mSucceeded && command.mIsEnabled);