Title: [237971] branches/safari-606.3.4.1-branch/Source
- Revision
- 237971
- Author
- [email protected]
- Date
- 2018-11-07 17:43:19 -0800 (Wed, 07 Nov 2018)
Log Message
Apply patch. rdar://problem/45837753
Modified Paths
Diff
Modified: branches/safari-606.3.4.1-branch/Source/WebCore/PAL/ChangeLog (237970 => 237971)
--- branches/safari-606.3.4.1-branch/Source/WebCore/PAL/ChangeLog 2018-11-08 01:34:31 UTC (rev 237970)
+++ branches/safari-606.3.4.1-branch/Source/WebCore/PAL/ChangeLog 2018-11-08 01:43:19 UTC (rev 237971)
@@ -1,3 +1,21 @@
+2018-11-07 Alan Coon <[email protected]>
+
+ Apply patch. rdar://problem/45837753
+
+ 2018-11-07 John Wilander <[email protected]>
+
+ Override the session configuration for cookieAcceptPolicy
+ https://bugs.webkit.org/show_bug.cgi?id=190925
+ <rdar://problem/45497382>
+
+ Reviewed by Alex Christensen.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+ Added the _overrideSessionCookieAcceptPolicy property.
+ Note that this is declared for both public and internal
+ SDKs so it may cause a build error if the SDK is ever
+ updated to include CFNetworkâs own declaration of the
+ property.
2018-11-06 Alan Coon <[email protected]>
Revert r237528. rdar://problem/45847130
Modified: branches/safari-606.3.4.1-branch/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (237970 => 237971)
--- branches/safari-606.3.4.1-branch/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-11-08 01:34:31 UTC (rev 237970)
+++ branches/safari-606.3.4.1-branch/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2018-11-08 01:43:19 UTC (rev 237971)
@@ -182,6 +182,12 @@
#endif // !PLATFORM(WIN) && !USE(APPLE_INTERNAL_SDK)
+#if defined(__OBJC__)
+@interface NSHTTPCookieStorage ()
+@property (nonatomic, readwrite) BOOL _overrideSessionCookieAcceptPolicy;
+@end
+#endif
+
WTF_EXTERN_C_BEGIN
#if !PLATFORM(WIN)
Modified: branches/safari-606.3.4.1-branch/Source/WebKit/ChangeLog (237970 => 237971)
--- branches/safari-606.3.4.1-branch/Source/WebKit/ChangeLog 2018-11-08 01:34:31 UTC (rev 237970)
+++ branches/safari-606.3.4.1-branch/Source/WebKit/ChangeLog 2018-11-08 01:43:19 UTC (rev 237971)
@@ -1,3 +1,20 @@
+2018-11-07 Alan Coon <[email protected]>
+
+ Apply patch. rdar://problem/45837753
+
+ 2018-11-07 John Wilander <[email protected]>
+
+ Override the session configuration for cookieAcceptPolicy
+ https://bugs.webkit.org/show_bug.cgi?id=190925
+ <rdar://problem/45497382>
+
+ Reviewed by Alex Christensen.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+ Sets the _overrideSessionCookieAcceptPolicy property to YES
+ if the application is Safari.
+
2018-11-06 Alan Coon <[email protected]>
Revert r237528. rdar://problem/45847130
Modified: branches/safari-606.3.4.1-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (237970 => 237971)
--- branches/safari-606.3.4.1-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-08 01:34:31 UTC (rev 237970)
+++ branches/safari-606.3.4.1-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2018-11-08 01:43:19 UTC (rev 237971)
@@ -44,6 +44,7 @@
#import <WebCore/ResourceError.h>
#import <WebCore/ResourceRequest.h>
#import <WebCore/ResourceResponse.h>
+#import <WebCore/RuntimeApplicationChecks.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/URL.h>
#import <WebCore/WebCoreURLResponse.h>
@@ -713,9 +714,24 @@
auto* storageSession = WebCore::NetworkStorageSession::storageSession(parameters.sessionID);
RELEASE_ASSERT(storageSession);
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300) || PLATFORM(IOS)
if (CFHTTPCookieStorageRef storage = storageSession->cookieStorage().get())
configuration.HTTPCookieStorage = [[[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:storage] autorelease];
+#else
+ NSHTTPCookieStorage* cookieStorage;
+ if (CFHTTPCookieStorageRef storage = storageSession->cookieStorage().get()) {
+ cookieStorage = [[[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:storage] autorelease];
+ configuration.HTTPCookieStorage = cookieStorage;
+ } else
+ cookieStorage = storageSession->nsCookieStorage();
+ ASSERT(cookieStorage);
+
+ if (WebCore::MacApplication::isSafari() && [cookieStorage respondsToSelector:@selector(_overrideSessionCookieAcceptPolicy)])
+ cookieStorage._overrideSessionCookieAcceptPolicy = YES;
+#endif // (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300) || PLATFORM(IOS)
+
m_sessionWithCredentialStorageDelegate = adoptNS([[WKNetworkSessionDelegate alloc] initWithNetworkSession:*this withCredentials:true]);
m_sessionWithCredentialStorage = [NSURLSession sessionWithConfiguration:configuration delegate:static_cast<id>(m_sessionWithCredentialStorageDelegate.get()) delegateQueue:[NSOperationQueue mainQueue]];
LOG(NetworkSession, "Created NetworkSession with cookieAcceptPolicy %lu", configuration.HTTPCookieStorage.cookieAcceptPolicy);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes