Commit 54d2763d authored by oliver's avatar oliver
Browse files

Reviewed by Geoff.

        Fix for <rdar://problem/5223782> REGRESSION: Can't drag and drop a standalone image

        The main resource for a standalone image webarchive has the same mimetype as the
        underlying image.

        * Misc/WebNSPasteboardExtras.mm:
        (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 649a9edd
2007-05-23 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff.
Fix for <rdar://problem/5223782> REGRESSION: Can't drag and drop a standalone image
The main resource for a standalone image webarchive has the same mimetype as the
underlying image.
* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
2007-05-22 Sam Weinig <sam@webkit.org>
 
Reviewed by Adam.
......
......@@ -234,8 +234,8 @@ static NSArray *_writableTypesForImageWithArchive (void)
// or the main resource (standalone image case).
NSArray *subresources = [archive subresources];
WebResource *resource = [archive mainResource];
if (containsImage && !MimeTypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType])
&& [subresources count] > 0)
if (containsImage && [subresources count] > 0
&& MimeTypeRegistry::isSupportedImageResourceMIMEType([[subresources objectAtIndex:0] MIMEType]))
resource = (WebResource *)[subresources objectAtIndex:0];
ASSERT(resource != nil);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment