Make adjustMIMETypeIfNecessary use CFNetwork directly
authorpsolanki@apple.com <psolanki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2011 00:10:38 +0000 (00:10 +0000)
committerpsolanki@apple.com <psolanki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Mar 2011 00:10:38 +0000 (00:10 +0000)
commit1fe03189e5d97d0be2b3f54c6c4520d0db6cd306
treed9ecbbb1cb2596cee2232755514ccc2257838881
parentf35588b521b59d1d67a90b42ad23390aa51fdcd6
Make adjustMIMETypeIfNecessary use CFNetwork directly
https://bugs.webkit.org/show_bug.cgi?id=55912

Reviewed by Brady Eidson.

Source/WebCore:

Convert category method [NSURLResponse adjustMIMETypeIfNecessary] to C function
WebCore::adjustMIMETypeIfNecessary() that takes a CFURLResponseRef and is functionally
identical.

Testing is covered by existing LayoutTests.

* WebCore.exp.in:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/network/mac/ResourceHandleMac.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreURLResponse.h:
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::createBinaryExtensionsSet):
(WebCore::createExtensionToMIMETypeMap):
(WebCore::mimeTypeFromUTITree):
(WebCore::adjustMIMETypeIfNecessary):

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Support for new WKSI functions.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Support for new WKSI functions.

WebKitLibraries:

Add new WKSI functions needed to implement adjustMIMETypeIfNecessary.

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceSnowLeopard.a:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebCore/platform/network/mac/WebCoreURLResponse.h
Source/WebCore/platform/network/mac/WebCoreURLResponse.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a