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

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

Issue 2146323002: Expose RTF content on the clipboard as strings to pages when pasting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BrowserTestClipboardScope. Created 4 years, 5 months 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/DataObjectItem.cpp
diff --git a/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp b/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp
index f7f309810c3aaf1a3ef65ae88402b444975e8ab3..c046b283ae945273e9759dae85407931362d3ebb 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp
@@ -139,6 +139,8 @@ String DataObjectItem::getAsString() const
// This is ugly but there's no real alternative.
if (m_type == mimeTypeTextPlain) {
data = Platform::current()->clipboard()->readPlainText(buffer);
+ } else if (m_type == mimeTypeTextRTF) {
+ data = Platform::current()->clipboard()->readRTF(buffer);
} else if (m_type == mimeTypeTextHTML) {
WebURL ignoredSourceURL;
unsigned ignored;
« no previous file with comments | « content/test/data/paste_listener.html ('k') | third_party/WebKit/Source/platform/clipboard/ClipboardMimeTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698