Apps with the full browser entitlement who are not linked to iOS 14.0 should have ITP enabled in WKWebViews, and should not be treated as a full web browser in other WebKit cases until upgrading to iOS 14.0.
<rdar://problem/69081227>
Created attachment 409051 [details] Patch
Comment on attachment 409051 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409051&action=review > Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm:246 > + return appWasLinkedOnOrAfter && isFullWebBrowser(WebCore::applicationBundleIdentifier()); Couldn't this be return linkedOnOrAfter(SDKVersion::FirstWithSessionCleanupByDefault, AssumeSafariIsAlwaysLinkedOnAfter::Yes) && isFullWebBrowser(WebCore::applicationBundleIdentifier())?
Comment on attachment 409051 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409051&action=review I don't think this is quite right (see inline comments) > Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm:109 > + if (isFullWebBrowser(bundleIdentifier) && !appWasLinkedOnOrAfter) Instead of this new test, I think we should change the existing linkedOnOrAfter check to only bail out if the default browser entitlement was NOT used. if (!appWasLinkedOnOrAfter && !isFullWebBrowser(bundleIdentifier)) return false; This way, we fall through and use the User's choice about ITP state for a default browser, even if it was built against the older SDK. > Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm:246 > + return appWasLinkedOnOrAfter && isFullWebBrowser(WebCore::applicationBundleIdentifier()); After thinking about it, I don't think we need this check. We don't care if the app was linked against an older SDK. We just want to make sure that default browsers honor the user's ITP setting which you handle in your change to 'determineITPStateInternal'.
Created attachment 409056 [details] Patch
Comment on attachment 409056 [details] Patch Looks good! r=me
Committed r267208: <https://trac.webkit.org/changeset/267208> All reviewed patches have been landed. Closing bug and clearing flags on attachment 409056 [details].