Title: [234615] trunk/Source/WebKit

Diff

Modified: trunk/Source/WebKit/ChangeLog (234614 => 234615)


--- trunk/Source/WebKit/ChangeLog	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/ChangeLog	2018-08-06 20:17:04 UTC (rev 234615)
@@ -1,5 +1,17 @@
 2018-08-06  Ryan Haddad  <ryanhad...@apple.com>
 
+        Unreviewed, rolling out r234552.
+
+        Introduced 2 layout test failures on High Sierra.
+
+        Reverted changeset:
+
+        "Check with SafeBrowsing during navigation in WKWebView"
+        https://bugs.webkit.org/show_bug.cgi?id=188133
+        https://trac.webkit.org/changeset/234552
+
+2018-08-06  Ryan Haddad  <ryanhad...@apple.com>
+
         Unreviewed, rolling out r234569.
 
         Breaks internal builds.

Modified: trunk/Source/WebKit/Platform/spi/Cocoa/SafeBrowsingSPI.h (234614 => 234615)


--- trunk/Source/WebKit/Platform/spi/Cocoa/SafeBrowsingSPI.h	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/Platform/spi/Cocoa/SafeBrowsingSPI.h	2018-08-06 20:17:04 UTC (rev 234615)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if HAVE(SAFE_BROWSING)
+#if WK_API_ENABLED && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000))
 
 #import <Foundation/Foundation.h>
 
@@ -73,3 +73,4 @@
 #endif
 
 #endif
+

Deleted: trunk/Source/WebKit/UIProcess/Cocoa/SafeBrowsingResultCocoa.mm (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/Cocoa/SafeBrowsingResultCocoa.mm	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/Cocoa/SafeBrowsingResultCocoa.mm	2018-08-06 20:17:04 UTC (rev 234615)
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2018 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 "SafeBrowsingResult.h"
-
-#import "SafeBrowsingSPI.h"
-
-namespace WebKit {
-
-#if HAVE(SAFE_BROWSING)
-SafeBrowsingResult::SafeBrowsingResult(SSBServiceLookupResult *result)
-    : m_provider([result provider])
-    , m_isPhishing([result isPhishing])
-    , m_isMalware([result isMalware])
-    , m_isUnwantedSoftware([result isUnwantedSoftware])
-    , m_isKnownToBeUnsafe([result isKnownToBeUnsafe])
-{
-}
-#endif
-
-}

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm	2018-08-06 20:17:04 UTC (rev 234615)
@@ -30,14 +30,11 @@
 #import "DataDetectionResult.h"
 #import "LoadParameters.h"
 #import "PageClient.h"
-#import "SafeBrowsingResult.h"
-#import "SafeBrowsingSPI.h"
 #import "WebProcessProxy.h"
 #import <WebCore/DragItem.h>
 #import <WebCore/NotImplemented.h>
 #import <WebCore/SearchPopupMenuCocoa.h>
 #import <WebCore/ValidationBubble.h>
-#import <wtf/BlockPtr.h>
 #import <wtf/cf/TypeCastsCF.h>
 
 using namespace WebCore;
@@ -71,29 +68,6 @@
     searchItems = WebCore::loadRecentSearches(name);
 }
 
