[webkit-changes] cvs commit: WebKit/Misc.subproj WebNSPasteboardExtras.m

Vicki vicki at opensource.apple.com
Fri Oct 14 13:31:47 PDT 2005


vicki       05/10/14 13:31:47

  Modified:    .        ChangeLog
               Misc.subproj WebNSPasteboardExtras.m
  Log:
  	Changes by Mitz Pettel, reviewed by Maciej.
  
  	Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5029 (Assertion failure in -[NSPasteboard(WebExtras)
  	_web_writeImage:URL:title:archive:types:] when trying to drag an image from a site with no favicon)
  
          * Misc.subproj/WebNSPasteboardExtras.m:
          (-[NSPasteboard _web_writeImage:URL:title:archive:types:]): Prefer the main resource if it is an image
  
  Revision  Changes    Path
  1.3352    +10 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3351
  retrieving revision 1.3352
  diff -u -r1.3351 -r1.3352
  --- ChangeLog	13 Oct 2005 19:37:24 -0000	1.3351
  +++ ChangeLog	14 Oct 2005 20:31:39 -0000	1.3352
  @@ -1,3 +1,13 @@
  +2005-10-14  Vicki Murley  <vicki at apple.com>
  +
  +	Changes by Mitz Pettel, reviewed by Maciej.
  +
  +	Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5029 (Assertion failure in -[NSPasteboard(WebExtras) 
  +	_web_writeImage:URL:title:archive:types:] when trying to drag an image from a site with no favicon)
  +
  +        * Misc.subproj/WebNSPasteboardExtras.m:
  +        (-[NSPasteboard _web_writeImage:URL:title:archive:types:]): Prefer the main resource if it is an image
  +
   2005-10-12  Vicki Murley  <vicki at apple.com>
   
           Reviewed by Darin.
  
  
  
  1.49      +4 -2      WebKit/Misc.subproj/WebNSPasteboardExtras.m
  
  Index: WebNSPasteboardExtras.m
  ===================================================================
  RCS file: /cvs/root/WebKit/Misc.subproj/WebNSPasteboardExtras.m,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- WebNSPasteboardExtras.m	16 Aug 2005 19:03:29 -0000	1.48
  +++ WebNSPasteboardExtras.m	14 Oct 2005 20:31:46 -0000	1.49
  @@ -238,11 +238,13 @@
           if ([types containsObject:NSRTFDPboardType]) {
               // This image data is either the only subresource of an archive (HTML image case)
               // or the main resource (standalone image case).
  +            NSArray *imageTypes = [[WebImageRendererFactory sharedFactory] supportedMIMETypes];
               NSArray *subresources = [archive subresources];
  -            WebResource *resource = [subresources count] > 0 ? (WebResource *)[subresources objectAtIndex:0] : [archive mainResource];
  +            WebResource *mainResource = [archive mainResource];
  +            WebResource *resource = ![imageTypes containsObject:[mainResource MIMEType]] && [subresources count] > 0 ? (WebResource *)[subresources objectAtIndex:0] : mainResource;
               ASSERT(resource != nil);
               
  -            ASSERT([[[WebImageRendererFactory sharedFactory] supportedMIMETypes] containsObject:[resource MIMEType]]);
  +            ASSERT([imageTypes containsObject:[resource MIMEType]]);
               [self _web_writeFileWrapperAsRTFDAttachment:[resource _fileWrapperRepresentation]];
           }
           if ([types containsObject:WebArchivePboardType]) {
  
  
  



More information about the webkit-changes mailing list