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

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 208313009: Fix the HTML5 drag and drop demos on Linux and CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | ui/base/dragdrop/os_exchange_data_provider_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index f0cce6521220a903c2b50270e36df23258510291..d9959de21b4c3fbdc4845224b4dc6ffca60ab2e6 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -362,6 +362,10 @@ void PrepareDragData(const DropData& drop_data,
if (!drop_data.file_contents.empty())
PrepareDragForFileContents(drop_data, provider);
#endif
+ // Call SetString() before SetURL() when we actually have a custom string.
+ // SetURL() will itself do SetString() when a string hasn't been set yet,
+ // but we want to prefer drop_data.text.string() over the URL string if it
+ // exists.
if (!drop_data.text.string().empty())
provider->SetString(drop_data.text.string());
if (drop_data.url.is_valid())
« no previous file with comments | « no previous file | ui/base/dragdrop/os_exchange_data_provider_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698