Index: chrome/browser/cocoa/web_drop_target.mm |
=================================================================== |
--- chrome/browser/cocoa/web_drop_target.mm (revision 48762) |
+++ chrome/browser/cocoa/web_drop_target.mm (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -253,10 +253,13 @@ |
base::SysNSStringToUTF16([pboard stringForType:NSStringPboardType]); |
} |
- // Get HTML. |
+ // Get HTML. If there's no HTML, try RTF. |
if ([types containsObject:NSHTMLPboardType]) { |
data->text_html = |
base::SysNSStringToUTF16([pboard stringForType:NSHTMLPboardType]); |
+ } else if ([types containsObject:NSRTFPboardType]) { |
+ NSString* html = [pboard htmlFromRtf]; |
+ data->text_html = base::SysNSStringToUTF16(html); |
} |
// Get files. |