-void WebPageProxy::beginSafeBrowsingCheck(const URL& url, WebFramePolicyListenerProxy& listener)
-{
-#if HAVE(SAFE_BROWSING)
-    [[SSBLookupContext sharedLookupContext] lookUpURL:url completionHandler:BlockPtr<void(SSBLookupResult *, NSError *)>::fromCallable([listener = makeRef(listener)] (SSBLookupResult *result, NSError *error) mutable {
-        RunLoop::main().dispatch([listener = WTFMove(listener), result = retainPtr(result), error = retainPtr(error)] {
-            if (error) {
-                listener->didReceiveSafeBrowsingResults({ });
-                return;
-            }
-
-            NSArray<SSBServiceLookupResult *> *results = [result serviceLookupResults];
-            Vector<SafeBrowsingResult> resultsVector;
-            resultsVector.reserveInitialCapacity([results count]);
-            for (SSBServiceLookupResult *result in results)
-                resultsVector.uncheckedAppend({ result });
-            listener->didReceiveSafeBrowsingResults(WTFMove(resultsVector));
-        });
-    }).get()];
-#else
-    listener.didReceiveSafeBrowsingResults({ });
-#endif
-}
-
 #if ENABLE(CONTENT_FILTERING)
 void WebPageProxy::contentFilterDidBlockLoadForFrame(const WebCore::ContentFilterUnblockHandler& unblockHandler, uint64_t frameID)
 {

Deleted: trunk/Source/WebKit/UIProcess/SafeBrowsingResult.h (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/SafeBrowsingResult.h	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/SafeBrowsingResult.h	2018-08-06 20:17:04 UTC (rev 234615)
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2018 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/text/WTFString.h>
-
-OBJC_CLASS SSBServiceLookupResult;
-
-namespace WebKit {
-
-class SafeBrowsingResult {
-public:
-#if HAVE(SAFE_BROWSING)
-    SafeBrowsingResult(SSBServiceLookupResult *);
-#endif
-    SafeBrowsingResult() = default;
-
-    const String& provider() const { return m_provider; }
-    bool isPhishing() const { return m_isPhishing; }
-    bool isMalware() const { return m_isMalware; }
-    bool isUnwantedSoftware() const { return m_isUnwantedSoftware; }
-    bool isKnownToBeUnsafe() const { return m_isKnownToBeUnsafe; }
-
-private:
-    String m_provider;
-    bool m_isPhishing { false };
-    bool m_isMalware { false };
-    bool m_isUnwantedSoftware { false };
-    bool m_isKnownToBeUnsafe { false };
-};
-
-} // namespace WebKit

Modified: trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.cpp	2018-08-06 20:17:04 UTC (rev 234615)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -29,7 +29,6 @@
 #include "APINavigation.h"
 #include "APIWebsiteDataStore.h"
 #include "APIWebsitePolicies.h"
-#include "SafeBrowsingResult.h"
 #include "WebFrameProxy.h"
 #include "WebsiteDataStore.h"
 #include "WebsitePoliciesData.h"
@@ -36,45 +35,27 @@
 
 namespace WebKit {
 
-WebFramePolicyListenerProxy::WebFramePolicyListenerProxy(Reply&& reply, ShouldExpectSafeBrowsingResult expect)
-    : m_reply(WTFMove(reply))
+WebFramePolicyListenerProxy::WebFramePolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible)>&& completionHandler)
+    : m_completionHandler(WTFMove(completionHandler))
 {
-    if (expect == ShouldExpectSafeBrowsingResult::No)
-        didReceiveSafeBrowsingResults({ });
 }
 
-WebFramePolicyListenerProxy::~WebFramePolicyListenerProxy() = default;
-
-void WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults(Vector<SafeBrowsingResult>&& safeBrowsingResults)
-{
-    ASSERT(!m_safeBrowsingResults);
-    if (m_policyResult) {
-        if (m_reply)
-            m_reply(WebCore::PolicyAction::Use, m_policyResult->first.get(), m_policyResult->second, WTFMove(safeBrowsingResults));
-    } else
-        m_safeBrowsingResults = WTFMove(safeBrowsingResults);
-}
-
 void WebFramePolicyListenerProxy::use(API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap)
 {
-    ASSERT(!m_policyResult);
-    if (m_safeBrowsingResults) {
-        if (m_reply)
-            m_reply(WebCore::PolicyAction::Use, policies, swap, WTFMove(*m_safeBrowsingResults));
-    } else
-        m_policyResult = {{ policies, swap }};
+    if (m_completionHandler)
+        m_completionHandler(WebCore::PolicyAction::Use, policies, swap);
 }
 
 void WebFramePolicyListenerProxy::download()
 {
-    if (m_reply)
-        m_reply(WebCore::PolicyAction::Download, nullptr, ShouldProcessSwapIfPossible::No, { });
+    if (m_completionHandler)
+        m_completionHandler(WebCore::PolicyAction::Download, nullptr, ShouldProcessSwapIfPossible::No);
 }
 
 void WebFramePolicyListenerProxy::ignore()
 {
-    if (m_reply)
-        m_reply(WebCore::PolicyAction::Ignore, nullptr, ShouldProcessSwapIfPossible::No, { });
+    if (m_completionHandler)
+        m_completionHandler(WebCore::PolicyAction::Ignore, nullptr, ShouldProcessSwapIfPossible::No);
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/WebFramePolicyListenerProxy.h	2018-08-06 20:17:04 UTC (rev 234615)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,7 +27,6 @@
 
 #include "APIObject.h"
 #include <wtf/CompletionHandler.h>
-#include <wtf/Vector.h>
 
 namespace API {
 class WebsitePolicies;
@@ -39,33 +38,24 @@
 
 namespace WebKit {
 
-class SafeBrowsingResult;
-
 enum class ShouldProcessSwapIfPossible { No, Yes };
-enum class ShouldExpectSafeBrowsingResult { No, Yes };
 
 class WebFramePolicyListenerProxy : public API::ObjectImpl<API::Object::Type::FramePolicyListener> {
 public:
 
-    using Reply = CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible, Vector<SafeBrowsingResult>&&)>;
-    static Ref<WebFramePolicyListenerProxy> create(Reply&& reply, ShouldExpectSafeBrowsingResult expect)
+    static Ref<WebFramePolicyListenerProxy> create(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible)>&& completionHandler)
     {
-        return adoptRef(*new WebFramePolicyListenerProxy(WTFMove(reply), expect));
+        return adoptRef(*new WebFramePolicyListenerProxy(WTFMove(completionHandler)));
     }
-    ~WebFramePolicyListenerProxy();
 
     void use(API::WebsitePolicies* = nullptr, ShouldProcessSwapIfPossible = ShouldProcessSwapIfPossible::No);
     void download();
     void ignore();
-    
-    void didReceiveSafeBrowsingResults(Vector<SafeBrowsingResult>&&);
 
 private:
-    WebFramePolicyListenerProxy(Reply&&, ShouldExpectSafeBrowsingResult);
+    WebFramePolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible)>&&);
 
-    std::optional<std::pair<RefPtr<API::WebsitePolicies>, ShouldProcessSwapIfPossible>> m_policyResult;
-    std::optional<Vector<SafeBrowsingResult>> m_safeBrowsingResults;
-    Reply m_reply;
+    CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible)> m_completionHandler;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/UIProcess/WebFrameProxy.cpp (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/WebFrameProxy.cpp	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/WebFrameProxy.cpp	2018-08-06 20:17:04 UTC (rev 234615)
@@ -178,14 +178,14 @@
     m_title = title;
 }
 
