Commit 7c50d652 authored by oliver's avatar oliver

2007-04-13 Oliver Hunt <oliver@apple.com>

        Reviewed by Adam.

        Due to rdar://problem/5133910 -- WebArchives should not be constructed 
        using resource from the cache -- We may try to create a potentially 
        incorrect WebArchive when dragging an image multiple times.

        This patch retains the assertion for invalid behaviour, but adds a
        branch to make sure we don't try to do anything with the WebArchive
        in release builds.

        * Misc/WebNSPasteboardExtras.mm:
        (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f859d745
2007-04-13 Oliver Hunt <oliver@apple.com>
Reviewed by Adam.
Due to rdar://problem/5133910 -- WebArchives should not be constructed
using resource from the cache -- We may try to create a potentially
incorrect WebArchive when dragging an image multiple times.
This patch retains the assertion for invalid behaviour, but adds a
branch to make sure we don't try to do anything with the WebArchive
in release builds.
* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
2007-04-13 Timothy Hatcher <timothy@apple.com>
Reviewed by Dave Harrison.
......
......@@ -251,7 +251,8 @@ static NSArray *_writableTypesForImageWithArchive (void)
ASSERT(resource != nil);
ASSERT(MimeTypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType]));
[self _web_writeFileWrapperAsRTFDAttachment:[resource _fileWrapperRepresentation]];
if (MimeTypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType]))
[self _web_writeFileWrapperAsRTFDAttachment:[resource _fileWrapperRepresentation]];
}
if ([types containsObject:WebArchivePboardType]) {
[self setData:[archive data] forType:WebArchivePboardType];
......
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