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

Unified Diff: ui/base/clipboard/clipboard_gtk.cc

Issue 9447047: Fix copying from Java AWT app and pasting into Chrome on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_gtk.cc
diff --git a/ui/base/clipboard/clipboard_gtk.cc b/ui/base/clipboard/clipboard_gtk.cc
index c047b96b2ffa16e82092fdf96fa449e13679f7b6..3a7a0d5ded6516cee56e623d922264227358f435 100644
--- a/ui/base/clipboard/clipboard_gtk.cc
+++ b/ui/base/clipboard/clipboard_gtk.cc
@@ -367,7 +367,10 @@ bool Clipboard::IsFormatAvailable(const Clipboard::FormatType& format,
// This tries a number of common text targets.
if (data) {
retval = gtk_selection_data_targets_include_text(data);
- } else {
+ }
+ // Some programs like Java decide to set an empty TARGETS list, so even if
+ // data is not NULL, we still have to fall back.
+ if (!retval) {
// Some programs post data to the clipboard without any targets. If this
// is the case we attempt to make sense of the contents as text. This is
// pretty unfortunate since it means we have to actually copy the data to
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698