-WebFramePolicyListenerProxy& WebFrameProxy::setUpPolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible, Vector<SafeBrowsingResult>&&)>&& completionHandler, ShouldExpectSafeBrowsingResult expect)
+WebFramePolicyListenerProxy& WebFrameProxy::setUpPolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible)>&& completionHandler)
 {
     if (m_activeListener)
         m_activeListener->ignore();
-    m_activeListener = WebFramePolicyListenerProxy::create([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (WebCore::PolicyAction action, API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap, Vector<SafeBrowsingResult>&& safeBrowsingResults) mutable {
-        completionHandler(action, policies, swap, WTFMove(safeBrowsingResults));
+    m_activeListener = WebFramePolicyListenerProxy::create([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (WebCore::PolicyAction action, API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap) mutable {
+        completionHandler(action, policies, swap);
         m_activeListener = nullptr;
-    }, expect);
+    });
     return *m_activeListener;
 }
 

Modified: trunk/Source/WebKit/UIProcess/WebFrameProxy.h (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/WebFrameProxy.h	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/WebFrameProxy.h	2018-08-06 20:17:04 UTC (rev 234615)
@@ -48,12 +48,10 @@
 }
 
 namespace WebKit {
-class SafeBrowsingResult;
 class WebCertificateInfo;
 class WebFramePolicyListenerProxy;
 class WebPageProxy;
 class WebsiteDataStore;
-enum class ShouldExpectSafeBrowsingResult;
 enum class ShouldProcessSwapIfPossible;
 struct WebsitePoliciesData;
 
@@ -117,7 +115,7 @@
     void didSameDocumentNavigation(const WebCore::URL&); // eg. anchor navigation, session state change.
     void didChangeTitle(const String&);
 
-    WebFramePolicyListenerProxy& setUpPolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible, Vector<SafeBrowsingResult>&&)>&&, ShouldExpectSafeBrowsingResult);
+    WebFramePolicyListenerProxy& setUpPolicyListenerProxy(CompletionHandler<void(WebCore::PolicyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible)>&&);
 
 #if ENABLE(CONTENT_FILTERING)
     void contentFilterDidBlockLoad(WebCore::ContentFilterUnblockHandler contentFilterUnblockHandler) { m_contentFilterUnblockHandler = WTFMove(contentFilterUnblockHandler); }

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-08-06 20:17:04 UTC (rev 234615)
@@ -76,7 +76,6 @@
 #include "PluginInformation.h"
 #include "PluginProcessManager.h"
 #include "PrintInfo.h"
-#include "SafeBrowsingResult.h"
 #include "TextChecker.h"
 #include "TextCheckerState.h"
 #include "UIMessagePortChannelProvider.h"
@@ -4003,13 +4002,6 @@
         m_frameSetLargestFrame = value ? m_mainFrame : 0;
 }
 
