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

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

Issue 2558643003: [InputEvent] Move 'beforeinput' logic into |CompositeEditCommand::willApplyEditing()| (3/3) (Closed)
Patch Set: Retain the order of firing 'beforeinput' before 'compositionupdate' 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 ea267e89f1aeff97fa3a3218b9bda224b6d8c4cf..8a810841aaa0eaa36e7d2a78798a692661a01192 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