diff options
-rw-r--r-- | webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp | 16 | ||||
-rw-r--r-- | webkit/port/platform/mac/PasteboardMac.mm | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp b/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp index a4eaa9f..f2a72d7 100644 --- a/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp +++ b/webkit/port/platform/chromium/MimeTypeRegistryChromium.cpp @@ -36,6 +36,22 @@ namespace WebCore { +// From MIMETypeRegistryMac.mm. PLATFORM(CG) seems wrong, this should +// probably be PLATFORM(CF), but the caller uses PLATFORM(CG). This is +// filed upstream at https://bugs.webkit.org/show_bug.cgi?id=21847. +#if PLATFORM(CG) +String getMIMETypeForUTI(const String & uti) +{ + CFStringRef utiref = uti.createCFString(); + CFStringRef mime = UTTypeCopyPreferredTagWithClass(utiref, kUTTagClassMIMEType); + String mimeType = mime; + if (mime) + CFRelease(mime); + CFRelease(utiref); + return mimeType; +} +#endif + // Returns the file extension if one is found. Does not include the dot in the // filename. E.g., 'html'. // NOTE: This does not work in the sandbox because the renderer doesn't have diff --git a/webkit/port/platform/mac/PasteboardMac.mm b/webkit/port/platform/mac/PasteboardMac.mm index c91c337..249235b 100644 --- a/webkit/port/platform/mac/PasteboardMac.mm +++ b/webkit/port/platform/mac/PasteboardMac.mm @@ -282,6 +282,7 @@ void Pasteboard::writeURL(const KURL& url, const String& titleStr, Frame* frame) #endif } +#if 0 static NSFileWrapper* fileWrapperForImage(CachedResource* resource, NSURL *url) { SharedBuffer* coreData = resource->data(); @@ -296,7 +297,6 @@ static NSFileWrapper* fileWrapperForImage(CachedResource* resource, NSURL *url) return wrapper; } -#if 0 void Pasteboard::writeFileWrapperAsRTFDAttachment(NSFileWrapper* wrapper) { NSTextAttachment *attachment = [[NSTextAttachment alloc] initWithFileWrapper:wrapper]; |