diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 01:20:01 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-19 01:20:01 +0000 |
commit | 22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83 (patch) | |
tree | df838980effe3721bdc41b6acea356bf6352df8e /webkit/glue/webdropdata.cc | |
parent | 234ebdecf98582ca141b9066b1e5f4f74d3bdbff (diff) | |
download | chromium_src-22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83.zip chromium_src-22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83.tar.gz chromium_src-22cf8687fe6c4fc4dbb2b9b2ac41d7d45f656d83.tar.bz2 |
Remove cf_html from webdropdata.h. This is windows
specific code so we should handle it before we get
to webkit.
CF_HTML needs the source URL to resolve relative URLs
so I added that to the format and plumb it through
from webcore.
I also did some small refactoring so we only have one
implementation of converting to/from CF_HTML and regular
markup. We can tweak these converters (and add unit tests)
in follow up changes.
Review URL: http://codereview.chromium.org/11247
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webdropdata.cc')
-rw-r--r-- | webkit/glue/webdropdata.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webkit/glue/webdropdata.cc b/webkit/glue/webdropdata.cc index 28ed52d..cd96169 100644 --- a/webkit/glue/webdropdata.cc +++ b/webkit/glue/webdropdata.cc @@ -20,8 +20,11 @@ void WebDropData::PopulateWebDropData(IDataObject* data_object, } ClipboardUtil::GetFilenames(data_object, &drop_data->filenames); ClipboardUtil::GetPlainText(data_object, &drop_data->plain_text); - ClipboardUtil::GetCFHtml(data_object, &drop_data->cf_html); - ClipboardUtil::GetTextHtml(data_object, &drop_data->text_html); + std::string base_url; + ClipboardUtil::GetHtml(data_object, &drop_data->text_html, &base_url); + if (!base_url.empty()) { + drop_data->html_base_url = GURL(base_url); + } ClipboardUtil::GetFileContents(data_object, &drop_data->file_description_filename, &drop_data->file_contents); } |