Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
index 1b3f1a50e1d49a7acc1344a376b70375e3217020..0a94b5e1375449d442ba65e8fcfc983058660b71 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
@@ -160,12 +160,7 @@ InputEvent::InputType InputTypeFromCommandType(WebEditingCommandType commandType |
return InputType::Undo; |
case CommandType::Redo: |
return InputType::Redo; |
- case CommandType::Copy: |
- return InputType::Copy; |
- case CommandType::Cut: |
- return InputType::Cut; |
- case CommandType::Paste: |
- return InputType::Paste; |
+ // Cut and Paste will be handled in |Editor::dispatchCPPEvent()|. |
// Styling. |
case CommandType::Bold: |
@@ -467,7 +462,7 @@ static bool executeCut(LocalFrame& frame, Event*, EditorCommandSource source, co |
// |canExecute()|. See also "Copy", and "Paste" command. |
if (!canWriteClipboard(frame, source)) |
return false; |
- frame.editor().cut(); |
+ frame.editor().cut(source); |
return true; |
} |
@@ -1114,7 +1109,7 @@ static bool executePaste(LocalFrame& frame, Event*, EditorCommandSource source, |
// |canExecute()|. See also "Copy", and "Cut" command. |
if (!canReadClipboard(frame, source)) |
return false; |
- frame.editor().paste(); |
+ frame.editor().paste(source); |
return true; |
} |
@@ -1133,14 +1128,14 @@ static bool executePasteGlobalSelection(LocalFrame& frame, Event*, EditorCommand |
bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode(); |
Pasteboard::generalPasteboard()->setSelectionMode(true); |
- frame.editor().paste(); |
+ frame.editor().paste(source); |
Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode); |
return true; |
} |
-static bool executePasteAndMatchStyle(LocalFrame& frame, Event*, EditorCommandSource, const String&) |
+static bool executePasteAndMatchStyle(LocalFrame& frame, Event*, EditorCommandSource source, const String&) |
{ |
- frame.editor().pasteAsPlainText(); |
+ frame.editor().pasteAsPlainText(source); |
return true; |
} |