-#if !PLATFORM(COCOA)
-void WebPageProxy::beginSafeBrowsingCheck(const URL&, WebFramePolicyListenerProxy& listener)
-{
-    listener.didReceiveSafeBrowsingResults({ });
-}
-#endif
-
 void WebPageProxy::decidePolicyForNavigationActionAsync(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, NavigationActionData&& navigationActionData, const FrameInfoData& frameInfoData, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, uint64_t listenerID)
 {
     decidePolicyForNavigationAction(frameID, frameSecurityOrigin, navigationID, WTFMove(navigationActionData), frameInfoData, originatingPageID, originalRequest, WTFMove(request), WTFMove(redirectResponse), userData, PolicyDecisionSender::create([this, protectedThis = makeRef(*this), frameID, listenerID] (auto... args) {
@@ -4071,9 +4063,7 @@
     UNUSED_PARAM(newNavigationID);
 #endif
 
-    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(*frame), sender = sender.copyRef(), navigation] (WebCore::PolicyAction policyAction, API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap, Vector<SafeBrowsingResult>&&) mutable {
-        // FIXME: do something with the SafeBrowsingResults.
-
+    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(*frame), sender = sender.copyRef(), navigation] (WebCore::PolicyAction policyAction, API::WebsitePolicies* policies, ShouldProcessSwapIfPossible swap) mutable {
         std::optional<WebsitePoliciesData> data;
         if (policies) {
             data = ""
@@ -4094,8 +4084,7 @@
         }
 
         receivedPolicyDecision(policyAction, navigation.get(), WTFMove(data), WTFMove(sender));
-    }, ShouldExpectSafeBrowsingResult::Yes));
-    beginSafeBrowsingCheck(request.url(), listener);
+    }));
 
     API::Navigation* mainFrameNavigation = frame->isMainFrame() ? navigation.get() : nullptr;
     WebFrameProxy* originatingFrame = m_process->webFrame(originatingFrameInfoData.frameID);
@@ -4141,14 +4130,13 @@
     MESSAGE_CHECK(frame);
     MESSAGE_CHECK_URL(request.url());
 
-    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), listenerID, frameID] (WebCore::PolicyAction policyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible swap, Vector<SafeBrowsingResult>&& safeBrowsingResults) mutable {
+    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), listenerID, frameID] (WebCore::PolicyAction policyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible swap) mutable {
         // FIXME: Assert the API::WebsitePolicies* is nullptr here once clients of WKFramePolicyListenerUseWithPolicies go away.
         RELEASE_ASSERT(swap == ShouldProcessSwapIfPossible::No);
-        ASSERT_UNUSED(safeBrowsingResults, safeBrowsingResults.isEmpty());
         receivedPolicyDecision(policyAction, nullptr, std::nullopt, PolicyDecisionSender::create([this, protectedThis = WTFMove(protectedThis), frameID, listenerID] (auto... args) {
             m_process->send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...), m_pageID);
         }));
