Diff
Modified: trunk/LayoutTests/ChangeLog (265036 => 265037)
--- trunk/LayoutTests/ChangeLog 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/LayoutTests/ChangeLog 2020-07-29 11:55:11 UTC (rev 265037)
@@ -1,3 +1,16 @@
+2020-07-29 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r265018.
+ https://bugs.webkit.org/show_bug.cgi?id=214917
+
+ Broke various ios-wk2 tests.
+
+ Reverted changeset:
+
+ "Migrate App-Bound Domains code from WebKit Additions"
+ https://bugs.webkit.org/show_bug.cgi?id=214889
+ https://trac.webkit.org/changeset/265018
+
2020-07-28 Ryan Haddad <[email protected]>
REGRESSION (r264930): [ iOS debug wk2 ] webrtc/video.html is a constant failure
Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (265036 => 265037)
--- trunk/LayoutTests/platform/ios-wk2/TestExpectations 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2020-07-29 11:55:11 UTC (rev 265037)
@@ -1797,5 +1797,3 @@
webkit.org/b/214512 imported/w3c/web-platform-tests/css/geometry/DOMMatrix2DInit-validate-fixup.html [ Pass Failure ]
webkit.org/b/214598 fast/scrolling/ios/autoscroll-input-when-very-zoomed.html [ Pass Failure ]
-
-http/tests/in-app-browser-privacy/ [ Pass ]
Modified: trunk/Source/WebKit/ChangeLog (265036 => 265037)
--- trunk/Source/WebKit/ChangeLog 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/ChangeLog 2020-07-29 11:55:11 UTC (rev 265037)
@@ -1,3 +1,16 @@
+2020-07-29 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r265018.
+ https://bugs.webkit.org/show_bug.cgi?id=214917
+
+ Broke various ios-wk2 tests.
+
+ Reverted changeset:
+
+ "Migrate App-Bound Domains code from WebKit Additions"
+ https://bugs.webkit.org/show_bug.cgi?id=214889
+ https://trac.webkit.org/changeset/265018
+
2020-07-29 Youenn Fablet <[email protected]>
TestWebKitAPI.WebKit.QuotaDelegate flaky times out
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (265036 => 265037)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-07-29 11:55:11 UTC (rev 265037)
@@ -29,7 +29,6 @@
#import "AuthenticationChallengeDisposition.h"
#import "AuthenticationManager.h"
#import "DataReference.h"
-#import "DefaultWebBrowserChecks.h"
#import "Download.h"
#import "LegacyCustomProtocolManager.h"
#import "Logging.h"
@@ -64,6 +63,7 @@
#import <WebKitAdditions/NetworkSessionCocoaAdditions.h>
#else
#define NETWORK_SESSION_COCOA_ADDITIONS_1
+#define NETWORK_SESSION_COCOA_ADDITIONS_2 true
#endif
#import "DeviceManagementSoftLink.h"
@@ -1152,29 +1152,6 @@
session = [NSURLSession sessionWithConfiguration:configuration delegate:delegate.get() delegateQueue:[NSOperationQueue mainQueue]];
}
-#if HAVE(SESSION_CLEANUP)
-static void activateSessionCleanup(NetworkSessionCocoa& session, const NetworkSessionCreationParameters& parameters)
-{
-#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
- // Don't override an explicitly set value.
- if (parameters.resourceLoadStatisticsParameters.isItpStateExplicitlySet)
- return;
-
-#if !PLATFORM(IOS_FAMILY_SIMULATOR)
- auto parentAuditToken = session.networkProcess().parentProcessConnection()->getAuditToken();
- RELEASE_ASSERT(parentAuditToken); // This should be impossible.
-
- bool itpEnabled = doesParentProcessHaveITPEnabled(parentAuditToken);
- bool passedEnabledState = session.isResourceLoadStatisticsEnabled();
-
- if (itpEnabled != passedEnabledState)
- WTFLogAlways("Passed ITP enabled state (%d) does not match TCC setting (%d)\n", itpEnabled, passedEnabledState);
- session.setResourceLoadStatisticsEnabled(passedEnabledState);
-#endif
-#endif
-}
-#endif
-
NetworkSessionCocoa::NetworkSessionCocoa(NetworkProcess& networkProcess, NetworkSessionCreationParameters&& parameters)
: NetworkSession(networkProcess, parameters)
, m_boundInterfaceIdentifier(parameters.boundInterfaceIdentifier)
@@ -1315,7 +1292,7 @@
SessionWrapper& NetworkSessionCocoa::sessionWrapperForTask(const WebCore::ResourceRequest& request, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain)
{
auto shouldBeConsideredAppBound = isNavigatingToAppBoundDomain ? *isNavigatingToAppBoundDomain : NavigatingToAppBoundDomain::Yes;
- if (isParentProcessAFullWebBrowser(networkProcess().parentProcessConnection()->getAuditToken()))
+ if (NETWORK_SESSION_COCOA_ADDITIONS_2)
shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No;
#if ENABLE(RESOURCE_LOAD_STATISTICS)
if (auto* storageSession = networkStorageSession()) {
Deleted: trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.h (265036 => 265037)
--- trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.h 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.h 2020-07-29 11:55:11 UTC (rev 265037)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <wtf/spi/darwin/XPCSPI.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-class RegistrableDomain;
-}
-
-namespace WebKit {
-
-bool hasProhibitedUsageStrings();
-Optional<Vector<WebCore::RegistrableDomain>> getAppBoundDomainsTesting(const String&);
-bool shouldBeTreatedAsFullBrowser(const String& bundleID);
-void determineITPState();
-bool doesAppHaveITPEnabled();
-bool doesParentProcessHaveITPEnabled(Optional<audit_token_t>);
-bool isFullWebBrowser();
-bool isParentProcessAFullWebBrowser(Optional<audit_token_t>);
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm (265036 => 265037)
--- trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm 2020-07-29 11:55:11 UTC (rev 265037)
@@ -1,245 +0,0 @@
-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "DefaultWebBrowserChecks.h"
-
-#import "TCCSPI.h"
-#import "VersionChecks.h"
-#import <WebCore/RegistrableDomain.h>
-#import <WebCore/RuntimeApplicationChecks.h>
-#import <wtf/HashMap.h>
-#import <wtf/RunLoop.h>
-#import <wtf/SoftLinking.h>
-#import <wtf/cocoa/Entitlements.h>
-#import <wtf/text/StringHash.h>
-
-SOFT_LINK_PRIVATE_FRAMEWORK(TCC)
-SOFT_LINK(TCC, TCCAccessPreflight, TCCAccessPreflightResult, (CFStringRef service, CFDictionaryRef options), (service, options))
-SOFT_LINK(TCC, TCCAccessPreflightWithAuditToken, TCCAccessPreflightResult, (CFStringRef service, audit_token_t token, CFDictionaryRef options), (service, token, options))
-SOFT_LINK_CONSTANT(TCC, kTCCServiceWebKitIntelligentTrackingPrevention, CFStringRef)
-
-
-namespace WebKit {
-
-static bool isFullWebBrowser(const String&);
-
-bool shouldBeTreatedAsFullBrowser(const String& bundleID)
-{
- return bundleID == "com.apple.WebKit.TestWebKitAPI"_s || bundleID == "com.apple.WebKit.WebKitTestRunner"_s;
-}
-
-Optional<Vector<WebCore::RegistrableDomain>> getAppBoundDomainsTesting(const String& bundleID)
-{
- if (bundleID.isNull())
- return WTF::nullopt;
-
- static auto appBoundDomainList = makeNeverDestroyed(HashMap<String, Vector<WebCore::RegistrableDomain>> {
- {"inAppBrowserPrivacyTestIdentifier"_s, Vector<WebCore::RegistrableDomain> { WebCore::RegistrableDomain::uncheckedCreateFromRegistrableDomainString("127.0.0.1") }},
- });
-
- auto appBoundDomainIter = appBoundDomainList->find(bundleID);
- if (appBoundDomainIter != appBoundDomainList->end())
- return appBoundDomainIter->value;
-
- return WTF::nullopt;
-}
-
-#if ASSERT_ENABLED
-static bool isInWebKitChildProcess()
-{
- static bool isInSubProcess;
-
- static dispatch_once_t once;
- dispatch_once(&once, ^{
- NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
- isInSubProcess = [bundleIdentifier hasPrefix:@"com.apple.WebKit.WebContent"]
- || [bundleIdentifier hasPrefix:@"com.apple.WebKit.Networking"]
- || [bundleIdentifier hasPrefix:@"com.apple.WebKit.GPU"];
- });
-
- return isInSubProcess;
-}
-#endif
-
-enum class ITPState : uint8_t {
- Uninitialized,
- Initializing,
- Enabled,
- Disabled
-};
-
-static std::atomic<ITPState> g_currentITPState = ITPState::Uninitialized;
-
-static bool hasRequestedCrossWebsiteTrackingPermission()
-{
- ASSERT(!isInWebKitChildProcess());
-
- static std::atomic<bool> hasRequestedCrossWebsiteTrackingPermission = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSCrossWebsiteTrackingUsageDescription"];
- return hasRequestedCrossWebsiteTrackingPermission;
-}
-
-static bool determineITPStateInternal(bool appWasLinkedOnOrAfter, const String& bundleIdentifier)
-{
- ASSERT(!RunLoop::isMain());
- ASSERT(!isInWebKitChildProcess());
-
- if (!appWasLinkedOnOrAfter)
- return false;
-
- 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);
-#endif
- return result != kTCCAccessPreflightDenied;
-}
-
-static dispatch_queue_t g_itpQueue;
-
-void determineITPState()
-{
- ASSERT(RunLoop::isMain());
- if (g_currentITPState != ITPState::Uninitialized)
- return;
-
- g_currentITPState = ITPState::Initializing;
- bool appWasLinkedOnOrAfter = linkedOnOrAfter(SDKVersion::FirstWithSessionCleanupByDefault, AssumeSafariIsAlwaysLinkedOnAfter::Yes);
-
- g_itpQueue = dispatch_queue_create("com.apple.WebKit.itpCheckQueue", NULL);
-
- dispatch_async(g_itpQueue, [appWasLinkedOnOrAfter, bundleIdentifier = WebCore::applicationBundleIdentifier().isolatedCopy()] {
- g_currentITPState = determineITPStateInternal(appWasLinkedOnOrAfter, bundleIdentifier) ? ITPState::Enabled : ITPState::Disabled;
-
- dispatch_async(dispatch_get_main_queue(), ^{
- dispatch_release(g_itpQueue);
- g_itpQueue = nullptr;
- });
- });
-}
-
-bool doesAppHaveITPEnabled()
-{
- ASSERT(!isInWebKitChildProcess());
- ASSERT(RunLoop::isMain());
- if (g_currentITPState > ITPState::Initializing)
- return g_currentITPState == ITPState::Enabled;
-
- RELEASE_ASSERT(g_itpQueue);
-
- __block bool isITPEnabled;
- dispatch_sync(g_itpQueue, ^{
- isITPEnabled = g_currentITPState == ITPState::Enabled;
- });
- return isITPEnabled;
-}
-
-bool doesParentProcessHaveITPEnabled(Optional<audit_token_t> auditToken)
-{
- ASSERT(isInWebKitChildProcess());
- ASSERT(RunLoop::isMain());
-
- if (!isParentProcessAFullWebBrowser(auditToken))
- return true;
-
- TCCAccessPreflightResult result = kTCCAccessPreflightDenied;
-#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
- if (auditToken)
- result = TCCAccessPreflightWithAuditToken(getkTCCServiceWebKitIntelligentTrackingPrevention(), auditToken.value(), nullptr);
-#endif
- return result != kTCCAccessPreflightDenied;
-}
-
-static std::atomic<bool> hasCheckedUsageStrings = false;
-bool hasProhibitedUsageStrings()
-{
- ASSERT(!isInWebKitChildProcess());
-
- static bool hasProhibitedUsageStrings = false;
-
- if (hasCheckedUsageStrings)
- return hasProhibitedUsageStrings;
-
- NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
- RELEASE_ASSERT(infoDictionary);
-
- // See <rdar://problem/59979468> for details about how this list was selected.
- auto prohibitedStrings = @[
- @"NSHomeKitUsageDescription",
- @"NSBluetoothAlwaysUsageDescription",
- @"NSPhotoLibraryUsageDescription",
- @"NSHealthShareUsageDescription",
- @"NSHealthUpdateUsageDescription",
- @"NSLocationAlwaysUsageDescription",
- @"NSLocationAlwaysAndWhenInUseUsageDescription"
- ];
-
- for (NSString *prohibitedString : prohibitedStrings) {
- if ([infoDictionary objectForKey:prohibitedString]) {
- String message = [NSString stringWithFormat:@"[In-App Browser Privacy] %@ used prohibited usage string %@.", [[NSBundle mainBundle] bundleIdentifier], prohibitedString];
- WTFLogAlways(message.utf8().data());
- hasProhibitedUsageStrings = true;
- break;
- }
- }
- hasCheckedUsageStrings = true;
- return hasProhibitedUsageStrings;
-}
-
-bool isParentProcessAFullWebBrowser(Optional<audit_token_t> auditToken)
-{
- ASSERT(isInWebKitChildProcess());
- RELEASE_ASSERT(auditToken);
-
- static bool fullWebBrowser;
-
- static dispatch_once_t once;
- dispatch_once(&once, ^{
- fullWebBrowser = WTF::hasEntitlement(auditToken.value(), "com.apple.developer.web-browser");
- });
-
- return fullWebBrowser || shouldBeTreatedAsFullBrowser(WebCore::applicationBundleIdentifier());
-}
-
-static bool isFullWebBrowser(const String& bundleIdentifier)
-{
- ASSERT(!isInWebKitChildProcess());
-
- static bool fullWebBrowser = WTF::processHasEntitlement("com.apple.developer.web-browser");
-
- return fullWebBrowser || shouldBeTreatedAsFullBrowser(bundleIdentifier);
-}
-
-bool isFullWebBrowser()
-{
- ASSERT(!isInWebKitChildProcess());
- ASSERT(RunLoop::isMain());
-
- return isFullWebBrowser(WebCore::applicationBundleIdentifier());
-}
-
-} // namespace WebKit
Modified: trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp (265036 => 265037)
--- trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp 2020-07-29 11:55:11 UTC (rev 265037)
@@ -26,10 +26,6 @@
#include "config.h"
#include "APIHTTPCookieStore.h"
-#if PLATFORM(IOS_FAMILY)
-#include "DefaultWebBrowserChecks.h"
-#endif
-
#include "WebCookieManagerProxy.h"
#include "WebProcessPool.h"
#include "WebsiteDataStore.h"
@@ -39,6 +35,12 @@
#include <WebCore/HTTPCookieAcceptPolicy.h>
#include <WebCore/NetworkStorageSession.h>
+#if USE(APPLE_INTERNAL_SDK)
+#include <WebKitAdditions/HTTPCookieStoreAdditions.h>
+#else
+#define IMPLEMENT_IN_APP_BROWSER_PRIVACY_ENABLED false
+#endif
+
using namespace WebKit;
namespace API {
@@ -64,7 +66,7 @@
Vector<WebCore::Cookie> appBoundCookies;
#if PLATFORM(IOS_FAMILY)
m_owningDataStore->getAppBoundDomains([cookies, appBoundCookies = WTFMove(appBoundCookies), completionHandler = WTFMove(completionHandler)] (auto& domains) mutable {
- if (!domains.isEmpty() && !isFullWebBrowser()) {
+ if (!domains.isEmpty() && IMPLEMENT_IN_APP_BROWSER_PRIVACY_ENABLED) {
for (auto& cookie : cookies) {
if (domains.contains(WebCore::RegistrableDomain::uncheckedCreateFromHost(cookie.domain)))
appBoundCookies.append(cookie);
Modified: trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp (265036 => 265037)
--- trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp 2020-07-29 11:55:11 UTC (rev 265037)
@@ -35,6 +35,12 @@
#include "WebURLSchemeHandler.h"
#include "WebUserContentControllerProxy.h"
+#if USE(APPLE_INTERNAL_SDK)
+#include <WebKitAdditions/PageConfigurationAdditions.h>
+#else
+#define PAGE_CONFIGURATION_ADDITIONS
+#endif
+
#if ENABLE(APPLICATION_MANIFEST)
#include "APIApplicationManifest.h"
#endif
@@ -48,6 +54,7 @@
}
PageConfiguration::PageConfiguration()
+PAGE_CONFIGURATION_ADDITIONS
{
}
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (265036 => 265037)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-07-29 11:55:11 UTC (rev 265037)
@@ -288,9 +288,14 @@
#include "MediaUsageManager.h"
#endif
-#if PLATFORM(COCOA)
-#include "DefaultWebBrowserChecks.h"
+#if USE(APPLE_INTERNAL_SDK)
+#include <WebKitAdditions/WebPageProxyAdditions.h>
+#else
+static bool isFullWebBrowser() { return true; }
+#if PLATFORM(IOS_FAMILY)
+static bool hasProhibitedUsageStrings() { return false; }
#endif
+#endif
// This controls what strategy we use for mouse wheel coalescing.
#define MERGE_WHEEL_EVENTS 1
@@ -1391,10 +1396,8 @@
{
RELEASE_LOG_IF_ALLOWED(Loading, "loadData:");
-#if PLATFORM(IOS_FAMILY)
if (MIMEType == "text/html"_s && !isFullWebBrowser())
m_limitsNavigationsToAppBoundDomains = true;
-#endif
if (m_isClosed) {
RELEASE_LOG_IF_ALLOWED(Loading, "loadData: page is closed");
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (265036 => 265037)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2020-07-29 11:55:11 UTC (rev 265037)
@@ -126,7 +126,6 @@
#endif
#if PLATFORM(COCOA)
-#include "DefaultWebBrowserChecks.h"
#include "VersionChecks.h"
#include <WebCore/GameControllerGamepadProvider.h>
#include <WebCore/HIDGamepadProvider.h>
@@ -142,6 +141,15 @@
#include <wtf/RefCountedLeakCounter.h>
#endif
+#if USE(APPLE_INTERNAL_SDK)
+#include <WebKitAdditions/WebProcessPoolAdditions.h>
+#else
+#define WEB_PROCESS_POOL_ADDITIONS
+#define WEB_PROCESS_POOL_ADDITIONS_2
+#define WEB_PROCESS_POOL_ADDITIONS_3
+#define WEB_PROCESS_POOL_ADDITIONS_4
+#endif
+
#define WEBPROCESSPOOL_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__)
#define WEBPROCESSPOOL_RELEASE_LOG_ERROR(channel, fmt, ...) RELEASE_LOG_ERROR(channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__)
#define WEBPROCESSPOOL_RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__)
@@ -247,6 +255,7 @@
#endif
, m_alwaysRunsAtBackgroundPriority(m_configuration->alwaysRunsAtBackgroundPriority())
, m_shouldTakeUIBackgroundAssertion(m_configuration->shouldTakeUIBackgroundAssertion())
+ WEB_PROCESS_POOL_ADDITIONS
, m_userObservablePageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
, m_processSuppressionDisabledForPageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
, m_hiddenPageThrottlingAutoIncreasesCounter([this](RefCounterEvent) { m_hiddenPageThrottlingTimer.startOneShot(0_s); })
@@ -262,9 +271,7 @@
WTF::setProcessPrivileges(allPrivileges());
WebCore::NetworkStorageSession::permitProcessToUseCookieAPI(true);
Process::setIdentifier(WebCore::ProcessIdentifier::generate());
-#if PLATFORM(COCOA)
- determineITPState();
-#endif
+ WEB_PROCESS_POOL_ADDITIONS_4
});
if (!m_websiteDataStore && WebKit::WebsiteDataStore::defaultDataStoreExists())
@@ -606,22 +613,7 @@
WebCore::RegistrableDomain standaloneApplicationDomain;
HashSet<WebCore::RegistrableDomain> appBoundDomains;
WebCore::RegistrableDomain manualPrevalentResource;
-
-#if PLATFORM(COCOA)
- m_tccPreferenceEnabled = doesAppHaveITPEnabled();
- if (withWebsiteDataStore && !withWebsiteDataStore->isItpStateExplicitlySet()) {
- enableResourceLoadStatistics = m_tccPreferenceEnabled;
- withWebsiteDataStore->setResourceLoadStatisticsEnabled(enableResourceLoadStatistics);
- } else if (m_websiteDataStore && !m_websiteDataStore->isItpStateExplicitlySet()) {
- enableResourceLoadStatistics = m_tccPreferenceEnabled;
- m_websiteDataStore->setResourceLoadStatisticsEnabled(enableResourceLoadStatistics);
- } else if (WebsiteDataStore::defaultDataStoreExists() && !WebsiteDataStore::defaultDataStore()->isItpStateExplicitlySet()) {
- enableResourceLoadStatistics = m_tccPreferenceEnabled;
- WebsiteDataStore::defaultDataStore()->setResourceLoadStatisticsEnabled(enableResourceLoadStatistics);
- } else
- enableResourceLoadStatistics = m_tccPreferenceEnabled;
-#endif
-
+ WEB_PROCESS_POOL_ADDITIONS_2
if (withWebsiteDataStore) {
enableResourceLoadStatistics = withWebsiteDataStore->resourceLoadStatisticsEnabled();
#if ENABLE(RESOURCE_LOAD_STATISTICS)
@@ -892,12 +884,7 @@
WebProcessProxy& WebProcessPool::createNewWebProcess(WebsiteDataStore* websiteDataStore, WebProcessProxy::IsPrewarmed isPrewarmed)
{
-#if PLATFORM(COCOA)
- m_tccPreferenceEnabled = doesAppHaveITPEnabled();
- if (websiteDataStore && !websiteDataStore->isItpStateExplicitlySet())
- websiteDataStore->setResourceLoadStatisticsEnabled(m_tccPreferenceEnabled);
-#endif
-
+ WEB_PROCESS_POOL_ADDITIONS_3
auto processProxy = WebProcessProxy::create(*this, websiteDataStore, isPrewarmed);
auto& process = processProxy.get();
initializeNewWebProcess(process, websiteDataStore, isPrewarmed);
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (265036 => 265037)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-07-29 11:55:11 UTC (rev 265037)
@@ -27,7 +27,6 @@
#import "WebsiteDataStore.h"
#import "CookieStorageUtilsCF.h"
-#import "DefaultWebBrowserChecks.h"
#import "SandboxUtilities.h"
#import "StorageManager.h"
#import "WebFramePolicyListenerProxy.h"
@@ -46,6 +45,12 @@
#import <wtf/URL.h>
#import <wtf/text/StringBuilder.h>
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/WebsiteDataStoreAdditions.h>
+#else
+#define WEBSITE_DATA_STORE_ADDITIONS
+#endif
+
#if PLATFORM(IOS_FAMILY)
#import <UIKit/UIApplication.h>
#import <pal/ios/ManagedConfigurationSoftLink.h>
@@ -458,23 +463,11 @@
});
}
-void WebsiteDataStore::addTestDomains() const
-{
- if (appBoundDomains().isEmpty()) {
- auto bundleID = WebCore::applicationBundleIdentifier();
- auto appBoundDomainsTesting = getAppBoundDomainsTesting(bundleID);
- if (appBoundDomainsTesting) {
- for (auto& domain : *appBoundDomainsTesting)
- appBoundDomains().add(domain);
- }
- }
-}
-
void WebsiteDataStore::ensureAppBoundDomains(CompletionHandler<void(const HashSet<WebCore::RegistrableDomain>&, const HashSet<String>&)>&& completionHandler) const
{
if (hasInitializedAppBoundDomains) {
if (m_isInAppBrowserPrivacyTestModeEnabled) {
- addTestDomains();
+ WEBSITE_DATA_STORE_ADDITIONS;
}
completionHandler(appBoundDomains(), appBoundSchemes());
return;
@@ -486,7 +479,7 @@
RunLoop::main().dispatch([this, protectedThis = WTFMove(protectedThis), completionHandler = WTFMove(completionHandler)] () mutable {
ASSERT(hasInitializedAppBoundDomains);
if (m_isInAppBrowserPrivacyTestModeEnabled) {
- addTestDomains();
+ WEBSITE_DATA_STORE_ADDITIONS;
}
completionHandler(appBoundDomains(), appBoundSchemes());
});
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (265036 => 265037)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h 2020-07-29 11:55:11 UTC (rev 265037)
@@ -312,7 +312,6 @@
private:
enum class ForceReinitialization : bool { No, Yes };
void initializeAppBoundDomains(ForceReinitialization = ForceReinitialization::No);
- void addTestDomains() const;
void fetchDataAndApply(OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, RefPtr<WorkQueue>&&, Function<void(Vector<WebsiteDataRecord>)>&& apply);
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (265036 => 265037)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-07-29 11:55:11 UTC (rev 265037)
@@ -963,7 +963,6 @@
49BCA19223A177660028A836 /* APIResourceLoadStatisticsFirstParty.h in Headers */ = {isa = PBXBuildFile; fileRef = 49BCA19123A177660028A836 /* APIResourceLoadStatisticsFirstParty.h */; };
49BCA19523A18CFD0028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 49BCA19023A175490028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h */; };
49BCA19723A1930D0028A836 /* APIResourceLoadStatisticsThirdParty.h in Headers */ = {isa = PBXBuildFile; fileRef = 49BCA19623A18F620028A836 /* APIResourceLoadStatisticsThirdParty.h */; };
- 49DAA38C24CBA1A800793D75 /* DefaultWebBrowserChecks.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49DAA38B24CBA1A800793D75 /* DefaultWebBrowserChecks.mm */; };
49ECA41C23FCA5D80023358D /* PolicyDecision.h in Headers */ = {isa = PBXBuildFile; fileRef = 49ECA41B23FCA4860023358D /* PolicyDecision.h */; };
49FBEFFD239B011D00BD032F /* _WKResourceLoadStatisticsFirstParty.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49FBEFFC239B011D00BD032F /* _WKResourceLoadStatisticsFirstParty.mm */; };
49FBEFFF239B012F00BD032F /* _WKResourceLoadStatisticsThirdParty.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49FBEFFE239B012F00BD032F /* _WKResourceLoadStatisticsThirdParty.mm */; };
@@ -3587,8 +3586,6 @@
49BCA19023A175490028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _WKResourceLoadStatisticsFirstPartyInternal.h; sourceTree = "<group>"; };
49BCA19123A177660028A836 /* APIResourceLoadStatisticsFirstParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIResourceLoadStatisticsFirstParty.h; sourceTree = "<group>"; };
49BCA19623A18F620028A836 /* APIResourceLoadStatisticsThirdParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIResourceLoadStatisticsThirdParty.h; sourceTree = "<group>"; };
- 49DAA38B24CBA1A800793D75 /* DefaultWebBrowserChecks.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DefaultWebBrowserChecks.mm; sourceTree = "<group>"; };
- 49DAA38D24CBA1BD00793D75 /* DefaultWebBrowserChecks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultWebBrowserChecks.h; sourceTree = "<group>"; };
49ECA41B23FCA4860023358D /* PolicyDecision.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PolicyDecision.h; sourceTree = "<group>"; };
49FBEFFA239AD97800BD032F /* _WKResourceLoadStatisticsThirdParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _WKResourceLoadStatisticsThirdParty.h; sourceTree = "<group>"; };
49FBEFFB239ADB1800BD032F /* _WKResourceLoadStatisticsFirstParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _WKResourceLoadStatisticsFirstParty.h; sourceTree = "<group>"; };
@@ -7486,8 +7483,6 @@
1C739E852347BCF600C621EC /* CoreTextHelpers.mm */,
C55F916C1C595E440029E92D /* DataDetectionResult.h */,
C55F916D1C595E440029E92D /* DataDetectionResult.mm */,
- 49DAA38D24CBA1BD00793D75 /* DefaultWebBrowserChecks.h */,
- 49DAA38B24CBA1A800793D75 /* DefaultWebBrowserChecks.mm */,
CE550E132283744400D28791 /* InsertTextOptions.cpp */,
CE550E12228373C800D28791 /* InsertTextOptions.h */,
C1663E5A24AEA74200C6A3B2 /* LaunchServicesDatabaseXPCConstants.h */,
@@ -12735,7 +12730,6 @@
2D92A77D212B6A7100F493FD /* Connection.cpp in Sources */,
2D92A77E212B6A7100F493FD /* DataReference.cpp in Sources */,
2D92A77F212B6A7100F493FD /* Decoder.cpp in Sources */,
- 49DAA38C24CBA1A800793D75 /* DefaultWebBrowserChecks.mm in Sources */,
2D0C56FE229F1DEA00BD33E7 /* DeviceManagementSoftLink.mm in Sources */,
1AB7D6191288B9D900CFD08C /* DownloadProxyMessageReceiver.cpp in Sources */,
1A64229912DD029200CAAE2C /* DrawingAreaMessageReceiver.cpp in Sources */,
Modified: trunk/Tools/ChangeLog (265036 => 265037)
--- trunk/Tools/ChangeLog 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Tools/ChangeLog 2020-07-29 11:55:11 UTC (rev 265037)
@@ -1,3 +1,16 @@
+2020-07-29 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r265018.
+ https://bugs.webkit.org/show_bug.cgi?id=214917
+
+ Broke various ios-wk2 tests.
+
+ Reverted changeset:
+
+ "Migrate App-Bound Domains code from WebKit Additions"
+ https://bugs.webkit.org/show_bug.cgi?id=214889
+ https://trac.webkit.org/changeset/265018
+
2020-07-29 Youenn Fablet <[email protected]>
TestWebKitAPI.WebKit.QuotaDelegate flaky times out
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (265036 => 265037)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2020-07-29 10:32:27 UTC (rev 265036)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2020-07-29 11:55:11 UTC (rev 265037)
@@ -45,6 +45,9 @@
#if PLATFORM(IOS_FAMILY)
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/InAppBrowserPrivacyTestAdditions.h>
+
static bool isDone;
@interface AppBoundDomainDelegate : NSObject <WKNavigationDelegate>
@@ -128,7 +131,7 @@
static void cleanUpInAppBrowserPrivacyTestSettings()
{
WebCore::clearApplicationBundleIdentifierTestingOverride();
- WebCore::setApplicationBundleIdentifier("com.apple.WebKit.TestWebKitAPI");
+ IN_APP_BROWSER_PRIVACY_ADDITIONS_2
}
static void initializeInAppBrowserPrivacyTestSettings()
@@ -135,7 +138,7 @@
{
WTF::initializeMainThread();
WebCore::clearApplicationBundleIdentifierTestingOverride();
- WebCore::setApplicationBundleIdentifier("inAppBrowserPrivacyTestIdentifier");
+ IN_APP_BROWSER_PRIVACY_ADDITIONS
}
TEST(InAppBrowserPrivacy, NonAppBoundDomainFailedUserScriptAtStart)
@@ -1335,4 +1338,6 @@
TestWebKitAPI::Util::run(&isDone);
}
+#endif // USE(APPLE_INTERNAL_SDK)
+
#endif // PLATFORM(IOS_FAMILY)