Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2578753002: [EditCommandSource] Rename and move |EditorCommandSource| to "CompositeEditCommand.h" (1/3) (Closed)
Patch Set: Xiaocheng and tkent's review: Rename to |EditCommandSource| and use kCamelCase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 82343babbefba12d7a2245e2b570827981e58a4c..2ab4351d35d3b6b935d028158bc2c6a9ededb2bb 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -1024,7 +1024,7 @@ bool Editor::insertParagraphSeparator() {
return true;
}
-void Editor::cut(EditorCommandSource source) {
+void Editor::cut(EditCommandSource source) {
if (tryDHTMLCut())
return; // DHTML did the whole operation
if (!canCut())
@@ -1048,7 +1048,7 @@ void Editor::cut(EditorCommandSource source) {
writeSelectionToPasteboard();
}
- if (source == CommandFromMenuOrKeyBinding) {
+ if (source == EditCommandSource::kMenuOrKeyBinding) {
if (dispatchBeforeInputDataTransfer(findEventTargetFromSelection(),
InputEvent::InputType::DeleteByCut,
nullptr, nullptr) !=
@@ -1092,7 +1092,7 @@ void Editor::copy() {
}
}
-void Editor::paste(EditorCommandSource source) {
+void Editor::paste(EditCommandSource source) {
DCHECK(frame().document());
if (tryDHTMLPaste(AllMimeTypes))
return; // DHTML did the whole operation
@@ -1106,7 +1106,7 @@ void Editor::paste(EditorCommandSource source) {
? AllMimeTypes
: PlainTextOnly;
- if (source == CommandFromMenuOrKeyBinding) {
+ if (source == EditCommandSource::kMenuOrKeyBinding) {
DataTransfer* dataTransfer =
DataTransfer::create(DataTransfer::CopyAndPaste, DataTransferReadable,
DataObject::createFromPasteboard(pasteMode));
@@ -1127,7 +1127,7 @@ void Editor::paste(EditorCommandSource source) {
pasteAsPlainTextWithPasteboard(Pasteboard::generalPasteboard());
}
-void Editor::pasteAsPlainText(EditorCommandSource source) {
+void Editor::pasteAsPlainText(EditCommandSource source) {
if (tryDHTMLPaste(PlainTextOnly))
return;
if (!canPaste())

Powered by Google App Engine
This is Rietveld 408576698