[Win] Reduce the use of WKSI library calls: CFNetwork
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 21:43:11 +0000 (21:43 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 21:43:11 +0000 (21:43 +0000)
commit2974e399e2fab1c5ca19b40d59e2c5c93f4c42b6
tree36ac86beb2cf167163b5db56a791f61c1c9393a2
parent0d79b336e2cb3a4c6ed6e6aeafed535238e0604c
[Win] Reduce the use of WKSI library calls: CFNetwork
https://bugs.webkit.org/show_bug.cgi?id=191718
<rdar://problem/46108732>

Reviewed by Alex Christensen.

Source/WebCore:

Remove custom WKSI CFNetwork calls, since the SPI is already documented in PAL. Just
make the same calls on Windows, like we did for iOS and macOS back in 2017.

Stop including WebKitSystemInterface.h for files that used to rely on it
for font-related features.

Tested by existing Windows regression tests. There should be no change in behavior.

* platform/graphics/win/FontCacheWin.cpp:
* platform/graphics/win/FontCustomPlatformData.cpp:
* platform/graphics/win/FontPlatformDataCGWin.cpp:
* platform/network/cf/CookieStorageCFNet.cpp:
* platform/network/cf/CredentialStorageCFNet.cpp:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::createPrivateStorageSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::ensureSession):
* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::getSSLPeerCertificateData):
(WebCore::setSSLPeerCertificateData):
(WebCore::ResourceError::getSSLPeerCertificateDataBytePtr):
(WebCore::ResourceError::platformLazyInit):
(WebCore::ResourceError::cfError const):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::setClientCertificateInSSLProperties):
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cf/ResourceRequestCFNet.cpp:
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:

Source/WebCore/PAL:

Add necessary declarations for CFNetwork SPI needed by the Apple Windows build.

* pal/PlatformAppleWin.cmake:
* pal/spi/cf/CFNetworkSPI.h:
* pal/spi/cf/CFNetworkSPIWin.cpp: Added.

Source/WebKitLegacy/win:

Remove custom WKSI CFNetwork calls, since the SPI is already documented in PAL. Just
make the same calls on Windows, like we did for iOS and macOS back in 2017.

* WebCache.cpp:
(WebCache::cacheFolder):
* WebCoreSupport/WebFrameNetworkingContext.cpp:
* WebCoreSupport/WebPlatformStrategies.cpp:
* WebError.cpp:
(WebError::localizedDescription):
(WebError::sslPeerCertificate):
* WebURLResponse.cpp:
(WebURLResponse::sslPeerCertificate):
(WebURLResponse::certificateDictionary const):
* WebView.cpp:
(WebView::setCacheModel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/PlatformAppleWin.cmake
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPIWin.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/win/FontCacheWin.cpp
Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp
Source/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp
Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
Source/WebCore/platform/network/cf/ResourceError.h
Source/WebCore/platform/network/cf/ResourceErrorCF.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp
Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCache.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebFrameNetworkingContext.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKitLegacy/win/WebError.cpp
Source/WebKitLegacy/win/WebURLResponse.cpp
Source/WebKitLegacy/win/WebView.cpp