We use WKWebView for Mac, and with the Big Sur update ITP became enabled by default and is breaking valid auth scenarios that depend on cookies in an iframe. We would like to be able to disable ITP, but adding NSCrossWebsiteTrackingUsageDescription to the info.plist is not all that is necessary. TCCAccessPreflight(getkTCCServiceWebKitIntelligentTrackingPrevention(), nullptr) check is also performed. For iOS this is controlled by a toggle in the application OS provided settings (defaults to ITP enabled), but on Mac there does not seem to be an equivalent. I have looked through UI and documentation but have not been able to find where a Mac user can allow third-party cookies after adding NSCrossWebsiteTrackingUsageDescription to the plist. We are not a browser application, but are required to use WKWebView to render web content due to app store policies. We would like control over this ITP setting in our app which is breaking compatibility.
<rdar://problem/72744909>
Created attachment 417032 [details] Patch
Comment on attachment 417032 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417032&action=review > Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm:115 > +#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || PLATFORM(MACCATALYST) Stylechecker is reminding us " Misplaced OS version check. Please use a named macro in one of headers in the wtf/Platform." Could you do the extra work to add a new PlatformUse.h entry? #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || PLATFORM(MACCATALYST) #define USE_ITP_TCC_CHECK 1 #endif Then we would just do: #if USE(ITP_TCC_CHECK) #else #endif
Created attachment 417034 [details] Patch
Comment on attachment 417034 [details] Patch r=me
Found 1 new test failure: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
This test failure seems flaky and unrelated, trying cq+ again.
Created attachment 417063 [details] Patch for landing
Committed r271192: <https://trac.webkit.org/changeset/271192> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417063 [details].
*** Bug 220199 has been marked as a duplicate of this bug. ***
Re-opened since this is blocked by bug 220440