diff options
Diffstat (limited to 'WebCore/platform/mac/PasteboardMac.mm')
-rw-r--r-- | WebCore/platform/mac/PasteboardMac.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/WebCore/platform/mac/PasteboardMac.mm b/WebCore/platform/mac/PasteboardMac.mm index de369fc..36b00f6 100644 --- a/WebCore/platform/mac/PasteboardMac.mm +++ b/WebCore/platform/mac/PasteboardMac.mm @@ -278,7 +278,7 @@ void Pasteboard::writeImage(Node* node, const KURL& url, const String& title) ASSERT(cocoaURL); ASSERT(node->renderer() && node->renderer()->isImage()); - RenderImage* renderer = static_cast<RenderImage*>(node->renderer()); + RenderImage* renderer = toRenderImage(node->renderer()); CachedImage* cachedImage = static_cast<CachedImage*>(renderer->cachedImage()); ASSERT(cachedImage); @@ -310,7 +310,7 @@ String Pasteboard::plainText(Frame* frame) NSArray *types = [m_pasteboard.get() types]; if ([types containsObject:NSStringPboardType]) - return [m_pasteboard.get() stringForType:NSStringPboardType]; + return [[m_pasteboard.get() stringForType:NSStringPboardType] precomposedStringWithCanonicalMapping]; NSAttributedString *attributedString = nil; NSString *string; @@ -320,13 +320,13 @@ String Pasteboard::plainText(Frame* frame) if (attributedString == nil && [types containsObject:NSRTFPboardType]) attributedString = [[NSAttributedString alloc] initWithRTF:[m_pasteboard.get() dataForType:NSRTFPboardType] documentAttributes:NULL]; if (attributedString != nil) { - string = [[attributedString string] copy]; + string = [[attributedString string] precomposedStringWithCanonicalMapping]; [attributedString release]; - return [string autorelease]; + return string; } if ([types containsObject:NSFilenamesPboardType]) { - string = [[m_pasteboard.get() propertyListForType:NSFilenamesPboardType] componentsJoinedByString:@"\n"]; + string = [[[m_pasteboard.get() propertyListForType:NSFilenamesPboardType] componentsJoinedByString:@"\n"] precomposedStringWithCanonicalMapping]; if (string != nil) return string; } @@ -338,7 +338,7 @@ String Pasteboard::plainText(Frame* frame) // helper code that should either be done in a separate patch or figured out in another way. string = frame->editor()->client()->userVisibleString(url); if ([string length] > 0) - return string; + return [string precomposedStringWithCanonicalMapping]; } |