summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 22:04:45 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-15 22:04:45 +0000
commit0dc1628dd72a18561061c4200a36f351cb21921f (patch)
tree845aa47887f79a98e07192d1d6c6af42bb84c4fe /chrome/browser
parent181b2e84fb5843e5def0b0ce431b7dccd3455393 (diff)
downloadchromium_src-0dc1628dd72a18561061c4200a36f351cb21921f.zip
chromium_src-0dc1628dd72a18561061c4200a36f351cb21921f.tar.gz
chromium_src-0dc1628dd72a18561061c4200a36f351cb21921f.tar.bz2
Fix drag data population on Windows so URL data doesn't take precedence over text.
BUG=59229 TEST=Manual test using test case attached to bug 59229. Review URL: http://codereview.chromium.org/3818005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_drag_win.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/views/tab_contents/tab_contents_drag_win.cc b/chrome/browser/views/tab_contents/tab_contents_drag_win.cc
index e9c7d5f..51d8f3a 100644
--- a/chrome/browser/views/tab_contents/tab_contents_drag_win.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_drag_win.cc
@@ -286,10 +286,12 @@ void TabContentsDragWin::DoDragging(const WebDropData& drop_data,
PrepareDragForFileContents(drop_data, &data);
if (!drop_data.text_html.empty())
data.SetHtml(drop_data.text_html, drop_data.html_base_url);
- if (drop_data.url.is_valid())
- PrepareDragForUrl(drop_data, &data);
+ // We set the text contents before the URL because the URL also sets text
+ // content.
if (!drop_data.plain_text.empty())
data.SetString(drop_data.plain_text);
+ if (drop_data.url.is_valid())
+ PrepareDragForUrl(drop_data, &data);
}
// Set drag image.