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

Unified Diff: webkit/glue/webclipboard_impl.cc

Issue 10532168: Allow empty strings to be written to the clipboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix Created 8 years, 6 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
« no previous file with comments | « ui/base/clipboard/scoped_clipboard_writer.cc ('k') | webkit/glue/webdropdata.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webclipboard_impl.cc
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index b782cd2d9fa7eceeb90aa77446f0a1187c981b3d..eb71a615f4a27b7acd5404747a658740029915af 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -235,8 +235,10 @@ void WebClipboardImpl::writeDataObject(const WebDragData& data) {
WebDropData data_object(data);
// TODO(dcheng): Properly support text/uri-list here.
- scw.WriteText(data_object.plain_text);
- scw.WriteHTML(data_object.text_html, "");
+ if (!data_object.text.is_null())
+ scw.WriteText(data_object.text.string());
+ if (!data_object.html.is_null())
+ scw.WriteHTML(data_object.html.string(), "");
// If there is no custom data, avoid calling WritePickledData. This ensures
// that ScopedClipboardWriterGlue's dtor remains a no-op if the page didn't
// modify the DataTransfer object, which is important to avoid stomping on
« no previous file with comments | « ui/base/clipboard/scoped_clipboard_writer.cc ('k') | webkit/glue/webdropdata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698