| Index: ui/base/clipboard/clipboard_mac.mm
|
| diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm
|
| index f3a4c434704ca60926ab0cce3d0cf378cd9f347b..d45bcf2cc098f2e0c86a04ba3f1ca7e0bd51ced9 100644
|
| --- a/ui/base/clipboard/clipboard_mac.mm
|
| +++ b/ui/base/clipboard/clipboard_mac.mm
|
| @@ -430,17 +430,11 @@ void ClipboardMac::WriteBookmark(const char* title_data,
|
| }
|
|
|
| void ClipboardMac::WriteBitmap(const SkBitmap& bitmap) {
|
| + NSPasteboard* pb = GetPasteboard();
|
| + [pb clearContents];
|
| NSImage* image = skia::SkBitmapToNSImageWithColorSpace(
|
| bitmap, base::mac::GetSystemColorSpace());
|
| - // An API to ask the NSImage to write itself to the clipboard comes in 10.6 :(
|
| - // For now, spit out the image as a TIFF.
|
| - NSPasteboard* pb = GetPasteboard();
|
| - [pb addTypes:[NSArray arrayWithObject:NSTIFFPboardType] owner:nil];
|
| - NSData* tiff_data = [image TIFFRepresentation];
|
| - LOG_IF(ERROR, tiff_data == NULL) << "Failed to allocate image for clipboard";
|
| - if (tiff_data) {
|
| - [pb setData:tiff_data forType:NSTIFFPboardType];
|
| - }
|
| + [pb writeObjects:@[ image ]];
|
| }
|
|
|
| void ClipboardMac::WriteData(const FormatType& format,
|
|
|