Diff
Modified: trunk/LayoutTests/ChangeLog (249062 => 249063)
--- trunk/LayoutTests/ChangeLog 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/ChangeLog 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,3 +1,17 @@
+2019-08-23 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r249001.
+
+ Caused one layout test to fail on all configurations and
+ another to time out on Catalina / iOS 13.
+
+ Reverted changeset:
+
+ "Add a WebsiteDataStore delegate to handle
+ AuthenticationChallenge that do not come from pages"
+ https://bugs.webkit.org/show_bug.cgi?id=196870
+ https://trac.webkit.org/changeset/249001
+
2019-08-23 Antoine Quint <grao...@apple.com>
REGRESSION: fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html is timing out
Modified: trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt (249062 => 249063)
--- trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight-expected.txt 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,4 +1,3 @@
-PASS Beacon load should not be sent if server is not trusted.
PASS Should send beacon with no CORS preflight
Modified: trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html (249062 => 249063)
--- trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html 2019-08-23 20:23:21 UTC (rev 249063)
@@ -26,33 +26,12 @@
});
}
-function testCORSPreflight(what) {
- var testBase = get_host_info().HTTPS_REMOTE_ORIGIN + RESOURCES_DIR;
+function testCORSPreflightSuccess(what) {
+ var testBase = get_host_info().HTTP_REMOTE_ORIGIN + RESOURCES_DIR;
+ var id = self.token();
+ var testUrl = testBase + "beacon-preflight.py?allowCors=1&cmd=put&id=" + id;
- promise_test(async function(test) {
- var id = "ca33c073-1cf0-41e5-bbd4-55969fb1a6c7";
- var testUrl = testBase + "beacon-preflight.py?allowCors=1&cmd=put&id=" + id;
- if (window.testRunner) {
- window.testRunner.setAllowsAnySSLCertificate(false);
- window.testRunner.terminateNetworkProcess();
- await fetch("").then(() => { }, () => { });
- }
-
- assert_true(navigator.sendBeacon(testUrl, what), "sendBeacon succeeded");
- const result = await pollResult(test, id);
- assert_equals(result['preflight'], 0, "Did not receive CORS preflight")
- assert_equals(result['beacon'], 0, "Did not receive beacon")
- }, "Beacon load should not be sent if server is not trusted.");
-
- promise_test(async function(test) {
- var id = self.token();
- var testUrl = testBase + "beacon-preflight.py?allowCors=1&cmd=put&id=" + id;
- if (window.testRunner) {
- window.testRunner.setAllowsAnySSLCertificate(true);
- window.testRunner.terminateNetworkProcess();
- await fetch("").then(() => { }, () => { });
- }
-
+ promise_test(function(test) {
assert_true(navigator.sendBeacon(testUrl, what), "SendBeacon Succeeded");
return pollResult(test, id) .then(result => {
assert_equals(result['preflight'], 0, "Did not receive CORS preflight")
@@ -72,7 +51,7 @@
return view;
}
-testCORSPreflight(stringToArrayBufferView("123"));
+testCORSPreflightSuccess(stringToArrayBufferView("123"));
</script>
</body>
</html>
Modified: trunk/LayoutTests/http/wpt/beacon/resources/beacon-preflight.py (249062 => 249063)
--- trunk/LayoutTests/http/wpt/beacon/resources/beacon-preflight.py 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/http/wpt/beacon/resources/beacon-preflight.py 2019-08-23 20:23:21 UTC (rev 249063)
@@ -44,9 +44,11 @@
stashed_data['beacon_origin'] = request.headers.get("Origin", "")
request.server.stash.put(test_id, stashed_data)
return [("Content-Type", "text/plain")], ""
-
+
if command == "get":
- return [("Content-Type", "text/plain")], json.dumps(stashed_data)
+ if stashed_data is not None:
+ return [("Content-Type", "text/plain")], json.dumps(stashed_data)
+ return [("Content-Type", "text/plain")], ""
response.set_error(400, "Bad Command")
return [("Content-Type", "text/plain")], "ERROR: Bad Command!"
Modified: trunk/LayoutTests/http/wpt/service-workers/resources/lengthy-pass.py (249062 => 249063)
--- trunk/LayoutTests/http/wpt/service-workers/resources/lengthy-pass.py 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/http/wpt/service-workers/resources/lengthy-pass.py 2019-08-23 20:23:21 UTC (rev 249063)
@@ -3,7 +3,6 @@
def main(request, response):
delay = 0.05
response.headers.set("Content-type", "text/_javascript_")
- response.headers.append("Access-Control-Allow-Origin", "*")
response.write_status_headers()
time.sleep(delay);
response.writer.write_content("document")
Deleted: trunk/LayoutTests/http/wpt/service-workers/server-trust-evaluation.https-expected.txt (249062 => 249063)
--- trunk/LayoutTests/http/wpt/service-workers/server-trust-evaluation.https-expected.txt 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/http/wpt/service-workers/server-trust-evaluation.https-expected.txt 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,5 +0,0 @@
-
-PASS Setup worker
-PASS Service worker load should fail
-PASS Service worker load should succeed
-
Deleted: trunk/LayoutTests/http/wpt/service-workers/server-trust-evaluation.https.html (249062 => 249063)
--- trunk/LayoutTests/http/wpt/service-workers/server-trust-evaluation.https.html 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/http/wpt/service-workers/server-trust-evaluation.https.html 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,53 +0,0 @@
-<html>
-<head>
-<title>Service Worker triggering server trust evaluation</title>
-<script src=""
-<script src=""
-<script src=""
-</head>
-<body>
-<script>
-var registration;
-var iframe;
-promise_test(async (test) => {
- if (window.testRunner) {
- window.testRunner.terminateNetworkProcess();
- await fetch("").then(() => { }, () => { });
- }
-
- registration = await navigator.serviceWorker.getRegistration("resources/");
- if (registration)
- await registration.unregister();
- registration = await navigator.serviceWorker.register("server-trust-worker.js", { scope : "resources/" });
- activeWorker = registration.active;
- if (activeWorker)
- return;
- activeWorker = registration.installing;
- await new Promise(resolve => {
- activeWorker.addEventListener('statechange', () => {
- if (activeWorker.state === "activated")
- resolve();
- });
- });
-}, "Setup worker");
-
-promise_test(async (test) => {
- if (window.testRunner)
- window.testRunner.setAllowsAnySSLCertificate(false);
-
- iframe = await with_iframe("resources/iframe1.html");
- assert_true(iframe.contentWindow.document.body.innerHTML.trim().indexOf("Load failed: ") !== -1);
- iframe.remove();
-}, "Service worker load should fail");
-
-promise_test(async (test) => {
- if (window.testRunner)
- window.testRunner.setAllowsAnySSLCertificate(true);
-
- iframe = await with_iframe("resources/iframe2.html");
- assert_true(iframe.contentWindow.document.body.innerHTML.trim().indexOf("PASS") !== -1);
- iframe.remove();
-}, "Service worker load should succeed");
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/http/wpt/service-workers/server-trust-worker.js (249062 => 249063)
--- trunk/LayoutTests/http/wpt/service-workers/server-trust-worker.js 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/LayoutTests/http/wpt/service-workers/server-trust-worker.js 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,5 +0,0 @@
-var remoteUrl = 'https://127.0.0.1:9443/WebKit/service-workers/resources/lengthy-pass.py?';
-var counter = 0;
-self.addEventListener('fetch', (event) => {
- event.respondWith(fetch(remoteUrl + counter++).then(response => new Response("PASS")).catch(e => new Response("Load failed: " + e)));
-});
Modified: trunk/Source/WebKit/ChangeLog (249062 => 249063)
--- trunk/Source/WebKit/ChangeLog 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/ChangeLog 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,3 +1,17 @@
+2019-08-23 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r249001.
+
+ Caused one layout test to fail on all configurations and
+ another to time out on Catalina / iOS 13.
+
+ Reverted changeset:
+
+ "Add a WebsiteDataStore delegate to handle
+ AuthenticationChallenge that do not come from pages"
+ https://bugs.webkit.org/show_bug.cgi?id=196870
+ https://trac.webkit.org/changeset/249001
+
2019-08-23 Brian Burg <bb...@apple.com>
REGRESSION(r248713): WebDriver commands which target the implicit main frame now hit an ASSERT
Modified: trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp (249062 => 249063)
--- trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -101,7 +101,7 @@
return;
}
- m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_parameters.sessionID, m_parameters.pageID, m_parameters.frameID, challenge, WTFMove(completionHandler));
+ m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_parameters.pageID, m_parameters.frameID, challenge, WTFMove(completionHandler));
}
void NetworkCORSPreflightChecker::didReceiveResponse(WebCore::ResourceResponse&& response, ResponseCompletionHandler&& completionHandler)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkDataTask.cpp (249062 => 249063)
--- trunk/Source/WebKit/NetworkProcess/NetworkDataTask.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/NetworkProcess/NetworkDataTask.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -150,9 +150,4 @@
return emptyString();
}
-PAL::SessionID NetworkDataTask::sessionID() const
-{
- return m_session->sessionID();
-}
-
} // namespace WebKit
Modified: trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h (249062 => 249063)
--- trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -34,7 +34,6 @@
#include <WebCore/ResourceRequest.h>
#include <WebCore/StoredCredentialsPolicy.h>
#include <WebCore/Timer.h>
-#include <pal/SessionID.h>
#include <wtf/CompletionHandler.h>
#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/text/WTFString.h>
@@ -131,8 +130,6 @@
virtual String description() const;
- PAL::SessionID sessionID() const;
-
protected:
NetworkDataTask(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::StoredCredentialsPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, bool dataTaskIsForMainFrameNavigation);
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp (249062 => 249063)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -201,7 +201,7 @@
if (auto* pendingDownload = m_task->pendingDownload())
m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(*pendingDownload, challenge, WTFMove(completionHandler));
else
- m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_task->sessionID(), m_parameters.webPageID, m_parameters.webFrameID, challenge, WTFMove(completionHandler));
+ m_networkProcess->authenticationManager().didReceiveAuthenticationChallenge(m_parameters.webPageID, m_parameters.webFrameID, challenge, WTFMove(completionHandler));
}
void NetworkLoad::didReceiveResponse(ResourceResponse&& response, ResponseCompletionHandler&& completionHandler)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.h (249062 => 249063)
--- trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoadChecker.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -84,8 +84,6 @@
}
#endif
- NetworkProcess& networkProcess() { return m_networkProcess; }
-
const URL& url() const { return m_url; }
WebCore::StoredCredentialsPolicy storedCredentialsPolicy() const { return m_storedCredentialsPolicy; }
Modified: trunk/Source/WebKit/NetworkProcess/PingLoad.cpp (249062 => 249063)
--- trunk/Source/WebKit/NetworkProcess/PingLoad.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/NetworkProcess/PingLoad.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -148,7 +148,7 @@
{
RELEASE_LOG_IF_ALLOWED("didReceiveChallenge");
if (challenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
- m_networkLoadChecker->networkProcess().authenticationManager().didReceiveAuthenticationChallenge(m_parameters.sessionID, m_parameters.webPageID, m_parameters.webFrameID, challenge, WTFMove(completionHandler));
+ completionHandler(AuthenticationChallengeDisposition::PerformDefaultHandling, { });
return;
}
auto weakThis = makeWeakPtr(*this);
Modified: trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp (249062 => 249063)
--- trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -108,7 +108,7 @@
return challengesToCoalesce;
}
-void AuthenticationManager::didReceiveAuthenticationChallenge(PAL::SessionID sessionID, PageIdentifier pageID, FrameIdentifier frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler)
+void AuthenticationManager::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler)
{
ASSERT(pageID);
ASSERT(frameID);
@@ -119,7 +119,7 @@
if (shouldCoalesceChallenge(pageID, challengeID, authenticationChallenge))
return;
- m_process.send(Messages::NetworkProcessProxy::DidReceiveAuthenticationChallenge(sessionID, pageID, frameID, authenticationChallenge, challengeID));
+ m_process.send(Messages::NetworkProcessProxy::DidReceiveAuthenticationChallenge(pageID, frameID, authenticationChallenge, challengeID));
}
void AuthenticationManager::didReceiveAuthenticationChallenge(IPC::MessageSender& download, const WebCore::AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler)
Modified: trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.h (249062 => 249063)
--- trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -63,7 +63,7 @@
static const char* supplementName();
- void didReceiveAuthenticationChallenge(PAL::SessionID, WebCore::PageIdentifier, WebCore::FrameIdentifier, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
+ void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
void didReceiveAuthenticationChallenge(IPC::MessageSender& download, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&);
void completeAuthenticationChallenge(uint64_t challengeID, AuthenticationChallengeDisposition, WebCore::Credential&&);
Deleted: trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h (249062 => 249063)
--- trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,35 +0,0 @@
- /*
- * Copyright (C) 2019 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
-
-#import "AuthenticationChallengeDisposition.h"
-#import <Foundation/NSURLSession.h>
-
-namespace WebKit {
-
-AuthenticationChallengeDisposition toAuthenticationChallengeDisposition(NSURLSessionAuthChallengeDisposition);
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm (249062 => 249063)
--- trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2018-2019 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.
- */
-
-#include "config.h"
-#include "AuthenticationChallengeDispositionCocoa.h"
-
-namespace WebKit {
-
-AuthenticationChallengeDisposition toAuthenticationChallengeDisposition(NSURLSessionAuthChallengeDisposition disposition)
-{
- switch (disposition) {
- case NSURLSessionAuthChallengeUseCredential:
- return AuthenticationChallengeDisposition::UseCredential;
- case NSURLSessionAuthChallengePerformDefaultHandling:
- return AuthenticationChallengeDisposition::PerformDefaultHandling;
- case NSURLSessionAuthChallengeCancelAuthenticationChallenge:
- return AuthenticationChallengeDisposition::Cancel;
- case NSURLSessionAuthChallengeRejectProtectionSpace:
- return AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue;
- }
- [NSException raise:NSInvalidArgumentException format:@"Invalid NSURLSessionAuthChallengeDisposition (%ld)", (long)disposition];
-}
-
-} // namespace WebKit
Modified: trunk/Source/WebKit/SourcesCocoa.txt (249062 => 249063)
--- trunk/Source/WebKit/SourcesCocoa.txt 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/SourcesCocoa.txt 2019-08-23 20:23:21 UTC (rev 249063)
@@ -133,7 +133,6 @@
Shared/cg/ShareableBitmapCG.cpp
-Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm
Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm
Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm 2019-08-23 20:23:21 UTC (rev 249063)
@@ -27,11 +27,9 @@
#import "WKWebsiteDataStoreInternal.h"
#import "APIString.h"
-#import "AuthenticationChallengeDispositionCocoa.h"
#import "CompletionHandlerCallChecker.h"
#import "WKHTTPCookieStoreInternal.h"
#import "WKNSArray.h"
-#import "WKNSURLAuthenticationChallenge.h"
#import "WKWebViewInternal.h"
#import "WKWebsiteDataRecordInternal.h"
#import "WebPageProxy.h"
@@ -40,7 +38,6 @@
#import "WebsiteDataFetchOption.h"
#import "_WKWebsiteDataStoreConfiguration.h"
#import "_WKWebsiteDataStoreDelegate.h"
-#import <WebCore/Credential.h>
#import <WebKit/ServiceWorkerProcessProxy.h>
#import <wtf/BlockPtr.h>
#import <wtf/URL.h>
@@ -51,7 +48,6 @@
explicit WebsiteDataStoreClient(id <_WKWebsiteDataStoreDelegate> delegate)
: m_delegate(delegate)
, m_hasRequestStorageSpaceSelector([m_delegate.get() respondsToSelector:@selector(requestStorageSpace: frameOrigin: quota: currentSize: spaceRequired: decisionHandler:)])
- , m_hasAuthenticationChallengeSelector([m_delegate.get() respondsToSelector:@selector(didReceiveAuthenticationChallenge: completionHandler:)])
{
}
@@ -77,28 +73,8 @@
[m_delegate.getAutoreleased() requestStorageSpace:mainFrameURL frameOrigin:frameURL quota:quota currentSize:currentSize spaceRequired:spaceRequired decisionHandler:decisionHandler.get()];
}
- void didReceiveAuthenticationChallenge(Ref<WebKit::AuthenticationChallengeProxy>&& challenge) final
- {
- if (!m_hasAuthenticationChallengeSelector || !m_delegate) {
- challenge->listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling);
- return;
- }
-
- auto nsURLChallenge = wrapper(challenge);
- auto checker = WebKit::CompletionHandlerCallChecker::create(m_delegate.getAutoreleased(), @selector(didReceiveAuthenticationChallenge: completionHandler:));
- auto completionHandler = makeBlockPtr([challenge = WTFMove(challenge), checker = WTFMove(checker)](NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential) mutable {
- if (checker->completionHandlerHasBeenCalled())
- return;
- checker->didCallCompletionHandler();
- challenge->listener().completeChallenge(WebKit::toAuthenticationChallengeDisposition(disposition), WebCore::Credential(credential));
- });
-
- [m_delegate.getAutoreleased() didReceiveAuthenticationChallenge:nsURLChallenge completionHandler:completionHandler.get()];
- }
-
WeakObjCPtr<id <_WKWebsiteDataStoreDelegate> > m_delegate;
bool m_hasRequestStorageSpaceSelector { false };
- bool m_hasAuthenticationChallengeSelector { false };
};
@implementation WKWebsiteDataStore
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -34,6 +34,4 @@
- (void)requestStorageSpace:(NSURL *)mainFrameURL frameOrigin:(NSURL *)frameURL quota:(NSUInteger)quota currentSize:(NSUInteger)currentSize spaceRequired:(NSUInteger)spaceRequired decisionHandler:(void (^)(unsigned long long quota))decisionHandler;
-- (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler;
-
@end
Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2019-08-23 20:23:21 UTC (rev 249063)
@@ -35,7 +35,6 @@
#import "APIURL.h"
#import "APIWebsiteDataStore.h"
#import "AuthenticationChallengeDisposition.h"
-#import "AuthenticationChallengeDispositionCocoa.h"
#import "AuthenticationDecisionListener.h"
#import "CompletionHandlerCallChecker.h"
#import "Logging.h"
@@ -960,6 +959,21 @@
|| m_navigationState.m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionWithPreferencesUserInfoDecisionHandler;
}
+static AuthenticationChallengeDisposition toAuthenticationChallengeDisposition(NSURLSessionAuthChallengeDisposition disposition)
+{
+ switch (disposition) {
+ case NSURLSessionAuthChallengeUseCredential:
+ return AuthenticationChallengeDisposition::UseCredential;
+ case NSURLSessionAuthChallengePerformDefaultHandling:
+ return AuthenticationChallengeDisposition::PerformDefaultHandling;
+ case NSURLSessionAuthChallengeCancelAuthenticationChallenge:
+ return AuthenticationChallengeDisposition::Cancel;
+ case NSURLSessionAuthChallengeRejectProtectionSpace:
+ return AuthenticationChallengeDisposition::RejectProtectionSpaceAndContinue;
+ }
+ [NSException raise:NSInvalidArgumentException format:@"Invalid NSURLSessionAuthChallengeDisposition (%ld)", (long)disposition];
+}
+
void NavigationState::NavigationClient::didReceiveAuthenticationChallenge(WebPageProxy&, AuthenticationChallengeProxy& authenticationChallenge)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallengeCompletionHandler)
@@ -974,7 +988,7 @@
if (checker->completionHandlerHasBeenCalled())
return;
checker->didCallCompletionHandler();
- challenge->listener().completeChallenge(WebKit::toAuthenticationChallengeDisposition(disposition), Credential(credential));
+ challenge->listener().completeChallenge(toAuthenticationChallengeDisposition(disposition), Credential(credential));
}).get()];
}
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -37,9 +37,6 @@
#include "NetworkProcessCreationParameters.h"
#include "NetworkProcessMessages.h"
#include "SandboxExtension.h"
-#if HAVE(SEC_KEY_PROXY)
-#include "SecKeyProxyStore.h"
-#endif
#include "ShouldGrandfatherStatistics.h"
#include "StorageAccessStatus.h"
#include "WebCompiledContentRuleList.h"
@@ -315,36 +312,20 @@
#endif
}
-void NetworkProcessProxy::didReceiveAuthenticationChallenge(PAL::SessionID sessionID, PageIdentifier pageID, FrameIdentifier frameID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID)
+void NetworkProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID)
{
-#if HAVE(SEC_KEY_PROXY)
- WeakPtr<SecKeyProxyStore> secKeyProxyStore;
- if (coreChallenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeClientCertificateRequested) {
- if (auto* store = websiteDataStoreFromSessionID(sessionID)) {
- auto newSecKeyProxyStore = SecKeyProxyStore::create();
- secKeyProxyStore = makeWeakPtr(newSecKeyProxyStore.get());
- store->addSecKeyProxyStore(WTFMove(newSecKeyProxyStore));
- }
+#if ENABLE(SERVICE_WORKER)
+ if (auto* serviceWorkerProcessProxy = m_processPool.serviceWorkerProcessProxyFromPageID(pageID)) {
+ auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), nullptr);
+ serviceWorkerProcessProxy->didReceiveAuthenticationChallenge(pageID, frameID, WTFMove(authenticationChallenge));
+ return;
}
- auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), WTFMove(secKeyProxyStore));
-#else
- auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), nullptr);
#endif
- WebPageProxy* page = nullptr;
- if (pageID && !m_processPool.isServiceWorkerPageID(pageID))
- page = WebProcessProxy::webPage(pageID);
+ WebPageProxy* page = WebProcessProxy::webPage(pageID);
+ MESSAGE_CHECK(page);
- if (!page) {
- auto* store = websiteDataStoreFromSessionID(sessionID);
- if (!store || coreChallenge.protectionSpace().authenticationScheme() != ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
- authenticationChallenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling);
- return;
- }
- store->client().didReceiveAuthenticationChallenge(WTFMove(authenticationChallenge));
- return;
- }
-
+ auto authenticationChallenge = AuthenticationChallengeProxy::create(WTFMove(coreChallenge), challengeID, makeRef(*connection()), page->secKeyProxyStore(coreChallenge));
page->didReceiveAuthenticationChallengeProxy(frameID, WTFMove(authenticationChallenge));
}
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -213,7 +213,7 @@
// Message handlers
void didReceiveNetworkProcessProxyMessage(IPC::Connection&, IPC::Decoder&);
void didCreateNetworkConnectionToWebProcess(const IPC::Attachment&);
- void didReceiveAuthenticationChallenge(PAL::SessionID, WebCore::PageIdentifier, WebCore::FrameIdentifier, WebCore::AuthenticationChallenge&&, uint64_t challengeID);
+ void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, WebCore::AuthenticationChallenge&&, uint64_t challengeID);
void didFetchWebsiteData(uint64_t callbackID, const WebsiteData&);
void didDeleteWebsiteData(uint64_t callbackID);
void didDeleteWebsiteDataForOrigins(uint64_t callbackID);
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in 2019-08-23 20:23:21 UTC (rev 249063)
@@ -23,7 +23,7 @@
messages -> NetworkProcessProxy LegacyReceiver {
DidCreateNetworkConnectionToWebProcess(IPC::Attachment connectionIdentifier)
- DidReceiveAuthenticationChallenge(PAL::SessionID sessionID, WebCore::PageIdentifier pageID, WebCore::FrameIdentifier frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
+ DidReceiveAuthenticationChallenge(WebCore::PageIdentifier pageID, WebCore::FrameIdentifier frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID)
DidFetchWebsiteData(uint64_t callbackID, struct WebKit::WebsiteData websiteData)
DidDeleteWebsiteData(uint64_t callbackID)
Modified: trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -90,6 +90,22 @@
send(Messages::WebSWContextManagerConnection::UpdatePreferencesStore { store }, 0);
}
+void ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, FrameIdentifier frameID, Ref<AuthenticationChallengeProxy>&& challenge)
+{
+ UNUSED_PARAM(pageID);
+ UNUSED_PARAM(frameID);
+
+ // FIXME: Expose an API to delegate the actual decision to the application layer.
+ auto& protectionSpace = challenge->core().protectionSpace();
+ if (protectionSpace.authenticationScheme() == WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested && processPool().allowsAnySSLCertificateForServiceWorker()) {
+ auto credential = WebCore::Credential("accept server trust"_s, emptyString(), WebCore::CredentialPersistenceNone);
+ challenge->listener().completeChallenge(AuthenticationChallengeDisposition::UseCredential, credential);
+ return;
+ }
+ notImplemented();
+ challenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling);
+}
+
} // namespace WebKit
#endif // ENABLE(SERVICE_WORKER)
Modified: trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -41,6 +41,8 @@
static bool hasRegisteredServiceWorkers(const String& serviceWorkerDirectory);
+ void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, WebCore::FrameIdentifier, Ref<AuthenticationChallengeProxy>&&);
+
void start(const WebPreferencesStore&, Optional<PAL::SessionID> initialSessionID);
void setUserAgent(const String&);
void updatePreferencesStore(const WebPreferencesStore&);
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -7333,6 +7333,19 @@
#endif
+WeakPtr<SecKeyProxyStore> WebPageProxy::secKeyProxyStore(const WebCore::AuthenticationChallenge& challenge)
+{
+#if HAVE(SEC_KEY_PROXY)
+ if (challenge.protectionSpace().authenticationScheme() == ProtectionSpaceAuthenticationSchemeClientCertificateRequested) {
+ auto secKeyProxyStore = SecKeyProxyStore::create();
+ auto weakPointer = makeWeakPtr(secKeyProxyStore.get());
+ m_websiteDataStore->addSecKeyProxyStore(WTFMove(secKeyProxyStore));
+ return weakPointer;
+ }
+#endif
+ return nullptr;
+}
+
void WebPageProxy::didReceiveAuthenticationChallengeProxy(FrameIdentifier, Ref<AuthenticationChallengeProxy>&& authenticationChallenge)
{
m_navigationClient->didReceiveAuthenticationChallenge(*this, authenticationChallenge.get());
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -2231,17 +2231,17 @@
#endif
}
-bool WebProcessPool::isServiceWorkerPageID(PageIdentifier pageID) const
+#if ENABLE(SERVICE_WORKER)
+ServiceWorkerProcessProxy* WebProcessPool::serviceWorkerProcessProxyFromPageID(PageIdentifier pageID) const
{
-#if ENABLE(SERVICE_WORKER)
// FIXME: This is inefficient.
for (auto* serviceWorkerProcess : m_serviceWorkerProcesses.values()) {
if (serviceWorkerProcess->pageID() == pageID)
- return true;
+ return serviceWorkerProcess;
}
+ return nullptr;
+}
#endif
- return false;
-}
void WebProcessPool::addProcessToOriginCacheSet(WebProcessProxy& process, const URL& url)
{
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -379,9 +379,9 @@
void getNetworkProcessConnection(WebProcessProxy&, Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply&&);
- bool isServiceWorkerPageID(WebCore::PageIdentifier) const;
#if ENABLE(SERVICE_WORKER)
void establishWorkerContextConnectionToNetworkProcess(NetworkProcessProxy&, WebCore::RegistrableDomain&&, Optional<PAL::SessionID>);
+ ServiceWorkerProcessProxy* serviceWorkerProcessProxyFromPageID(WebCore::PageIdentifier) const;
const HashMap<WebCore::RegistrableDomain, ServiceWorkerProcessProxy*>& serviceWorkerProxies() const { return m_serviceWorkerProcesses; }
void setAllowsAnySSLCertificateForServiceWorker(bool allows) { m_allowsAnySSLCertificateForServiceWorker = allows; }
bool allowsAnySSLCertificateForServiceWorker() const { return m_allowsAnySSLCertificateForServiceWorker; }
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreClient.h (249062 => 249063)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreClient.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreClient.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -25,9 +25,6 @@
#pragma once
-#include "AuthenticationChallengeDisposition.h"
-#include "AuthenticationChallengeProxy.h"
-#include "AuthenticationDecisionListener.h"
#include <wtf/CompletionHandler.h>
namespace WebCore {
@@ -45,11 +42,6 @@
{
completionHandler({ });
}
-
- virtual void didReceiveAuthenticationChallenge(Ref<AuthenticationChallengeProxy>&& challenge)
- {
- challenge->listener().completeChallenge(AuthenticationChallengeDisposition::PerformDefaultHandling);
- }
};
} // namespace WebKit
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (249062 => 249063)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2019-08-23 20:23:21 UTC (rev 249063)
@@ -3156,8 +3156,6 @@
41897ED51F415D850016FA42 /* CacheStorageEngineConnection.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = CacheStorageEngineConnection.messages.in; sourceTree = "<group>"; };
41897ED61F415D860016FA42 /* CacheStorageEngine.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CacheStorageEngine.cpp; sourceTree = "<group>"; };
419ACF9B1F981D26009F1A83 /* WebServiceWorkerFetchTaskClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebServiceWorkerFetchTaskClient.h; sourceTree = "<group>"; };
- 41A5F7B9226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallengeDispositionCocoa.h; sourceTree = "<group>"; };
- 41A5F7BA226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AuthenticationChallengeDispositionCocoa.mm; sourceTree = "<group>"; };
41AC86811E042E5300303074 /* WebRTCResolver.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; name = WebRTCResolver.messages.in; path = Network/webrtc/WebRTCResolver.messages.in; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = "<none>"; };
41B28B081F83AD3E00FB52AC /* RTCPacketOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCPacketOptions.h; sourceTree = "<group>"; };
41B28B091F83AD3E00FB52AC /* RTCPacketOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCPacketOptions.cpp; sourceTree = "<group>"; };
@@ -7043,8 +7041,6 @@
57B4B45C20B5048B00D4AD79 /* cocoa */ = {
isa = PBXGroup;
children = (
- 41A5F7B9226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.h */,
- 41A5F7BA226ECF7C00671764 /* AuthenticationChallengeDispositionCocoa.mm */,
57B4B45D20B504AB00D4AD79 /* AuthenticationManagerCocoa.mm */,
44A481C621F2D27B00F2F919 /* ClientCertificateAuthenticationXPCConstants.cpp */,
57B4B45E20B504AB00D4AD79 /* ClientCertificateAuthenticationXPCConstants.h */,
Modified: trunk/Tools/ChangeLog (249062 => 249063)
--- trunk/Tools/ChangeLog 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Tools/ChangeLog 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1,3 +1,17 @@
+2019-08-23 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, rolling out r249001.
+
+ Caused one layout test to fail on all configurations and
+ another to time out on Catalina / iOS 13.
+
+ Reverted changeset:
+
+ "Add a WebsiteDataStore delegate to handle
+ AuthenticationChallenge that do not come from pages"
+ https://bugs.webkit.org/show_bug.cgi?id=196870
+ https://trac.webkit.org/changeset/249001
+
2019-08-23 Jonathan Bedard <jbed...@apple.com>
results.webkit.org: Escape html in changelog
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (249062 => 249063)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2019-08-23 20:23:21 UTC (rev 249063)
@@ -1032,9 +1032,7 @@
#if PLATFORM(IOS_FAMILY)
m_openPanelFileURLsMediaIcon = nullptr;
#endif
-
- setAllowsAnySSLCertificate(true);
-
+
statisticsResetToConsistentState();
clearAdClickAttribution();
@@ -1183,13 +1181,10 @@
#endif
}
-#if !PLATFORM(COCOA)
void TestController::setAllowsAnySSLCertificate(bool allows)
{
- m_allowsAnySSLCertificate = allows;
WKContextSetAllowsAnySSLCertificateForWebSocketTesting(platformContext(), allows);
}
-#endif
static std::string testPath(WKURLRef url)
{
@@ -2333,12 +2328,8 @@
m_serverTrustEvaluationCallbackCallsCount++;
- if (m_allowsAnySSLCertificate) {
- WKRetainPtr<WKCredentialRef> credential = adoptWK(WKCredentialCreate(toWK("accept server trust").get(), toWK("").get(), kWKCredentialPersistenceNone));
- WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get());
- return;
- }
- WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(decisionListener);
+ WKRetainPtr<WKCredentialRef> credential = adoptWK(WKCredentialCreate(toWK("accept server trust").get(), toWK("").get(), kWKCredentialPersistenceNone));
+ WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get());
return;
}
Modified: trunk/Tools/WebKitTestRunner/TestController.h (249062 => 249063)
--- trunk/Tools/WebKitTestRunner/TestController.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -591,7 +591,6 @@
uint64_t m_serverTrustEvaluationCallbackCallsCount { 0 };
bool m_shouldDismissJavaScriptAlertsAsynchronously { false };
- bool m_allowsAnySSLCertificate { true };
};
struct TestCommand {
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (249062 => 249063)
--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2019-08-23 20:23:21 UTC (rev 249063)
@@ -35,7 +35,6 @@
#import <Foundation/Foundation.h>
#import <Security/SecItem.h>
#import <WebKit/WKContextConfigurationRef.h>
-#import <WebKit/WKContextPrivate.h>
#import <WebKit/WKCookieManager.h>
#import <WebKit/WKPreferencesRefPrivate.h>
#import <WebKit/WKProcessPoolPrivate.h>
@@ -398,13 +397,6 @@
[globalWebsiteDataStoreDelegateClient setAllowRaisingQuota: value];
}
-void TestController::setAllowsAnySSLCertificate(bool allows)
-{
- m_allowsAnySSLCertificate = allows;
- WKContextSetAllowsAnySSLCertificateForWebSocketTesting(platformContext(), allows);
- [globalWebsiteDataStoreDelegateClient setAllowAnySSLCertificate: allows];
-}
-
bool TestController::canDoServerTrustEvaluationInNetworkProcess() const
{
#if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h (249062 => 249063)
--- trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h 2019-08-23 20:23:21 UTC (rev 249063)
@@ -30,9 +30,7 @@
@interface TestWebsiteDataStoreDelegate: NSObject <_WKWebsiteDataStoreDelegate> {
@private
BOOL _shouldAllowRaisingQuota;
- BOOL _shouldAllowAnySSLCertificate;
}
- (instancetype)init;
- (void)setAllowRaisingQuota:(BOOL)shouldAllowRaisingQuota;
-- (void)setAllowAnySSLCertificate:(BOOL)shouldAllowAnySSLCertificate;
@end
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm (249062 => 249063)
--- trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm 2019-08-23 19:35:02 UTC (rev 249062)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm 2019-08-23 20:23:21 UTC (rev 249063)
@@ -42,23 +42,4 @@
{
_shouldAllowRaisingQuota = shouldAllowRaisingQuota;
}
-
-- (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler
-{
- NSString *method = challenge.protectionSpace.authenticationMethod;
- if ([method isEqualToString:NSURLAuthenticationMethodServerTrust]) {
- if (_shouldAllowAnySSLCertificate)
- completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust: challenge.protectionSpace.serverTrust]);
- else
- completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);
- return;
- }
- completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
-}
-
-- (void)setAllowAnySSLCertificate:(BOOL)shouldAllowAnySSLCertificate
-{
- _shouldAllowAnySSLCertificate = shouldAllowAnySSLCertificate;
-}
-
@end