Changeset 202279 in webkit
- Timestamp:
- Jun 21, 2016 10:20:08 AM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r202278 r202279 1 2016-06-21 Amir Alavi <aalavi@apple.com> 2 3 Upstream WKHTTPCookiesForURL from WebKitSystemInterface to OpenSource 4 https://bugs.webkit.org/show_bug.cgi?id=158967 5 6 Reviewed by Brent Fulgham. 7 8 * platform/ios/WebCoreSystemInterfaceIOS.mm: 9 * platform/mac/WebCoreSystemInterface.h: 10 * platform/mac/WebCoreSystemInterface.mm: 11 * platform/network/mac/CookieJarMac.mm: 12 (WebCore::httpCookiesForURL): Upstreamed from WebKitSystemInterface. 13 (WebCore::cookiesForURL): Changed to call httpCookiesForURL. 14 (WebCore::deleteCookie): Ditto. 15 * platform/spi/cf/CFNetworkSPI.h: 16 1 17 2016-06-21 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm
r194378 r202279 44 44 WEBCORE_EXPORT unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef); 45 45 WEBCORE_EXPORT NSArray *(*wkHTTPCookies)(CFHTTPCookieStorageRef); 46 WEBCORE_EXPORT NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *, NSURL *);47 46 WEBCORE_EXPORT void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *); 48 47 WEBCORE_EXPORT void (*wkDeleteAllHTTPCookies)(CFHTTPCookieStorageRef); -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h
r194378 r202279 223 223 extern unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef); 224 224 extern NSArray *(*wkHTTPCookies)(CFHTTPCookieStorageRef); 225 extern NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *, NSURL *);226 225 extern void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *); 227 226 extern void (*wkDeleteHTTPCookie)(CFHTTPCookieStorageRef, NSHTTPCookie *); -
trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm
r194378 r202279 100 100 unsigned (*wkGetHTTPCookieAcceptPolicy)(CFHTTPCookieStorageRef); 101 101 NSArray *(*wkHTTPCookies)(CFHTTPCookieStorageRef); 102 NSArray *(*wkHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSURL *, NSURL *);103 102 void (*wkSetHTTPCookiesForURL)(CFHTTPCookieStorageRef, NSArray *, NSURL *, NSURL *); 104 103 void (*wkDeleteAllHTTPCookies)(CFHTTPCookieStorageRef); -
trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm
r201038 r202279 46 46 namespace WebCore { 47 47 48 static NSArray *httpCookiesForURL(CFHTTPCookieStorageRef cookieStorage, NSURL *firstParty, NSURL *url) 49 { 50 if (!cookieStorage) { 51 // FIXME: The fallback to NSHTTPCookieStorage should not be present when USE(CFNETWORK) is defined. 52 return [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:url]; 53 } 54 55 bool secure = ![[url scheme] caseInsensitiveCompare:@"https"]; 56 57 auto cookies = adoptCF(_CFHTTPCookieStorageCopyCookiesForURLWithMainDocumentURL(cookieStorage, static_cast<CFURLRef>(url), static_cast<CFURLRef>(firstParty), secure)); 58 NSArray *nsCookies = [NSHTTPCookie _cf2nsCookies:cookies.get()]; 59 60 return nsCookies; 61 } 62 63 48 64 static RetainPtr<NSArray> filterCookies(NSArray *unfilteredCookies) 49 65 { … … 119 135 return cookies; 120 136 #endif 121 return wkHTTPCookiesForURL(session.cookieStorage().get(), firstParty, url);137 return httpCookiesForURL(session.cookieStorage().get(), firstParty, url); 122 138 } 123 139 … … 233 249 234 250 RetainPtr<CFHTTPCookieStorageRef> cookieStorage = session.cookieStorage(); 235 NSArray *cookies = wkHTTPCookiesForURL(cookieStorage.get(), 0, url);251 NSArray *cookies = httpCookiesForURL(cookieStorage.get(), nil, url); 236 252 237 253 NSString *cookieNameString = cookieName; -
trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h
r201492 r202279 179 179 EXTERN_C void CFURLResponseSetMIMEType(CFURLResponseRef, CFStringRef); 180 180 EXTERN_C CFHTTPCookieStorageRef _CFURLStorageSessionCopyCookieStorage(CFAllocatorRef, CFURLStorageSessionRef); 181 EXTERN_C CFArrayRef _CFHTTPCookieStorageCopyCookiesForURLWithMainDocumentURL(CFHTTPCookieStorageRef inCookieStorage, CFURLRef inURL, CFURLRef inMainDocumentURL, Boolean sendSecureCookies); 181 182 182 183 // FIXME: We should only forward declare this SPI when building for iOS without the Apple Internal SDK. … … 217 218 #if defined(__OBJC__) 218 219 220 @interface NSHTTPCookie () 219 221 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100 220 @interface NSHTTPCookie ()221 222 + (NSArray *)_parsedCookiesWithResponseHeaderFields:(NSDictionary *)headerFields forURL:(NSURL *)aURL; 222 @end 223 #endif 223 #endif 224 + (NSArray *)_cf2nsCookies:(CFArrayRef)cfCookies; 225 @end 224 226 225 227 #if !USE(APPLE_INTERNAL_SDK) -
trunk/Source/WebKit/mac/ChangeLog
r202263 r202279 1 2016-06-21 Amir Alavi <aalavi@apple.com> 2 3 Upstream WKHTTPCookiesForURL from WebKitSystemInterface to OpenSource 4 https://bugs.webkit.org/show_bug.cgi?id=158967 5 6 Reviewed by Brent Fulgham. 7 8 * WebCoreSupport/WebSystemInterface.mm: 9 (InitWebCoreSystemInterface): Deleted. 10 1 11 2016-06-20 Commit Queue <commit-queue@webkit.org> 2 12 -
trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
r194378 r202279 114 114 INIT(GetHTTPCookieAcceptPolicy); 115 115 INIT(HTTPCookies); 116 INIT(HTTPCookiesForURL);117 116 INIT(SetHTTPCookiesForURL); 118 117 INIT(DeleteAllHTTPCookies); -
trunk/Source/WebKit2/ChangeLog
r202274 r202279 1 2016-06-21 Amir Alavi <aalavi@apple.com> 2 3 Upstream WKHTTPCookiesForURL from WebKitSystemInterface to OpenSource 4 https://bugs.webkit.org/show_bug.cgi?id=158967 5 6 Reviewed by Brent Fulgham. 7 8 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: 9 (InitWebCoreSystemInterface): Deleted. 10 1 11 2016-06-21 Dan Bernstein <mitz@apple.com> 2 12 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
r194378 r202279 84 84 INIT(GetHTTPCookieAcceptPolicy); 85 85 INIT(HTTPCookies); 86 INIT(HTTPCookiesForURL);87 86 INIT(SetHTTPCookiesForURL); 88 87 INIT(DeleteAllHTTPCookies);
Note: See TracChangeset
for help on using the changeset viewer.