2006-11-09 Oliver Hunt <oliver@apple.com>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2006 07:31:04 +0000 (07:31 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Nov 2006 07:31:04 +0000 (07:31 +0000)
commitf7b274af45ed86e92c8cc871b9f8201bb77618c4
treede055e5ecf9a37ea682b83e797ce83519886dfea
parent9c201c597d694931368ca84f7e7ee277fbce21fa
2006-11-09  Oliver Hunt  <oliver@apple.com>

        Reviewed by Brady.

        Pulled MIME type handling out of WebFrameBridge and added
        a general C++ class to store/query MIME info
        Added an Obj-C bridge to provide WebKit with access to the
        MimeTypeRegistry for non-Obj-C++ classes.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        * bridge/mac/WebMimeTypeRegistryBridge.h: Added.
        * bridge/mac/WebMimeTypeRegistryBridge.mm: Added.
        (+[WebMimeTypeRegistryBridge supportsImageWithMIMEType:]):
        (+[WebMimeTypeRegistryBridge supportsNonImageWithMIMEType:]):
        (+[WebMimeTypeRegistryBridge supportedNonImageMIMETypes]):
        (+[WebMimeTypeRegistryBridge supportedImageMIMETypes]):
        (+[WebMimeTypeRegistryBridge supportedImageResourceMIMETypes]):
        * platform/Image.cpp:
        (WebCore::Image::supportsType):
        * platform/Image.h:
        * platform/MimeTypeRegistry.cpp: Added.
        (WebCore::initialiseSupportedImageMIMETypes):
        (WebCore::initialiseSupportedNonImageMimeTypes):
        (WebCore::initialiseMimeTypeRegistry):
        (WebCore::MimeTypeRegistry::isSupportedImageMIMEType):
        (WebCore::MimeTypeRegistry::isSupportedImageResourceMIMEType):
        (WebCore::MimeTypeRegistry::isSupportedNonImageMIMEType):
        (WebCore::MimeTypeRegistry::getSupportedImageMIMETypes):
        (WebCore::MimeTypeRegistry::getSupportedImageResourceMIMETypes):
        (WebCore::MimeTypeRegistry::getSupportedNonImageMIMETypes):
        * platform/MimeTypeRegistry.h: Added.
        * platform/mac/ImageMac.mm:
        * platform/mac/MimeTypeRegistryMac.mm: Added.
        (WebCore::getMIMETypeForUTI):
        (WebCore::MimeTypeRegistry::getMIMETypeForExtension):

        Updated to make use of MimeTypeRegistry/bridge

        * Misc/WebNSPasteboardExtras.m:
        (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge determineObjectFromMIMEType:URL:]):
        * WebView/WebDataSource.mm:
        (-[WebDataSource _documentFragmentWithArchive:]):
        * WebView/WebHTMLRepresentation.m:
        (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
        (+[WebHTMLRepresentation supportedImageMIMETypes]):
        * WebView/WebHTMLView.m:
        (-[WebHTMLView _imageExistsAtPaths:]):
        (-[WebHTMLView _documentFragmentWithPaths:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/bridge/mac/WebMimeTypeRegistryBridge.h [new file with mode: 0644]
WebCore/bridge/mac/WebMimeTypeRegistryBridge.mm [new file with mode: 0644]
WebCore/platform/Image.cpp
WebCore/platform/Image.h
WebCore/platform/MimeTypeRegistry.cpp [new file with mode: 0644]
WebCore/platform/MimeTypeRegistry.h [new file with mode: 0644]
WebCore/platform/mac/ImageMac.mm
WebCore/platform/mac/MimeTypeRegistryMac.mm [new file with mode: 0644]
WebKit/ChangeLog
WebKit/Misc/WebNSPasteboardExtras.m
WebKit/WebCoreSupport/WebFrameBridge.mm
WebKit/WebView/WebDataSource.mm
WebKit/WebView/WebHTMLRepresentation.m
WebKit/WebView/WebHTMLView.m