Diff
Modified: trunk/Source/WebKit/ChangeLog (259674 => 259675)
--- trunk/Source/WebKit/ChangeLog 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Source/WebKit/ChangeLog 2020-04-07 22:27:35 UTC (rev 259675)
@@ -1,3 +1,16 @@
+2020-04-07 Ryan Haddad <[email protected]>
+
+ Unreviewed, reverting r259655.
+
+ Caused assertion failures and timeouts on iOS bots
+
+ Reverted changeset:
+
+ "Return app-bound sessions for instances where
+ WKAppBoundDomains is"
+ https://bugs.webkit.org/show_bug.cgi?id=210124
+ https://trac.webkit.org/changeset/259655
+
2020-04-07 Chris Dumez <[email protected]>
Merge DependencyAssertion into ProcessAssertion
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (259674 => 259675)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-04-07 22:27:35 UTC (rev 259675)
@@ -63,6 +63,7 @@
#include <WebKitAdditions/NetworkSessionCocoaAdditions.h>
#else
#define NETWORK_SESSION_COCOA_ADDITIONS_1
+#define NETWORK_SESSION_COCOA_ADDITIONS_2 false
#endif
#import "DeviceManagementSoftLink.h"
@@ -1210,8 +1211,10 @@
ASSERT_NOT_REACHED();
#endif
- if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::Yes)
- return appBoundSession(storedCredentialsPolicy);
+ if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::Yes) {
+ if (m_isInAppBrowserPrivacyEnabled || NETWORK_SESSION_COCOA_ADDITIONS_2)
+ return appBoundSession(storedCredentialsPolicy);
+ }
switch (storedCredentialsPolicy) {
case WebCore::StoredCredentialsPolicy::Use:
Modified: trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp (259674 => 259675)
--- trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2020-04-07 22:27:35 UTC (rev 259675)
@@ -38,6 +38,7 @@
#if USE(APPLE_INTERNAL_SDK)
#include <WebKitAdditions/HTTPCookieStoreAdditions.h>
#else
+#define IN_APP_BROWSER_PRIVACY_ENABLED false
#define IMPLEMENT_IN_APP_BROWSER_PRIVACY_ENABLED
#endif
@@ -65,8 +66,8 @@
{
Vector<WebCore::Cookie> appBoundCookies;
#if PLATFORM(IOS_FAMILY)
- m_owningDataStore->getAppBoundDomains([cookies, appBoundCookies = WTFMove(appBoundCookies), completionHandler = WTFMove(completionHandler)] (auto& domains) mutable {
- if (!domains.isEmpty()) {
+ m_owningDataStore->getAppBoundDomains([this, protectedThis = makeRef(*this), cookies, appBoundCookies = WTFMove(appBoundCookies), completionHandler = WTFMove(completionHandler)] (auto& domains) mutable {
+ if (m_owningDataStore->parameters().networkSessionParameters.isInAppBrowserPrivacyEnabled || IN_APP_BROWSER_PRIVACY_ENABLED) {
IMPLEMENT_IN_APP_BROWSER_PRIVACY_ENABLED
for (auto& cookie : cookies) {
if (domains.contains(WebCore::RegistrableDomain::uncheckedCreateFromHost(cookie.domain)))
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (259674 => 259675)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-04-07 22:27:35 UTC (rev 259675)
@@ -282,6 +282,7 @@
#include <WebKitAdditions/WebPageProxyAdditions.h>
#else
#define WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN
+#define WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN_2 false
#endif
// This controls what strategy we use for mouse wheel coalescing.
@@ -3118,18 +3119,14 @@
PolicyCheckIdentifier m_identifier;
};
-void WebPageProxy::setIsNavigatingToAppBoundDomain(bool isMainFrame, const URL& requestURL, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain)
+void WebPageProxy::setIsNavigatingToAppBoundDomain(bool isMainFrame, const URL& requestURL, NavigatingToAppBoundDomain isNavigatingToAppBoundDomain)
{
#if PLATFORM(IOS_FAMILY)
- if (isMainFrame) {
- WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN
- if (!isNavigatingToAppBoundDomain) {
- m_isNavigatingToAppBoundDomain = NavigatingToAppBoundDomain::Yes;
- return;
- }
+ if (isMainFrame && (m_preferences->isInAppBrowserPrivacyEnabled() || WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN_2)) {
if (m_ignoresAppBoundDomains)
return;
- if (*isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::No) {
+ WEB_PAGE_PROXY_ADDITIONS_SETISNAVIGATINGTOAPPBOUNDDOMAIN
+ if (isNavigatingToAppBoundDomain == NavigatingToAppBoundDomain::No) {
m_configuration->setWebViewCategory(WebViewCategory::InAppBrowser);
m_isNavigatingToAppBoundDomain = NavigatingToAppBoundDomain::No;
m_hasNavigatedAwayFromAppBoundDomain = NavigatedAwayFromAppBoundDomain::Yes;
@@ -5108,8 +5105,8 @@
auto listener = makeRef(frame.setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(frame), sender = WTFMove(sender), navigation] (PolicyAction policyAction, API::WebsitePolicies* policies, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, Optional<NavigatingToAppBoundDomain> isAppBoundDomain) mutable {
- if (policyAction != PolicyAction::Ignore)
- setIsNavigatingToAppBoundDomain(frame->isMainFrame(), navigation->currentRequest().url(), isAppBoundDomain);
+ if (policyAction != PolicyAction::Ignore && isAppBoundDomain)
+ setIsNavigatingToAppBoundDomain(frame->isMainFrame(), navigation->currentRequest().url(), *isAppBoundDomain);
auto completionHandler = [this, protectedThis = protectedThis.copyRef(), frame = frame.copyRef(), sender = WTFMove(sender), navigation, processSwapRequestedByClient, policies = makeRefPtr(policies)] (PolicyAction policyAction) mutable {
if (frame->isMainFrame()) {
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (259674 => 259675)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-04-07 22:27:35 UTC (rev 259675)
@@ -2282,7 +2282,7 @@
void tryCloseTimedOut();
void makeStorageSpaceRequest(WebCore::FrameIdentifier, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&&);
- void setIsNavigatingToAppBoundDomain(bool isMainFrame, const URL&, Optional<NavigatingToAppBoundDomain>);
+ void setIsNavigatingToAppBoundDomain(bool isMainFrame, const URL&, NavigatingToAppBoundDomain);
NavigatedAwayFromAppBoundDomain hasNavigatedAwayFromAppBoundDomain() const { return m_hasNavigatedAwayFromAppBoundDomain; }
const Identifier m_identifier;
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (259674 => 259675)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-04-07 22:27:35 UTC (rev 259675)
@@ -403,13 +403,13 @@
static const auto maxAppBoundDomainCount = 10;
- appBoundDomainQueue().dispatch([isInAppBrowserPrivacyEnabled = parameters().networkSessionParameters.isInAppBrowserPrivacyEnabled, forceReinitialization] () mutable {
+ appBoundDomainQueue().dispatch([forceReinitialization] () mutable {
if (hasInitializedAppBoundDomains && forceReinitialization != ForceReinitialization::Yes)
return;
NSArray<NSString *> *domains = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"WKAppBoundDomains"];
- RunLoop::main().dispatch([isInAppBrowserPrivacyEnabled, forceReinitialization, domains = retainPtr(domains)] {
+ RunLoop::main().dispatch([forceReinitialization , domains = retainPtr(domains)] {
if (forceReinitialization == ForceReinitialization::Yes)
appBoundDomains().clear();
@@ -426,8 +426,7 @@
if (appBoundDomains().size() >= maxAppBoundDomainCount)
break;
}
- if (isInAppBrowserPrivacyEnabled)
- WEBSITE_DATA_STORE_ADDITIONS
+ WEBSITE_DATA_STORE_ADDITIONS
hasInitializedAppBoundDomains = true;
});
});
Modified: trunk/Tools/ChangeLog (259674 => 259675)
--- trunk/Tools/ChangeLog 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Tools/ChangeLog 2020-04-07 22:27:35 UTC (rev 259675)
@@ -1,3 +1,16 @@
+2020-04-07 Ryan Haddad <[email protected]>
+
+ Unreviewed, reverting r259655.
+
+ Caused assertion failures and timeouts on iOS bots
+
+ Reverted changeset:
+
+ "Return app-bound sessions for instances where
+ WKAppBoundDomains is"
+ https://bugs.webkit.org/show_bug.cgi?id=210124
+ https://trac.webkit.org/changeset/259655
+
2020-04-07 Joanmarie Diggs <[email protected]>
AX: Change ATK mapping of the ARIA alert and alertdialog roles
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (259674 => 259675)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2020-04-07 22:09:36 UTC (rev 259674)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2020-04-07 22:27:35 UTC (rev 259675)
@@ -81,13 +81,11 @@
static void cleanUpInAppBrowserPrivacyTestSettings()
{
- [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
IN_APP_BROWSER_PRIVACY_ADDITIONS_2
}
static void initializeInAppBrowserPrivacyTestSettings()
{
- [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
RunLoop::initializeMainRunLoop();
WebCore::clearApplicationBundleIdentifierTestingOverride();
IN_APP_BROWSER_PRIVACY_ADDITIONS
@@ -538,6 +536,7 @@
TEST(InAppBrowserPrivacy, SetCookieForNonAppBoundDomainFails)
{
initializeInAppBrowserPrivacyTestSettings();
+ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
auto dataStore = [WKWebsiteDataStore defaultDataStore];
auto webView = adoptNS([TestWKWebView new]);
@@ -582,6 +581,7 @@
TestWebKitAPI::Util::run(&gotFlag);
cleanUpInAppBrowserPrivacyTestSettings();
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
gotFlag = false;
// Check the cookie store to make sure only one cookie was set.
@@ -607,7 +607,7 @@
{
// Since we can't set non-app-bound cookies with In-App Browser privacy protections on,
// we can turn the protections off to set a cookie we will then try to get with protections enabled.
- cleanUpInAppBrowserPrivacyTestSettings();
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
setUpCookieTest();
globalCookieStore = [[WKWebsiteDataStore defaultDataStore] httpCookieStore];
@@ -658,6 +658,7 @@
ASSERT_EQ(cookies.count, 2u);
// Now enable protections and ensure we can only retrieve the app-bound cookies.
+ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
initializeInAppBrowserPrivacyTestSettings();
gotFlag = false;
@@ -682,6 +683,7 @@
gotFlag = false;
[globalCookieStore deleteCookie:appBoundCookie.get() completionHandler:[]() {
// Reset flag.
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
cleanUpInAppBrowserPrivacyTestSettings();
gotFlag = true;
}];
@@ -693,7 +695,7 @@
{
// Since we can't set non-app-bound cookies with In-App Browser privacy protections on,
// we can turn the protections off to set a cookie we will then try to get with protections enabled.
- cleanUpInAppBrowserPrivacyTestSettings();
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
setUpCookieTest();
globalCookieStore = [[WKWebsiteDataStore defaultDataStore] httpCookieStore];
@@ -718,6 +720,7 @@
[globalCookieStore setCookie:appBoundCookie completionHandler:^{
// Now enable protections and ensure we can only retrieve the app-bound cookies.
+ [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
initializeInAppBrowserPrivacyTestSettings();
[globalCookieStore _getCookiesForURL:[NSURL URLWithString:@"https://webkit.org/"] completionHandler:^(NSArray<NSHTTPCookie *> *cookies) {
@@ -727,6 +730,7 @@
EXPECT_EQ(cookies.count, 0u);
[globalCookieStore deleteCookie:nonAppBoundCookie completionHandler:^{
[globalCookieStore deleteCookie:appBoundCookie completionHandler:^{
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitDebugIsInAppBrowserPrivacyEnabled"];
cleanUpInAppBrowserPrivacyTestSettings();
done = true;
}];