Changeset 19920 in webkit
- Timestamp:
- Feb 28, 2007 3:46:58 PM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r19919 r19920 1 2007-02-28 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Brady. 4 5 Fix for http://bugs.webkit.org/show_bug.cgi?id=12923 REGRESSION: 6 Assertion failure copying standalone image 7 8 * platform/mac/PasteboardMac.mm: 9 (WebCore::Pasteboard::writeImage): Use the CachedImage as the 10 resource. This makes more sense anyway. There is no need to null- 11 check the renderer or the CachedImage since we return early if 12 there is no Image* and the HitTestResult::image() function checks 13 for these things. 14 1 15 2007-02-28 Adele Peterson <adele@apple.com> 2 16 -
trunk/WebCore/platform/mac/PasteboardMac.mm
r19764 r19920 27 27 #import "Pasteboard.h" 28 28 29 #import "Cache.h"30 29 #import "CachedResource.h" 31 30 #import "CharacterNames.h" … … 40 39 #import "LoaderNSURLExtras.h" 41 40 #import "MimeTypeRegistry.h" 41 #import "RenderImage.h" 42 42 #import "RetainPtr.h" 43 43 #import "WebCoreNSStringExtras.h" … … 279 279 ASSERT(URL); 280 280 281 Node* node = result.innerNonSharedNode(); 282 if (!node) 283 return; 284 281 285 NSString *title = result.altDisplayString().isNull() ? nil : (NSString*)(result.altDisplayString()); 282 Frame* frame = result.innerNonSharedNode()->document()->frame();286 Frame* frame = node->document()->frame(); 283 287 284 288 writeURL(URL, title, frame, true); … … 286 290 [m_pasteboard declareTypes:types owner:nil]; 287 291 288 NSImage *image = (NSImage *)(result.image() ? result.image()->getNSImage() : nil); 289 ASSERT(image); 290 [m_pasteboard setData:[image TIFFRepresentation] forType:NSTIFFPboardType]; 291 292 CachedResource* imageResource = WebCore::cache()->resourceForURL(result.absoluteImageURL().url()); 292 Image* coreImage = result.image(); 293 ASSERT(coreImage); 294 if (!coreImage) 295 return; 296 [m_pasteboard setData:[coreImage->getNSImage() TIFFRepresentation] forType:NSTIFFPboardType]; 297 298 RenderImage* renderer = static_cast<RenderImage*>(node->renderer()); 299 CachedResource* imageResource = static_cast<CachedResource*>(renderer->cachedImage()); 293 300 ASSERT(imageResource); 294 301 String MIMEType = imageResource->response().mimeType();
Note: See TracChangeset
for help on using the changeset viewer.