Source/WebKit/ChangeLog

 12020-03-08 Brent Fulgham <bfulgham@apple.com>
 2
 3 Revise In-App Browser Privacy checks to better reflect the meaning of the flag
 4 https://bugs.webkit.org/show_bug.cgi?id=208793
 5 <rdar://problem/60206256>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 The 'isInAppBrowserPrivacyEnabled' seems like a feature, but it's really an internal debugging flag.
 10
 11 Revise the use of these calls to make it clearer.
 12
 13 Tested by existing test cases.
 14
 15 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
 16 (WebKit::NetworkSessionCocoa::sessionWrapperForTask):
 17 * UIProcess/API/APIPageConfiguration.cpp:
 18 * UIProcess/WebPageProxy.cpp:
 19 (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
 20
1212020-03-08 Megan Gardner <megan_gardner@apple.com>
222
323 Build Fix Watch

Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

6161
6262#if USE(APPLE_INTERNAL_SDK)
6363#include <WebKitAdditions/NetworkSessionCocoaAdditions.h>
 64#else
 65#define NETWORK_SESSION_COCOA_ADDITIONS false
6466#endif
6567
6668#import "DeviceManagementSoftLink.h"

@@SessionWrapper& NetworkSessionCocoa::sessionWrapperForTask(const WebCore::Resour
12131215 ASSERT_NOT_REACHED();
12141216#endif
12151217
1216  if (m_isInAppBrowserPrivacyEnabled && isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::Yes)
1217  return appBoundSession(storedCredentialsPolicy);
 1218 if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::Yes) {
 1219 if (m_isInAppBrowserPrivacyEnabled || NETWORK_SESSION_COCOA_ADDITIONS)
 1220 return appBoundSession(storedCredentialsPolicy);
 1221 }
12181222
12191223 switch (storedCredentialsPolicy) {
12201224 case WebCore::StoredCredentialsPolicy::Use:

Source/WebKit/UIProcess/WebPageProxy.cpp

280280#include <WebKitAdditions/WebPageProxyAdditions.h>
281281#else
282282#define WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN
 283#define WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN_2 false
283284#endif
284285
285286// This controls what strategy we use for mouse wheel coalescing.

@@private:
30963097
30973098void WebPageProxy::setIsNavigatingToAppBoundDomain(bool isMainFrame, const URL& requestURL, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain)
30983099{
3099  if (m_preferences->isInAppBrowserPrivacyEnabled() && isMainFrame) {
 3100 if (isMainFrame && (m_preferences->isInAppBrowserPrivacyEnabled() || WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN_2)) {
31003101 WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN
31013102 if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::No) {
31023103 m_configuration->setWebViewCategory(WebViewCategory::InAppBrowser);