[Mac] [iOS] Add support for CFHTTPCookieStorageAcceptPolicyExclusivelyFromMainDocumen...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 00:33:35 +0000 (00:33 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 00:33:35 +0000 (00:33 +0000)
commitd30978751fb3193addd7223cf173a9842a721c78
tree9b3818a44bd51b492f47dc537aece9c576da2c08
parent9d91a71cd5470d0dc86e54dbec11ee91e7bf8e6f
[Mac] [iOS] Add support for CFHTTPCookieStorageAcceptPolicyExclusivelyFromMainDocumentDomain
https://bugs.webkit.org/show_bug.cgi?id=127139

Reviewed by Brady Eidson.

Source/WebCore:

* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Pass first party URL down, because reading cookies depends on it when this policy
in in action.

* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::copyCookiesForURLWithFirstPartyURL):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
Use a new CFNetwork API that takes first party URL.

* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
Pass first party URL (and null in deleteCookie, as there is none).

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
Removed a call to shouldRelaxThirdPartyCookiePolicy(), which no longer exists
in trunk.

Source/WebKit/mac:

* WebView/WebPreferences.mm: (-[WebPreferences _synchronizeWebStoragePolicyWithCookiePolicy]):
Handle the new case.

Source/WebKit2:

* Shared/HTTPCookieAcceptPolicy.h:
* UIProcess/API/C/WKAPICast.h:
(WebKit::toHTTPCookieAcceptPolicy):
(WebKit::toAPI):
* UIProcess/API/C/WKCookieManager.h:
Added the policy to appropriate switches and enums.

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:
Update WebKitSystemInterface.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/network/cf/CookieJarCFNet.cpp
Source/WebCore/platform/network/mac/CookieJarMac.mm
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/HTTPCookieAcceptPolicy.h
Source/WebKit2/UIProcess/API/C/WKAPICast.h
Source/WebKit2/UIProcess/API/C/WKCookieManager.h
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLion.a
WebKitLibraries/libWebKitSystemInterfaceMavericks.a
WebKitLibraries/libWebKitSystemInterfaceMountainLion.a