-    }, ShouldExpectSafeBrowsingResult::No));
+    }));
 
     if (m_navigationClient) {
         RefPtr<API::FrameInfo> sourceFrameInfo;
@@ -4177,14 +4165,13 @@
     MESSAGE_CHECK_URL(response.url());
 
     RefPtr<API::Navigation> navigation = navigationID ? &m_navigationState->navigation(navigationID) : nullptr;
-    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frameID, listenerID, navigation = WTFMove(navigation)] (WebCore::PolicyAction policyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible swap, Vector<SafeBrowsingResult>&& safeBrowsingResults) mutable {
+    auto listener = makeRef(frame->setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frameID, listenerID, navigation = WTFMove(navigation)] (WebCore::PolicyAction policyAction, API::WebsitePolicies*, ShouldProcessSwapIfPossible swap) mutable {
         // FIXME: Assert the API::WebsitePolicies* is nullptr here once clients of WKFramePolicyListenerUseWithPolicies go away.
         RELEASE_ASSERT(swap == ShouldProcessSwapIfPossible::No);
-        ASSERT_UNUSED(safeBrowsingResults, safeBrowsingResults.isEmpty());
         receivedPolicyDecision(policyAction, navigation.get(), std::nullopt, PolicyDecisionSender::create([this, protectedThis = WTFMove(protectedThis), frameID, listenerID] (auto... args) {
             m_process->send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...), m_pageID);
         }));
-    }, ShouldExpectSafeBrowsingResult::No));
+    }));
 
     if (m_navigationClient) {
         auto navigationResponse = API::NavigationResponse::create(API::FrameInfo::create(*frame, frameSecurityOrigin.securityOrigin()).get(), request, response, canShowMIMEType);

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (234614 => 234615)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2018-08-06 20:17:04 UTC (rev 234615)
@@ -1435,7 +1435,6 @@
     void decidePolicyForNewWindowAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, NavigationActionData&&, WebCore::ResourceRequest&&, const String& frameName, uint64_t listenerID, const UserData&);
     void decidePolicyForResponse(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, uint64_t listenerID, const UserData&);
     void unableToImplementPolicy(uint64_t frameID, const WebCore::ResourceError&, const UserData&);
-    void beginSafeBrowsingCheck(const WebCore::URL&, WebFramePolicyListenerProxy&);
 
     void willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, const Vector<std::pair<String, String>>& textFieldValues, uint64_t listenerID, const UserData&);
         

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (234614 => 234615)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-08-06 20:17:04 UTC (rev 234615)
@@ -1289,8 +1289,6 @@
 		5C8DD3801FE4521600F2A556 /* WebsiteAutoplayPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C8DD37F1FE4519200F2A556 /* WebsiteAutoplayPolicy.h */; };
 		5C9E56821DF7F1AB00C9EE33 /* WKWebsitePolicies.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C9E56801DF7F05500C9EE33 /* WKWebsitePolicies.cpp */; };
 		5C9E56831DF7F1B300C9EE33 /* WKWebsitePolicies.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C9E56811DF7F05500C9EE33 /* WKWebsitePolicies.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		5CA9854A210BEB640057EB6B /* SafeBrowsingResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CA98549210BEB5A0057EB6B /* SafeBrowsingResult.h */; };
-		5CA9854C210BEB7D0057EB6B /* SafeBrowsingResultCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CA9854B210BEB730057EB6B /* SafeBrowsingResultCocoa.mm */; };
 		5CB2378B1DF0DE5300117AA3 /* _WKWebsitePolicies.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB2378A1DF0DD4300117AA3 /* _WKWebsitePolicies.mm */; };
 		5CB2378C1DF0DE6E00117AA3 /* _WKWebsitePolicies.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB237891DF0DD4300117AA3 /* _WKWebsitePolicies.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		5CB2378E1DF0E0D300117AA3 /* _WKWebsitePoliciesInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB2378D1DF0E0C200117AA3 /* _WKWebsitePoliciesInternal.h */; };
