<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207585] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207585">207585</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2016-10-19 23:05:26 -0700 (Wed, 19 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Revert <a href="http://trac.webkit.org/projects/webkit/changeset/207151">r207151</a>
https://bugs.webkit.org/show_bug.cgi?id=163675
Reviewed by Brent Fulgham.
.:
* Source/cmake/OptionsAppleWin.cmake:
Source/WebCore:
This code is still useful for comparison with Windows. I'll remove it again soon.
No new tests. No change in behavior.
* WebCore.xcodeproj/project.pbxproj:
* WebCorePrefix.h:
* loader/DocumentLoader.h:
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
* loader/ResourceLoader.h:
* loader/SubresourceLoader.h:
* loader/cf/ResourceLoaderCFNet.cpp:
* loader/cocoa/SubresourceLoaderCocoa.mm:
(WebCore::SubresourceLoader::willCacheResponse):
* loader/mac/DocumentLoaderMac.cpp:
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::willCacheResponse):
* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::WebCoreNSURLAuthenticationChallengeClient::create):
(WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient):
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
* platform/mac/WebCoreSystemInterface.h:
* platform/network/NetworkStorageSession.h:
* platform/network/ProtectionSpace.h:
* platform/network/ProtectionSpaceBase.cpp:
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.cpp:
* platform/network/ResourceHandleClient.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/ResourceRequestBase.cpp:
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
(WebCore::AuthenticationChallenge::authenticationClient): Deleted.
(WebCore::AuthenticationChallenge::platformCompare): Deleted.
(WebCore::createCF): Deleted.
(WebCore::core): Deleted.
* platform/network/cf/AuthenticationCF.h:
* platform/network/cf/AuthenticationChallenge.h:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
(WebCore::CredentialStorage::saveToPersistentStorage):
* platform/network/cf/LoaderRunLoopCF.cpp:
* platform/network/cf/LoaderRunLoopCF.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::cookieStorage):
* platform/network/cf/ProtectionSpaceCFNet.cpp:
* platform/network/cf/ProtectionSpaceCFNet.h:
* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::shouldSniffConnectionProperty):
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::schedule):
(WebCore::ResourceHandle::unschedule):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::encodingRequiresPlatformData):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
(WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cf/ResourceRequestCFNet.h:
* platform/network/cf/ResourceResponse.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
* platform/network/cf/SynchronousLoaderClientCFNet.cpp:
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
* platform/network/cocoa/CredentialCocoa.h:
* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::Credential::Credential):
(WebCore::Credential::cfCredential):
* platform/network/cocoa/ProtectionSpaceCocoa.h:
* platform/network/cocoa/ProtectionSpaceCocoa.mm:
(WebCore::ProtectionSpace::ProtectionSpace):
(WebCore::ProtectionSpace::cfSpace):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest):
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo):
(WebCore::ResourceResponse::nsURLResponse):
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
(-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]):
(-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]):
(-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]):
(-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]):
(-[WebQuickLookHandleAsDelegate connection:didFailWithError:]):
(-[WebQuickLookHandleAsDelegate detachHandle]):
(WebCore::QuickLookHandle::create):
(WebCore::QuickLookHandle::cfResponse):
* platform/network/mac/AuthenticationMac.mm:
(-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]):
(-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]):
(WebCore::core):
(WebCore::mac):
* platform/network/mac/CookieJarMac.mm:
(WebCore::setCookiesFromDOM):
(WebCore::addCookie):
(WebCore::cookieStorage):
* platform/network/mac/CredentialStorageMac.mm:
* platform/network/mac/FormDataStreamMac.h:
* platform/network/mac/FormDataStreamMac.mm:
* platform/network/mac/ResourceErrorMac.mm:
(NSErrorFromCFError):
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::nsError):
(WebCore::ResourceError::operator NSError *):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getConnectionTimingData):
* platform/network/mac/ResourceRequestMac.mm: Added.
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateNSURLRequest):
* platform/network/mac/SynchronousLoaderClient.mm:
* platform/network/mac/WebCoreResourceHandleAsDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
* platform/network/mac/WebCoreURLResponse.mm:
* platform/win/TemporaryLinkStubs.cpp:
* testing/js/WebCoreTestSupportPrefix.h:
Source/WebKit:
* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::scheduleLoad):
Source/WebKit/mac:
* Misc/WebDownload.mm:
(-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]):
* Misc/WebDownloadInternal.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebView/WebPreferences.mm:
(+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):
* WebView/WebView.mm:
(-[WebView scheduleInRunLoop:forMode:]):
(-[WebView unscheduleFromRunLoop:forMode:]):
Source/WebKit/win:
* DefaultDownloadDelegate.h:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::savePlatformDataToCachedFrame):
* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebCoreSupport/WebFrameNetworkingContext.h:
* WebCoreSupport/WebPlatformStrategies.cpp:
* WebDownload.h:
* WebError.cpp:
(WebError::localizedDescription):
(WebError::sslPeerCertificate):
* WebError.h:
* WebMutableURLRequest.cpp:
(WebMutableURLRequest::mutableCopy):
* WebURLAuthenticationChallenge.cpp:
(WebURLAuthenticationChallenge::initWithProtectionSpace):
(WebURLAuthenticationChallenge::initWithAuthenticationChallenge):
* WebURLResponse.cpp:
(WebURLResponse::sslPeerCertificate):
* WebURLResponse.h:
* WebView.cpp:
(WebView::setCacheModel):
(WebView::canHandleRequest):
(WebView::notifyPreferencesChanged):
(updateSharedSettingsFromPreferencesIfNeeded):
Source/WebKit2:
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/mac/DownloadMac.mm:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/mac/NetworkLoadMac.mm:
(WebKit::NetworkLoad::willCacheResponseAsync):
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
* WebKit2.xcodeproj/project.pbxproj:
Source/WTF:
* wtf/Platform.h:
* wtf/SchedulePair.h:
* wtf/SchedulePairMac.mm:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfPlatformh">trunk/Source/WTF/wtf/Platform.h</a></li>
<li><a href="#trunkSourceWTFwtfSchedulePairh">trunk/Source/WTF/wtf/SchedulePair.h</a></li>
<li><a href="#trunkSourceWTFwtfSchedulePairMacmm">trunk/Source/WTF/wtf/SchedulePairMac.mm</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorePrefixh">trunk/Source/WebCore/WebCorePrefix.h</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoaderh">trunk/Source/WebCore/loader/DocumentLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientsh">trunk/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoaderClienth">trunk/Source/WebCore/loader/FrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoaderh">trunk/Source/WebCore/loader/ResourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoaderh">trunk/Source/WebCore/loader/SubresourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloadercfResourceLoaderCFNetcpp">trunk/Source/WebCore/loader/cf/ResourceLoaderCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercocoaSubresourceLoaderCocoamm">trunk/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreloadermacDocumentLoaderMaccpp">trunk/Source/WebCore/loader/mac/DocumentLoaderMac.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadermacResourceLoaderMacmm">trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm</a></li>
<li><a href="#trunkSourceWebCorepagemacPageMacmm">trunk/Source/WebCore/page/mac/PageMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh">trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkProtectionSpaceBasecpp">trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleh">trunk/Source/WebCore/platform/network/ResourceHandle.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleClienth">trunk/Source/WebCore/platform/network/ResourceHandleClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleInternalh">trunk/Source/WebCore/platform/network/ResourceHandleInternal.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBasecpp">trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfAuthenticationCFcpp">trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfAuthenticationCFh">trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfCredentialStorageCFNetcpp">trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceErrorh">trunk/Source/WebCore/platform/network/cf/ResourceError.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceErrorCFcpp">trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegatecpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegateWithOperationQueuecpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceRequesth">trunk/Source/WebCore/platform/network/cf/ResourceRequest.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceRequestCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceResponseh">trunk/Source/WebCore/platform/network/cf/ResourceResponse.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceResponseCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp">trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaCredentialCocoah">trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaCredentialCocoamm">trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoah">trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoamm">trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaResourceRequestCocoamm">trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaResourceResponseCocoamm">trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosQuickLookh">trunk/Source/WebCore/platform/network/ios/QuickLook.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosQuickLookmm">trunk/Source/WebCore/platform/network/ios/QuickLook.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm">trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacCookieJarMacmm">trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacCredentialStorageMacmm">trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacFormDataStreamMach">trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacFormDataStreamMacmm">trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceErrorMacmm">trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm">trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacSynchronousLoaderClientmm">trunk/Source/WebCore/platform/network/mac/SynchronousLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegateh">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegateh">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreURLResponsemm">trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebDownloadmm">trunk/Source/WebKit/mac/Misc/WebDownload.mm</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebDownloadInternalh">trunk/Source/WebKit/mac/Misc/WebDownloadInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesmm">trunk/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessDownloadsDownloadh">trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessDownloadsmacDownloadMacmm">trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkLoadh">trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessmacNetworkLoadMacmm">trunk/Source/WebKit2/NetworkProcess/mac/NetworkLoadMac.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedAuthenticationcocoaAuthenticationManagerCocoamm">trunk/Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParameterscpp">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParametersh">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacWebCoreArgumentCodersMacmm">trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkiosResourceHandleIOSmm">trunk/Source/WebCore/platform/network/ios/ResourceHandleIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosResourceRequestIOSmm">trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceRequestMacmm">trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/ChangeLog        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-10-19 Alex Christensen <achristensen@webkit.org>
+
+ Revert r207151
+ https://bugs.webkit.org/show_bug.cgi?id=163675
+
+ Reviewed by Brent Fulgham.
+
+ * Source/cmake/OptionsAppleWin.cmake:
+
</ins><span class="cx"> 2016-10-18 Dean Jackson <dino@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove CSS_SHAPES feature definition. This should always be on.
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WTF/ChangeLog        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-10-19 Alex Christensen <achristensen@webkit.org>
+
+ Revert r207151
+ https://bugs.webkit.org/show_bug.cgi?id=163675
+
+ Reviewed by Brent Fulgham.
+
+ * wtf/Platform.h:
+ * wtf/SchedulePair.h:
+ * wtf/SchedulePairMac.mm:
+
</ins><span class="cx"> 2016-10-19 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r207480): 3 Dromaeo tests failing
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Platform.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Platform.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WTF/wtf/Platform.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -559,6 +559,10 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">
</span><ins>+#if USE(APPLE_INTERNAL_SDK) && __IPHONE_OS_VERSION_MIN_REQUIRED < 100000
+#define USE_CFURLCONNECTION 1
+#endif
+
</ins><span class="cx"> #define HAVE_NETWORK_EXTENSION 1
</span><span class="cx"> #define HAVE_READLINE 1
</span><span class="cx"> #define USE_UIKIT_EDITING 1
</span></span></pre></div>
<a id="trunkSourceWTFwtfSchedulePairh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/SchedulePair.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/SchedulePair.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WTF/wtf/SchedulePair.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> OBJC_CLASS NSRunLoop;
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static Ref<SchedulePair> create(CFRunLoopRef runLoop, CFStringRef mode) { return adoptRef(*new SchedulePair(runLoop, mode)); }
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> static Ref<SchedulePair> create(NSRunLoop* runLoop, CFStringRef mode) { return adoptRef(*new SchedulePair(runLoop, mode)); }
</span><span class="cx"> NSRunLoop* nsRunLoop() const { return m_nsRunLoop.get(); }
</span><span class="cx"> #endif
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> m_mode = adoptCF(CFStringCreateCopy(0, mode));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> WTF_EXPORT_PRIVATE SchedulePair(NSRunLoop*, CFStringRef);
</span><span class="cx"> RetainPtr<NSRunLoop*> m_nsRunLoop;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWTFwtfSchedulePairMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/SchedulePairMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/SchedulePairMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WTF/wtf/SchedulePairMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -29,6 +29,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "SchedulePair.h"
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> namespace WTF {
</span><span class="cx">
</span><span class="cx"> SchedulePair::SchedulePair(NSRunLoop* runLoop, CFStringRef mode)
</span><span class="lines">@@ -40,3 +42,5 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace
</span><ins>+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/ChangeLog        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1,3 +1,161 @@
</span><ins>+2016-10-19 Alex Christensen <achristensen@webkit.org>
+
+ Revert r207151
+ https://bugs.webkit.org/show_bug.cgi?id=163675
+
+ Reviewed by Brent Fulgham.
+
+ This code is still useful for comparison with Windows. I'll remove it again soon.
+
+ No new tests. No change in behavior.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * WebCorePrefix.h:
+ * loader/DocumentLoader.h:
+ * loader/EmptyClients.h:
+ * loader/FrameLoaderClient.h:
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
+ * loader/ResourceLoader.h:
+ * loader/SubresourceLoader.h:
+ * loader/cf/ResourceLoaderCFNet.cpp:
+ * loader/cocoa/SubresourceLoaderCocoa.mm:
+ (WebCore::SubresourceLoader::willCacheResponse):
+ * loader/mac/DocumentLoaderMac.cpp:
+ * loader/mac/ResourceLoaderMac.mm:
+ (WebCore::ResourceLoader::willCacheResponse):
+ * page/mac/PageMac.mm:
+ (WebCore::Page::platformInitialize):
+ (WebCore::Page::addSchedulePair):
+ (WebCore::Page::removeSchedulePair):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::WebCoreNSURLAuthenticationChallengeClient::create):
+ (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient):
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
+ * platform/mac/WebCoreSystemInterface.h:
+ * platform/network/NetworkStorageSession.h:
+ * platform/network/ProtectionSpace.h:
+ * platform/network/ProtectionSpaceBase.cpp:
+ * platform/network/ResourceHandle.cpp:
+ * platform/network/ResourceHandle.h:
+ * platform/network/ResourceHandleClient.cpp:
+ * platform/network/ResourceHandleClient.h:
+ * platform/network/ResourceHandleInternal.h:
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal):
+ * platform/network/ResourceRequestBase.cpp:
+ * platform/network/cf/AuthenticationCF.cpp:
+ (WebCore::AuthenticationChallenge::AuthenticationChallenge):
+ (WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
+ (WebCore::AuthenticationChallenge::authenticationClient): Deleted.
+ (WebCore::AuthenticationChallenge::platformCompare): Deleted.
+ (WebCore::createCF): Deleted.
+ (WebCore::core): Deleted.
+ * platform/network/cf/AuthenticationCF.h:
+ * platform/network/cf/AuthenticationChallenge.h:
+ * platform/network/cf/CookieJarCFNet.cpp:
+ * platform/network/cf/CredentialStorageCFNet.cpp:
+ (WebCore::CredentialStorage::getFromPersistentStorage):
+ (WebCore::CredentialStorage::saveToPersistentStorage):
+ * platform/network/cf/LoaderRunLoopCF.cpp:
+ * platform/network/cf/LoaderRunLoopCF.h:
+ * platform/network/cf/NetworkStorageSessionCFNet.cpp:
+ (WebCore::NetworkStorageSession::cookieStorage):
+ * platform/network/cf/ProtectionSpaceCFNet.cpp:
+ * platform/network/cf/ProtectionSpaceCFNet.h:
+ * platform/network/cf/ResourceError.h:
+ * platform/network/cf/ResourceErrorCF.cpp:
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::shouldSniffConnectionProperty):
+ (WebCore::ResourceHandle::createCFURLConnection):
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
+ (WebCore::ResourceHandle::receivedCredential):
+ (WebCore::ResourceHandle::schedule):
+ (WebCore::ResourceHandle::unschedule):
+ * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
+ * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
+ * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
+ (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
+ (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
+ (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
+ * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
+ * platform/network/cf/ResourceRequest.h:
+ (WebCore::ResourceRequest::encodingRequiresPlatformData):
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
+ (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
+ (WebCore::ResourceRequest::doUpdatePlatformRequest):
+ (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
+ (WebCore::ResourceRequest::doUpdateResourceRequest):
+ (WebCore::ResourceRequest::setStorageSession):
+ * platform/network/cf/ResourceRequestCFNet.h:
+ * platform/network/cf/ResourceResponse.h:
+ * platform/network/cf/ResourceResponseCFNet.cpp:
+ (WebCore::ResourceResponse::cfURLResponse):
+ * platform/network/cf/SynchronousLoaderClientCFNet.cpp:
+ * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
+ * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
+ * platform/network/cocoa/CredentialCocoa.h:
+ * platform/network/cocoa/CredentialCocoa.mm:
+ (WebCore::Credential::Credential):
+ (WebCore::Credential::cfCredential):
+ * platform/network/cocoa/ProtectionSpaceCocoa.h:
+ * platform/network/cocoa/ProtectionSpaceCocoa.mm:
+ (WebCore::ProtectionSpace::ProtectionSpace):
+ (WebCore::ProtectionSpace::cfSpace):
+ * platform/network/cocoa/ResourceRequestCocoa.mm:
+ (WebCore::ResourceRequest::nsURLRequest):
+ * platform/network/cocoa/ResourceResponseCocoa.mm:
+ (WebCore::ResourceResponse::platformCertificateInfo):
+ (WebCore::ResourceResponse::nsURLResponse):
+ (WebCore::ResourceResponse::ResourceResponse):
+ * platform/network/ios/QuickLook.h:
+ * platform/network/ios/QuickLook.mm:
+ (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]):
+ (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]):
+ (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]):
+ (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]):
+ (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]):
+ (-[WebQuickLookHandleAsDelegate detachHandle]):
+ (WebCore::QuickLookHandle::create):
+ (WebCore::QuickLookHandle::cfResponse):
+ * platform/network/mac/AuthenticationMac.mm:
+ (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]):
+ (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]):
+ (WebCore::core):
+ (WebCore::mac):
+ * platform/network/mac/CookieJarMac.mm:
+ (WebCore::setCookiesFromDOM):
+ (WebCore::addCookie):
+ (WebCore::cookieStorage):
+ * platform/network/mac/CredentialStorageMac.mm:
+ * platform/network/mac/FormDataStreamMac.h:
+ * platform/network/mac/FormDataStreamMac.mm:
+ * platform/network/mac/ResourceErrorMac.mm:
+ (NSErrorFromCFError):
+ (WebCore::ResourceError::ResourceError):
+ (WebCore::ResourceError::nsError):
+ (WebCore::ResourceError::operator NSError *):
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::getConnectionTimingData):
+ * platform/network/mac/ResourceRequestMac.mm: Added.
+ (WebCore::ResourceRequest::ResourceRequest):
+ (WebCore::ResourceRequest::updateNSURLRequest):
+ * platform/network/mac/SynchronousLoaderClient.mm:
+ * platform/network/mac/WebCoreResourceHandleAsDelegate.h:
+ * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
+ * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
+ * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+ * platform/network/mac/WebCoreURLResponse.mm:
+ * platform/win/TemporaryLinkStubs.cpp:
+ * testing/js/WebCoreTestSupportPrefix.h:
+
</ins><span class="cx"> 2016-10-19 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r206025): All YouTube videos play with black bars on all four sides
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -2042,6 +2042,7 @@
</span><span class="cx">                 514C764F0CE9234E007EF3CD /* FormDataStreamMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76450CE9234E007EF3CD /* FormDataStreamMac.mm */; };
</span><span class="cx">                 514C76500CE9234E007EF3CD /* ResourceErrorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76460CE9234E007EF3CD /* ResourceErrorMac.mm */; };
</span><span class="cx">                 514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */; };
</span><ins>+                514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */; };
</ins><span class="cx">                 514C766D0CE923A1007EF3CD /* CredentialBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76580CE923A1007EF3CD /* CredentialBase.cpp */; };
</span><span class="cx">                 514C766E0CE923A1007EF3CD /* Credential.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76590CE923A1007EF3CD /* Credential.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 514C766F0CE923A1007EF3CD /* FormData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C765A0CE923A1007EF3CD /* FormData.cpp */; };
</span><span class="lines">@@ -2828,6 +2829,7 @@
</span><span class="cx">                 7D4C96DD1AD4483500365A50 /* JSFetchHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D4C96D91AD4483500365A50 /* JSFetchHeaders.h */; };
</span><span class="cx">                 7D741BDA177226AA00859170 /* CSSValueKeywords.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 6565814809D13043000E61D7 /* CSSValueKeywords.h */; };
</span><span class="cx">                 7E37EF2E1339208800B29250 /* SubresourceLoaderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */; };
</span><ins>+                7E428CE513E3407F003B661C /* ResourceHandleIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */; };
</ins><span class="cx">                 7E46F6FA1627A2CA00062223 /* JSOESElementIndexUint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */; };
</span><span class="cx">                 7E46F6FB1627A2CA00062223 /* JSOESElementIndexUint.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */; };
</span><span class="cx">                 7E474E1E12494DC900235364 /* SQLiteDatabaseTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2845,6 +2847,7 @@
</span><span class="cx">                 7E66E23416D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E66E23216D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h */; };
</span><span class="cx">                 7E66E23417E6EB6C00F7E7FF /* WebGLCompressedTexturePVRTC.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E66E23217E6EB6C00F7E7FF /* WebGLCompressedTexturePVRTC.h */; };
</span><span class="cx">                 7E7DE1FD195CEF260035363B /* ResourceRequestCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E7DE1FC195CEF260035363B /* ResourceRequestCocoa.mm */; };
</span><ins>+                7E7DE202195CEFCD0035363B /* ResourceRequestIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E7DE201195CEFCD0035363B /* ResourceRequestIOS.mm */; };
</ins><span class="cx">                 7E8FADC4199A95B100714968 /* SubresourceLoaderCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E8FADC3199A95B100714968 /* SubresourceLoaderCocoa.mm */; };
</span><span class="cx">                 7E99AF510B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */; };
</span><span class="cx">                 7E99AF530B13846468FB01A5 /* WindowFocusAllowedIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2865,6 +2868,7 @@
</span><span class="cx">                 7EE6846912D26E3800E79415 /* LoaderRunLoopCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845612D26E3800E79415 /* LoaderRunLoopCF.h */; };
</span><span class="cx">                 7EE6846A12D26E3800E79415 /* ResourceError.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845712D26E3800E79415 /* ResourceError.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7EE6846B12D26E3800E79415 /* ResourceErrorCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6845812D26E3800E79415 /* ResourceErrorCF.cpp */; };
</span><ins>+                7EE6846C12D26E3800E79415 /* ResourceHandleCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6845912D26E3800E79415 /* ResourceHandleCFNet.cpp */; };
</ins><span class="cx">                 7EE6846D12D26E3800E79415 /* ResourceRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845A12D26E3800E79415 /* ResourceRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7EE6846E12D26E3800E79415 /* ResourceRequestCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6845B12D26E3800E79415 /* ResourceRequestCFNet.cpp */; };
</span><span class="cx">                 7EE6846F12D26E3800E79415 /* ResourceRequestCFNet.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6845C12D26E3800E79415 /* ResourceRequestCFNet.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -9108,6 +9112,7 @@
</span><span class="cx">                 514C76450CE9234E007EF3CD /* FormDataStreamMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FormDataStreamMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 514C76460CE9234E007EF3CD /* ResourceErrorMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceErrorMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleMac.mm; sourceTree = "<group>"; };
</span><ins>+                514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestMac.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 514C76580CE923A1007EF3CD /* CredentialBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CredentialBase.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 514C76590CE923A1007EF3CD /* Credential.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Credential.h; sourceTree = "<group>"; };
</span><span class="cx">                 514C765A0CE923A1007EF3CD /* FormData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormData.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -10102,6 +10107,7 @@
</span><span class="cx">                 7D4C96D81AD4483500365A50 /* JSFetchHeaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFetchHeaders.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7D4C96D91AD4483500365A50 /* JSFetchHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFetchHeaders.h; sourceTree = "<group>"; };
</span><span class="cx">                 7E37EF2D1339208800B29250 /* SubresourceLoaderCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubresourceLoaderCF.cpp; sourceTree = "<group>"; };
</span><ins>+                7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceHandleIOS.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESElementIndexUint.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESElementIndexUint.h; sourceTree = "<group>"; };
</span><span class="cx">                 7E474E1B12494DC900235364 /* SQLiteDatabaseTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteDatabaseTrackerClient.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -10119,6 +10125,7 @@
</span><span class="cx">                 7E66E23216D6EB6C00F7E7FF /* WebGLCompressedTextureATC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLCompressedTextureATC.h; sourceTree = "<group>"; };
</span><span class="cx">                 7E66E23217E6EB6C00F7E7FF /* WebGLCompressedTexturePVRTC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLCompressedTexturePVRTC.h; sourceTree = "<group>"; };
</span><span class="cx">                 7E7DE1FC195CEF260035363B /* ResourceRequestCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestCocoa.mm; sourceTree = "<group>"; };
</span><ins>+                7E7DE201195CEFCD0035363B /* ResourceRequestIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ResourceRequestIOS.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 7E8FADC3199A95B100714968 /* SubresourceLoaderCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SubresourceLoaderCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 7E99AF520B13846468FB01A5 /* WindowFocusAllowedIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowFocusAllowedIndicator.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7E99AF540B13846468FB01A5 /* WindowFocusAllowedIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowFocusAllowedIndicator.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -10141,6 +10148,7 @@
</span><span class="cx">                 7EE6845612D26E3800E79415 /* LoaderRunLoopCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderRunLoopCF.h; sourceTree = "<group>"; };
</span><span class="cx">                 7EE6845712D26E3800E79415 /* ResourceError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceError.h; sourceTree = "<group>"; };
</span><span class="cx">                 7EE6845812D26E3800E79415 /* ResourceErrorCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceErrorCF.cpp; sourceTree = "<group>"; };
</span><ins>+                7EE6845912D26E3800E79415 /* ResourceHandleCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceHandleCFNet.cpp; sourceTree = "<group>"; };
</ins><span class="cx">                 7EE6845A12D26E3800E79415 /* ResourceRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceRequest.h; sourceTree = "<group>"; };
</span><span class="cx">                 7EE6845B12D26E3800E79415 /* ResourceRequestCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceRequestCFNet.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7EE6845C12D26E3800E79415 /* ResourceRequestCFNet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceRequestCFNet.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -16390,6 +16398,8 @@
</span><span class="cx">                                 442AF7A7102CDDEA008FD4D3 /* QuickLook.h */,
</span><span class="cx">                                 442AF7A8102CDDEA008FD4D3 /* QuickLook.mm */,
</span><span class="cx">                                 A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */,
</span><ins>+                                7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */,
+                                7E7DE201195CEFCD0035363B /* ResourceRequestIOS.mm */,
</ins><span class="cx">                                 44A20DB80F84166C00B3E1FE /* WebCoreURLResponseIOS.h */,
</span><span class="cx">                                 444D4E210F708B2E003158E0 /* WebCoreURLResponseIOS.mm */,
</span><span class="cx">                         );
</span><span class="lines">@@ -17302,6 +17312,7 @@
</span><span class="cx">                                 1A7FA6470DDA3CBA0028F8A5 /* NetworkStateNotifierMac.cpp */,
</span><span class="cx">                                 514C76460CE9234E007EF3CD /* ResourceErrorMac.mm */,
</span><span class="cx">                                 514C76470CE9234E007EF3CD /* ResourceHandleMac.mm */,
</span><ins>+                                514C76490CE9234E007EF3CD /* ResourceRequestMac.mm */,
</ins><span class="cx">                                 E180811416FCF9CB00B80D07 /* SynchronousLoaderClient.mm */,
</span><span class="cx">                                 1FAFBF1615A5FA5200083A20 /* UTIUtilities.h */,
</span><span class="cx">                                 1FAFBF1715A5FA5200083A20 /* UTIUtilities.mm */,
</span><span class="lines">@@ -21340,6 +21351,7 @@
</span><span class="cx">                                 1AF8E1C1125673E000230FF7 /* ProxyServerCFNet.cpp */,
</span><span class="cx">                                 7EE6845712D26E3800E79415 /* ResourceError.h */,
</span><span class="cx">                                 7EE6845812D26E3800E79415 /* ResourceErrorCF.cpp */,
</span><ins>+                                7EE6845912D26E3800E79415 /* ResourceHandleCFNet.cpp */,
</ins><span class="cx">                                 26FAE4C81852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp */,
</span><span class="cx">                                 26FAE4C91852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.h */,
</span><span class="cx">                                 26C15CF41857E15D00F15C03 /* ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp */,
</span><span class="lines">@@ -30296,9 +30308,11 @@
</span><span class="cx">                                 7EE6846B12D26E3800E79415 /* ResourceErrorCF.cpp in Sources */,
</span><span class="cx">                                 514C76500CE9234E007EF3CD /* ResourceErrorMac.mm in Sources */,
</span><span class="cx">                                 514C76780CE923A1007EF3CD /* ResourceHandle.cpp in Sources */,
</span><ins>+                                7EE6846C12D26E3800E79415 /* ResourceHandleCFNet.cpp in Sources */,
</ins><span class="cx">                                 26FAE4CC1852E3A5004C8C46 /* ResourceHandleCFURLConnectionDelegate.cpp in Sources */,
</span><span class="cx">                                 26C15CF61857E15D00F15C03 /* ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp in Sources */,
</span><span class="cx">                                 E1BA003116FB92AC00BA7A35 /* ResourceHandleClient.cpp in Sources */,
</span><ins>+                                7E428CE513E3407F003B661C /* ResourceHandleIOS.mm in Sources */,
</ins><span class="cx">                                 514C76510CE9234E007EF3CD /* ResourceHandleMac.mm in Sources */,
</span><span class="cx">                                 93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */,
</span><span class="cx">                                 7EE6847512D26E7000E79415 /* ResourceLoaderCFNet.cpp in Sources */,
</span><span class="lines">@@ -30311,6 +30325,8 @@
</span><span class="cx">                                 514C767C0CE923A1007EF3CD /* ResourceRequestBase.cpp in Sources */,
</span><span class="cx">                                 7EE6846E12D26E3800E79415 /* ResourceRequestCFNet.cpp in Sources */,
</span><span class="cx">                                 7E7DE1FD195CEF260035363B /* ResourceRequestCocoa.mm in Sources */,
</span><ins>+                                7E7DE202195CEFCD0035363B /* ResourceRequestIOS.mm in Sources */,
+                                514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */,
</ins><span class="cx">                                 514C767E0CE923A1007EF3CD /* ResourceResponseBase.cpp in Sources */,
</span><span class="cx">                                 7EE6847112D26E3800E79415 /* ResourceResponseCFNet.cpp in Sources */,
</span><span class="cx">                                 A1F78D0C1C25424C00245446 /* ResourceResponseCocoa.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorePrefixh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCorePrefix.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCorePrefix.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/WebCorePrefix.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -151,16 +151,14 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #include <windows.h>
</span><del>-
-#elif !PLATFORM(IOS)
-
</del><ins>+#else
+#if !PLATFORM(IOS)
</ins><span class="cx"> #include <CoreServices/CoreServices.h>
</span><ins>+#endif // !PLATFORM(IOS)
+#endif // OS(WINDOWS)
</ins><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-
-#endif
-
</del><span class="cx"> #ifdef __OBJC__
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #import <Foundation/Foundation.h>
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/DocumentLoader.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> #include "QuickLook.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> #include <wtf/SchedulePair.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx"> WEBCORE_EXPORT void setTitle(const StringWithDirection&);
</span><span class="cx"> const String& overrideEncoding() const { return m_overrideEncoding; }
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> void schedule(SchedulePair&);
</span><span class="cx"> void unschedule(SchedulePair&);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/EmptyClients.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -403,7 +403,7 @@
</span><span class="cx"> RemoteAXObjectRef accessibilityRemoteObject() override { return nullptr; }
</span><span class="cx"> NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long, NSCachedURLResponse* response) const override { return response; }
</span><span class="cx"> #endif
</span><del>-#if USE(CFURLCONNECTION)
</del><ins>+#if PLATFORM(WIN) && USE(CFURLCONNECTION)
</ins><span class="cx"> // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
</span><span class="cx"> bool shouldCacheResponse(DocumentLoader*, unsigned long, const ResourceResponse&, const unsigned char*, unsigned long long) override { return true; }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoaderClient.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx"> virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const = 0;
</span><span class="cx"> virtual NSDictionary *dataDetectionContext() { return nullptr; }
</span><span class="cx"> #endif
</span><del>-#if USE(CFURLCONNECTION)
</del><ins>+#if PLATFORM(WIN) && USE(CFURLCONNECTION)
</ins><span class="cx"> // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
</span><span class="cx"> virtual bool shouldCacheResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&, const unsigned char* data, unsigned long long length) = 0;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -741,7 +741,7 @@
</span><span class="cx"> cancel();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx">
</span><span class="cx"> void ResourceLoader::schedule(SchedulePair& pair)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/ResourceLoader.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">
</span><span class="cx"> const LoadTiming& loadTiming() { return m_loadTiming; }
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> void schedule(WTF::SchedulePair&);
</span><span class="cx"> void unschedule(WTF::SchedulePair&);
</span><span class="cx"> #endif
</span><span class="lines">@@ -163,9 +163,12 @@
</span><span class="cx">
</span><span class="cx"> const ResourceLoaderOptions& options() { return m_options; }
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> NSCachedURLResponse* willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(COCOA) && USE(CFURLCONNECTION)
+ CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
+#endif
</ins><span class="cx">
</span><span class="cx"> virtual void willSendRequestInternal(ResourceRequest&, const ResourceResponse& redirectResponse);
</span><span class="cx">
</span><span class="lines">@@ -205,7 +208,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> RetainPtr<CFDictionaryRef> connectionProperties(ResourceHandle*) override;
</span><span class="cx"> #endif
</span><del>-#if USE(CFURLCONNECTION)
</del><ins>+#if PLATFORM(WIN) && USE(CFURLCONNECTION)
</ins><span class="cx"> // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
</span><span class="cx"> bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/SubresourceLoader.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -74,9 +74,12 @@
</span><span class="cx"> void willCancel(const ResourceError&) override;
</span><span class="cx"> void didCancel(const ResourceError&) override;
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse*) override;
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(COCOA) && USE(CFURLCONNECTION)
+ CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef) override;
+#endif
</ins><span class="cx">
</span><span class="cx"> #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
</span><span class="cx"> bool supportsDataArray() override { return true; }
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercfResourceLoaderCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cf/ResourceLoaderCFNet.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cf/ResourceLoaderCFNet.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/cf/ResourceLoaderCFNet.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if PLATFORM(WIN)
+
</ins><span class="cx"> bool ResourceLoader::shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef cachedResponse)
</span><span class="cx"> {
</span><span class="cx"> if (m_options.sendLoadCallbacks == DoNotSendCallbacks)
</span><span class="lines">@@ -43,6 +45,8 @@
</span><span class="cx"> return frameLoader()->client().shouldCacheResponse(documentLoader(), identifier(), response, CFDataGetBytePtr(data), CFDataGetLength(data));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // USE(CFURLCONNECTION)
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercocoaSubresourceLoaderCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/cocoa/SubresourceLoaderCocoa.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -35,6 +35,18 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+
+CFCachedURLResponseRef SubresourceLoader::willCacheResponse(ResourceHandle* handle, CFCachedURLResponseRef cachedResponse)
+{
+ DiskCacheMonitor::monitorFileBackingStoreCreation(request(), m_resource->sessionID(), cachedResponse);
+ if (!m_resource->shouldCacheResponse(CFCachedURLResponseGetWrappedResponse(cachedResponse)))
+ return nullptr;
+ return ResourceLoader::willCacheResponse(handle, cachedResponse);
+}
+
+#else
+
</ins><span class="cx"> NSCachedURLResponse* SubresourceLoader::willCacheResponse(ResourceHandle* handle, NSCachedURLResponse* response)
</span><span class="cx"> {
</span><span class="cx"> DiskCacheMonitor::monitorFileBackingStoreCreation(request(), m_resource->sessionID(), [response _CFCachedURLResponse]);
</span><span class="lines">@@ -43,4 +55,6 @@
</span><span class="cx"> return ResourceLoader::willCacheResponse(handle, response);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreloadermacDocumentLoaderMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/mac/DocumentLoaderMac.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/mac/DocumentLoaderMac.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/mac/DocumentLoaderMac.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> static void scheduleAll(const ResourceLoaderMap& loaders, SchedulePair& pair)
</span><span class="cx"> {
</span><span class="cx"> Vector<RefPtr<ResourceLoader>> loadersCopy;
</span><span class="lines">@@ -67,4 +69,6 @@
</span><span class="cx"> unscheduleAll(m_multipartSubresourceLoaders, pair);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloadermacResourceLoaderMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -36,6 +36,19 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+
+CFCachedURLResponseRef ResourceLoader::willCacheResponse(ResourceHandle*, CFCachedURLResponseRef cachedResponse)
+{
+ if (m_options.sendLoadCallbacks == DoNotSendCallbacks)
+ return nullptr;
+
+ RetainPtr<NSCachedURLResponse> nsCachedResponse = adoptNS([[NSCachedURLResponse alloc] _initWithCFCachedURLResponse:cachedResponse]);
+ return [frameLoader()->client().willCacheResponse(documentLoader(), identifier(), nsCachedResponse.get()) _CFCachedURLResponse];
+}
+
+#else
+
</ins><span class="cx"> NSCachedURLResponse* ResourceLoader::willCacheResponse(ResourceHandle*, NSCachedURLResponse* response)
</span><span class="cx"> {
</span><span class="cx"> if (m_options.sendLoadCallbacks == DoNotSendCallbacks)
</span><span class="lines">@@ -43,6 +56,8 @@
</span><span class="cx"> return frameLoader()->client().willCacheResponse(documentLoader(), identifier(), response);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
</span><span class="cx">
</span><span class="cx"> void ResourceLoader::didReceiveDataArray(CFArrayRef dataArray)
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/PageMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/mac/PageMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/page/mac/PageMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -45,7 +45,11 @@
</span><span class="cx"> void Page::platformInitialize()
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS)
</span><ins>+#if USE(CFURLCONNECTION)
+ addSchedulePair(SchedulePair::create(WebThreadRunLoop(), kCFRunLoopCommonModes));
+#else
</ins><span class="cx"> addSchedulePair(SchedulePair::create(WebThreadNSRunLoop(), kCFRunLoopCommonModes));
</span><ins>+#endif // USE(CFURLCONNECTION)
</ins><span class="cx"> #else
</span><span class="cx"> addSchedulePair(SchedulePair::create([NSRunLoop currentRunLoop], kCFRunLoopCommonModes));
</span><span class="cx"> #endif
</span><span class="lines">@@ -65,6 +69,7 @@
</span><span class="cx"> m_scheduledRunLoopPairs = std::make_unique<SchedulePairHashSet>();
</span><span class="cx"> m_scheduledRunLoopPairs->add(pair.ptr());
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> for (Frame* frame = &m_mainFrame.get(); frame; frame = frame->tree().traverseNext()) {
</span><span class="cx"> if (DocumentLoader* documentLoader = frame->loader().documentLoader())
</span><span class="cx"> documentLoader->schedule(pair);
</span><span class="lines">@@ -71,6 +76,7 @@
</span><span class="cx"> if (DocumentLoader* documentLoader = frame->loader().provisionalDocumentLoader())
</span><span class="cx"> documentLoader->schedule(pair);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> // FIXME: make SharedTimerMac use these SchedulePairs.
</span><span class="cx"> }
</span><span class="lines">@@ -83,6 +89,7 @@
</span><span class="cx">
</span><span class="cx"> m_scheduledRunLoopPairs->remove(pair.ptr());
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> for (Frame* frame = &m_mainFrame.get(); frame; frame = frame->tree().traverseNext()) {
</span><span class="cx"> if (DocumentLoader* documentLoader = frame->loader().documentLoader())
</span><span class="cx"> documentLoader->unschedule(pair);
</span><span class="lines">@@ -89,6 +96,7 @@
</span><span class="cx"> if (DocumentLoader* documentLoader = frame->loader().provisionalDocumentLoader())
</span><span class="cx"> documentLoader->unschedule(pair);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateAVFoundationObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -109,6 +109,10 @@
</span><span class="cx"> #import <VideoToolbox/VideoToolbox.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#include "CFNSURLConnectionSPI.h"
+#endif
+
</ins><span class="cx"> #import "CoreVideoSoftLink.h"
</span><span class="cx">
</span><span class="cx"> namespace std {
</span><span class="lines">@@ -368,6 +372,58 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+class WebCoreNSURLAuthenticationChallengeClient : public RefCounted<WebCoreNSURLAuthenticationChallengeClient>, public AuthenticationClient {
+public:
+ static RefPtr<WebCoreNSURLAuthenticationChallengeClient> create(NSURLAuthenticationChallenge *challenge)
+ {
+ return adoptRef(new WebCoreNSURLAuthenticationChallengeClient(challenge));
+ }
+
+ using RefCounted<WebCoreNSURLAuthenticationChallengeClient>::ref;
+ using RefCounted<WebCoreNSURLAuthenticationChallengeClient>::deref;
+
+private:
+ WebCoreNSURLAuthenticationChallengeClient(NSURLAuthenticationChallenge *challenge)
+ : m_challenge(challenge)
+ {
+ ASSERT(m_challenge);
+ }
+
+ void refAuthenticationClient() override { ref(); }
+ void derefAuthenticationClient() override { deref(); }
+
+ void receivedCredential(const AuthenticationChallenge&, const Credential& credential) override
+ {
+ [[m_challenge sender] useCredential:credential.nsCredential() forAuthenticationChallenge:m_challenge.get()];
+ }
+
+ void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&) override
+ {
+ [[m_challenge sender] continueWithoutCredentialForAuthenticationChallenge:m_challenge.get()];
+ }
+
+ void receivedCancellation(const AuthenticationChallenge&) override
+ {
+ [[m_challenge sender] cancelAuthenticationChallenge:m_challenge.get()];
+ }
+
+ void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) override
+ {
+ if ([[m_challenge sender] respondsToSelector:@selector(performDefaultHandlingForAuthenticationChallenge:)])
+ [[m_challenge sender] performDefaultHandlingForAuthenticationChallenge:m_challenge.get()];
+ }
+
+ void receivedChallengeRejection(const AuthenticationChallenge&) override
+ {
+ if ([[m_challenge sender] respondsToSelector:@selector(rejectProtectionSpaceAndContinueWithChallenge:)])
+ [[m_challenge sender] rejectProtectionSpaceAndContinueWithChallenge:m_challenge.get()];
+ }
+
+ RetainPtr<NSURLAuthenticationChallenge> m_challenge;
+};
+#endif
+
</ins><span class="cx"> void MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(MediaEngineRegistrar registrar)
</span><span class="cx"> {
</span><span class="cx"> if (!isAvailable())
</span><span class="lines">@@ -1741,7 +1797,15 @@
</span><span class="cx">
</span><span class="cx"> bool MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge(NSURLAuthenticationChallenge* nsChallenge)
</span><span class="cx"> {
</span><del>- return player()->shouldWaitForResponseToAuthenticationChallenge(AuthenticationChallenge(nsChallenge));
</del><ins>+#if USE(CFURLCONNECTION)
+ RefPtr<WebCoreNSURLAuthenticationChallengeClient> client = WebCoreNSURLAuthenticationChallengeClient::create(nsChallenge);
+ RetainPtr<CFURLAuthChallengeRef> cfChallenge = adoptCF([nsChallenge _createCFAuthChallenge]);
+ AuthenticationChallenge challenge(cfChallenge.get(), client.get());
+#else
+ AuthenticationChallenge challenge(nsChallenge);
+#endif
+
+ return player()->shouldWaitForResponseToAuthenticationChallenge(challenge);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest(AVAssetResourceLoadingRequest* avRequest)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebCoreSystemInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -77,6 +77,14 @@
</span><span class="cx"> #include <CoreGraphics/CoreGraphics.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
+typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
+typedef struct _CFURLCredential* WKCFURLCredentialRef;
+typedef struct _CFURLRequest* CFMutableURLRequestRef;
+typedef const struct _CFURLRequest* CFURLRequestRef;
+#endif
+
</ins><span class="cx"> OBJC_CLASS AVAsset;
</span><span class="cx"> OBJC_CLASS AVPlayer;
</span><span class="cx"> OBJC_CLASS CALayer;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkProtectionSpaceBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -27,6 +27,11 @@
</span><span class="cx">
</span><span class="cx"> #include "ProtectionSpace.h"
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION) && !PLATFORM(COCOA)
+#include "AuthenticationCF.h"
+#include <CFNetwork/CFURLProtectionSpacePriv.h>
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> // Need to enforce empty, non-null strings due to the pickiness of the String == String operator
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandle.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandle.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> bool canAuthenticateAgainstProtectionSpace(const ProtectionSpace&);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> WEBCORE_EXPORT NSURLConnection *connection() const;
</span><span class="cx"> id makeDelegate(bool);
</span><span class="cx"> id delegate();
</span><span class="lines">@@ -127,8 +127,12 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA) && ENABLE(WEB_TIMING)
</span><ins>+#if USE(CFURLCONNECTION)
+ static void getConnectionTimingData(CFURLConnectionRef, NetworkLoadTiming&);
+#else
</ins><span class="cx"> static void getConnectionTimingData(NSURLConnection *, NetworkLoadTiming&);
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> void schedule(WTF::SchedulePair&);
</span><span class="lines">@@ -201,7 +205,7 @@
</span><span class="cx"> #if USE(CFURLCONNECTION)
</span><span class="cx"> WEBCORE_EXPORT void continueWillCacheResponse(CFCachedURLResponseRef);
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> WEBCORE_EXPORT void continueWillCacheResponse(NSCachedURLResponse *);
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -221,6 +225,10 @@
</span><span class="cx"> WEBCORE_EXPORT static CFStringRef synchronousLoadRunLoopMode();
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS) && USE(CFURLCONNECTION)
+ static CFMutableDictionaryRef createSSLPropertiesFromNSURLRequest(const ResourceRequest&);
+#endif
+
</ins><span class="cx"> typedef Ref<ResourceHandle> (*BuiltinConstructor)(const ResourceRequest& request, ResourceHandleClient* client);
</span><span class="cx"> static void registerBuiltinConstructor(const AtomicString& protocol, BuiltinConstructor);
</span><span class="cx">
</span><span class="lines">@@ -257,11 +265,11 @@
</span><span class="cx"> void createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior, CFDictionaryRef clientProperties);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) && !USE(CFURLCONNECTION)
</ins><span class="cx"> void createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(IOS)
</del><ins>+#if PLATFORM(IOS) && !USE(CFURLCONNECTION)
</ins><span class="cx"> void createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior, NSDictionary *connectionProperties);
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandleClient.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandleClient.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/ResourceHandleClient.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -124,7 +124,10 @@
</span><span class="cx">
</span><span class="cx"> #if USE(CFURLCONNECTION)
</span><span class="cx"> virtual CFCachedURLResponseRef willCacheResponse(ResourceHandle*, CFCachedURLResponseRef response) { return response; }
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) { return true; }
</span><ins>+#endif // PLATFORM(WIN)
+
</ins><span class="cx"> #elif PLATFORM(COCOA)
</span><span class="cx"> virtual NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse *response) { return response; }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandleInternal.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandleInternal.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/ResourceHandleInternal.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> ResourceRequest m_currentRequest;
</span><span class="cx"> RefPtr<ResourceHandleCFURLConnectionDelegate> m_connectionDelegate;
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
</ins><span class="cx"> RetainPtr<NSURLConnection> m_connection;
</span><span class="cx"> RetainPtr<id> m_delegate;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-#if !USE(SOUP) && !PLATFORM(COCOA)
</del><ins>+#if !USE(SOUP) && (!PLATFORM(COCOA) || USE(CFURLCONNECTION))
</ins><span class="cx"> double ResourceRequestBase::s_defaultTimeoutInterval = INT_MAX;
</span><span class="cx"> #else
</span><span class="cx"> // Will use NSURLRequest default timeout unless set to a non-zero value with setDefaultTimeoutInterval().
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfAuthenticationCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -38,21 +38,18 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-AuthenticationChallenge::AuthenticationChallenge(const ProtectionSpace& protectionSpace,
- const Credential& proposedCredential,
- unsigned previousFailureCount,
- const ResourceResponse& response,
- const ResourceError& error)
- : AuthenticationChallengeBase(protectionSpace,
- proposedCredential,
- previousFailureCount,
- response,
- error)
</del><ins>+AuthenticationChallenge::AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error)
+ : AuthenticationChallengeBase(protectionSpace, proposedCredential, previousFailureCount, response, error)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> AuthenticationChallenge::AuthenticationChallenge(CFURLAuthChallengeRef cfChallenge, AuthenticationClient* authenticationClient)
</span><del>- : AuthenticationChallengeBase(core(CFURLAuthChallengeGetProtectionSpace(cfChallenge)), core(CFURLAuthChallengeGetProposedCredential(cfChallenge)), CFURLAuthChallengeGetPreviousFailureCount(cfChallenge), (CFURLResponseRef)CFURLAuthChallengeGetFailureResponse(cfChallenge), CFURLAuthChallengeGetError(cfChallenge))
</del><ins>+#if PLATFORM(COCOA)
+ : AuthenticationChallengeBase(ProtectionSpace(CFURLAuthChallengeGetProtectionSpace(cfChallenge)), Credential(CFURLAuthChallengeGetProposedCredential(cfChallenge)),
+#else
+ : AuthenticationChallengeBase(core(CFURLAuthChallengeGetProtectionSpace(cfChallenge)), core(CFURLAuthChallengeGetProposedCredential(cfChallenge)),
+#endif
+ CFURLAuthChallengeGetPreviousFailureCount(cfChallenge), (CFURLResponseRef)CFURLAuthChallengeGetFailureResponse(cfChallenge), CFURLAuthChallengeGetError(cfChallenge))
</ins><span class="cx"> , m_authenticationClient(authenticationClient)
</span><span class="cx"> , m_cfChallenge(cfChallenge)
</span><span class="cx"> {
</span><span class="lines">@@ -83,10 +80,17 @@
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Why not cache CFURLAuthChallengeRef in m_cfChallenge? Foundation counterpart does that.
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+ CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, coreChallenge.protectionSpace().cfSpace(), coreChallenge.proposedCredential().cfCredential(),
+#else
</ins><span class="cx"> RetainPtr<CFURLCredentialRef> credential = adoptCF(createCF(coreChallenge.proposedCredential()));
</span><span class="cx"> RetainPtr<CFURLProtectionSpaceRef> protectionSpace = adoptCF(createCF(coreChallenge.protectionSpace()));
</span><del>-
- return CFURLAuthChallengeCreate(nullptr, protectionSpace.get(), credential.get(), coreChallenge.previousFailureCount(), coreChallenge.failureResponse().cfURLResponse(), coreChallenge.error());
</del><ins>+ CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, protectionSpace.get(), credential.get(),
+#endif
+ coreChallenge.previousFailureCount(),
+ coreChallenge.failureResponse().cfURLResponse(),
+ coreChallenge.error());
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CFURLCredentialRef createCF(const Credential& coreCredential)
</span><span class="lines">@@ -271,6 +275,6 @@
</span><span class="cx"> scheme);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-};
</del><ins>+}
</ins><span class="cx">
</span><span class="cx"> #endif // USE(CFURLCONNECTION)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfAuthenticationCFh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -39,10 +39,18 @@
</span><span class="cx"> class ProtectionSpace;
</span><span class="cx">
</span><span class="cx"> CFURLAuthChallengeRef createCF(const AuthenticationChallenge&);
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> CFURLCredentialRef createCF(const Credential&);
</span><span class="cx"> CFURLProtectionSpaceRef createCF(const ProtectionSpace&);
</span><ins>+#endif
+
+#if PLATFORM(COCOA)
+AuthenticationChallenge core(CFURLAuthChallengeRef);
+#endif
+#if PLATFORM(WIN)
</ins><span class="cx"> Credential core(CFURLCredentialRef);
</span><span class="cx"> ProtectionSpace core(CFURLProtectionSpaceRef);
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // USE(CFURLCONNECTION)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfCredentialStorageCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -32,9 +32,18 @@
</span><span class="cx"> #include "CFNetworkSPI.h"
</span><span class="cx"> #include "Credential.h"
</span><span class="cx"> #include "ProtectionSpace.h"
</span><del>-#include <WebKitSystemInterface/WebKitSystemInterface.h>
</del><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+#include "WebCoreSystemInterface.h"
+#elif PLATFORM(WIN)
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#endif
+
+#if PLATFORM(IOS)
+#include <CFNetwork/CFURLCredentialStorage.h>
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> static inline CFURLCredentialRef copyCredentialFromProtectionSpace(CFURLProtectionSpaceRef protectionSpace)
</span><span class="lines">@@ -45,11 +54,29 @@
</span><span class="cx">
</span><span class="cx"> Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace& protectionSpace)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(COCOA)
+ auto credentialCF = adoptCF(copyCredentialFromProtectionSpace(protectionSpace.cfSpace()));
+ return Credential(credentialCF.get());
+#else
</ins><span class="cx"> auto protectionSpaceCF = adoptCF(createCF(protectionSpace));
</span><span class="cx"> auto credentialCF = adoptCF(copyCredentialFromProtectionSpace(protectionSpaceCF.get()));
</span><span class="cx"> return core(credentialCF.get());
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+void CredentialStorage::saveToPersistentStorage(const ProtectionSpace& protectionSpace, const Credential& credential)
+{
+ RetainPtr<CFURLCredentialStorageRef> storageCF = adoptCF(CFURLCredentialStorageCreate(0));
+
+ if (credential.persistence() == CredentialPersistenceNone) {
+ Credential sessionCredential(credential, CredentialPersistenceForSession);
+ CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), sessionCredential.cfCredential(), protectionSpace.cfSpace());
+ } else
+ CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), credential.cfCredential(), protectionSpace.cfSpace());
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // USE(CFURLCONNECTION)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceError.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceError.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceError.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -28,11 +28,10 @@
</span><span class="cx"> #include "ResourceErrorBase.h"
</span><span class="cx">
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><del>-
-#if PLATFORM(WIN)
</del><span class="cx"> #if USE(CFURLCONNECTION)
</span><span class="cx"> #include <CoreFoundation/CFStream.h>
</span><span class="cx"> #endif
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> #include <windows.h>
</span><span class="cx"> #include <wincrypt.h> // windows.h must be included before wincrypt.h.
</span><span class="cx"> #endif
</span><span class="lines">@@ -63,9 +62,11 @@
</span><span class="cx"> WEBCORE_EXPORT operator CFErrorRef() const;
</span><span class="cx">
</span><span class="cx"> #if USE(CFURLCONNECTION)
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> ResourceError(const String& domain, int errorCode, const URL& failingURL, const String& localizedDescription, CFDataRef certificate);
</span><span class="cx"> PCCERT_CONTEXT certificate() const;
</span><span class="cx"> void setCertificate(CFDataRef);
</span><ins>+#endif
</ins><span class="cx"> ResourceError(CFStreamError error);
</span><span class="cx"> CFStreamError cfStreamError() const;
</span><span class="cx"> operator CFStreamError() const;
</span><span class="lines">@@ -89,11 +90,12 @@
</span><span class="cx"> bool m_dataIsUpToDate;
</span><span class="cx"> #if USE(CFURLCONNECTION)
</span><span class="cx"> mutable RetainPtr<CFErrorRef> m_platformError;
</span><del>-#elif PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA)
</ins><span class="cx"> mutable RetainPtr<NSError> m_platformNSError;
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="cx"> RetainPtr<CFDataRef> m_certificate;
</span><ins>+#endif
</ins><span class="cx"> #else
</span><span class="cx"> mutable RetainPtr<NSError> m_platformError;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceErrorCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -31,9 +31,12 @@
</span><span class="cx"> #include "URL.h"
</span><span class="cx"> #include <CoreFoundation/CFError.h>
</span><span class="cx"> #include <CFNetwork/CFNetworkErrors.h>
</span><del>-#include <WebKitSystemInterface/WebKitSystemInterface.h>
</del><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(WIN)
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> ResourceError::ResourceError(CFErrorRef cfError)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -46,8 +46,6 @@
</span><span class="cx"> #include "SynchronousLoaderClient.h"
</span><span class="cx"> #include "SynchronousResourceHandleCFURLConnectionDelegate.h"
</span><span class="cx"> #include <CFNetwork/CFNetwork.h>
</span><del>-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#include <process.h>
</del><span class="cx"> #include <sys/stat.h>
</span><span class="cx"> #include <sys/types.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="lines">@@ -57,6 +55,20 @@
</span><span class="cx"> #include <wtf/text/Base64.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+#include "ResourceHandleCFURLConnectionDelegateWithOperationQueue.h"
+#include "WebCoreSystemInterface.h"
+#if USE(CFURLCONNECTION)
+#include "WebCoreURLResponse.h"
+#include <CFNetwork/CFURLConnectionPriv.h>
+#include <CFNetwork/CFURLRequestPriv.h>
+#endif
+#endif
+
+#if PLATFORM(WIN)
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#include <process.h>
+
</ins><span class="cx"> // FIXME: Remove this declaration once it's in WebKitSupportLibrary.
</span><span class="cx"> extern "C" {
</span><span class="cx"> __declspec(dllimport) CFURLConnectionRef CFURLConnectionCreateWithProperties(
</span><span class="lines">@@ -65,6 +77,7 @@
</span><span class="cx"> CFURLConnectionClient * client,
</span><span class="cx"> CFDictionaryRef properties);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -107,7 +120,11 @@
</span><span class="cx">
</span><span class="cx"> static inline CFStringRef shouldSniffConnectionProperty()
</span><span class="cx"> {
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> return CFSTR("_kCFURLConnectionPropertyShouldSniff");
</span><ins>+#else
+ return _kCFURLConnectionPropertyShouldSniff;
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff, SchedulingBehavior schedulingBehavior, CFDictionaryRef clientProperties)
</span><span class="lines">@@ -149,6 +166,9 @@
</span><span class="cx">
</span><span class="cx"> RetainPtr<CFMutableDictionaryRef> sslProps;
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ sslProps = adoptCF(ResourceHandle::createSSLPropertiesFromNSURLRequest(firstRequest()));
+#else
</ins><span class="cx"> if (allowsAnyHTTPSCertificateHosts().contains(firstRequest().url().host())) {
</span><span class="cx"> sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
</span><span class="cx"> CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsAnyRoot, kCFBooleanTrue);
</span><span class="lines">@@ -161,8 +181,11 @@
</span><span class="cx"> if (clientCert != clientCertificates().end()) {
</span><span class="cx"> if (!sslProps)
</span><span class="cx"> sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> wkSetClientCertificateInSSLProperties(sslProps.get(), (clientCert->value).get());
</span><ins>+#endif
</ins><span class="cx"> }
</span><ins>+#endif // PLATFORM(IOS)
</ins><span class="cx">
</span><span class="cx"> if (sslProps)
</span><span class="cx"> CFURLRequestSetSSLProperties(request.get(), sslProps.get());
</span><span class="lines">@@ -183,6 +206,12 @@
</span><span class="cx"> CFDictionarySetValue(streamProperties, CFSTR("_WebKitSynchronousRequest"), kCFBooleanTrue);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+ RetainPtr<CFDataRef> sourceApplicationAuditData = d->m_context->sourceApplicationAuditData();
+ if (sourceApplicationAuditData)
+ CFDictionarySetValue(streamProperties, CFSTR("kCFStreamPropertySourceApplication"), sourceApplicationAuditData.get());
+#endif
+
</ins><span class="cx"> static const CFStringRef kCFURLConnectionSocketStreamProperties = CFSTR("kCFURLConnectionSocketStreamProperties");
</span><span class="cx"> RetainPtr<CFMutableDictionaryRef> propertiesDictionary;
</span><span class="cx"> if (clientProperties)
</span><span class="lines">@@ -201,7 +230,14 @@
</span><span class="cx"> CFDictionaryAddValue(propertiesDictionary.get(), kCFURLConnectionSocketStreamProperties, streamProperties);
</span><span class="cx"> CFRelease(streamProperties);
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+ if (d->m_usesAsyncCallbacks)
+ d->m_connectionDelegate = adoptRef(new ResourceHandleCFURLConnectionDelegateWithOperationQueue(this));
+ else
+ d->m_connectionDelegate = adoptRef(new SynchronousResourceHandleCFURLConnectionDelegate(this));
+#else
</ins><span class="cx"> d->m_connectionDelegate = adoptRef(new SynchronousResourceHandleCFURLConnectionDelegate(this));
</span><ins>+#endif
</ins><span class="cx"> d->m_connectionDelegate->setupRequest(request.get());
</span><span class="cx">
</span><span class="cx"> CFURLConnectionClient_V6 client = d->m_connectionDelegate->makeConnectionClient();
</span><span class="lines">@@ -228,6 +264,10 @@
</span><span class="cx">
</span><span class="cx"> bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this);
</span><span class="cx">
</span><ins>+#if ENABLE(WEB_TIMING) && PLATFORM(COCOA) && !HAVE(TIMINGDATAOPTIONS)
+ setCollectsTimingData();
+#endif
+
</ins><span class="cx"> SchedulingBehavior schedulingBehavior = client()->loadingSynchronousXHR() ? SchedulingBehavior::Synchronous : SchedulingBehavior::Asynchronous;
</span><span class="cx">
</span><span class="cx"> createCFURLConnection(shouldUseCredentialStorage, d->m_shouldContentSniff, schedulingBehavior, client()->connectionProperties(this).get());
</span><span class="lines">@@ -311,6 +351,16 @@
</span><span class="cx"> ASSERT(challenge.cfURLAuthChallengeRef());
</span><span class="cx"> ASSERT(challenge.authenticationClient() == this); // Should be already set.
</span><span class="cx">
</span><ins>+#if !PLATFORM(WIN)
+ // Proxy authentication is handled by CFNetwork internally. We can get here if the user cancels
+ // CFNetwork authentication dialog, and we shouldn't ask the client to display another one in that case.
+ if (challenge.protectionSpace().isProxy()) {
+ // Cannot use receivedRequestToContinueWithoutCredential(), because current challenge is not yet set.
+ CFURLConnectionUseCredential(d->m_connection.get(), 0, challenge.cfURLAuthChallengeRef());
+ return;
+ }
+#endif
+
</ins><span class="cx"> if (tryHandlePasswordBasedAuthentication(challenge))
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -331,7 +381,11 @@
</span><span class="cx">
</span><span class="cx"> if (!d->m_user.isNull() && !d->m_pass.isNull()) {
</span><span class="cx"> RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(CFURLCredentialCreate(kCFAllocatorDefault, d->m_user.createCFString().get(), d->m_pass.createCFString().get(), 0, kCFURLCredentialPersistenceNone));
</span><ins>+#if PLATFORM(COCOA)
+ Credential credential = Credential(cfCredential.get());
+#else
</ins><span class="cx"> Credential credential = core(cfCredential.get());
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> URL urlToStore;
</span><span class="cx"> if (challenge.failureResponse().httpStatusCode() == 401)
</span><span class="lines">@@ -361,8 +415,12 @@
</span><span class="cx"> // Store the credential back, possibly adding it as a default for this directory.
</span><span class="cx"> d->m_context->storageSession().credentialStorage().set(credential, challenge.protectionSpace(), challenge.failureResponse().url());
</span><span class="cx"> }
</span><ins>+#if PLATFORM(COCOA)
+ CFURLConnectionUseCredential(d->m_connection.get(), credential.cfCredential(), challenge.cfURLAuthChallengeRef());
+#else
</ins><span class="cx"> RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(credential));
</span><span class="cx"> CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
</span><ins>+#endif
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -412,12 +470,20 @@
</span><span class="cx"> d->m_context->storageSession().credentialStorage().set(webCredential, challenge.protectionSpace(), urlToStore);
</span><span class="cx">
</span><span class="cx"> if (d->m_connection) {
</span><ins>+#if PLATFORM(COCOA)
+ CFURLConnectionUseCredential(d->m_connection.get(), webCredential.cfCredential(), challenge.cfURLAuthChallengeRef());
+#else
</ins><span class="cx"> RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(webCredential));
</span><span class="cx"> CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> } else if (d->m_connection) {
</span><ins>+#if PLATFORM(COCOA)
+ CFURLConnectionUseCredential(d->m_connection.get(), credential.cfCredential(), challenge.cfURLAuthChallengeRef());
+#else
</ins><span class="cx"> RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(credential));
</span><span class="cx"> CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> clearAuthentication();
</span><span class="lines">@@ -558,6 +624,30 @@
</span><span class="cx"> CFURLConnectionResume(d->m_connection.get());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+void ResourceHandle::schedule(SchedulePair& pair)
+{
+ CFRunLoopRef runLoop = pair.runLoop();
+ if (!runLoop)
+ return;
+
+ CFURLConnectionScheduleWithRunLoop(d->m_connection.get(), runLoop, pair.mode());
+ if (d->m_startWhenScheduled) {
+ CFURLConnectionStart(d->m_connection.get());
+ d->m_startWhenScheduled = false;
+ }
+}
+
+void ResourceHandle::unschedule(SchedulePair& pair)
+{
+ CFRunLoopRef runLoop = pair.runLoop();
+ if (!runLoop)
+ return;
+
+ CFURLConnectionUnscheduleFromRunLoop(d->m_connection.get(), runLoop, pair.mode());
+}
+#endif
+
</ins><span class="cx"> const ResourceRequest& ResourceHandle::currentRequest() const
</span><span class="cx"> {
</span><span class="cx"> return d->m_currentRequest;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -32,7 +32,14 @@
</span><span class="cx"> #include "FormDataStreamCFNet.h"
</span><span class="cx"> #include "NetworkingContext.h"
</span><span class="cx"> #include "ResourceHandle.h"
</span><ins>+
+#if PLATFORM(COCOA)
+#include "WebCoreSystemInterface.h"
+#endif
+
+#if PLATFORM(WIN)
</ins><span class="cx"> #include <WebKitSystemInterface/WebKitSystemInterface.h>
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegateWithOperationQueuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -75,6 +75,9 @@
</span><span class="cx">
</span><span class="cx"> void ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest(CFMutableURLRequestRef request)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+ CFURLRequestSetShouldStartSynchronously(request, 1);
+#endif
</ins><span class="cx"> CFURLRef requestURL = CFURLRequestGetURL(request);
</span><span class="cx"> if (!requestURL)
</span><span class="cx"> return;
</span><span class="lines">@@ -146,8 +149,10 @@
</span><span class="cx"> adjustMIMETypeIfNecessary(cfResponse, isMainResourceLoad);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx"> if (_CFURLRequestCopyProtocolPropertyForKey(m_handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType")))
</span><span class="cx"> CFURLResponseSetMIMEType(cfResponse, CFSTR("text/html"));
</span><ins>+#endif // !PLATFORM(IOS)
</ins><span class="cx">
</span><span class="cx"> ResourceResponse resourceResponse(cfResponse);
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><span class="lines">@@ -283,7 +288,15 @@
</span><span class="cx">
</span><span class="cx"> LOG(Network, "CFNet - ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
</span><span class="cx">
</span><del>- m_handle->canAuthenticateAgainstProtectionSpace(ProtectionSpace(protectionSpace));
</del><ins>+ ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
+#if PLATFORM(IOS)
+ if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown) {
+ m_boolResult = false;
+ dispatch_semaphore_signal(m_semaphore);
+ return;
+ }
+#endif // PLATFORM(IOS)
+ m_handle->canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
</ins><span class="cx"> });
</span><span class="cx"> dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
</span><span class="cx"> return m_boolResult;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequest.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequest.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -62,6 +62,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(CFURLCONNECTION)
</span><ins>+#if PLATFORM(COCOA)
+ WEBCORE_EXPORT ResourceRequest(NSURLRequest *);
+ void updateNSURLRequest();
+ void clearOrUpdateNSURLRequest();
+#endif
+
</ins><span class="cx"> ResourceRequest(CFURLRequestRef cfRequest)
</span><span class="cx"> : ResourceRequestBase()
</span><span class="cx"> , m_cfRequest(cfRequest)
</span><span class="lines">@@ -78,7 +84,11 @@
</span><span class="cx"> WEBCORE_EXPORT void updateFromDelegatePreservingOldProperties(const ResourceRequest&);
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><ins>+#if USE(CFURLCONNECTION)
+ bool encodingRequiresPlatformData() const { return m_httpBody || m_cfRequest; }
+#else
</ins><span class="cx"> bool encodingRequiresPlatformData() const { return m_httpBody || m_nsRequest; }
</span><ins>+#endif
</ins><span class="cx"> WEBCORE_EXPORT NSURLRequest *nsURLRequest(HTTPBodyUpdatePolicy) const;
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT static CFStringRef isUserInitiatedKey();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceRequestCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx"> typedef void (*CFURLRequestSetContentDispositionEncodingFallbackArrayFunction)(CFMutableURLRequestRef, CFArrayRef);
</span><span class="cx"> typedef CFArrayRef (*CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction)(CFURLRequestRef);
</span><span class="cx">
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> static HMODULE findCFNetworkModule()
</span><span class="cx"> {
</span><span class="cx"> #ifndef DEBUG_ALL
</span><span class="lines">@@ -82,7 +83,18 @@
</span><span class="cx"> {
</span><span class="cx"> return reinterpret_cast<CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction>(GetProcAddress(findCFNetworkModule(), "_CFURLRequestCopyContentDispositionEncodingFallbackArray"));
</span><span class="cx"> }
</span><ins>+#elif PLATFORM(COCOA)
+static CFURLRequestSetContentDispositionEncodingFallbackArrayFunction findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction()
+{
+ return reinterpret_cast<CFURLRequestSetContentDispositionEncodingFallbackArrayFunction>(dlsym(RTLD_DEFAULT, "_CFURLRequestSetContentDispositionEncodingFallbackArray"));
+}
</ins><span class="cx">
</span><ins>+static CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction()
+{
+ return reinterpret_cast<CFURLRequestCopyContentDispositionEncodingFallbackArrayFunction>(dlsym(RTLD_DEFAULT, "_CFURLRequestCopyContentDispositionEncodingFallbackArray"));
+}
+#endif
+
</ins><span class="cx"> static void setContentDispositionEncodingFallbackArray(CFMutableURLRequestRef request, CFArrayRef fallbackArray)
</span><span class="cx"> {
</span><span class="cx"> static CFURLRequestSetContentDispositionEncodingFallbackArrayFunction function = findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction();
</span><span class="lines">@@ -144,6 +156,10 @@
</span><span class="cx"> if (resourcePrioritiesEnabled())
</span><span class="cx"> CFURLRequestSetRequestPriority(cfRequest, toPlatformRequestPriority(priority()));
</span><span class="cx">
</span><ins>+#if !PLATFORM(WIN)
+ _CFURLRequestSetProtocolProperty(cfRequest, kCFURLRequestAllowAllPOSTCaching, kCFBooleanTrue);
+#endif
+
</ins><span class="cx"> setHeaderFields(cfRequest, httpHeaderFields());
</span><span class="cx">
</span><span class="cx"> CFURLRequestSetShouldHandleHTTPCookies(cfRequest, allowCookies());
</span><span class="lines">@@ -168,6 +184,9 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> m_cfRequest = adoptCF(cfRequest);
</span><ins>+#if PLATFORM(COCOA)
+ clearOrUpdateNSURLRequest();
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: We should use a switch based on ResourceRequestCachePolicy parameter
</span><span class="lines">@@ -206,12 +225,30 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_cfRequest = adoptCF(cfRequest);
</span><ins>+#if PLATFORM(COCOA)
+ clearOrUpdateNSURLRequest();
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ResourceRequest::doUpdateResourceRequest()
</span><span class="cx"> {
</span><span class="cx"> if (!m_cfRequest) {
</span><ins>+#if PLATFORM(IOS)
+ // <rdar://problem/9913526>
+ // This is a hack to mimic the subtle behaviour of the Foundation based ResourceRequest
+ // code. That code does not reset m_httpMethod if the NSURLRequest is nil. I filed
+ // <https://bugs.webkit.org/show_bug.cgi?id=66336> to track that.
+ // Another related bug is <https://bugs.webkit.org/show_bug.cgi?id=66350>. Fixing that
+ // would, ideally, allow us to not have this hack. But unfortunately that caused layout test
+ // failures.
+ // Removal of this hack is tracked by <rdar://problem/9970499>.
+
+ String httpMethod = m_httpMethod;
</ins><span class="cx"> *this = ResourceRequest();
</span><ins>+ m_httpMethod = httpMethod;
+#else
+ *this = ResourceRequest();
+#endif
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -287,6 +324,9 @@
</span><span class="cx"> if (storageSession)
</span><span class="cx"> _CFURLRequestSetStorageSession(cfRequest, storageSession);
</span><span class="cx"> m_cfRequest = adoptCF(cfRequest);
</span><ins>+#if PLATFORM(COCOA)
+ clearOrUpdateNSURLRequest();
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // USE(CFURLCONNECTION)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponse.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponse.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -50,6 +50,9 @@
</span><span class="cx"> {
</span><span class="cx"> m_isNull = !cfResponse;
</span><span class="cx"> }
</span><ins>+#if PLATFORM(COCOA)
+ WEBCORE_EXPORT ResourceResponse(NSURLResponse *);
+#endif
</ins><span class="cx"> #else
</span><span class="cx"> ResourceResponse(NSURLResponse *nsResponse)
</span><span class="cx"> : m_initLevel(Uninitialized)
</span><span class="lines">@@ -116,7 +119,8 @@
</span><span class="cx">
</span><span class="cx"> #if USE(CFURLCONNECTION)
</span><span class="cx"> mutable RetainPtr<CFURLResponseRef> m_cfResponse;
</span><del>-#elif PLATFORM(COCOA)
</del><ins>+#endif
+#if PLATFORM(COCOA)
</ins><span class="cx"> mutable RetainPtr<NSURLResponse> m_nsResponse;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceResponseCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/ResourceResponseCFNet.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -34,6 +34,10 @@
</span><span class="cx"> #include "MIMETypeRegistry.h"
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+#include "WebCoreSystemInterface.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> static CFStringRef const commonHeaderFields[] = {
</span><span class="lines">@@ -43,9 +47,13 @@
</span><span class="cx"> CFURLResponseRef ResourceResponse::cfURLResponse() const
</span><span class="cx"> {
</span><span class="cx"> if (!m_cfResponse && !m_isNull) {
</span><ins>+#if PLATFORM(COCOA)
+ nsURLResponse();
+#else
</ins><span class="cx"> RetainPtr<CFURLRef> url = m_url.createCFURL();
</span><span class="cx"> // FIXME: This creates a very incomplete CFURLResponse, which does not even have a status code.
</span><span class="cx"> m_cfResponse = adoptCF(CFURLResponseCreate(0, url.get(), m_mimeType.string().createCFString().get(), m_expectedContentLength, m_textEncodingName.string().createCFString().get(), kCFURLCacheStorageAllowed));
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return m_cfResponse.get();
</span><span class="lines">@@ -108,10 +116,12 @@
</span><span class="cx"> m_initLevel = initLevel;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !PLATFORM(COCOA)
</ins><span class="cx"> CertificateInfo ResourceResponse::platformCertificateInfo() const
</span><span class="cx"> {
</span><span class="cx"> return { };
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> String ResourceResponse::platformSuggestedFilename() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include "AuthenticationChallenge.h"
</span><span class="cx"> #include "LoaderRunLoopCF.h"
</span><span class="cx"> #include "Logging.h"
</span><del>-#include "MIMETypeRegistry.h"
</del><span class="cx"> #include "ResourceHandle.h"
</span><span class="cx"> #include "ResourceHandleClient.h"
</span><span class="cx"> #include "ResourceResponse.h"
</span><span class="lines">@@ -41,6 +40,20 @@
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+#include "CFNetworkSPI.h"
+#include "WebCoreSystemInterface.h"
+#include "WebCoreURLResponse.h"
+#endif // PLATFORM(COCOA)
+
+#if PLATFORM(IOS)
+#include "WebCoreThread.h"
+#endif // PLATFORM(IOS)
+
+#if PLATFORM(WIN)
+#include "MIMETypeRegistry.h"
+#endif // PLATFORM(WIN)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate(ResourceHandle* handle)
</span><span class="lines">@@ -50,11 +63,20 @@
</span><span class="cx">
</span><span class="cx"> void SynchronousResourceHandleCFURLConnectionDelegate::setupRequest(CFMutableURLRequestRef request)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
+ CFURLRequestSetShouldStartSynchronously(request, 1);
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling(CFURLConnectionRef connection)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> CFURLConnectionScheduleWithCurrentMessageQueue(connection);
</span><ins>+#elif PLATFORM(IOS)
+ CFURLConnectionScheduleWithRunLoop(connection, WebThreadRunLoop(), kCFRunLoopDefaultMode);
+#else
+ CFURLConnectionScheduleWithRunLoop(connection, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+#endif
</ins><span class="cx"> CFURLConnectionScheduleDownloadWithRunLoop(connection, loaderRunLoop(), kCFRunLoopDefaultMode);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -81,6 +103,7 @@
</span><span class="cx"> return newCFRequest;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !PLATFORM(COCOA)
</ins><span class="cx"> static void setDefaultMIMEType(CFURLResponseRef response)
</span><span class="cx"> {
</span><span class="cx"> static CFStringRef defaultMIMETypeString = defaultMIMEType().createCFString().leakRef();
</span><span class="lines">@@ -110,8 +133,9 @@
</span><span class="cx"> if (result != originalResult)
</span><span class="cx"> CFURLResponseSetMIMEType(cfResponse, result.get());
</span><span class="cx"> }
</span><ins>+#endif // !PLATFORM(COCOA)
</ins><span class="cx">
</span><del>-void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(CFURLConnectionRef, CFURLResponseRef cfResponse)
</del><ins>+void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(CFURLConnectionRef connection, CFURLResponseRef cfResponse)
</ins><span class="cx"> {
</span><span class="cx"> LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
</span><span class="cx">
</span><span class="lines">@@ -118,6 +142,21 @@
</span><span class="cx"> if (!m_handle->client())
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+ // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
+ auto msg = CFURLResponseGetHTTPResponse(cfResponse);
+ int statusCode = msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0;
+
+ if (statusCode != 304) {
+ bool isMainResourceLoad = m_handle->firstRequest().requester() == ResourceRequest::Requester::Main;
+ adjustMIMETypeIfNecessary(cfResponse, isMainResourceLoad);
+ }
+
+#if !PLATFORM(IOS)
+ if (_CFURLRequestCopyProtocolPropertyForKey(m_handle->firstRequest().cfURLRequest(DoNotUpdateHTTPBody), CFSTR("ForceHTMLMIMEType")))
+ CFURLResponseSetMIMEType(cfResponse, CFSTR("text/html"));
+#endif // !PLATFORM(IOS)
+#else
</ins><span class="cx"> if (!CFURLResponseGetMIMEType(cfResponse))
</span><span class="cx"> adjustMIMETypeIfNecessary(cfResponse);
</span><span class="cx">
</span><span class="lines">@@ -126,6 +165,7 @@
</span><span class="cx"> ASSERT(!m_handle->shouldContentSniff());
</span><span class="cx"> setDefaultMIMEType(cfResponse);
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> bool isQuickLookPreview = false;
</span><span class="lines">@@ -137,6 +177,12 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> ResourceResponse resourceResponse(cfResponse);
</span><ins>+#if PLATFORM(COCOA) && ENABLE(WEB_TIMING)
+ ResourceHandle::getConnectionTimingData(connection, resourceResponse.networkLoadTiming());
+#else
+ UNUSED_PARAM(connection);
+#endif
+
</ins><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> resourceResponse.setIsQuickLook(isQuickLookPreview);
</span><span class="cx"> #endif
</span><span class="lines">@@ -185,6 +231,7 @@
</span><span class="cx">
</span><span class="cx"> CFCachedURLResponseRef SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse(CFCachedURLResponseRef cachedResponse)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> // Workaround for <rdar://problem/6300990> Caching does not respect Vary HTTP header.
</span><span class="cx"> // FIXME: WebCore cache has issues with Vary, too (bug 58797, bug 71509).
</span><span class="cx"> CFURLResponseRef wrappedResponse = CFCachedURLResponseGetWrappedResponse(cachedResponse);
</span><span class="lines">@@ -194,8 +241,16 @@
</span><span class="cx"> if (varyValue)
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><ins>+#endif // PLATFORM(WIN)
+
+#if PLATFORM(WIN)
</ins><span class="cx"> if (m_handle->client() && !m_handle->client()->shouldCacheResponse(m_handle, cachedResponse))
</span><span class="cx"> return 0;
</span><ins>+#else
+ CFCachedURLResponseRef newResponse = m_handle->client()->willCacheResponse(m_handle, cachedResponse);
+ if (newResponse != cachedResponse)
+ return newResponse;
+#endif
</ins><span class="cx">
</span><span class="cx"> CFRetain(cachedResponse);
</span><span class="cx"> return cachedResponse;
</span><span class="lines">@@ -232,7 +287,14 @@
</span><span class="cx">
</span><span class="cx"> LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace(handle=%p (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
+ if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown)
+ return false;
+ return m_handle->canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
+#else
</ins><span class="cx"> return m_handle->canAuthenticateAgainstProtectionSpace(core(protectionSpace));
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaCredentialCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -29,6 +29,10 @@
</span><span class="cx"> #include <Security/SecBase.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#include "CFNetworkSPI.h"
+#endif
+
</ins><span class="cx"> OBJC_CLASS NSURLCredential;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -47,6 +51,9 @@
</span><span class="cx">
</span><span class="cx"> Credential(const Credential&, CredentialPersistence);
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+ explicit Credential(CFURLCredentialRef);
+#endif
</ins><span class="cx"> WEBCORE_EXPORT explicit Credential(NSURLCredential *);
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT bool isEmpty() const;
</span><span class="lines">@@ -53,6 +60,9 @@
</span><span class="cx">
</span><span class="cx"> bool encodingRequiresPlatformData() const { return m_nsCredential && encodingRequiresPlatformData(m_nsCredential.get()); }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+ CFURLCredentialRef cfCredential() const;
+#endif
</ins><span class="cx"> WEBCORE_EXPORT NSURLCredential *nsCredential() const;
</span><span class="cx">
</span><span class="cx"> static bool platformCompare(const Credential&, const Credential&);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaCredentialCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cocoa/CredentialCocoa.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -26,6 +26,13 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "CredentialCocoa.h"
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+@interface NSURLCredential (WebDetails)
+- (id)_initWithCFURLCredential:(CFURLCredentialRef)credential;
+- (CFURLCredentialRef) _CFURLCredential;
+@end
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> static NSURLCredentialPersistence toNSURLCredentialPersistence(CredentialPersistence persistence)
</span><span class="lines">@@ -77,6 +84,13 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+Credential::Credential(CFURLCredentialRef credential)
+ : Credential(adoptNS([[NSURLCredential alloc] _initWithCFURLCredential:credential]).get())
+{
+}
+#endif
+
</ins><span class="cx"> Credential::Credential(NSURLCredential *credential)
</span><span class="cx"> : CredentialBase(credential.user, credential.password, toCredentialPersistence(credential.persistence))
</span><span class="cx"> , m_nsCredential(credential)
</span><span class="lines">@@ -83,6 +97,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+CFURLCredentialRef Credential::cfCredential() const
+{
+ return [nsCredential() _CFURLCredential];
+}
+#endif
+
</ins><span class="cx"> NSURLCredential *Credential::nsCredential() const
</span><span class="cx"> {
</span><span class="cx"> if (m_nsCredential)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -28,6 +28,10 @@
</span><span class="cx"> #include "ProtectionSpaceBase.h"
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
+#endif
+
</ins><span class="cx"> OBJC_CLASS NSURLProtectionSpace;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -42,6 +46,9 @@
</span><span class="cx">
</span><span class="cx"> ProtectionSpace(WTF::HashTableDeletedValueType deletedValue) : ProtectionSpaceBase(deletedValue) { }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+ explicit ProtectionSpace(CFURLProtectionSpaceRef);
+#endif
</ins><span class="cx"> WEBCORE_EXPORT explicit ProtectionSpace(NSURLProtectionSpace *);
</span><span class="cx">
</span><span class="cx"> static bool platformCompare(const ProtectionSpace& a, const ProtectionSpace& b);
</span><span class="lines">@@ -50,6 +57,9 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT bool receivesCredentialSecurely() const;
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+ CFURLProtectionSpaceRef cfSpace() const;
+#endif
</ins><span class="cx"> WEBCORE_EXPORT NSURLProtectionSpace *nsSpace() const;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -26,9 +26,22 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "ProtectionSpaceCocoa.h"
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+@interface NSURLProtectionSpace (WebDetails)
+- (CFURLProtectionSpaceRef) _CFURLProtectionSpace;
+- (id)_initWithCFURLProtectionSpace:(CFURLProtectionSpaceRef)cfProtSpace;
+@end
+#endif
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+ProtectionSpace::ProtectionSpace(CFURLProtectionSpaceRef space)
+ : ProtectionSpace(adoptNS([[NSURLProtectionSpace alloc] _initWithCFURLProtectionSpace:space]).get())
+{
+}
+#endif
+
</ins><span class="cx"> static ProtectionSpaceServerType type(NSURLProtectionSpace *space)
</span><span class="cx"> {
</span><span class="cx"> if ([space isProxy]) {
</span><span class="lines">@@ -92,6 +105,13 @@
</span><span class="cx"> m_nsSpace = space;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+CFURLProtectionSpaceRef ProtectionSpace::cfSpace() const
+{
+ return [nsSpace() _CFURLProtectionSpace];
+}
+#endif
+
</ins><span class="cx"> NSURLProtectionSpace *ProtectionSpace::nsSpace() const
</span><span class="cx"> {
</span><span class="cx"> if (m_nsSpace)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaResourceRequestCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -53,9 +53,15 @@
</span><span class="cx"> NSURLRequest *ResourceRequest::nsURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
</span><span class="cx"> {
</span><span class="cx"> updatePlatformRequest(bodyPolicy);
</span><ins>+#if USE(CFURLCONNECTION)
+ if (!m_nsRequest)
+ const_cast<ResourceRequest*>(this)->updateNSURLRequest();
+#endif
</ins><span class="cx"> return [[m_nsRequest.get() retain] autorelease];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> CFURLRequestRef ResourceRequest::cfURLRequest(HTTPBodyUpdatePolicy bodyPolicy) const
</span><span class="cx"> {
</span><span class="cx"> return [nsURLRequest(bodyPolicy) _CFURLRequest];
</span><span class="lines">@@ -238,6 +244,8 @@
</span><span class="cx"> m_nsRequest = adoptNS(wkCopyRequestWithStorageSession(storageSession, m_nsRequest.get()));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif // USE(CFURLCONNECTION)
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaResourceResponseCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -75,8 +75,13 @@
</span><span class="cx">
</span><span class="cx"> CertificateInfo ResourceResponse::platformCertificateInfo() const
</span><span class="cx"> {
</span><ins>+#if USE(CFURLCONNECTION)
+ ASSERT(m_cfResponse);
+ CFURLResponseRef cfResponse = m_cfResponse.get();
+#else
</ins><span class="cx"> ASSERT(m_nsResponse);
</span><span class="cx"> CFURLResponseRef cfResponse = [m_nsResponse _CFURLResponse];
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> if (!cfResponse)
</span><span class="cx"> return { };
</span><span class="lines">@@ -109,6 +114,35 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+
+NSURLResponse *ResourceResponse::nsURLResponse() const
+{
+ if (!m_nsResponse && !m_cfResponse && !m_isNull) {
+ initNSURLResponse();
+ m_cfResponse = [m_nsResponse.get() _CFURLResponse];
+ return m_nsResponse.get();
+ }
+
+ if (!m_cfResponse)
+ return nil;
+
+ if (!m_nsResponse)
+ m_nsResponse = [NSURLResponse _responseWithCFURLResponse:m_cfResponse.get()];
+
+ return m_nsResponse.get();
+}
+
+ResourceResponse::ResourceResponse(NSURLResponse* nsResponse)
+ : m_initLevel(Uninitialized)
+ , m_cfResponse([nsResponse _CFURLResponse])
+ , m_nsResponse(nsResponse)
+{
+ m_isNull = !nsResponse;
+}
+
+#else
+
</ins><span class="cx"> static NSString* const commonHeaderFields[] = {
</span><span class="cx"> @"Age", @"Cache-Control", @"Content-Type", @"Date", @"Etag", @"Expires", @"Last-Modified", @"Pragma"
</span><span class="cx"> };
</span><span class="lines">@@ -208,6 +242,8 @@
</span><span class="cx"> return a.nsURLResponse() == b.nsURLResponse();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif // USE(CFURLCONNECTION)
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosQuickLookh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ios/QuickLook.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/QuickLook.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/ios/QuickLook.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -33,6 +33,10 @@
</span><span class="cx"> #import <objc/objc-runtime.h>
</span><span class="cx"> #import <wtf/RefPtr.h>
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#include "CFNetworkSPI.h"
+#endif
+
</ins><span class="cx"> OBJC_CLASS NSData;
</span><span class="cx"> OBJC_CLASS NSDictionary;
</span><span class="cx"> OBJC_CLASS NSFileHandle;
</span><span class="lines">@@ -77,6 +81,9 @@
</span><span class="cx"> WEBCORE_EXPORT static bool shouldCreateForMIMEType(const String&);
</span><span class="cx">
</span><span class="cx"> static std::unique_ptr<QuickLookHandle> create(ResourceHandle*, NSURLConnection *, NSURLResponse *, id delegate);
</span><ins>+#if USE(CFURLCONNECTION)
+ static std::unique_ptr<QuickLookHandle> create(ResourceHandle*, SynchronousResourceHandleCFURLConnectionDelegate*, CFURLResponseRef);
+#endif
</ins><span class="cx"> // FIXME: Use of ResourceLoader here is a platform violation.
</span><span class="cx"> WEBCORE_EXPORT static std::unique_ptr<QuickLookHandle> create(ResourceLoader&, const ResourceResponse&);
</span><span class="cx">
</span><span class="lines">@@ -88,6 +95,9 @@
</span><span class="cx"> WEBCORE_EXPORT void didFail();
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT NSURLResponse *nsResponse();
</span><ins>+#if USE(CFURLCONNECTION)
+ CFURLResponseRef cfResponse();
+#endif
</ins><span class="cx">
</span><span class="cx"> void setClient(PassRefPtr<QuickLookHandleClient> client) { m_client = client; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosQuickLookmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ios/QuickLook.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/QuickLook.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/ios/QuickLook.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -185,6 +185,81 @@
</span><span class="cx"> return previewProtocol.get().data();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+// The way QuickLook works is we pass it an NSURLConnectionDelegate callback object at creation
+// time. Then we pass it all the data as we receive it. Once we've downloaded the full URL,
+// QuickLook turns around and send us, through this delegate, the HTML version of the file which we
+// pass on to WebCore. The flag m_finishedLoadingDataIntoConverter in QuickLookHandle decides
+// whether to pass the data to QuickLook or WebCore.
+//
+// This works fine when using NS APIs, but when using CFNetwork, we don't have a NSURLConnectionDelegate.
+// So we create WebQuickLookHandleAsDelegate as an intermediate delegate object and pass it to
+// QLPreviewConverter. The proxy delegate then forwards the messages on to the CFNetwork code.
+@interface WebQuickLookHandleAsDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
+ RefPtr<SynchronousResourceHandleCFURLConnectionDelegate> m_connectionDelegate;
+}
+
+- (id)initWithConnectionDelegate:(SynchronousResourceHandleCFURLConnectionDelegate*)connectionDelegate;
+@end
+
+@implementation WebQuickLookHandleAsDelegate
+- (id)initWithConnectionDelegate:(SynchronousResourceHandleCFURLConnectionDelegate*)connectionDelegate
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ m_connectionDelegate = connectionDelegate;
+ return self;
+}
+
+- (void)connection:(NSURLConnection *)connection didReceiveDataArray:(NSArray *)dataArray
+{
+ UNUSED_PARAM(connection);
+ if (!m_connectionDelegate)
+ return;
+ LOG(Network, "WebQuickLookHandleAsDelegate::didReceiveDataArray()");
+ m_connectionDelegate->didReceiveDataArray(reinterpret_cast<CFArrayRef>(dataArray));
+}
+
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data lengthReceived:(long long)lengthReceived
+{
+ UNUSED_PARAM(connection);
+ if (!m_connectionDelegate)
+ return;
+ LOG(Network, "WebQuickLookHandleAsDelegate::didReceiveData() - data length = %ld", (long)[data length]);
+
+ // QuickLook code sends us a nil data at times. The check below is the same as the one in
+ // ResourceHandleMac.cpp added for a different bug.
+ if (![data length])
+ return;
+ m_connectionDelegate->didReceiveData(reinterpret_cast<CFDataRef>(data), static_cast<int>(lengthReceived));
+}
+
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+{
+ UNUSED_PARAM(connection);
+ if (!m_connectionDelegate)
+ return;
+ LOG(Network, "WebQuickLookHandleAsDelegate::didFinishLoading()");
+ m_connectionDelegate->didFinishLoading();
+}
+
+- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
+{
+ UNUSED_PARAM(connection);
+ if (!m_connectionDelegate)
+ return;
+ LOG(Network, "WebQuickLookHandleAsDelegate::didFail()");
+ m_connectionDelegate->didFail(reinterpret_cast<CFErrorRef>(error));
+}
+
+- (void)detachHandle
+{
+ m_connectionDelegate = nullptr;
+}
+@end
+#endif
+
</ins><span class="cx"> @interface WebResourceLoaderQuickLookDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
</span><span class="cx"> RefPtr<ResourceLoader> _resourceLoader;
</span><span class="cx"> BOOL _hasSentDidReceiveResponse;
</span><span class="lines">@@ -339,6 +414,26 @@
</span><span class="cx"> return quickLookHandle;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+std::unique_ptr<QuickLookHandle> QuickLookHandle::create(ResourceHandle* handle, SynchronousResourceHandleCFURLConnectionDelegate* connectionDelegate, CFURLResponseRef cfResponse)
+{
+ ASSERT_ARG(handle, handle);
+ if (handle->firstRequest().requester() != ResourceRequest::Requester::Main || ![QLPreviewGetSupportedMIMETypesSet() containsObject:(NSString *)CFURLResponseGetMIMEType(cfResponse)])
+ return nullptr;
+
+ NSURLResponse *nsResponse = [NSURLResponse _responseWithCFURLResponse:cfResponse];
+ WebQuickLookHandleAsDelegate *delegate = [[[WebQuickLookHandleAsDelegate alloc] initWithConnectionDelegate:connectionDelegate] autorelease];
+ std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, nsResponse, delegate));
+ handle->client()->didCreateQuickLookHandle(*quickLookHandle);
+ return quickLookHandle;
+}
+
+CFURLResponseRef QuickLookHandle::cfResponse()
+{
+ return [m_nsResponse _CFURLResponse];
+}
+#endif
+
</ins><span class="cx"> bool QuickLookHandle::shouldCreateForMIMEType(const String& mimeType)
</span><span class="cx"> {
</span><span class="cx"> return [QLPreviewGetSupportedMIMETypesSet() containsObject:mimeType];
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosResourceHandleIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/ios/ResourceHandleIOS.mm (0 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/ResourceHandleIOS.mm         (rev 0)
+++ trunk/Source/WebCore/platform/network/ios/ResourceHandleIOS.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+//
+// ResourceHandleIPhone.mm
+// WebCore
+//
+// Copyright 2011 Apple Inc. All rights reserved.
+//
+
+#import "config.h"
+#import "ResourceHandleInternal.h"
+
+#if USE(CFURLCONNECTION)
+
+#import <CFNetwork/CFSocketStreamPriv.h>
+#import <Foundation/NSURLRequestPrivate.h>
+
+using namespace WebCore;
+
+namespace WebCore {
+
+CFMutableDictionaryRef ResourceHandle::createSSLPropertiesFromNSURLRequest(const ResourceRequest& request)
+{
+ NSString *host = request.url().host();
+ NSArray *certArray = [NSURLRequest allowsSpecificHTTPSCertificateForHost:host];
+ BOOL allowsAnyCertificate = [NSURLRequest allowsAnyHTTPSCertificateForHost:host];
+ if (!certArray && !allowsAnyCertificate)
+ return 0;
+
+ CFMutableDictionaryRef sslProps = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+ if (certArray)
+ CFDictionarySetValue(sslProps, _kCFStreamSSLTrustedLeafCertificates, (CFTypeRef) certArray);
+
+ if (allowsAnyCertificate)
+ CFDictionarySetValue(sslProps, kCFStreamSSLValidatesCertificateChain, kCFBooleanFalse);
+ return sslProps;
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosResourceRequestIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm (0 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm         (rev 0)
+++ trunk/Source/WebCore/platform/network/ios/ResourceRequestIOS.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "ResourceRequest.h"
+
+#if PLATFORM(IOS)
+
+@interface NSURLRequest (WebNSURLRequestDetails)
+- (CFURLRequestRef)_CFURLRequest;
+- (id)_initWithCFURLRequest:(CFURLRequestRef)request;
+@end
+
+namespace WebCore {
+
+#if USE(CFURLCONNECTION)
+
+ResourceRequest::ResourceRequest(NSURLRequest *nsRequest)
+ : ResourceRequestBase()
+ , m_cfRequest([nsRequest _CFURLRequest])
+ , m_nsRequest(nsRequest)
+{
+}
+
+void ResourceRequest::updateNSURLRequest()
+{
+ if (m_cfRequest)
+ m_nsRequest = adoptNS([[NSMutableURLRequest alloc] _initWithCFURLRequest:m_cfRequest.get()]);
+}
+
+void ResourceRequest::clearOrUpdateNSURLRequest()
+{
+ // There is client code that extends NSURLRequest and expects to get back, in the delegate
+ // callbacks, an object of the same type that they passed into WebKit. To keep then running, we
+ // create an object of the same type and return that. See <rdar://9843582>.
+ // Also, developers really really want an NSMutableURLRequest so try to create an
+ // NSMutableURLRequest instead of NSURLRequest.
+ static Class nsURLRequestClass = [NSURLRequest class];
+ static Class nsMutableURLRequestClass = [NSMutableURLRequest class];
+ Class requestClass = [m_nsRequest.get() class];
+
+ if (!m_cfRequest)
+ return;
+
+ if (requestClass && requestClass != nsURLRequestClass && requestClass != nsMutableURLRequestClass)
+ m_nsRequest = adoptNS([[requestClass alloc] _initWithCFURLRequest:m_cfRequest.get()]);
+ else
+ m_nsRequest = nullptr;
+}
+
+#endif // USE(CFURLCONNECTION)
+
+} // namespace WebCore
+
+#endif // PLATFORM(IOS)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -32,11 +32,18 @@
</span><span class="cx"> #import <Foundation/NSURLAuthenticationChallenge.h>
</span><span class="cx"> #import <Foundation/NSURLProtectionSpace.h>
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#import "CFNSURLConnectionSPI.h"
+#endif
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> @interface WebCoreAuthenticationClientAsChallengeSender : NSObject <NSURLAuthenticationChallengeSender>
</span><span class="cx"> {
</span><span class="cx"> AuthenticationClient* m_client;
</span><ins>+#if USE(CFURLCONNECTION)
+ CFURLAuthChallengeRef m_cfChallenge;
+#endif
</ins><span class="cx"> }
</span><span class="cx"> - (id)initWithAuthenticationClient:(AuthenticationClient*)client;
</span><span class="cx"> - (AuthenticationClient*)client;
</span><span class="lines">@@ -94,10 +101,47 @@
</span><span class="cx"> m_client->receivedCancellation(core(challenge));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+- (void)setCFChallenge:(CFURLAuthChallengeRef)challenge
+{
+ m_cfChallenge = challenge;
+}
+
+- (CFURLAuthChallengeRef)cfChallenge
+{
+ return m_cfChallenge;
+}
+#endif
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+
+AuthenticationChallenge core(NSURLAuthenticationChallenge *macChallenge)
+{
+ WebCoreAuthenticationClientAsChallengeSender *challengeSender = (WebCoreAuthenticationClientAsChallengeSender*) [macChallenge sender];
+ return AuthenticationChallenge([challengeSender cfChallenge], [challengeSender client]);
+}
+
+NSURLAuthenticationChallenge *mac(const AuthenticationChallenge& coreChallenge)
+{
+ AuthenticationClient* authClient = coreChallenge.authenticationClient();
+ RetainPtr<WebCoreAuthenticationClientAsChallengeSender> challengeSender = adoptNS([[WebCoreAuthenticationClientAsChallengeSender alloc] initWithAuthenticationClient:authClient]);
+ RetainPtr<CFURLAuthChallengeRef> authChallenge = coreChallenge.cfURLAuthChallengeRef();
+ if (!authChallenge)
+ authChallenge = adoptCF(createCF(coreChallenge));
+ [challengeSender.get() setCFChallenge:authChallenge.get()];
+#if PLATFORM(IOS)
+ return [[NSURLAuthenticationChallenge _createAuthenticationChallengeForCFAuthChallenge:authChallenge.get() sender:challengeSender.get()] autorelease];
+#else
+ return [[NSURLAuthenticationChallenge _authenticationChallengeForCFAuthChallenge:authChallenge.get() sender:challengeSender.get()] autorelease];
+#endif
+}
+
+#else
+
</ins><span class="cx"> AuthenticationChallenge::AuthenticationChallenge(const ProtectionSpace& protectionSpace,
</span><span class="cx"> const Credential& proposedCredential,
</span><span class="cx"> unsigned previousFailureCount,
</span><span class="lines">@@ -171,4 +215,6 @@
</span><span class="cx"> return AuthenticationChallenge(macChallenge);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif // USE(CFURLCONNECTION)
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacCookieJarMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -27,12 +27,19 @@
</span><span class="cx"> #import "PlatformCookieJar.h"
</span><span class="cx">
</span><span class="cx"> #import "CFNetworkSPI.h"
</span><ins>+#import "NetworkStorageSession.h"
+#import "WebCoreSystemInterface.h"
+#import <wtf/BlockObjCExceptions.h>
+
+namespace WebCore {
+static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession&);
+}
+
+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #import "Cookie.h"
</span><span class="cx"> #import "CookieStorage.h"
</span><del>-#import "NetworkStorageSession.h"
</del><span class="cx"> #import "URL.h"
</span><del>-#import "WebCoreSystemInterface.h"
-#import <wtf/BlockObjCExceptions.h>
</del><span class="cx"> #import <wtf/Optional.h>
</span><span class="cx"> #import <wtf/text/StringBuilder.h>
</span><span class="cx">
</span><span class="lines">@@ -184,7 +191,6 @@
</span><span class="cx"> NSURL *cookieURL = url;
</span><span class="cx"> NSDictionary *headerFields = [NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"];
</span><span class="cx">
</span><del>- // FIXME: Is this needed on iOS, too?
</del><span class="cx"> #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
</span><span class="cx"> NSArray *unfilteredCookies = [NSHTTPCookie _parsedCookiesWithResponseHeaderFields:headerFields forURL:cookieURL];
</span><span class="cx"> #else
</span><span class="lines">@@ -254,15 +260,6 @@
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession& session)
-{
- auto cookieStorage = session.cookieStorage();
- if (!cookieStorage || [NSHTTPCookieStorage sharedHTTPCookieStorage]._cookieStorage == cookieStorage)
- return [NSHTTPCookieStorage sharedHTTPCookieStorage];
-
- return [[[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:cookieStorage.get()] autorelease];
-}
-
</del><span class="cx"> void addCookie(const NetworkStorageSession& session, const URL& url, const Cookie& cookie)
</span><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><span class="lines">@@ -283,10 +280,12 @@
</span><span class="cx"> NSHTTPCookieExpires: [NSDate dateWithTimeIntervalSince1970:cookie.expires / 1000.0],
</span><span class="cx"> }];
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> if (!cookieStorage) {
</span><span class="cx"> [WebCore::cookieStorage(session) setCookie:httpCookie];
</span><span class="cx"> return;
</span><span class="cx"> }
</span><ins>+#endif // !USE(CFURLCONNECTION)
</ins><span class="cx">
</span><span class="cx"> CFHTTPCookieStorageSetCookie(cookieStorage.get(), [httpCookie _CFHTTPCookie]);
</span><span class="cx">
</span><span class="lines">@@ -310,6 +309,21 @@
</span><span class="cx"> wkDeleteAllHTTPCookies(session.cookieStorage().get());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+}
+
+#endif // !USE(CFURLCONNECTION)
+
+namespace WebCore {
+
+static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession& session)
+{
+ auto cookieStorage = session.cookieStorage();
+ if (!cookieStorage || [NSHTTPCookieStorage sharedHTTPCookieStorage]._cookieStorage == cookieStorage)
+ return [NSHTTPCookieStorage sharedHTTPCookieStorage];
+
+ return [[[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:cookieStorage.get()] autorelease];
+}
+
</ins><span class="cx"> void deleteCookiesForHostnames(const NetworkStorageSession& session, const Vector<String>& hostnames)
</span><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacCredentialStorageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "CredentialStorage.h"
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #include "AuthenticationMac.h"
</span><span class="cx"> #include "Credential.h"
</span><span class="cx"> #include "ProtectionSpace.h"
</span><span class="lines">@@ -50,3 +52,5 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacFormDataStreamMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx">
</span><span class="cx"> typedef const struct _CFURLRequest* CFURLRequestRef;
</span><span class="lines">@@ -45,3 +47,5 @@
</span><span class="cx"> CFStringRef formDataStreamLengthPropertyName();
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacFormDataStreamMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/FormDataStreamMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -29,6 +29,8 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "FormDataStreamMac.h"
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #import "FormData.h"
</span><span class="cx"> #import "FormDataStreamCFNet.h"
</span><span class="cx">
</span><span class="lines">@@ -49,3 +51,5 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceErrorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/ResourceErrorMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -31,6 +31,10 @@
</span><span class="cx"> #import <Foundation/Foundation.h>
</span><span class="cx"> #import <wtf/BlockObjCExceptions.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS) && USE(CFURLCONNECTION)
+#import <CFNetwork/CFSocketStreamPriv.h>
+#endif
+
</ins><span class="cx"> @interface NSError (WebExtras)
</span><span class="cx"> - (NSString *)_web_localizedDescription;
</span><span class="cx"> @end
</span><span class="lines">@@ -87,6 +91,85 @@
</span><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span><ins>+
+#if USE(CFURLCONNECTION)
+static NSError *NSErrorFromCFError(CFErrorRef cfError, NSURL *url)
+{
+ CFIndex errCode = CFErrorGetCode(cfError);
+ if (CFEqual(CFErrorGetDomain(cfError), kCFErrorDomainCFNetwork) && errCode <= kCFURLErrorUnknown && errCode > -4000) {
+ // This is an URL error and needs to be translated to the NSURLErrorDomain
+ id keys[10], values[10];
+ CFDictionaryRef userInfo = CFErrorCopyUserInfo(cfError);
+ NSError *result;
+ NSInteger count = 0;
+
+ if (url) {
+ keys[count] = NSURLErrorFailingURLErrorKey;
+ values[count] = url;
+ count++;
+
+ keys[count] = NSURLErrorFailingURLStringErrorKey;
+ values[count] = [url absoluteString];
+ count++;
+ }
+
+ values[count] = (id)CFDictionaryGetValue(userInfo, kCFErrorLocalizedDescriptionKey);
+ if (values[count]) {
+ keys[count] = NSLocalizedDescriptionKey;
+ count++;
+ }
+
+ values[count] = (id)CFDictionaryGetValue(userInfo, kCFErrorLocalizedFailureReasonKey);
+ if (values[count]) {
+ keys[count] = NSLocalizedFailureReasonErrorKey;
+ count++;
+ }
+
+ values[count] = (id)CFDictionaryGetValue(userInfo, kCFErrorLocalizedRecoverySuggestionKey);
+ if (values[count]) {
+ keys[count] = NSLocalizedRecoverySuggestionErrorKey;
+ count++;
+ }
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ if (userInfo && (values[count] = (id)CFDictionaryGetValue(userInfo, kCFStreamPropertySSLPeerCertificates)) != nil) {
+ // Need to translate the cert
+ keys[count] = @"NSErrorPeerCertificateChainKey";
+ count++;
+
+ values[count] = (id)CFDictionaryGetValue(userInfo, _kCFStreamPropertySSLClientCertificates);
+ if (values[count]) {
+ keys[count] = @"NSErrorClientCertificateChainKey";
+ count++;
+ }
+
+ values[count] = (id)CFDictionaryGetValue(userInfo, _kCFStreamPropertySSLClientCertificateState);
+ if (values[count]) {
+ keys[count] = @"NSErrorClientCertificateStateKey";
+ count++;
+ }
+ }
+#pragma clang diagnostic pop
+
+ if (userInfo && (values[count] = (id)CFDictionaryGetValue(userInfo, kCFStreamPropertySSLPeerTrust)) != nil) {
+ keys[count] = NSURLErrorFailingURLPeerTrustErrorKey;
+ count++;
+ }
+
+ keys[count] = NSUnderlyingErrorKey;
+ values[count] = (id)cfError;
+ count++;
+
+ result = [WebCustomNSURLError errorWithDomain:NSURLErrorDomain code:(errCode == kCFURLErrorUnknown ? (CFIndex)NSURLErrorUnknown : errCode) userInfo:[NSDictionary dictionaryWithObjects:values forKeys:keys count:count]];
+ if (userInfo)
+ CFRelease(userInfo);
+ return result;
+ }
+ return (NSError *)cfError;
+}
+#endif // USE(CFURLCONNECTION)
+
</ins><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -107,6 +190,53 @@
</span><span class="cx"> return adoptNS([[NSError alloc] initWithDomain:resourceError.domain() code:resourceError.errorCode() userInfo:userInfo.get()]);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+
+ResourceError::ResourceError(NSError *error)
+ : ResourceErrorBase(Type::Null)
+ , m_dataIsUpToDate(false)
+ , m_platformError(reinterpret_cast<CFErrorRef>(error))
+{
+ if (error)
+ setType(([error code] == NSURLErrorTimedOut) ? Type::Timeout : Type::General);
+}
+
+NSError *ResourceError::nsError() const
+{
+ if (isNull()) {
+ ASSERT(!m_platformError);
+ return nil;
+ }
+
+ if (m_platformNSError)
+ return m_platformNSError.get();
+
+ if (m_platformError) {
+ CFErrorRef error = m_platformError.get();
+ RetainPtr<CFDictionaryRef> userInfo = adoptCF(CFErrorCopyUserInfo(error));
+#if PLATFORM(IOS)
+ m_platformNSError = NSErrorFromCFError(error, (NSURL *)[(NSDictionary *)userInfo.get() objectForKey:(id) kCFURLErrorFailingURLErrorKey]);
+ // If NSErrorFromCFError created a new NSError for us, return that.
+ if (m_platformNSError.get() != (NSError *)error)
+ return m_platformNSError.get();
+
+ // Otherwise fall through to create a new NSError from the CFError.
+#endif
+ m_platformNSError = adoptNS([[NSError alloc] initWithDomain:(NSString *)CFErrorGetDomain(error) code:CFErrorGetCode(error) userInfo:(NSDictionary *)userInfo.get()]);
+ return m_platformNSError.get();
+ }
+
+ m_platformNSError = createNSErrorFromResourceErrorBase(*this);
+ return m_platformNSError.get();
+}
+
+ResourceError::operator NSError *() const
+{
+ return nsError();
+}
+
+#else
+
</ins><span class="cx"> ResourceError::ResourceError(NSError *nsError)
</span><span class="cx"> : ResourceErrorBase(Type::Null)
</span><span class="cx"> , m_dataIsUpToDate(false)
</span><span class="lines">@@ -179,4 +309,6 @@
</span><span class="cx"> return cfError();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif // USE(CFURLCONNECTION)
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -58,6 +58,16 @@
</span><span class="cx"> #import <wtf/text/Base64.h>
</span><span class="cx"> #import <wtf/text/CString.h>
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#if USE(APPLE_INTERNAL_SDK)
+#import <CFNetwork/CFURLConnectionPriv.h>
+#endif
+typedef struct _CFURLConnection* CFURLConnectionRef;
+extern "C" {
+CFDictionaryRef _CFURLConnectionCopyTimingData(CFURLConnectionRef);
+}
+#endif // USE(CFURLCONNECTION)
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #import "CFNetworkSPI.h"
</span><span class="cx"> #import "RuntimeApplicationChecks.h"
</span><span class="lines">@@ -80,6 +90,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> static void applyBasicAuthorizationHeader(ResourceRequest& request, const Credential& credential)
</span><span class="cx"> {
</span><span class="cx"> String authenticationHeader = "Basic " + base64Encode(String(credential.user() + ":" + credential.password()).utf8());
</span><span class="lines">@@ -317,6 +329,8 @@
</span><span class="cx"> [d->m_connection setDefersCallbacks:defers];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> void ResourceHandle::schedule(SchedulePair& pair)
</span><span class="cx"> {
</span><span class="cx"> NSRunLoop *runLoop = pair.nsRunLoop();
</span><span class="lines">@@ -335,6 +349,8 @@
</span><span class="cx"> [d->m_connection.get() unscheduleFromRunLoop:runLoop forMode:(NSString *)pair.mode()];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> id ResourceHandle::makeDelegate(bool shouldUseCredentialStorage)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!d->m_delegate);
</span><span class="lines">@@ -714,14 +730,27 @@
</span><span class="cx">
</span><span class="cx"> [(id)delegate() continueWillCacheResponse:response];
</span><span class="cx"> }
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
+
+#if ENABLE(WEB_TIMING)
</ins><span class="cx">
</span><del>-#if ENABLE(WEB_TIMING)
</del><ins>+#if USE(CFURLCONNECTION)
</ins><span class="cx">
</span><ins>+void ResourceHandle::getConnectionTimingData(CFURLConnectionRef connection, NetworkLoadTiming& timing)
+{
+ copyTimingData((__bridge NSDictionary*)adoptCF(_CFURLConnectionCopyTimingData(connection)).get(), timing);
+}
+
+#else
+
</ins><span class="cx"> void ResourceHandle::getConnectionTimingData(NSURLConnection *connection, NetworkLoadTiming& timing)
</span><span class="cx"> {
</span><span class="cx"> copyTimingData([connection _timingData], timing);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif
+
</ins><span class="cx"> #endif // ENABLE(WEB_TIMING)
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceRequestMacmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm (0 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm         (rev 0)
+++ trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2006, 2007, 2008 Apple, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "ResourceRequest.h"
+
+#if PLATFORM(MAC)
+
+#import <Foundation/Foundation.h>
+
+@interface NSURLRequest (WebNSURLRequestDetails)
+- (CFURLRequestRef)_CFURLRequest;
+- (id)_initWithCFURLRequest:(CFURLRequestRef)request;
+@end
+
+namespace WebCore {
+
+#if USE(CFURLCONNECTION)
+
+ResourceRequest::ResourceRequest(NSURLRequest *nsRequest)
+ : ResourceRequestBase()
+ , m_cfRequest([nsRequest _CFURLRequest])
+ , m_nsRequest(nsRequest)
+{
+}
+
+void ResourceRequest::updateNSURLRequest()
+{
+ if (m_cfRequest)
+ m_nsRequest = adoptNS([[NSURLRequest alloc] _initWithCFURLRequest:m_cfRequest.get()]);
+}
+
+#endif
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacSynchronousLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/SynchronousLoaderClient.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/SynchronousLoaderClient.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/SynchronousLoaderClient.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "SynchronousLoaderClient.h"
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #include "AuthenticationChallenge.h"
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -36,10 +38,14 @@
</span><span class="cx"> [challenge.sender() continueWithoutCredentialForAuthenticationChallenge:challenge.nsURLAuthenticationChallenge()];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> ResourceError SynchronousLoaderClient::platformBadResponseError()
</span><span class="cx"> {
</span><span class="cx"> RetainPtr<NSError> error = adoptNS([[NSError alloc] initWithDomain:NSURLErrorDomain code:NSURLErrorBadServerResponse userInfo:nil]);
</span><span class="cx"> return error.get();
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> }
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -33,8 +33,12 @@
</span><span class="cx"> - (void)detachHandle;
</span><span class="cx"> @end
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> @interface WebCoreResourceHandleAsDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
</span><span class="cx"> WebCore::ResourceHandle* m_handle;
</span><span class="cx"> }
</span><span class="cx"> - (id)initWithHandle:(WebCore::ResourceHandle*)handle;
</span><span class="cx"> @end
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "WebCoreResourceHandleAsDelegate.h"
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #import "AuthenticationChallenge.h"
</span><span class="cx"> #import "AuthenticationMac.h"
</span><span class="cx"> #import "Logging.h"
</span><span class="lines">@@ -274,3 +276,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -25,6 +25,8 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #include "WebCoreResourceHandleAsDelegate.h"
</span><span class="cx"> #include <dispatch/dispatch.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="lines">@@ -55,3 +57,5 @@
</span><span class="cx"> @interface WebCoreResourceHandleWithCredentialStorageAsOperationQueueDelegate : WebCoreResourceHandleAsOperationQueueDelegate
</span><span class="cx">
</span><span class="cx"> @end
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "WebCoreResourceHandleAsOperationQueueDelegate.h"
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
+
</ins><span class="cx"> #import "AuthenticationChallenge.h"
</span><span class="cx"> #import "AuthenticationMac.h"
</span><span class="cx"> #import "Logging.h"
</span><span class="lines">@@ -327,3 +329,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span><ins>+
+#endif // !USE(CFURLCONNECTION)
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreURLResponsemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -325,6 +325,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> NSURLResponse *synthesizeRedirectResponseIfNecessary(NSURLRequest *currentRequest, NSURLRequest *newRequest, NSURLResponse *redirectResponse)
</span><span class="cx"> {
</span><span class="cx"> if (redirectResponse)
</span><span class="lines">@@ -338,5 +339,6 @@
</span><span class="cx"> NSDictionary *synthesizedResponseHeaderFields = @{ @"Location": [[newRequest URL] absoluteString], @"Cache-Control": @"no-store" };
</span><span class="cx"> return [[[NSHTTPURLResponse alloc] initWithURL:[currentRequest URL] statusCode:302 HTTPVersion:(NSString *)kCFHTTPVersion1_1 headerFields:synthesizedResponseHeaderFields] autorelease];
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/ChangeLog        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-10-19 Alex Christensen <achristensen@webkit.org>
+
+ Revert r207151
+ https://bugs.webkit.org/show_bug.cgi?id=163675
+
+ Reviewed by Brent Fulgham.
+
+ * WebCoreSupport/WebResourceLoadScheduler.cpp:
+ (WebResourceLoadScheduler::scheduleLoad):
+
</ins><span class="cx"> 2016-10-14 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix CMake build.
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-10-19 Alex Christensen <achristensen@webkit.org>
+
+ Revert r207151
+ https://bugs.webkit.org/show_bug.cgi?id=163675
+
+ Reviewed by Brent Fulgham.
+
+ * Misc/WebDownload.mm:
+ (-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]):
+ * Misc/WebDownloadInternal.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::convertMainResourceLoadToDownload):
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):
+ * WebView/WebView.mm:
+ (-[WebView scheduleInRunLoop:forMode:]):
+ (-[WebView unscheduleFromRunLoop:forMode:]):
+
</ins><span class="cx"> 2016-10-19 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r207557.
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebDownloadmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebDownload.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebDownload.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/mac/Misc/WebDownload.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -40,6 +40,11 @@
</span><span class="cx">
</span><span class="cx"> #import "WebTypesInternal.h"
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#import <CFNetwork/CFNetwork.h>
+#import <CFNetwork/CFURLConnection.h>
+#endif
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> @class NSURLConnectionDelegateProxy;
</span><span class="lines">@@ -56,6 +61,10 @@
</span><span class="cx"> delegate:(id)delegate
</span><span class="cx"> directory:(NSString *)directory;
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+- (id)_initWithLoadingCFURLConnection:(CFURLConnectionRef)connection request:(CFURLRequestRef)request response:(CFURLResponseRef)response delegate:(id)delegate proxy:(NSURLConnectionDelegateProxy *)proxy;
+#endif
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @interface WebDownloadInternal : NSObject <NSURLDownloadDelegate>
</span><span class="lines">@@ -218,6 +227,14 @@
</span><span class="cx"> return [super _initWithLoadingConnection:connection request:request response:response delegate:_webInternal proxy:proxy];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+- (id)_initWithLoadingCFURLConnection:(CFURLConnectionRef)connection request:(CFURLRequestRef)request response:(CFURLResponseRef)response delegate:(id)delegate proxy:(NSURLConnectionDelegateProxy *)proxy
+{
+ [self _setRealDelegate:delegate];
+ return [super _initWithLoadingCFURLConnection:connection request:request response:response delegate:_webInternal proxy:proxy];
+}
+#endif
+
</ins><span class="cx"> - (id)_initWithRequest:(NSURLRequest *)request
</span><span class="cx"> delegate:(id)delegate
</span><span class="cx"> directory:(NSString *)directory
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebDownloadInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebDownloadInternal.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebDownloadInternal.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/mac/Misc/WebDownloadInternal.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -27,16 +27,18 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #import <WebKitLegacy/WebDownload.h>
</span><ins>+
+#if USE(CFURLCONNECTION)
+#import <CFNetwork/CFURLConnection.h>
+#endif
</ins><span class="cx">
</span><span class="cx"> @interface WebDownload (WebDownloadCreation)
</span><del>-+(id)_downloadWithLoadingConnection:(NSURLConnection *)connection
- request:(NSURLRequest *)request
- response:(NSURLResponse *)r
- delegate:(id)delegate
- proxy:(id)proxy;
</del><ins>++(id)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r delegate:(id)delegate proxy:(id)proxy;
</ins><span class="cx">
</span><del>-+(id)_downloadWithRequest:(NSURLRequest *)request
- delegate:(id)delegate
- directory:(NSString *)directory;
</del><ins>++(id)_downloadWithRequest:(NSURLRequest *)request delegate:(id)delegate directory:(NSString *)directory;
</ins><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
++ (id)_downloadWithLoadingCFURLConnection:(CFURLConnectionRef)connection request:(CFURLRequestRef)request response:(CFURLResponseRef)response delegate:(id)delegate proxy:(id)proxy;
+#endif
+
</ins><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -304,7 +304,13 @@
</span><span class="cx">
</span><span class="cx"> ResourceHandle* handle = mainResourceLoader->handle();
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+ ASSERT([WebDownload respondsToSelector:@selector(_downloadWithLoadingCFURLConnection:request:response:delegate:proxy:)]);
+ auto connection = handle->releaseConnectionForDownload();
+ [WebDownload _downloadWithLoadingCFURLConnection:connection.get() request:request.cfURLRequest(UpdateHTTPBody) response:response.cfURLResponse() delegate:[webView downloadDelegate] proxy:nil];
+#else
</ins><span class="cx"> [WebDownload _downloadWithLoadingConnection:handle->connection() request:request.nsURLRequest(UpdateHTTPBody) response:response.nsURLResponse() delegate:[webView downloadDelegate] proxy:nil];
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, const ResourceRequest& request, const ResourceResponse& response, int length)
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1801,7 +1801,7 @@
</span><span class="cx"> + (void)_setCurrentNetworkLoaderSessionCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy
</span><span class="cx"> {
</span><span class="cx"> RetainPtr<CFHTTPCookieStorageRef> cookieStorage = NetworkStorageSession::defaultStorageSession().cookieStorage();
</span><del>- ASSERT(cookieStorage); // Will fail when NetworkStorageSession::switchToNewTestingSession() was not called beforehand.
</del><ins>+ ASSERT(cookieStorage); // Will fail when building without USE(CFURLCONNECTION) and NetworkStorageSession::switchToNewTestingSession() was not called beforehand.
</ins><span class="cx"> CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage.get(), policy);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -6791,14 +6791,24 @@
</span><span class="cx">
</span><span class="cx"> - (void)scheduleInRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode
</span><span class="cx"> {
</span><ins>+#if USE(CFURLCONNECTION)
+ CFRunLoopRef schedulePairRunLoop = [runLoop getCFRunLoop];
+#else
+ NSRunLoop *schedulePairRunLoop = runLoop;
+#endif
</ins><span class="cx"> if (runLoop && mode)
</span><del>- core(self)->addSchedulePair(SchedulePair::create(runLoop, (CFStringRef)mode));
</del><ins>+ core(self)->addSchedulePair(SchedulePair::create(schedulePairRunLoop, (CFStringRef)mode));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)unscheduleFromRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode
</span><span class="cx"> {
</span><ins>+#if USE(CFURLCONNECTION)
+ CFRunLoopRef schedulePairRunLoop = [runLoop getCFRunLoop];
+#else
+ NSRunLoop *schedulePairRunLoop = runLoop;
+#endif
</ins><span class="cx"> if (runLoop && mode)
</span><del>- core(self)->removeSchedulePair(SchedulePair::create(runLoop, (CFStringRef)mode));
</del><ins>+ core(self)->removeSchedulePair(SchedulePair::create(schedulePairRunLoop, (CFStringRef)mode));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static BOOL findString(NSView <WebDocumentSearching> *searchView, NSString *string, WebFindOptions options)
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/win/ChangeLog        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-10-19 Alex Christensen <achristensen@webkit.org>
+
+ Revert r207151
+ https://bugs.webkit.org/show_bug.cgi?id=163675
+
+ Reviewed by Brent Fulgham.
+
+ * DefaultDownloadDelegate.h:
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::savePlatformDataToCachedFrame):
+ * WebCoreSupport/WebFrameNetworkingContext.cpp:
+ (WebFrameNetworkingContext::ensurePrivateBrowsingSession):
+ * WebCoreSupport/WebFrameNetworkingContext.h:
+ * WebCoreSupport/WebPlatformStrategies.cpp:
+ * WebDownload.h:
+ * WebError.cpp:
+ (WebError::localizedDescription):
+ (WebError::sslPeerCertificate):
+ * WebError.h:
+ * WebMutableURLRequest.cpp:
+ (WebMutableURLRequest::mutableCopy):
+ * WebURLAuthenticationChallenge.cpp:
+ (WebURLAuthenticationChallenge::initWithProtectionSpace):
+ (WebURLAuthenticationChallenge::initWithAuthenticationChallenge):
+ * WebURLResponse.cpp:
+ (WebURLResponse::sslPeerCertificate):
+ * WebURLResponse.h:
+ * WebView.cpp:
+ (WebView::setCacheModel):
+ (WebView::canHandleRequest):
+ (WebView::notifyPreferencesChanged):
+ (updateSharedSettingsFromPreferencesIfNeeded):
+
</ins><span class="cx"> 2016-10-18 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Move many miscellaneous classes from ExceptionCode to Exception
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit/win/WebView.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -5261,7 +5261,7 @@
</span><span class="cx"> hr = preferences->privateBrowsingEnabled(&enabled);
</span><span class="cx"> if (FAILED(hr))
</span><span class="cx"> return hr;
</span><del>-#if USE(CFURLCONNECTION)
</del><ins>+#if PLATFORM(WIN) || USE(CFURLCONNECTION)
</ins><span class="cx"> if (enabled)
</span><span class="cx"> WebFrameNetworkingContext::ensurePrivateBrowsingSession();
</span><span class="cx"> else
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/ChangeLog        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-10-19 Alex Christensen <achristensen@webkit.org>
+
+ Revert r207151
+ https://bugs.webkit.org/show_bug.cgi?id=163675
+
+ Reviewed by Brent Fulgham.
+
+ * NetworkProcess/Downloads/Download.h:
+ * NetworkProcess/Downloads/mac/DownloadMac.mm:
+ * NetworkProcess/NetworkLoad.h:
+ * NetworkProcess/mac/NetworkLoadMac.mm:
+ (WebKit::NetworkLoad::willCacheResponseAsync):
+ * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
+ (WebKit::AuthenticationManager::receivedCredential):
+ (WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
+ (WebKit::AuthenticationManager::receivedCancellation):
+ (WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
+ (WebKit::AuthenticationManager::receivedChallengeRejection):
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::encode):
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+ * Shared/mac/WebCoreArgumentCodersMac.mm:
+ (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
+ (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
+ * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2016-10-19 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> [WK2] Expose suggested filename via WKBundleHitTestResult API
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessDownloadsDownloadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/Download.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -47,6 +47,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#include <CFNetwork/CFURLDownloadPriv.h>
+#endif
+
</ins><span class="cx"> namespace IPC {
</span><span class="cx"> class DataReference;
</span><span class="cx"> }
</span><span class="lines">@@ -135,6 +139,9 @@
</span><span class="cx"> RetainPtr<WKDownloadAsDelegate> m_delegate;
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><ins>+#if USE(CFURLCONNECTION)
+ RetainPtr<CFURLDownloadRef> m_download;
+#endif
</ins><span class="cx"> std::unique_ptr<WebCore::ResourceHandleClient> m_downloadClient;
</span><span class="cx"> RefPtr<WebCore::ResourceHandle> m_resourceHandle;
</span><span class="cx"> String m_suggestedName;
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessDownloadsmacDownloadMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/mac/DownloadMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "Download.h"
</span><span class="cx">
</span><del>-#if !USE(NETWORK_SESSION)
</del><ins>+#if !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
</ins><span class="cx">
</span><span class="cx"> #import <WebCore/AuthenticationChallenge.h>
</span><span class="cx"> #import <WebCore/AuthenticationMac.h>
</span><span class="lines">@@ -272,4 +272,4 @@
</span><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span><del>-#endif // !USE(NETWORK_SESSION)
</del><ins>+#endif // !USE(CFURLCONNECTION) && !USE(NETWORK_SESSION)
</ins></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkLoadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkLoad.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -79,8 +79,12 @@
</span><span class="cx"> void didReceiveDataArray(WebCore::ResourceHandle*, CFArrayRef) override;
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA)
</span><ins>+#if USE(CFURLCONNECTION)
+ void willCacheResponseAsync(WebCore::ResourceHandle*, CFCachedURLResponseRef) override;
+#else
</ins><span class="cx"> void willCacheResponseAsync(WebCore::ResourceHandle*, NSCachedURLResponse *) override;
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> #if USE(PROTECTION_SPACE_AUTH_CALLBACK)
</span><span class="cx"> void continueCanAuthenticateAgainstProtectionSpace(bool);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessmacNetworkLoadMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/mac/NetworkLoadMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/mac/NetworkLoadMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/NetworkProcess/mac/NetworkLoadMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -33,6 +33,17 @@
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+
+void NetworkLoad::willCacheResponseAsync(ResourceHandle* handle, CFCachedURLResponseRef cfResponse)
+{
+ ASSERT_UNUSED(handle, handle == m_handle);
+
+ m_handle->continueWillCacheResponse(cfResponse);
+}
+
+#else
+
</ins><span class="cx"> void NetworkLoad::willCacheResponseAsync(ResourceHandle* handle, NSCachedURLResponse *nsResponse)
</span><span class="cx"> {
</span><span class="cx"> ASSERT_UNUSED(handle, handle == m_handle);
</span><span class="lines">@@ -40,4 +51,6 @@
</span><span class="cx"> m_handle->continueWillCacheResponse(nsResponse);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#endif // !USE(CFURLCONNECTION)
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAuthenticationcocoaAuthenticationManagerCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -32,27 +32,37 @@
</span><span class="cx">
</span><span class="cx"> void AuthenticationManager::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
</span><span class="cx"> {
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> [authenticationChallenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AuthenticationManager::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& authenticationChallenge)
</span><span class="cx"> {
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> [authenticationChallenge.sender() continueWithoutCredentialForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AuthenticationManager::receivedCancellation(const AuthenticationChallenge& authenticationChallenge)
</span><span class="cx"> {
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> [authenticationChallenge.sender() cancelAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AuthenticationManager::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& authenticationChallenge)
</span><span class="cx"> {
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> [authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AuthenticationManager::receivedChallengeRejection(const AuthenticationChallenge& authenticationChallenge)
</span><span class="cx"> {
</span><ins>+#if !USE(CFURLCONNECTION)
</ins><span class="cx"> [authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()];
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> encoder << textCheckerState;
</span><span class="cx"> encoder << fullKeyboardAccessEnabled;
</span><span class="cx"> encoder << defaultRequestTimeoutInterval;
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
</ins><span class="cx"> encoder << uiProcessBundleIdentifier;
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(parameters.defaultRequestTimeoutInterval))
</span><span class="cx"> return false;
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
</ins><span class="cx"> if (!decoder.decode(parameters.uiProcessBundleIdentifier))
</span><span class="cx"> return false;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">
</span><span class="cx"> double defaultRequestTimeoutInterval;
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><ins>+#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
</ins><span class="cx"> String uiProcessBundleIdentifier;
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacWebCoreArgumentCodersMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -39,6 +39,10 @@
</span><span class="cx"> #import <WebCore/ResourceError.h>
</span><span class="cx"> #import <WebCore/ResourceRequest.h>
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+#import <CFNetwork/CFURLRequest.h>
+#endif
+
</ins><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="cx"> #import <WebCore/AVFoundationSPI.h>
</span><span class="cx"> #import <WebCore/MediaPlaybackTargetContext.h>
</span><span class="lines">@@ -53,8 +57,38 @@
</span><span class="cx">
</span><span class="cx"> namespace IPC {
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
</ins><span class="cx"> void ArgumentCoder<ResourceRequest>::encodePlatformData(Encoder& encoder, const ResourceRequest& resourceRequest)
</span><span class="cx"> {
</span><ins>+ RetainPtr<CFURLRequestRef> requestToSerialize = resourceRequest.cfURLRequest(DoNotUpdateHTTPBody);
+
+ bool requestIsPresent = requestToSerialize;
+ encoder << requestIsPresent;
+
+ if (!requestIsPresent)
+ return;
+
+ // We don't send HTTP body over IPC for better performance.
+ // Also, it's not always possible to do, as streams can only be created in process that does networking.
+ RetainPtr<CFDataRef> requestHTTPBody = adoptCF(CFURLRequestCopyHTTPRequestBody(requestToSerialize.get()));
+ RetainPtr<CFReadStreamRef> requestHTTPBodyStream = adoptCF(CFURLRequestCopyHTTPRequestBodyStream(requestToSerialize.get()));
+ if (requestHTTPBody || requestHTTPBodyStream) {
+ CFMutableURLRequestRef mutableRequest = CFURLRequestCreateMutableCopy(0, requestToSerialize.get());
+ requestToSerialize = adoptCF(mutableRequest);
+ CFURLRequestSetHTTPRequestBody(mutableRequest, nil);
+ CFURLRequestSetHTTPRequestBodyStream(mutableRequest, nil);
+ }
+
+ RetainPtr<CFDictionaryRef> dictionary = adoptCF(WKCFURLRequestCreateSerializableRepresentation(requestToSerialize.get(), IPC::tokenNullTypeRef()));
+ IPC::encode(encoder, dictionary.get());
+
+ // The fallback array is part of CFURLRequest, but it is not encoded by WKCFURLRequestCreateSerializableRepresentation.
+ encoder << resourceRequest.responseContentDispositionEncodingFallbackArray();
+ encoder.encodeEnum(resourceRequest.requester());
+}
+#else
+void ArgumentCoder<ResourceRequest>::encodePlatformData(Encoder& encoder, const ResourceRequest& resourceRequest)
+{
</ins><span class="cx"> RetainPtr<NSURLRequest> requestToSerialize = resourceRequest.nsURLRequest(DoNotUpdateHTTPBody);
</span><span class="cx">
</span><span class="cx"> bool requestIsPresent = requestToSerialize;
</span><span class="lines">@@ -79,6 +113,7 @@
</span><span class="cx"> encoder.encodeEnum(resourceRequest.requester());
</span><span class="cx"> encoder.encodeEnum(resourceRequest.cachePolicy());
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> bool ArgumentCoder<ResourceRequest>::decodePlatformData(Decoder& decoder, ResourceRequest& resourceRequest)
</span><span class="cx"> {
</span><span class="lines">@@ -95,11 +130,19 @@
</span><span class="cx"> if (!IPC::decode(decoder, dictionary))
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+#if USE(CFURLCONNECTION)
+ RetainPtr<CFURLRequestRef> cfURLRequest = adoptCF(WKCreateCFURLRequestFromSerializableRepresentation(dictionary.get(), IPC::tokenNullTypeRef()));
+ if (!cfURLRequest)
+ return false;
+
+ resourceRequest = ResourceRequest(cfURLRequest.get());
+#else
</ins><span class="cx"> RetainPtr<NSURLRequest> nsURLRequest = WKNSURLRequestFromSerializableRepresentation(dictionary.get(), IPC::tokenNullTypeRef());
</span><span class="cx"> if (!nsURLRequest)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> resourceRequest = ResourceRequest(nsURLRequest.get());
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> Vector<String> responseContentDispositionEncodingFallbackArray;
</span><span class="cx"> if (!decoder.decode(responseContentDispositionEncodingFallbackArray))
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (207584 => 207585)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-10-20 03:10:12 UTC (rev 207584)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-10-20 06:05:26 UTC (rev 207585)
</span><span class="lines">@@ -1050,6 +1050,7 @@
</span><span class="cx">                 5C1427051C23F84C00D41183 /* DownloadID.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426F71C23F84300D41183 /* DownloadID.h */; };
</span><span class="cx">                 5C1427061C23F84C00D41183 /* DownloadManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C1426F81C23F84300D41183 /* DownloadManager.cpp */; };
</span><span class="cx">                 5C1427071C23F84C00D41183 /* DownloadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426F91C23F84300D41183 /* DownloadManager.h */; };
</span><ins>+                5C1427111C23F89E00D41183 /* DownloadIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270D1C23F88500D41183 /* DownloadIOS.mm */; };
</ins><span class="cx">                 5C1427121C23F89E00D41183 /* DownloadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C14270F1C23F89900D41183 /* DownloadMac.mm */; };
</span><span class="cx">                 5C1427131C23F89E00D41183 /* DownloadCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C1427091C23F86900D41183 /* DownloadCocoa.mm */; };
</span><span class="cx">                 5C1427181C23F8B700D41183 /* CustomProtocolManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1427141C23F8B000D41183 /* CustomProtocolManager.h */; };
</span><span class="lines">@@ -3131,6 +3132,7 @@
</span><span class="cx">                 5C1426F81C23F84300D41183 /* DownloadManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DownloadManager.cpp; path = NetworkProcess/Downloads/DownloadManager.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5C1426F91C23F84300D41183 /* DownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DownloadManager.h; path = NetworkProcess/Downloads/DownloadManager.h; sourceTree = "<group>"; };
</span><span class="cx">                 5C1427091C23F86900D41183 /* DownloadCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadCocoa.mm; path = NetworkProcess/Downloads/cocoa/DownloadCocoa.mm; sourceTree = "<group>"; };
</span><ins>+                5C14270D1C23F88500D41183 /* DownloadIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadIOS.mm; path = NetworkProcess/Downloads/ios/DownloadIOS.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 5C14270F1C23F89900D41183 /* DownloadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DownloadMac.mm; path = NetworkProcess/Downloads/mac/DownloadMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 5C1427141C23F8B000D41183 /* CustomProtocolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomProtocolManager.h; path = NetworkProcess/CustomProtocols/CustomProtocolManager.h; sourceTree = "<group>"; };
</span><span class="cx">                 5C1427151C23F8B000D41183 /* CustomProtocolManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CustomProtocolManager.messages.in; path = NetworkProcess/CustomProtocols/CustomProtocolManager.messages.in; sourceTree = "<group>"; };
</span><span class="lines">@@ -5741,6 +5743,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 5C1427081C23F85200D41183 /* cocoa */,
</span><ins>+                                5C14270C1C23F87700D41183 /* ios */,
</ins><span class="cx">                                 5C14270B1C23F87100D41183 /* mac */,
</span><span class="cx">                                 83BFAC411D96136000433490 /* BlobDownloadClient.cpp */,
</span><span class="cx">                                 83BFAC401D96136000433490 /* BlobDownloadClient.h */,
</span><span class="lines">@@ -5781,6 +5784,14 @@
</span><span class="cx">                         name = mac;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="cx">                 };
</span><ins>+                5C14270C1C23F87700D41183 /* ios */ = {
+                        isa = PBXGroup;
+                        children = (
+                                5C14270D1C23F88500D41183 /* DownloadIOS.mm */,
+                        );
+                        name = ios;
+                        sourceTree = "<group>";
+                };
</ins><span class="cx">                 5C14271A1C23F8BF00D41183 /* Cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -9089,6 +9100,7 @@
</span><span class="cx">                                 5C1427011C23F84C00D41183 /* Download.cpp in Sources */,
</span><span class="cx">                                 A1DF631218E0B7C8003A3E2A /* DownloadClient.mm in Sources */,
</span><span class="cx">                                 5C1427131C23F89E00D41183 /* DownloadCocoa.mm in Sources */,
</span><ins>+                                5C1427111C23F89E00D41183 /* DownloadIOS.mm in Sources */,
</ins><span class="cx">                                 5C1427121C23F89E00D41183 /* DownloadMac.mm in Sources */,
</span><span class="cx">                                 5C1427061C23F84C00D41183 /* DownloadManager.cpp in Sources */,
</span><span class="cx">                                 1AB7D4CB1288AAA700CFD08C /* DownloadProxy.cpp in Sources */,
</span></span></pre>
</div>
</div>
</body>
</html>