Title: [271192] trunk/Source
Revision
271192
Author
[email protected]
Date
2021-01-05 21:29:40 -0800 (Tue, 05 Jan 2021)

Log Message

NSCrossWebsiteTrackingUsageDescription is not working on Mac, ITP is always enabled
https://bugs.webkit.org/show_bug.cgi?id=220190
<rdar://problem/72744909>

Reviewed by Brent Fulgham.

Source/WebKit:

Consider the presence of the NSCrossWebsiteTrackingUsageDescription
key as an indication to disable ITP for WKWebView until we implement
a mechanism for disabling it in WKWebView like we do for iOS to avoid
compatibility bugs.

* Shared/Cocoa/DefaultWebBrowserChecks.mm:
(WebKit::determineITPStateInternal):

Source/WTF:

* wtf/PlatformUse.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (271191 => 271192)


--- trunk/Source/WTF/ChangeLog	2021-01-06 03:55:01 UTC (rev 271191)
+++ trunk/Source/WTF/ChangeLog	2021-01-06 05:29:40 UTC (rev 271192)
@@ -1,3 +1,13 @@
+2021-01-05  Kate Cheney  <[email protected]>
+
+        NSCrossWebsiteTrackingUsageDescription is not working on Mac, ITP is always enabled
+        https://bugs.webkit.org/show_bug.cgi?id=220190
+        <rdar://problem/72744909>
+
+        Reviewed by Brent Fulgham.
+
+        * wtf/PlatformUse.h:
+
 2021-01-05  Chris Dumez  <[email protected]>
 
         [iOS] Add a feature flag to stop leaking an XPC boost message to XPC services

Modified: trunk/Source/WTF/wtf/PlatformUse.h (271191 => 271192)


--- trunk/Source/WTF/wtf/PlatformUse.h	2021-01-06 03:55:01 UTC (rev 271191)
+++ trunk/Source/WTF/wtf/PlatformUse.h	2021-01-06 05:29:40 UTC (rev 271192)
@@ -326,3 +326,8 @@
 #if PLATFORM(COCOA)
 #define USE_OPENXR 0
 #endif
+
+#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || PLATFORM(MACCATALYST)
+// FIXME: Include macOS once <rdar://problem/72817121> is fixed.
+#define USE_ITP_TCC_CHECK 1
+#endif

Modified: trunk/Source/WebKit/ChangeLog (271191 => 271192)


--- trunk/Source/WebKit/ChangeLog	2021-01-06 03:55:01 UTC (rev 271191)
+++ trunk/Source/WebKit/ChangeLog	2021-01-06 05:29:40 UTC (rev 271192)
@@ -1,3 +1,19 @@
+2021-01-05  Kate Cheney  <[email protected]>
+
+        NSCrossWebsiteTrackingUsageDescription is not working on Mac, ITP is always enabled
+        https://bugs.webkit.org/show_bug.cgi?id=220190
+        <rdar://problem/72744909>
+
+        Reviewed by Brent Fulgham.
+
+        Consider the presence of the NSCrossWebsiteTrackingUsageDescription
+        key as an indication to disable ITP for WKWebView until we implement
+        a mechanism for disabling it in WKWebView like we do for iOS to avoid
+        compatibility bugs.
+
+        * Shared/Cocoa/DefaultWebBrowserChecks.mm:
+        (WebKit::determineITPStateInternal):
+
 2021-01-05  Aditya Keerthi  <[email protected]>
 
         REGRESSION (r261157): Crash in WKSelectPopover when running as iPhone app on iPad

Modified: trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm (271191 => 271192)


--- trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm	2021-01-06 03:55:01 UTC (rev 271191)
+++ trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm	2021-01-06 05:29:40 UTC (rev 271192)
@@ -112,11 +112,12 @@
     if (!isFullWebBrowser(bundleIdentifier) && !hasRequestedCrossWebsiteTrackingPermission())
         return true;
 
-    TCCAccessPreflightResult result = kTCCAccessPreflightDenied;
-#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
-    result = TCCAccessPreflight(getkTCCServiceWebKitIntelligentTrackingPrevention(), nullptr);
+#if USE(ITP_TCC_CHECK)
+    TCCAccessPreflightResult result = TCCAccessPreflight(getkTCCServiceWebKitIntelligentTrackingPrevention(), nullptr);
+    return result != kTCCAccessPreflightDenied;
+#else
+    return false;
 #endif
-    return result != kTCCAccessPreflightDenied;
 }
 
 static dispatch_queue_t g_itpQueue;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to