@@ -3856,8 +3854,6 @@
 		5C8DD3811FE455CA00F2A556 /* WebsiteAutoplayQuirk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebsiteAutoplayQuirk.h; sourceTree = "<group>"; };
 		5C9E56801DF7F05500C9EE33 /* WKWebsitePolicies.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKWebsitePolicies.cpp; sourceTree = "<group>"; };
 		5C9E56811DF7F05500C9EE33 /* WKWebsitePolicies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsitePolicies.h; sourceTree = "<group>"; };
-		5CA98549210BEB5A0057EB6B /* SafeBrowsingResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SafeBrowsingResult.h; sourceTree = "<group>"; };
-		5CA9854B210BEB730057EB6B /* SafeBrowsingResultCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SafeBrowsingResultCocoa.mm; sourceTree = "<group>"; };
 		5CB237891DF0DD4300117AA3 /* _WKWebsitePolicies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKWebsitePolicies.h; sourceTree = "<group>"; };
 		5CB2378A1DF0DD4300117AA3 /* _WKWebsitePolicies.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKWebsitePolicies.mm; sourceTree = "<group>"; };
 		5CB2378D1DF0E0C200117AA3 /* _WKWebsitePoliciesInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKWebsitePoliciesInternal.h; sourceTree = "<group>"; };
@@ -5672,7 +5668,6 @@
 				CDA29A221CBEB61A00901CCF /* PlaybackSessionManagerProxy.messages.in */,
 				CDA29A1F1CBEB5FB00901CCF /* PlaybackSessionManagerProxy.mm */,
 				837A660020E2AD8400A9DBD8 /* ResourceLoadStatisticsMemoryStoreCocoa.mm */,
-				5CA9854B210BEB730057EB6B /* SafeBrowsingResultCocoa.mm */,
 				1A002D47196B345D00B9AD44 /* SessionStateCoding.h */,
 				1A002D46196B345D00B9AD44 /* SessionStateCoding.mm */,
 				3157135C2040A9B20084F9CF /* SystemPreviewControllerCocoa.mm */,
@@ -7458,7 +7453,6 @@
 				51E6C1611F2935CD00FD3437 /* ResourceLoadStatisticsPersistentStorage.h */,
 				BC111B08112F5E3C00337BAB /* ResponsivenessTimer.cpp */,
 				1A30066C1110F4F70031937C /* ResponsivenessTimer.h */,
-				5CA98549210BEB5A0057EB6B /* SafeBrowsingResult.h */,
 				414DEDD61F9EDDE00047C40D /* ServiceWorkerProcessProxy.cpp */,
 				414DEDD51F9EDDDF0047C40D /* ServiceWorkerProcessProxy.h */,
 				51A4D5A816CAC4FF000E615E /* StatisticsRequest.cpp */,
@@ -9353,7 +9347,6 @@
 				51E6C1641F2935DD00FD3437 /* ResourceLoadStatisticsPersistentStorage.h in Headers */,
 				1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */,
 				410482CE1DDD324F00F006D0 /* RTCNetwork.h in Headers */,
-				5CA9854A210BEB640057EB6B /* SafeBrowsingResult.h in Headers */,
 				0E97D74D200E900400BF6643 /* SafeBrowsingSPI.h in Headers */,
 				BC2D021712AC41CB00E732A3 /* SameDocumentNavigationType.h in Headers */,
 				1AAB4A8D1296F0A20023952F /* SandboxExtension.h in Headers */,
@@ -11178,7 +11171,6 @@
 				BC111B09112F5E3C00337BAB /* ResponsivenessTimer.cpp in Sources */,
 				410482CD1DDD324C00F006D0 /* RTCNetwork.cpp in Sources */,
 				41B28B0A1F83AD4200FB52AC /* RTCPacketOptions.cpp in Sources */,
-				5CA9854C210BEB7D0057EB6B /* SafeBrowsingResultCocoa.mm in Sources */,
 				1AAB4AAA1296F1540023952F /* SandboxExtensionMac.mm in Sources */,
 				E1E552C416AE065F004ED653 /* SandboxInitialiationParametersMac.mm in Sources */,
 				E19BDA8B19368D4600B97F57 /* SandboxUtilities.mm in Sources */,

Modified: trunk/Source/WebKit/config.h (234614 => 234615)


--- trunk/Source/WebKit/config.h	2018-08-06 19:31:06 UTC (rev 234614)
+++ trunk/Source/WebKit/config.h	2018-08-06 20:17:04 UTC (rev 234615)
@@ -126,9 +126,3 @@
 #define HAVE_MOBILE_WIFI 0
 #endif
 #endif
-
-#if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)) && !defined(__i386__)
-#define HAVE_SAFE_BROWSING 1
-#else
-#define HAVE_SAFE_BROWSING 0
-#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to