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

Unified Diff: third_party/WebKit/Source/core/clipboard/DataObject.cpp

Issue 2558643003: [InputEvent] Move 'beforeinput' logic into |CompositeEditCommand::willApplyEditing()| (3/3) (Closed)
Patch Set: 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/clipboard/DataObject.cpp
diff --git a/third_party/WebKit/Source/core/clipboard/DataObject.cpp b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
index b95399a4400df5e4e8147389a47f174a05c9a5e6..84f422c6469af8c1031157d726fe7c9ab95fb457 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObject.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
@@ -62,6 +62,14 @@ DataObject* DataObject::createFromPasteboard(PasteMode pasteMode) {
return dataObject;
}
+DataObject* DataObject::createFromPlainTextAndHTML(const String& plainText,
+ const String& htmlText) {
+ DataObject* dataObject = create();
+ dataObject->add(plainText, mimeTypeTextPlain);
+ dataObject->add(htmlText, mimeTypeTextHTML);
+ return dataObject;
+}
+
DataObject* DataObject::createFromString(const String& data) {
DataObject* dataObject = create();
dataObject->add(data, mimeTypeTextPlain);

Powered by Google App Engine
This is Rietveld 408576698