mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 895274 part.168 Rename NS_CONTENT_COMMAND_REDO to eContentCommandRedo r=smaug
This commit is contained in:
parent
a8efbc56fa
commit
ac6c3eb8f7
@ -2055,22 +2055,23 @@ nsDOMWindowUtils::SendContentCommandEvent(const nsAString& aType,
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
EventMessage msg;
|
||||
if (aType.EqualsLiteral("cut"))
|
||||
if (aType.EqualsLiteral("cut")) {
|
||||
msg = eContentCommandCut;
|
||||
else if (aType.EqualsLiteral("copy"))
|
||||
} else if (aType.EqualsLiteral("copy")) {
|
||||
msg = eContentCommandCopy;
|
||||
else if (aType.EqualsLiteral("paste"))
|
||||
} else if (aType.EqualsLiteral("paste")) {
|
||||
msg = eContentCommandPaste;
|
||||
else if (aType.EqualsLiteral("delete"))
|
||||
} else if (aType.EqualsLiteral("delete")) {
|
||||
msg = eContentCommandDelete;
|
||||
else if (aType.EqualsLiteral("undo"))
|
||||
} else if (aType.EqualsLiteral("undo")) {
|
||||
msg = eContentCommandUndo;
|
||||
else if (aType.EqualsLiteral("redo"))
|
||||
msg = NS_CONTENT_COMMAND_REDO;
|
||||
else if (aType.EqualsLiteral("pasteTransferable"))
|
||||
} else if (aType.EqualsLiteral("redo")) {
|
||||
msg = eContentCommandRedo;
|
||||
} else if (aType.EqualsLiteral("pasteTransferable")) {
|
||||
msg = eContentCommandPasteTransferable;
|
||||
else
|
||||
} else {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
WidgetContentCommandEvent event(true, msg, widget);
|
||||
if (msg == eContentCommandPasteTransferable) {
|
||||
|
@ -752,7 +752,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
case eContentCommandPaste:
|
||||
case eContentCommandDelete:
|
||||
case eContentCommandUndo:
|
||||
case NS_CONTENT_COMMAND_REDO:
|
||||
case eContentCommandRedo:
|
||||
case eContentCommandPasteTransferable:
|
||||
DoContentCommandEvent(aEvent->AsContentCommandEvent());
|
||||
break;
|
||||
@ -5052,7 +5052,7 @@ EventStateManager::DoContentCommandEvent(WidgetContentCommandEvent* aEvent)
|
||||
case eContentCommandUndo:
|
||||
cmd = "cmd_undo";
|
||||
break;
|
||||
case NS_CONTENT_COMMAND_REDO:
|
||||
case eContentCommandRedo:
|
||||
cmd = "cmd_redo";
|
||||
break;
|
||||
case eContentCommandPasteTransferable:
|
||||
|
@ -305,7 +305,7 @@ NS_EVENT_MESSAGE(eContentCommandCopy, eContentCommandEventFirst + 1
|
||||
NS_EVENT_MESSAGE(eContentCommandPaste, eContentCommandEventFirst + 2)
|
||||
NS_EVENT_MESSAGE(eContentCommandDelete, eContentCommandEventFirst + 3)
|
||||
NS_EVENT_MESSAGE(eContentCommandUndo, eContentCommandEventFirst + 4)
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_REDO, eContentCommandEventFirst + 5)
|
||||
NS_EVENT_MESSAGE(eContentCommandRedo, eContentCommandEventFirst + 5)
|
||||
NS_EVENT_MESSAGE(eContentCommandPasteTransferable, eContentCommandEventFirst + 6)
|
||||
// NS_CONTENT_COMMAND_SCROLL scrolls the nearest scrollable element to the
|
||||
// currently focused content or latest DOM selection. This would normally be
|
||||
|
@ -3045,7 +3045,7 @@ nsWindow::OnKeyPressEvent(GdkEventKey *aEvent)
|
||||
case GDK_F18:
|
||||
return DispatchContentCommandEvent(eContentCommandPaste);
|
||||
case GDK_Redo:
|
||||
return DispatchContentCommandEvent(NS_CONTENT_COMMAND_REDO);
|
||||
return DispatchContentCommandEvent(eContentCommandRedo);
|
||||
case GDK_Undo:
|
||||
case GDK_F14:
|
||||
return DispatchContentCommandEvent(eContentCommandUndo);
|
||||
|
@ -1216,7 +1216,7 @@ nsWindow::keyPressEvent(QKeyEvent* aEvent)
|
||||
|
||||
// Qt::Key_Redo and Qt::Key_Undo are not available yet.
|
||||
if (aEvent->nativeVirtualKey() == 0xff66) {
|
||||
return DispatchContentCommandEvent(NS_CONTENT_COMMAND_REDO);
|
||||
return DispatchContentCommandEvent(eContentCommandRedo);
|
||||
}
|
||||
if (aEvent->nativeVirtualKey() == 0xff65) {
|
||||
return DispatchContentCommandEvent(eContentCommandUndo);
|
||||
|
@ -1363,7 +1363,7 @@ NativeKey::HandleAppCommandMessage() const
|
||||
contentCommandMessage = eContentCommandPaste;
|
||||
break;
|
||||
case APPCOMMAND_REDO:
|
||||
contentCommandMessage = NS_CONTENT_COMMAND_REDO;
|
||||
contentCommandMessage = eContentCommandRedo;
|
||||
break;
|
||||
case APPCOMMAND_UNDO:
|
||||
contentCommandMessage = eContentCommandUndo;
|
||||
|
@ -5689,7 +5689,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
|
||||
case EM_REDO:
|
||||
{
|
||||
WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_REDO, this);
|
||||
WidgetContentCommandEvent command(true, eContentCommandRedo, this);
|
||||
DispatchWindowEvent(&command);
|
||||
*aRetValue = (LRESULT)(command.mSucceeded && command.mIsEnabled);
|
||||
result = true;
|
||||
@ -5721,8 +5721,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
|
||||
case EM_CANREDO:
|
||||
{
|
||||
WidgetContentCommandEvent command(true, NS_CONTENT_COMMAND_REDO,
|
||||
this, true);
|
||||
WidgetContentCommandEvent command(true, eContentCommandRedo, this, true);
|
||||
DispatchWindowEvent(&command);
|
||||
*aRetValue = (LRESULT)(command.mSucceeded && command.mIsEnabled);
|
||||
result = true;
|
||||
|
Loading…
Reference in New Issue
Block a user