Title: [262452] branches/safari-610.1.15-branch/Source
- Revision
- 262452
- Author
- alanc...@apple.com
- Date
- 2020-06-02 14:58:30 -0700 (Tue, 02 Jun 2020)
Log Message
Cherry-pick r262332. rdar://problem/63891529
[Cocoa] Improve logging quality for non-ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=212551
<rdar://problem/62461099>
Reviewed by David Kilzer.
Source/WebCore/PAL:
Add support for the 'nw_context_privacy_level' setting.
* pal/spi/cf/CFNetworkSPI.h:
Source/WebKit:
In Bug 209522 I switched normal mode logging to use the same privacy-protecting mode we use for ephemeral sessions.
This had the unintended consequence of removing network load data used to investigate networking issues.
This patch adopts the more fine-grained logging provided by the low-level 'nw_context_privacy_level' setting.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForSessionID): Adopt 'nw_context_privacy_level' setting.
Source/WTF:
* wtf/PlatformHave.h: Add new feature check for CFNetwork convenience setter.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.1.15-branch/Source/WTF/ChangeLog (262451 => 262452)
--- branches/safari-610.1.15-branch/Source/WTF/ChangeLog 2020-06-02 21:58:27 UTC (rev 262451)
+++ branches/safari-610.1.15-branch/Source/WTF/ChangeLog 2020-06-02 21:58:30 UTC (rev 262452)
@@ -1,5 +1,47 @@
2020-06-02 Alan Coon <alanc...@apple.com>
+ Cherry-pick r262332. rdar://problem/63891529
+
+ [Cocoa] Improve logging quality for non-ephemeral sessions
+ https://bugs.webkit.org/show_bug.cgi?id=212551
+ <rdar://problem/62461099>
+
+ Reviewed by David Kilzer.
+
+ Source/WebCore/PAL:
+
+ Add support for the 'nw_context_privacy_level' setting.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+
+ Source/WebKit:
+
+ In Bug 209522 I switched normal mode logging to use the same privacy-protecting mode we use for ephemeral sessions.
+ This had the unintended consequence of removing network load data used to investigate networking issues.
+
+ This patch adopts the more fine-grained logging provided by the low-level 'nw_context_privacy_level' setting.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::configurationForSessionID): Adopt 'nw_context_privacy_level' setting.
+
+ Source/WTF:
+
+ * wtf/PlatformHave.h: Add new feature check for CFNetwork convenience setter.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-05-29 Brent Fulgham <bfulg...@apple.com>
+
+ [Cocoa] Improve logging quality for non-ephemeral sessions
+ https://bugs.webkit.org/show_bug.cgi?id=212551
+ <rdar://problem/62461099>
+
+ Reviewed by David Kilzer.
+
+ * wtf/PlatformHave.h: Add new feature check for CFNetwork convenience setter.
+
+2020-06-02 Alan Coon <alanc...@apple.com>
+
Cherry-pick r262434. rdar://problem/63891520
Change Gigacage::Config to use storage in WebConfig::g_config instead of its own.
Modified: branches/safari-610.1.15-branch/Source/WTF/wtf/PlatformHave.h (262451 => 262452)
--- branches/safari-610.1.15-branch/Source/WTF/wtf/PlatformHave.h 2020-06-02 21:58:27 UTC (rev 262451)
+++ branches/safari-610.1.15-branch/Source/WTF/wtf/PlatformHave.h 2020-06-02 21:58:30 UTC (rev 262452)
@@ -627,3 +627,7 @@
#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600)
#define HAVE_DISPLAY_LAYER_BIPLANAR_SUPPORT 1
#endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
+#define HAVE_LOGGING_PRIVACY_LEVEL 1
+#endif
Modified: branches/safari-610.1.15-branch/Source/WebCore/PAL/ChangeLog (262451 => 262452)
--- branches/safari-610.1.15-branch/Source/WebCore/PAL/ChangeLog 2020-06-02 21:58:27 UTC (rev 262451)
+++ branches/safari-610.1.15-branch/Source/WebCore/PAL/ChangeLog 2020-06-02 21:58:30 UTC (rev 262452)
@@ -1,3 +1,47 @@
+2020-06-02 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r262332. rdar://problem/63891529
+
+ [Cocoa] Improve logging quality for non-ephemeral sessions
+ https://bugs.webkit.org/show_bug.cgi?id=212551
+ <rdar://problem/62461099>
+
+ Reviewed by David Kilzer.
+
+ Source/WebCore/PAL:
+
+ Add support for the 'nw_context_privacy_level' setting.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+
+ Source/WebKit:
+
+ In Bug 209522 I switched normal mode logging to use the same privacy-protecting mode we use for ephemeral sessions.
+ This had the unintended consequence of removing network load data used to investigate networking issues.
+
+ This patch adopts the more fine-grained logging provided by the low-level 'nw_context_privacy_level' setting.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::configurationForSessionID): Adopt 'nw_context_privacy_level' setting.
+
+ Source/WTF:
+
+ * wtf/PlatformHave.h: Add new feature check for CFNetwork convenience setter.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-05-29 Brent Fulgham <bfulg...@apple.com>
+
+ [Cocoa] Improve logging quality for non-ephemeral sessions
+ https://bugs.webkit.org/show_bug.cgi?id=212551
+ <rdar://problem/62461099>
+
+ Reviewed by David Kilzer.
+
+ Add support for the 'nw_context_privacy_level' setting.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+
2020-05-22 Alex Christensen <achristen...@webkit.org>
Make download resume workaround forgiving of changes in CFNetwork
Modified: branches/safari-610.1.15-branch/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (262451 => 262452)
--- branches/safari-610.1.15-branch/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2020-06-02 21:58:27 UTC (rev 262451)
+++ branches/safari-610.1.15-branch/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2020-06-02 21:58:30 UTC (rev 262452)
@@ -42,6 +42,7 @@
#include <CFNetwork/CFURLRequestPriv.h>
#include <CFNetwork/CFURLResponsePriv.h>
#include <CFNetwork/CFURLStorageSession.h>
+#include <nw/private.h>
#if PLATFORM(WIN)
@@ -66,6 +67,20 @@
#else // !PLATFORM(WIN) && !USE(APPLE_INTERNAL_SDK)
+#if HAVE(LOGGING_PRIVACY_LEVEL)
+typedef enum {
+ nw_context_privacy_level_public = 1,
+ nw_context_privacy_level_private = 2,
+ nw_context_privacy_level_sensitive = 3,
+ nw_context_privacy_level_silent = 4,
+} nw_context_privacy_level_t;
+
+#ifndef NW_CONTEXT_HAS_PRIVACY_LEVEL_SILENT
+#define NW_CONTEXT_HAS_PRIVACY_LEVEL_SILENT 1
+#endif
+
+#endif
+
typedef CF_ENUM(int64_t, _TimingDataOptions)
{
_TimingDataOptionsEnableW3CNavigationTiming = (1 << 0)
@@ -209,6 +224,9 @@
#if HAVE(ALLOWS_SENSITIVE_LOGGING)
@property BOOL _allowsSensitiveLogging;
#endif
+#if HAVE(LOGGING_PRIVACY_LEVEL)
+@property nw_context_privacy_level_t _loggingPrivacyLevel;
+#endif
#if HAVE(CFNETWORK_ALTERNATIVE_SERVICE)
@property (nullable, retain) _NSHTTPAlternativeServicesStorage *_alternativeServicesStorage;
@property (readonly, assign) BOOL _allowsHTTP3;
Modified: branches/safari-610.1.15-branch/Source/WebKit/ChangeLog (262451 => 262452)
--- branches/safari-610.1.15-branch/Source/WebKit/ChangeLog 2020-06-02 21:58:27 UTC (rev 262451)
+++ branches/safari-610.1.15-branch/Source/WebKit/ChangeLog 2020-06-02 21:58:30 UTC (rev 262452)
@@ -1,5 +1,53 @@
2020-06-02 Alan Coon <alanc...@apple.com>
+ Cherry-pick r262332. rdar://problem/63891529
+
+ [Cocoa] Improve logging quality for non-ephemeral sessions
+ https://bugs.webkit.org/show_bug.cgi?id=212551
+ <rdar://problem/62461099>
+
+ Reviewed by David Kilzer.
+
+ Source/WebCore/PAL:
+
+ Add support for the 'nw_context_privacy_level' setting.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+
+ Source/WebKit:
+
+ In Bug 209522 I switched normal mode logging to use the same privacy-protecting mode we use for ephemeral sessions.
+ This had the unintended consequence of removing network load data used to investigate networking issues.
+
+ This patch adopts the more fine-grained logging provided by the low-level 'nw_context_privacy_level' setting.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::configurationForSessionID): Adopt 'nw_context_privacy_level' setting.
+
+ Source/WTF:
+
+ * wtf/PlatformHave.h: Add new feature check for CFNetwork convenience setter.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-05-29 Brent Fulgham <bfulg...@apple.com>
+
+ [Cocoa] Improve logging quality for non-ephemeral sessions
+ https://bugs.webkit.org/show_bug.cgi?id=212551
+ <rdar://problem/62461099>
+
+ Reviewed by David Kilzer.
+
+ In Bug 209522 I switched normal mode logging to use the same privacy-protecting mode we use for ephemeral sessions.
+ This had the unintended consequence of removing network load data used to investigate networking issues.
+
+ This patch adopts the more fine-grained logging provided by the low-level 'nw_context_privacy_level' setting.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::configurationForSessionID): Adopt 'nw_context_privacy_level' setting.
+
+2020-06-02 Alan Coon <alanc...@apple.com>
+
Cherry-pick r262429. rdar://problem/63891546
macCatalyst: WKWebView's tint color is not propagated to Web Content process
Modified: branches/safari-610.1.15-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (262451 => 262452)
--- branches/safari-610.1.15-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-06-02 21:58:27 UTC (rev 262451)
+++ branches/safari-610.1.15-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-06-02 21:58:30 UTC (rev 262452)
@@ -52,6 +52,7 @@
#import <wtf/MainThread.h>
#import <wtf/NakedRef.h>
#import <wtf/NeverDestroyed.h>
+#import <wtf/ObjCRuntimeExtras.h>
#import <wtf/ProcessPrivilege.h>
#import <wtf/SoftLinking.h>
#import <wtf/URL.h>
@@ -1022,14 +1023,25 @@
static NSURLSessionConfiguration *configurationForSessionID(const PAL::SessionID& session)
{
+#if HAVE(LOGGING_PRIVACY_LEVEL)
+ auto loggingPrivacyLevel = nw_context_privacy_level_sensitive;
+#endif
+
NSURLSessionConfiguration *configuration;
if (session.isEphemeral()) {
configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration];
configuration._shouldSkipPreferredClientCertificateLookup = YES;
+#if HAVE(LOGGING_PRIVACY_LEVEL) && defined(NW_CONTEXT_HAS_PRIVACY_LEVEL_SILENT)
+ loggingPrivacyLevel = nw_context_privacy_level_silent;
+#endif
} else
configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
-#if HAVE(ALLOWS_SENSITIVE_LOGGING)
+#if HAVE(LOGGING_PRIVACY_LEVEL)
+ auto setLoggingPrivacyLevel = NSSelectorFromString(@"_setLoggingPrivacyLevel:");
+ if ([configuration respondsToSelector:setLoggingPrivacyLevel])
+ wtfObjCMsgSend<void>(configuration, setLoggingPrivacyLevel, loggingPrivacyLevel);
+#elif HAVE(ALLOWS_SENSITIVE_LOGGING)
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
configuration._allowsSensitiveLogging = NO;
ALLOW_DEPRECATED_DECLARATIONS_END
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes