Chromium Code Reviews| Index: content/browser/web_contents/web_drag_source_mac.mm |
| diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm |
| index 2063b093599ecfdf719dc8b25583aba67d0dc94b..336d072febeeb97e147e35ba5a45642f9851bd96 100644 |
| --- a/content/browser/web_contents/web_drag_source_mac.mm |
| +++ b/content/browser/web_contents/web_drag_source_mac.mm |
| @@ -343,11 +343,6 @@ void PromiseWriterHelper(const WebDropData& drop_data, |
| declareTypes:[NSArray arrayWithObject:ui::kChromeDragDummyPboardType] |
| owner:contentsView_]; |
| - // HTML. |
| - if (!dropData_->html.string().empty()) |
| - [pasteboard_ addTypes:[NSArray arrayWithObject:NSHTMLPboardType] |
| - owner:contentsView_]; |
| - |
| // URL (and title). |
| if (dropData_->url.is_valid()) { |
| NSURL* url = [NSURL URLWithString:SysUTF8ToNSString(dropData_->url.spec())]; |
| @@ -433,6 +428,15 @@ void PromiseWriterHelper(const WebDropData& drop_data, |
| } |
| } |
| + // HTML. |
| + // Mail.app and TextEdit don't accept drops with both HTML and file content on |
| + // them <http://crbug.com/55879>. If there is both file content and HTML in |
| + // |dropData_| (as in the case of dragging an image), only provide the file |
| + // data. |
|
Nico
2012/12/23 00:08:26
How does the HTML content for just an image look?
|
| + if (!dropData_->html.string().empty() && dropData_->file_contents.empty()) |
| + [pasteboard_ addTypes:[NSArray arrayWithObject:NSHTMLPboardType] |
| + owner:contentsView_]; |
| + |
| // Plain text. |
| if (!dropData_->text.string().empty()) |
| [pasteboard_ addTypes:[NSArray arrayWithObject:NSStringPboardType] |