Title: [209599] trunk/Source
Revision
209599
Author
barraclo...@apple.com
Date
2016-12-09 00:08:41 -0800 (Fri, 09 Dec 2016)

Log Message

Revert - Add _WKIconLoadingDelegate SPI
https://bugs.webkit.org/show_bug.cgi?id=164894

Unreviewed rollout due to performance regression.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::implicitClose):
* html/LinkIconCollector.cpp:
(WebCore::iconSize):
(WebCore::compareIcons):
* html/LinkIconCollector.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startIconLoading): Deleted.
(WebCore::DocumentLoader::didGetLoadDecisionForIcon): Deleted.
(WebCore::DocumentLoader::finishedLoadingIcon): Deleted.
* loader/DocumentLoader.h:
* loader/FrameLoaderClient.h:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::IconLoader):
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):
* loader/icon/IconLoader.h:
* platform/LinkIcon.h: Removed.

Source/WebKit2:

* PlatformMac.cmake:
* UIProcess/API/APIIconLoadingClient.h: Removed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _iconLoadingDelegate]): Deleted.
(-[WKWebView _setIconLoadingDelegate:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Removed.
* UIProcess/API/Cocoa/_WKLinkIconParameters.h: Removed.
* UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Removed.
* UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Removed.
* UIProcess/Cocoa/IconLoadingDelegate.h: Removed.
* UIProcess/Cocoa/IconLoadingDelegate.mm: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIconLoadingClient): Deleted.
(WebKit::WebPageProxy::getLoadDecisionForIcon): Deleted.
(WebKit::WebPageProxy::finishedLoadingIcon): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::iconLoadingClient): Deleted.
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.
(WebKit::WebFrameLoaderClient::getLoadDecisionForIcon): Deleted.
(WebKit::WebFrameLoaderClient::finishedLoadingIcon): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebKit::WebFrameLoaderClient::setUseIconLoadingClient): Deleted.
(): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didGetLoadDecisionForIcon): Deleted.
(WebKit::WebPage::setUseIconLoadingClient): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (209598 => 209599)


--- trunk/Source/WebCore/ChangeLog	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/ChangeLog	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,3 +1,30 @@
+2016-12-09  Gavin Barraclough  <barraclo...@apple.com>
+
+        Revert - Add _WKIconLoadingDelegate SPI
+        https://bugs.webkit.org/show_bug.cgi?id=164894
+
+        Unreviewed rollout due to performance regression.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/Document.cpp:
+        (WebCore::Document::implicitClose):
+        * html/LinkIconCollector.cpp:
+        (WebCore::iconSize):
+        (WebCore::compareIcons):
+        * html/LinkIconCollector.h:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::startIconLoading): Deleted.
+        (WebCore::DocumentLoader::didGetLoadDecisionForIcon): Deleted.
+        (WebCore::DocumentLoader::finishedLoadingIcon): Deleted.
+        * loader/DocumentLoader.h:
+        * loader/FrameLoaderClient.h:
+        * loader/icon/IconLoader.cpp:
+        (WebCore::IconLoader::IconLoader):
+        (WebCore::IconLoader::startLoading):
+        (WebCore::IconLoader::notifyFinished):
+        * loader/icon/IconLoader.h:
+        * platform/LinkIcon.h: Removed.
+
 2016-12-08  Jiewen Tan  <jiewen_...@apple.com>
 
         [WebCrypto] Remove NoInterfaceObject attribute from SubtleCrypto Interface

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209598 => 209599)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-12-09 08:08:41 UTC (rev 209599)
@@ -2050,7 +2050,6 @@
 		514129981C6976900059E714 /* IDBRequestCompletionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514129961C6976150059E714 /* IDBRequestCompletionEvent.cpp */; };
 		514129991C6976900059E714 /* IDBRequestCompletionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 514129971C6976150059E714 /* IDBRequestCompletionEvent.h */; };
 		5141299B1C6C16740059E714 /* JSIDBIndexCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5141299A1C6C166D0059E714 /* JSIDBIndexCustom.cpp */; };
-		5143B2631DDD15200014FAC6 /* LinkIcon.h in Headers */ = {isa = PBXBuildFile; fileRef = 5143B2621DDD14900014FAC6 /* LinkIcon.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		5145B1091BC48E2E00E86219 /* IDBResourceIdentifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5145B1071BC4890B00E86219 /* IDBResourceIdentifier.cpp */; };
 		5145B10A1BC48E2E00E86219 /* IDBResourceIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 5145B1081BC4890B00E86219 /* IDBResourceIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		5148453E1BB9D07E006A72ED /* IDBError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5148453C1BB9D076006A72ED /* IDBError.cpp */; };
@@ -9273,7 +9272,6 @@
 		514129961C6976150059E714 /* IDBRequestCompletionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBRequestCompletionEvent.cpp; sourceTree = "<group>"; };
 		514129971C6976150059E714 /* IDBRequestCompletionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBRequestCompletionEvent.h; sourceTree = "<group>"; };
 		5141299A1C6C166D0059E714 /* JSIDBIndexCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBIndexCustom.cpp; sourceTree = "<group>"; };
-		5143B2621DDD14900014FAC6 /* LinkIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkIcon.h; sourceTree = "<group>"; };
 		5145B1071BC4890B00E86219 /* IDBResourceIdentifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBResourceIdentifier.cpp; sourceTree = "<group>"; };
 		5145B1081BC4890B00E86219 /* IDBResourceIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBResourceIdentifier.h; sourceTree = "<group>"; };
 		5148453C1BB9D076006A72ED /* IDBError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBError.cpp; sourceTree = "<group>"; };
@@ -22550,7 +22548,6 @@
 				BCFF64900EAD15C200C1D6F7 /* LengthSize.h */,
 				A7AD2F850EC89D07008AB002 /* LinkHash.cpp */,
 				A7AD2F860EC89D07008AB002 /* LinkHash.h */,
-				5143B2621DDD14900014FAC6 /* LinkIcon.h */,
 				C046E1AB1208A9FE00BA2CF7 /* LocalizedStrings.cpp */,
 				935207BD09BD410A00F2038D /* LocalizedStrings.h */,
 				A8239DFE09B3CF8A00B60641 /* Logging.cpp */,
@@ -27774,7 +27771,6 @@
 				B22279F40D00BF220071B782 /* SVGFEMergeElement.h in Headers */,
 				B22279F70D00BF220071B782 /* SVGFEMergeNodeElement.h in Headers */,
 				84224194107E78A700766A87 /* SVGFEMorphologyElement.h in Headers */,
-				5143B2631DDD15200014FAC6 /* LinkIcon.h in Headers */,
 				B22279FA0D00BF220071B782 /* SVGFEOffsetElement.h in Headers */,
 				B22279FD0D00BF220071B782 /* SVGFEPointLightElement.h in Headers */,
 				B2227A000D00BF220071B782 /* SVGFESpecularLightingElement.h in Headers */,

Modified: trunk/Source/WebCore/dom/Document.cpp (209598 => 209599)


--- trunk/Source/WebCore/dom/Document.cpp	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/dom/Document.cpp	2016-12-09 08:08:41 UTC (rev 209599)
@@ -2651,12 +2651,7 @@
     // ramifications, and we need to decide what is the Right Thing To Do(tm)
     Frame* f = frame();
     if (f) {
-        if (f->loader().client().useIconLoadingClient()) {
-            if (auto* documentLoader = loader())
-                documentLoader->startIconLoading();
-        } else
-            f->loader().icon().startLoader();
-
+        f->loader().icon().startLoader();
         f->animation().startAnimationsIfNotSuspended(this);
 
         // FIXME: We shouldn't be dispatching pending events globally on all Documents here.

Modified: trunk/Source/WebCore/html/LinkIconCollector.cpp (209598 => 209599)


--- trunk/Source/WebCore/html/LinkIconCollector.cpp	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/html/LinkIconCollector.cpp	2016-12-09 08:08:41 UTC (rev 209599)
@@ -36,7 +36,7 @@
 
 const unsigned defaultTouchIconWidth = 60;
 
-static unsigned iconSize(const LinkIcon& icon)
+static unsigned iconSize(const LinkIconCollector::Icon& icon)
 {
     if (icon.size)
         return *icon.size;
@@ -47,7 +47,7 @@
     return 0;
 }
 
-static int compareIcons(const LinkIcon& a, const LinkIcon& b)
+static int compareIcons(const LinkIconCollector::Icon& a, const LinkIconCollector::Icon& b)
 {
     // Apple Touch icons always come first.
     if (a.type == LinkIconType::Favicon && b.type != LinkIconType::Favicon)
@@ -72,13 +72,13 @@
     return 0;
 }
 
-auto LinkIconCollector::iconsOfTypes(OptionSet<LinkIconType> iconTypes) -> Vector<LinkIcon>
+auto LinkIconCollector::iconsOfTypes(OptionSet<LinkIconType> iconTypes) -> Vector<Icon>
 {
     auto* head = m_document.head();
     if (!head)
         return { };
 
-    Vector<LinkIcon> icons;
+    Vector<Icon> icons;
 
     for (auto& linkElement : childrenOfType<HTMLLinkElement>(*head)) {
         if (!linkElement.iconType())
@@ -104,7 +104,7 @@
                 iconSize = size;
         }
 
-        icons.append({ url, iconType, linkElement.type(), iconSize });
+        icons.append({ url, iconType, iconSize });
     }
 
     std::sort(icons.begin(), icons.end(), [](auto& a, auto& b) {

Modified: trunk/Source/WebCore/html/LinkIconCollector.h (209598 => 209599)


--- trunk/Source/WebCore/html/LinkIconCollector.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/html/LinkIconCollector.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -25,8 +25,9 @@
 
 #pragma once
 
-#include "LinkIcon.h"
+#include "URL.h"
 #include <wtf/OptionSet.h>
+#include <wtf/Optional.h>
 
 namespace WebCore {
 
@@ -40,8 +41,15 @@
     {
     }
 
-    WEBCORE_EXPORT Vector<LinkIcon> iconsOfTypes(OptionSet<LinkIconType>);
+    struct Icon {
+        URL url;
 
+        LinkIconType type;
+        std::optional<unsigned> size;
+    };
+
+    WEBCORE_EXPORT Vector<Icon> iconsOfTypes(OptionSet<LinkIconType>);
+
 private:
     Document& m_document;
 };

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (209598 => 209599)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2016-12-09 08:08:41 UTC (rev 209599)
@@ -41,7 +41,6 @@
 #include "Document.h"
 #include "DocumentParser.h"
 #include "DocumentWriter.h"
-#include "ElementChildIterator.h"
 #include "Event.h"
 #include "EventNames.h"
 #include "ExtensionStyleSheets.h"
@@ -54,10 +53,7 @@
 #include "HTTPHeaderNames.h"
 #include "HistoryItem.h"
 #include "IconController.h"
-#include "IconLoader.h"
 #include "InspectorInstrumentation.h"
-#include "LinkIconCollector.h"
-#include "LinkIconType.h"
 #include "Logging.h"
 #include "MainFrame.h"
 #include "MemoryCache.h"
@@ -1706,46 +1702,6 @@
     iconDatabase().iconDataForIconURL(urlString, m_iconDataCallback);
 }
 
-void DocumentLoader::startIconLoading()
-{
-    ASSERT(m_frame->loader().client().useIconLoadingClient());
-
-    static uint64_t nextIconCallbackID = 1;
-
-    auto* document = this->document();
-    if (!document)
-        return;
-
-    Vector<LinkIcon> icons = LinkIconCollector { *document }.iconsOfTypes({ LinkIconType::Favicon, LinkIconType::TouchIcon, LinkIconType::TouchPrecomposedIcon });
-
-    if (icons.isEmpty())
-        icons.append({ m_frame->document()->completeURL(ASCIILiteral("/favicon.ico")), LinkIconType::Favicon, String(), std::nullopt });
-
-    for (auto& icon : icons) {
-        auto result = m_iconsPendingLoadDecision.add(nextIconCallbackID++, icon);
-        m_frame->loader().client().getLoadDecisionForIcon(icon, result.iterator->key);
-    }
-}
-
-void DocumentLoader::didGetLoadDecisionForIcon(bool decision, uint64_t loadIdentifier, uint64_t newCallbackID)
-{
-    auto icon = m_iconsPendingLoadDecision.take(loadIdentifier);
-    if (!decision || icon.url.isEmpty() || !m_frame)
-        return;
-
-    auto iconLoader = std::make_unique<IconLoader>(*this, icon.url);
-    iconLoader->startLoading();
-    m_iconLoaders.set(WTFMove(iconLoader), newCallbackID);
-}
-
-void DocumentLoader::finishedLoadingIcon(IconLoader& loader, SharedBuffer* buffer)
-{
-    auto loadIdentifier = m_iconLoaders.take(&loader);
-    ASSERT(loadIdentifier);
-
-    m_frame->loader().client().finishedLoadingIcon(loadIdentifier, buffer);
-}
-
 void DocumentLoader::dispatchOnloadEvents()
 {
     m_wasOnloadDispatched = true;

Modified: trunk/Source/WebCore/loader/DocumentLoader.h (209598 => 209599)


--- trunk/Source/WebCore/loader/DocumentLoader.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/loader/DocumentLoader.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -33,7 +33,6 @@
 #include "CachedResourceHandle.h"
 #include "DocumentWriter.h"
 #include "IconDatabaseBase.h"
-#include "LinkIcon.h"
 #include "LoadTiming.h"
 #include "NavigationAction.h"
 #include "ResourceError.h"
@@ -72,7 +71,6 @@
 class FormState;
 class Frame;
 class FrameLoader;
-class IconLoader;
 class Page;
 class ResourceLoader;
 class SharedBuffer;
@@ -291,10 +289,6 @@
 
     bool isAlwaysOnLoggingAllowed() const;
 
-    void startIconLoading();
-    WEBCORE_EXPORT void didGetLoadDecisionForIcon(bool decision, uint64_t loadIdentifier, uint64_t newCallbackID);
-    void finishedLoadingIcon(IconLoader&, SharedBuffer*);
-
 protected:
     WEBCORE_EXPORT DocumentLoader(const ResourceRequest&, const SubstituteData&);
 
@@ -447,14 +441,9 @@
     bool m_waitingForContentPolicy { false };
     bool m_waitingForNavigationPolicy { false };
 
-    // For IconDatabase-style loads
     RefPtr<IconLoadDecisionCallback> m_iconLoadDecisionCallback;
     RefPtr<IconDataCallback> m_iconDataCallback;
 
-    // For IconLoadingClient-style loads
-    HashMap<uint64_t, LinkIcon> m_iconsPendingLoadDecision;
-    HashMap<std::unique_ptr<IconLoader>, uint64_t> m_iconLoaders;
-
     bool m_subresourceLoadersArePageCacheAcceptable;
     ShouldOpenExternalURLsPolicy m_shouldOpenExternalURLsPolicy { ShouldOpenExternalURLsPolicy::ShouldNotAllow };
 

Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (209598 => 209599)


--- trunk/Source/WebCore/loader/FrameLoaderClient.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -31,7 +31,6 @@
 
 #include "FrameLoaderTypes.h"
 #include "LayoutMilestones.h"
-#include "LinkIcon.h"
 #include "ResourceLoadPriority.h"
 #include <functional>
 #include <wtf/Forward.h>
@@ -355,10 +354,6 @@
     virtual void prefetchDNS(const String&) = 0;
 
     virtual void didRestoreScrollPosition() { }
-
-    virtual bool useIconLoadingClient() { return false; }
-    virtual void getLoadDecisionForIcon(const LinkIcon&, uint64_t) { }
-    virtual void finishedLoadingIcon(uint64_t, SharedBuffer*) { }
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/loader/icon/IconLoader.cpp (209598 => 209599)


--- trunk/Source/WebCore/loader/icon/IconLoader.cpp	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/loader/icon/IconLoader.cpp	2016-12-09 08:08:41 UTC (rev 209599)
@@ -44,17 +44,10 @@
 namespace WebCore {
 
 IconLoader::IconLoader(Frame& frame)
-    : m_frame(&frame)
-    , m_url(frame.loader().icon().url())
+    : m_frame(frame)
 {
 }
 
-IconLoader::IconLoader(DocumentLoader& documentLoader, const URL& url)
-    : m_documentLoader(&documentLoader)
-    , m_url(url)
-{
-}
-
 IconLoader::~IconLoader()
 {
     stopLoading();
@@ -62,18 +55,10 @@
 
 void IconLoader::startLoading()
 {
-    ASSERT(m_frame || m_documentLoader);
-
-    if (m_resource)
+    if (m_resource || !m_frame.document())
         return;
 
-    if (m_frame && !m_frame->document())
-        return;
-
-    if (m_documentLoader && !m_documentLoader->frame())
-        return;
-
-    ResourceRequest resourceRequest(m_url);
+    ResourceRequest resourceRequest(m_frame.loader().icon().url());
     resourceRequest.setPriority(ResourceLoadPriority::Low);
 
     // ContentSecurityPolicyImposition::DoPolicyCheck is a placeholder value. It does not affect the request since Content Security Policy does not apply to raw resources.
@@ -81,12 +66,11 @@
 
     request.setInitiator(cachedResourceRequestInitiators().icon);
 
-    auto* frame = m_frame ? m_frame : m_documentLoader->frame();
-    m_resource = frame->document()->cachedResourceLoader().requestRawResource(WTFMove(request));
+    m_resource = m_frame.document()->cachedResourceLoader().requestRawResource(WTFMove(request));
     if (m_resource)
         m_resource->addClient(*this);
     else
-        LOG_ERROR("Failed to start load for icon at url %s", frame->loader().icon().url().string().ascii().data());
+        LOG_ERROR("Failed to start load for icon at url %s", m_frame.loader().icon().url().string().ascii().data());
 }
 
 void IconLoader::stopLoading()
@@ -116,19 +100,12 @@
     }
 
     LOG(IconDatabase, "IconLoader::finishLoading() - Committing iconURL %s to database", m_resource->url().string().ascii().data());
-
-    if (m_frame) {
-        m_frame->loader().icon().commitToDatabase(m_resource->url());
-
-        // Setting the icon data only after committing to the database ensures that the data is
-        // kept in memory (so it does not have to be read from the database asynchronously), since
-        // there is a page URL referencing it.
-        iconDatabase().setIconDataForIconURL(data, m_resource->url().string());
-        m_frame->loader().client().dispatchDidReceiveIcon();
-
-    } else
-        m_documentLoader->finishedLoadingIcon(*this, data);
-
+    m_frame.loader().icon().commitToDatabase(m_resource->url());
+    // Setting the icon data only after committing to the database ensures that the data is
+    // kept in memory (so it does not have to be read from the database asynchronously), since
+    // there is a page URL referencing it.
+    iconDatabase().setIconDataForIconURL(data, m_resource->url().string());
+    m_frame.loader().client().dispatchDidReceiveIcon();
     stopLoading();
 }
 

Modified: trunk/Source/WebCore/loader/icon/IconLoader.h (209598 => 209599)


--- trunk/Source/WebCore/loader/icon/IconLoader.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/loader/icon/IconLoader.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -27,7 +27,6 @@
 
 #include "CachedRawResourceClient.h"
 #include "CachedResourceHandle.h"
-#include "URL.h"
 #include <wtf/Forward.h>
 #include <wtf/Noncopyable.h>
 
@@ -34,7 +33,6 @@
 namespace WebCore {
 
 class CachedRawResource;
-class DocumentLoader;
 class Frame;
 
 class IconLoader final : private CachedRawResourceClient {
@@ -41,7 +39,6 @@
     WTF_MAKE_NONCOPYABLE(IconLoader); WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit IconLoader(Frame&);
-    IconLoader(DocumentLoader&, const URL&);
     virtual ~IconLoader();
 
     void startLoading();
@@ -50,9 +47,7 @@
 private:
     void notifyFinished(CachedResource&) final;
 
-    Frame* m_frame { nullptr };
-    DocumentLoader* m_documentLoader { nullptr };
-    URL m_url;
+    Frame& m_frame;
     CachedResourceHandle<CachedRawResource> m_resource;
 };
 

Deleted: trunk/Source/WebCore/platform/LinkIcon.h (209598 => 209599)


--- trunk/Source/WebCore/platform/LinkIcon.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebCore/platform/LinkIcon.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2016 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 "LinkIconType.h"
-#include "URL.h"
-#include <wtf/Optional.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-struct LinkIcon {
-    URL url;
-    LinkIconType type;
-    String mimeType;
-    std::optional<unsigned> size;
-
-    template<class Encoder> void encode(Encoder&) const;
-    template<class Decoder> static bool decode(Decoder&, LinkIcon&);
-};
-
-template<class Encoder>
-void LinkIcon::encode(Encoder& encoder) const
-{
-    encoder << url << mimeType << size;
-    encoder.encodeEnum(type);
-}
-
-template<class Decoder>
-bool LinkIcon::decode(Decoder& decoder, LinkIcon& result)
-{
-    if (!decoder.decode(result.url))
-        return false;
-
-    if (!decoder.decode(result.mimeType))
-        return false;
-
-    if (!decoder.decode(result.size))
-        return false;
-
-    if (!decoder.decodeEnum(result.type))
-        return false;
-
-    return true;
-}
-
-} // namespace WebCore

Modified: trunk/Source/WebKit2/ChangeLog (209598 => 209599)


--- trunk/Source/WebKit2/ChangeLog	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/ChangeLog	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,3 +1,44 @@
+2016-12-09  Gavin Barraclough  <barraclo...@apple.com>
+
+        Revert - Add _WKIconLoadingDelegate SPI
+        https://bugs.webkit.org/show_bug.cgi?id=164894
+
+        Unreviewed rollout due to performance regression.
+
+        * PlatformMac.cmake:
+        * UIProcess/API/APIIconLoadingClient.h: Removed.
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _initializeWithConfiguration:]):
+        (-[WKWebView _iconLoadingDelegate]): Deleted.
+        (-[WKWebView _setIconLoadingDelegate:]): Deleted.
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        * UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Removed.
+        * UIProcess/API/Cocoa/_WKLinkIconParameters.h: Removed.
+        * UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Removed.
+        * UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Removed.
+        * UIProcess/Cocoa/IconLoadingDelegate.h: Removed.
+        * UIProcess/Cocoa/IconLoadingDelegate.mm: Removed.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setIconLoadingClient): Deleted.
+        (WebKit::WebPageProxy::getLoadDecisionForIcon): Deleted.
+        (WebKit::WebPageProxy::finishedLoadingIcon): Deleted.
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::iconLoadingClient): Deleted.
+        * UIProcess/WebPageProxy.messages.in:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.
+        (WebKit::WebFrameLoaderClient::getLoadDecisionForIcon): Deleted.
+        (WebKit::WebFrameLoaderClient::finishedLoadingIcon): Deleted.
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+        (WebKit::WebFrameLoaderClient::setUseIconLoadingClient): Deleted.
+        (): Deleted.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::didGetLoadDecisionForIcon): Deleted.
+        (WebKit::WebPage::setUseIconLoadingClient): Deleted.
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+
 2016-12-08  Keith Rollin  <krol...@apple.com>
 
         Move FileHandle to WebCore FileHandle.h

Modified: trunk/Source/WebKit2/PlatformMac.cmake (209598 => 209599)


--- trunk/Source/WebKit2/PlatformMac.cmake	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/PlatformMac.cmake	2016-12-09 08:08:41 UTC (rev 209599)
@@ -209,7 +209,6 @@
     UIProcess/API/Cocoa/_WKElementAction.mm
     UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm
     UIProcess/API/Cocoa/_WKExperimentalFeature.mm
-    UIProcess/API/Cocoa/_WKLinkIconParameters.mm
     UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
     UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm
     UIProcess/API/Cocoa/_WKSessionState.mm
@@ -233,7 +232,6 @@
     UIProcess/Cocoa/DownloadClient.mm
     UIProcess/Cocoa/FindClient.mm
     UIProcess/Cocoa/FullscreenClient.mm
-    UIProcess/Cocoa/IconLoadingDelegate.mm
     UIProcess/Cocoa/NavigationState.mm
     UIProcess/Cocoa/RemoteLayerTreeScrollingPerformanceData.mm
     UIProcess/Cocoa/SessionStateCoding.mm

Deleted: trunk/Source/WebKit2/UIProcess/API/APIIconLoadingClient.h (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/API/APIIconLoadingClient.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/API/APIIconLoadingClient.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2016 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 "GenericCallback.h"
-#include <WebCore/LinkIcon.h>
-#include <wtf/Function.h>
-
-namespace IPC {
-class DataReference;
-}
-
-namespace API {
-
-class IconLoadingClient {
-public:
-    virtual ~IconLoadingClient() { }
-
-    virtual void getLoadDecisionForIcon(const WebCore::LinkIcon&, Function<void (std::function<void (API::Data*, WebKit::CallbackBase::Error)>)>&& completionHandler) {
-        completionHandler(nullptr);
-    }
-};
-
-} // namespace API

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2016-12-09 08:08:41 UTC (rev 209599)
@@ -35,7 +35,6 @@
 #import "DiagnosticLoggingClient.h"
 #import "FindClient.h"
 #import "FullscreenClient.h"
-#import "IconLoadingDelegate.h"
 #import "LegacySessionStateCoding.h"
 #import "Logging.h"
 #import "NavigationState.h"
@@ -196,7 +195,6 @@
 @implementation WKWebView {
     std::unique_ptr<WebKit::NavigationState> _navigationState;
     std::unique_ptr<WebKit::UIDelegate> _uiDelegate;
-    std::unique_ptr<WebKit::IconLoadingDelegate> _iconLoadingDelegate;
 
     _WKRenderingProgressEvents _observedRenderingProgressEvents;
 
@@ -570,8 +568,6 @@
     _page->setFindClient(std::make_unique<WebKit::FindClient>(self));
     _page->setDiagnosticLoggingClient(std::make_unique<WebKit::DiagnosticLoggingClient>(self));
 
-    _iconLoadingDelegate = std::make_unique<WebKit::IconLoadingDelegate>(self);
-
 #if ENABLE(FULLSCREEN_API)
     _page->setFullscreenClient(std::make_unique<WebKit::FullscreenClient>(self));
 #endif
@@ -686,17 +682,6 @@
     _uiDelegate->setDelegate(UIDelegate);
 }
 
-- (id <_WKIconLoadingDelegate>)_iconLoadingDelegate
-{
-    return _iconLoadingDelegate->delegate().autorelease();
-}
-
-- (void)_setIconLoadingDelegate:(id<_WKIconLoadingDelegate>)iconLoadingDelegate
-{
-    _page->setIconLoadingClient(_iconLoadingDelegate->createIconLoadingClient());
-    _iconLoadingDelegate->setDelegate(iconLoadingDelegate);
-}
-
 - (WKNavigation *)loadRequest:(NSURLRequest *)request
 {
     auto navigation = _page->loadRequest(request);

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -56,7 +56,6 @@
 @class WKBrowsingContextHandle;
 @class _WKFrameHandle;
 @class _WKHitTestResult;
-@class _WKIconLoadingDelegate;
 @class _WKRemoteObjectRegistry;
 @class _WKSessionState;
 @class _WKWebViewPrintFormatter;
@@ -64,7 +63,6 @@
 @protocol WKHistoryDelegatePrivate;
 @protocol _WKDiagnosticLoggingDelegate;
 @protocol _WKFindDelegate;
-@protocol _WKIconLoadingDelegate;
 @protocol _WKInputDelegate;
 @protocol _WKFullscreenDelegate;
 
@@ -77,7 +75,6 @@
 @property (nonatomic, setter=_setObservedRenderingProgressEvents:) _WKRenderingProgressEvents _observedRenderingProgressEvents;
 
 @property (nonatomic, weak, setter=_setHistoryDelegate:) id <WKHistoryDelegatePrivate> _historyDelegate;
-@property (nonatomic, weak, setter=_setIconLoadingDelegate:) id <_WKIconLoadingDelegate> _iconLoadingDelegate;
 
 @property (nonatomic, readonly) NSURL *_unreachableURL;
 

Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKIconLoadingDelegate.h (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKIconLoadingDelegate.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKIconLoadingDelegate.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2016 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 <WebKit/WKFoundation.h>
-
-#if WK_API_ENABLED
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class _WKLinkIconParameters;
-
-@protocol _WKIconLoadingDelegate <NSObject>
-@optional
-
-- (void)webView:(WKWebView *)webView shouldLoadIconWithParameters:(_WKLinkIconParameters *)parameters completionHandler:(void (^)(void (^)(NSData*)))completionHandler;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif

Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParameters.h (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParameters.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParameters.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2016 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 <WebKit/WKFoundation.h>
-
-#if WK_API_ENABLED
-
-#import <Foundation/Foundation.h>
-
-typedef NS_ENUM(NSInteger, WKLinkIconType) {
-    WKLinkIconTypeFavicon,
-    WKLinkIconTypeTouchIcon,
-    WKLinkIconTypeTouchPrecomposedIcon,
-};
-
-@interface _WKLinkIconParameters : NSObject
-
-@property (nonatomic, readonly, copy) NSURL *url;
-@property (nonatomic, readonly) WKLinkIconType iconType;
-@property (nonatomic, readonly, copy) NSString *mimeType;
-@property (nonatomic, readonly, copy) NSNumber *size;
-
-@end
-
-#endif

Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParameters.mm (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParameters.mm	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParameters.mm	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2016 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 "_WKLinkIconParametersInternal.h"
-
-#if WK_API_ENABLED
-
-#import <WebCore/LinkIcon.h>
-
-@implementation _WKLinkIconParameters {
-    RetainPtr<NSURL> _url;
-    WKLinkIconType _iconType;
-    RetainPtr<NSString> _mimeType;
-    RetainPtr<NSNumber> _size;
-}
-
-- (instancetype)_initWithLinkIcon:(const WebCore::LinkIcon&)linkIcon
-{
-    if (!(self = [super init]))
-        return nil;
-
-    _url = adoptNS([(NSURL *)linkIcon.url copy]);
-    _mimeType = adoptNS([(NSString *)linkIcon.mimeType copy]);
-
-    if (linkIcon.size)
-        _size = adoptNS([[NSNumber alloc] initWithUnsignedInt:linkIcon.size.value()]);
-
-    switch (linkIcon.type) {
-    case WebCore::LinkIconType::Favicon:
-        _iconType = WKLinkIconTypeFavicon;
-        break;
-    case WebCore::LinkIconType::TouchIcon:
-        _iconType = WKLinkIconTypeTouchIcon;
-        break;
-    case WebCore::LinkIconType::TouchPrecomposedIcon:
-        _iconType = WKLinkIconTypeTouchPrecomposedIcon;
-        break;
-    }
-
-    return self;
-}
-
-- (NSURL *)url
-{
-    return _url.get();
-}
-
-- (NSString *)mimeType
-{
-    return _mimeType.get();
-}
-
-- (NSNumber *)size
-{
-    return _size.get();
-}
-
-- (WKLinkIconType)iconType
-{
-    return _iconType;
-}
-
-@end
-
-#endif // WK_API_ENABLED

Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2016 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 "_WKLinkIconParameters.h"
-
-#if WK_API_ENABLED
-
-namespace WebCore {
-struct LinkIcon;
-}
-
-@interface _WKLinkIconParameters ()
-
-- (instancetype)_initWithLinkIcon:(const WebCore::LinkIcon&)linkIcon;
-
-@end
-
-#endif

Deleted: trunk/Source/WebKit2/UIProcess/Cocoa/IconLoadingDelegate.h (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/Cocoa/IconLoadingDelegate.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/IconLoadingDelegate.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2016 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 "WKFoundation.h"
-
-#if WK_API_ENABLED
-
-#import "APIIconLoadingClient.h"
-#import "WeakObjCPtr.h"
-#import <wtf/RetainPtr.h>
-
-@class WKWebView;
-@protocol _WKIconLoadingDelegate;
-
-namespace WebKit {
-
-class IconLoadingDelegate {
-public:
-    explicit IconLoadingDelegate(WKWebView *);
-    ~IconLoadingDelegate();
-
-    std::unique_ptr<API::IconLoadingClient> createIconLoadingClient();
-
-    RetainPtr<id <_WKIconLoadingDelegate> > delegate();
-    void setDelegate(id <_WKIconLoadingDelegate>);
-
-private:
-    class IconLoadingClient : public API::IconLoadingClient {
-    public:
-        explicit IconLoadingClient(IconLoadingDelegate&);
-        ~IconLoadingClient();
-
-    private:
-        void getLoadDecisionForIcon(const WebCore::LinkIcon&, Function<void (std::function<void (API::Data*, WebKit::CallbackBase::Error)>)>&& completionHandler) override;
-
-        IconLoadingDelegate& m_iconLoadingDelegate;
-    };
-
-    WKWebView *m_webView;
-    WeakObjCPtr<id <_WKIconLoadingDelegate> > m_delegate;
-
-    struct {
-        bool webViewShouldLoadIconWithParametersCompletionHandler : 1;
-    } m_delegateMethods;
-};
-
-} // namespace WebKit
-
-#endif // WK_API_ENABLED

Deleted: trunk/Source/WebKit2/UIProcess/Cocoa/IconLoadingDelegate.mm (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/Cocoa/IconLoadingDelegate.mm	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/IconLoadingDelegate.mm	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2016 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 "IconLoadingDelegate.h"
-
-#if WK_API_ENABLED
-
-#include "WKNSData.h"
-#include "_WKIconLoadingDelegate.h"
-#include "_WKLinkIconParametersInternal.h"
-
-namespace WebKit {
-
-IconLoadingDelegate::IconLoadingDelegate(WKWebView *webView)
-    : m_webView(webView)
-{
-}
-
-IconLoadingDelegate::~IconLoadingDelegate()
-{
-}
-
-std::unique_ptr<API::IconLoadingClient> IconLoadingDelegate::createIconLoadingClient()
-{
-    return std::make_unique<IconLoadingClient>(*this);
-}
-
-RetainPtr<id <_WKIconLoadingDelegate> > IconLoadingDelegate::delegate()
-{
-    return m_delegate.get();
-}
-
-void IconLoadingDelegate::setDelegate(id <_WKIconLoadingDelegate> delegate)
-{
-    m_delegate = delegate;
-
-    m_delegateMethods.webViewShouldLoadIconWithParametersCompletionHandler = [delegate respondsToSelector:@selector(webView:shouldLoadIconWithParameters:completionHandler:)];
-}
-
-IconLoadingDelegate::IconLoadingClient::IconLoadingClient(IconLoadingDelegate& iconLoadingDelegate)
-    : m_iconLoadingDelegate(iconLoadingDelegate)
-{
-}
-
-IconLoadingDelegate::IconLoadingClient::~IconLoadingClient()
-{
-}
-
-typedef void (^IconLoadCompletionHandler)(NSData*);
-
-void IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon(const WebCore::LinkIcon& linkIcon, Function<void (std::function<void (API::Data*, WebKit::CallbackBase::Error)>)>&& completionHandler)
-{
-    if (!m_iconLoadingDelegate.m_delegateMethods.webViewShouldLoadIconWithParametersCompletionHandler) {
-        completionHandler(nullptr);
-        return;
-    }
-
-    auto delegate = m_iconLoadingDelegate.m_delegate.get();
-    if (!delegate) {
-        completionHandler(nullptr);
-        return;
-    }
-
-    RetainPtr<_WKLinkIconParameters> parameters = adoptNS([[_WKLinkIconParameters alloc] _initWithLinkIcon:linkIcon]);
-
-    [delegate webView:m_iconLoadingDelegate.m_webView shouldLoadIconWithParameters:parameters.get() completionHandler:^void (IconLoadCompletionHandler loadCompletionHandler) {
-        if (loadCompletionHandler) {
-            completionHandler([loadCompletionHandler = Block_copy(loadCompletionHandler)](API::Data* data, WebKit::CallbackBase::Error error) {
-                if (error != CallbackBase::Error::None || !data)
-                    loadCompletionHandler(nil);
-                else
-                    loadCompletionHandler(wrapper(*data));
-            });
-        } else
-            completionHandler(nullptr);
-    }];
-}
-
-} // namespace WebKit
-
-#endif // WK_API_ENABLED

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-12-09 08:08:41 UTC (rev 209599)
@@ -37,7 +37,6 @@
 #include "APIGeometry.h"
 #include "APIHistoryClient.h"
 #include "APIHitTestResult.h"
-#include "APIIconLoadingClient.h"
 #include "APILegacyContextHistoryClient.h"
 #include "APILoaderClient.h"
 #include "APINavigation.h"
@@ -628,20 +627,6 @@
     setCanRunModal(m_uiClient->canRunModal());
 }
 
-void WebPageProxy::setIconLoadingClient(std::unique_ptr<API::IconLoadingClient> iconLoadingClient)
-{
-    bool hasClient = iconLoadingClient.get();
-    if (!iconLoadingClient)
-        m_iconLoadingClient = std::make_unique<API::IconLoadingClient>();
-    else
-        m_iconLoadingClient = WTFMove(iconLoadingClient);
-
-    if (!isValid())
-        return;
-
-    m_process->send(Messages::WebPage::SetUseIconLoadingClient(hasClient), m_pageID);
-}
-
 void WebPageProxy::setFindClient(std::unique_ptr<API::FindClient> findClient)
 {
     if (!findClient) {
@@ -6688,30 +6673,6 @@
     m_pageClient.didRestoreScrollPosition();
 }
 
-void WebPageProxy::getLoadDecisionForIcon(const WebCore::LinkIcon& icon, uint64_t loadIdentifier)
-{
-    if (!m_iconLoadingClient)
-        return;
-
-    m_iconLoadingClient->getLoadDecisionForIcon(icon, [this, protectedThis = Ref<WebPageProxy>(*this), loadIdentifier](std::function<void (API::Data*, CallbackBase::Error)> callbackFunction) {
-        if (!isValid()) {
-            if (callbackFunction)
-                callbackFunction(nullptr, CallbackBase::Error::Unknown);
-            return;
-        }
-
-        bool decision = (bool)callbackFunction;
-        uint64_t newCallbackIdentifier = decision ? m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()) : 0;
-
-        m_process->send(Messages::WebPage::DidGetLoadDecisionForIcon(decision, loadIdentifier, newCallbackIdentifier), m_pageID);
-    });
-}
-
-void WebPageProxy::finishedLoadingIcon(uint64_t callbackIdentifier, const IPC::DataReference& data)
-{
-    dataCallback(data, callbackIdentifier);
-}
-
 void WebPageProxy::setResourceCachingDisabled(bool disabled)
 {
     if (m_isResourceCachingDisabled == disabled)

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -130,7 +130,6 @@
 class FormClient;
 class FullscreenClient;
 class HistoryClient;
-class IconLoadingClient;
 class LoaderClient;
 class Navigation;
 class NavigationClient;
@@ -369,9 +368,6 @@
     API::UIClient& uiClient() { return *m_uiClient; }
     void setUIClient(std::unique_ptr<API::UIClient>);
 
-    API::IconLoadingClient& iconLoadingClient() { return *m_iconLoadingClient; }
-    void setIconLoadingClient(std::unique_ptr<API::IconLoadingClient>);
-
     void initializeWebPage();
 
     void close();
@@ -1145,9 +1141,6 @@
 
     void didRestoreScrollPosition();
 
-    void getLoadDecisionForIcon(const WebCore::LinkIcon&, uint64_t callbackID);
-    void finishedLoadingIcon(uint64_t callbackIdentifier, const IPC::DataReference&);
-
     void setFocus(bool focused);
     void setWindowFrame(const WebCore::FloatRect&);
     void getWindowFrame(WebCore::FloatRect&);
@@ -1600,7 +1593,6 @@
     std::unique_ptr<API::PolicyClient> m_policyClient;
     std::unique_ptr<API::NavigationClient> m_navigationClient;
     std::unique_ptr<API::HistoryClient> m_historyClient;
-    std::unique_ptr<API::IconLoadingClient> m_iconLoadingClient;
     std::unique_ptr<API::FormClient> m_formClient;
     std::unique_ptr<API::UIClient> m_uiClient;
     std::unique_ptr<API::FindClient> m_findClient;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (209598 => 209599)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2016-12-09 08:08:41 UTC (rev 209599)
@@ -478,9 +478,6 @@
 
     DidRestoreScrollPosition()
 
-    GetLoadDecisionForIcon(struct WebCore::LinkIcon icon, uint64_t callbackID)
-    FinishedLoadingIcon(uint64_t callbackIdentifier, IPC::DataReference data);
-
 #if PLATFORM(MAC)
     DidHandleAcceptedCandidate()
     HandleActiveNowPlayingSessionInfoResponse(bool hasActiveSession, String title, double duration, double elapsedTime)

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (209598 => 209599)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2016-12-09 08:08:41 UTC (rev 209599)
@@ -893,9 +893,6 @@
 		5106D7C418BDBE73000AB166 /* ContextMenuContextData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5106D7C018BDBE73000AB166 /* ContextMenuContextData.h */; };
 		510AFFB916542048001BA05E /* WebResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510AFFB716542048001BA05E /* WebResourceLoader.cpp */; };
 		510AFFBA16542048001BA05E /* WebResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 510AFFB816542048001BA05E /* WebResourceLoader.h */; };
-		510F59101DDE296900412FF5 /* _WKIconLoadingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5143B25E1DDCDFD10014FAC6 /* _WKIconLoadingDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		510F59111DDE297000412FF5 /* _WKLinkIconParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C0C9791DDD78540032CAD3 /* _WKLinkIconParameters.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		510F59121DDE297700412FF5 /* _WKLinkIconParameters.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51C0C97A1DDD78540032CAD3 /* _WKLinkIconParameters.mm */; };
 		510FBB9A1288C95E00AFFDF4 /* WebContextMenuItemData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510FBB981288C95E00AFFDF4 /* WebContextMenuItemData.cpp */; };
 		510FBB9B1288C95E00AFFDF4 /* WebContextMenuItemData.h in Headers */ = {isa = PBXBuildFile; fileRef = 510FBB991288C95E00AFFDF4 /* WebContextMenuItemData.h */; };
 		5110AE0C133C16CB0072717A /* WKIconDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5110AE0A133C16CB0072717A /* WKIconDatabase.cpp */; };
@@ -1011,8 +1008,6 @@
 		51ACBBA1127A8F2C00D203B9 /* WebContextMenuProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51ACBB9F127A8F2C00D203B9 /* WebContextMenuProxyMac.mm */; };
 		51B15A8413843A3900321AD8 /* EnvironmentUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51B15A8213843A3900321AD8 /* EnvironmentUtilities.cpp */; };
 		51B15A8513843A3900321AD8 /* EnvironmentUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B15A8313843A3900321AD8 /* EnvironmentUtilities.h */; };
-		51C0C9741DDD76000032CAD3 /* IconLoadingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C0C9721DDD74F00032CAD3 /* IconLoadingDelegate.h */; };
-		51C0C9751DDD76030032CAD3 /* IconLoadingDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51C0C9731DDD74F00032CAD3 /* IconLoadingDelegate.mm */; };
 		51CD1C5D1B3493AF00142CA5 /* WKSecurityOriginRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51CD1C591B3493A900142CA5 /* WKSecurityOriginRef.cpp */; };
 		51CD1C5E1B3493B400142CA5 /* WKSecurityOriginRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 51CD1C5A1B3493A900142CA5 /* WKSecurityOriginRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		51CD1C651B34B9D400142CA5 /* WKSecurityOrigin.h in Headers */ = {isa = PBXBuildFile; fileRef = 51CD1C5F1B34B9C900142CA5 /* WKSecurityOrigin.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3064,8 +3059,6 @@
 		513E462C1AD837560016234A /* WKSharingServicePickerDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKSharingServicePickerDelegate.mm; sourceTree = "<group>"; };
 		514129911C6428100059E714 /* WebIDBConnectionToServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIDBConnectionToServer.cpp; sourceTree = "<group>"; };
 		514129921C6428100059E714 /* WebIDBConnectionToServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIDBConnectionToServer.h; sourceTree = "<group>"; };
-		5143B25E1DDCDFD10014FAC6 /* _WKIconLoadingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKIconLoadingDelegate.h; sourceTree = "<group>"; };
-		5143B2611DDD0DA00014FAC6 /* APIIconLoadingClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIIconLoadingClient.h; sourceTree = "<group>"; };
 		514BDED216C98EDD00E4E25E /* StatisticsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatisticsRequest.h; sourceTree = "<group>"; };
 		514D9F5519119D35000063A7 /* ServicesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServicesController.h; sourceTree = "<group>"; };
 		514D9F5619119D35000063A7 /* ServicesController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ServicesController.mm; sourceTree = "<group>"; };
@@ -3135,11 +3128,6 @@
 		51ACC9351628064800342550 /* NetworkProcessMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkProcessMessages.h; sourceTree = "<group>"; };
 		51B15A8213843A3900321AD8 /* EnvironmentUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EnvironmentUtilities.cpp; path = unix/EnvironmentUtilities.cpp; sourceTree = "<group>"; };
 		51B15A8313843A3900321AD8 /* EnvironmentUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EnvironmentUtilities.h; path = unix/EnvironmentUtilities.h; sourceTree = "<group>"; };
-		51C0C9721DDD74F00032CAD3 /* IconLoadingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IconLoadingDelegate.h; sourceTree = "<group>"; };
-		51C0C9731DDD74F00032CAD3 /* IconLoadingDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IconLoadingDelegate.mm; sourceTree = "<group>"; };
-		51C0C9791DDD78540032CAD3 /* _WKLinkIconParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKLinkIconParameters.h; sourceTree = "<group>"; };
-		51C0C97A1DDD78540032CAD3 /* _WKLinkIconParameters.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKLinkIconParameters.mm; sourceTree = "<group>"; };
-		51C0C97B1DDD78540032CAD3 /* _WKLinkIconParametersInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKLinkIconParametersInternal.h; sourceTree = "<group>"; };
 		51CD1C591B3493A900142CA5 /* WKSecurityOriginRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKSecurityOriginRef.cpp; sourceTree = "<group>"; };
 		51CD1C5A1B3493A900142CA5 /* WKSecurityOriginRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSecurityOriginRef.h; sourceTree = "<group>"; };
 		51CD1C5F1B34B9C900142CA5 /* WKSecurityOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSecurityOrigin.h; sourceTree = "<group>"; };
@@ -4902,8 +4890,6 @@
 				00B9661718E25AE100CE1F88 /* FindClient.mm */,
 				CD78E1121DB7D7ED0014A2DE /* FullscreenClient.mm */,
 				CD78E1131DB7D7ED0014A2DE /* FullscreenClient.h */,
-				51C0C9721DDD74F00032CAD3 /* IconLoadingDelegate.h */,
-				51C0C9731DDD74F00032CAD3 /* IconLoadingDelegate.mm */,
 				0F0C365918C0555800F607D7 /* LayerRepresentation.h */,
 				1ABC3DF41899E437004F0626 /* NavigationState.h */,
 				1ABC3DF31899E437004F0626 /* NavigationState.mm */,
@@ -5292,12 +5278,8 @@
 				2E7A94491BBD95C600945547 /* _WKFocusedElementInfo.h */,
 				37A64E5618F38F4600EB30F1 /* _WKFormInputSession.h */,
 				CD78E1181DB7E5AD0014A2DE /* _WKFullscreenDelegate.h */,
-				5143B25E1DDCDFD10014FAC6 /* _WKIconLoadingDelegate.h */,
 				37A64E5418F38E3C00EB30F1 /* _WKInputDelegate.h */,
 				2D790A9C1AD7050D00AB90B3 /* _WKLayoutMode.h */,
-				51C0C9791DDD78540032CAD3 /* _WKLinkIconParameters.h */,
-				51C0C97A1DDD78540032CAD3 /* _WKLinkIconParameters.mm */,
-				51C0C97B1DDD78540032CAD3 /* _WKLinkIconParametersInternal.h */,
 				9323611D1B015DA800FA9232 /* _WKOverlayScrollbarStyle.h */,
 				1A43E828188F3CDC009E4D30 /* _WKProcessPoolConfiguration.h */,
 				1A43E827188F3CDC009E4D30 /* _WKProcessPoolConfiguration.mm */,
@@ -6413,7 +6395,6 @@
 				93A88B431BC8828C00ABA5C2 /* APIHitTestResult.h */,
 				7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */,
 				1A2464F21891E45100234C5B /* APILoaderClient.h */,
-				5143B2611DDD0DA00014FAC6 /* APIIconLoadingClient.h */,
 				7CD3A4801A5D02FA009623B8 /* APINavigation.cpp */,
 				7CD3A4811A5D02FA009623B8 /* APINavigation.h */,
 				2DF9EEEA1A7836EE00B6CFBE /* APINavigationAction.h */,
@@ -7983,7 +7964,6 @@
 				1A7865BA16CAC71500ACE83A /* PluginProcessConnectionManagerMessages.h in Headers */,
 				1A2BB6D114117B4D000F35D4 /* PluginProcessConnectionMessages.h in Headers */,
 				1A2D90D21281C966001EB962 /* PluginProcessCreationParameters.h in Headers */,
-				510F59101DDE296900412FF5 /* _WKIconLoadingDelegate.h in Headers */,
 				1A0EC603124A9F2C007EF4A5 /* PluginProcessManager.h in Headers */,
 				1A0EC6C0124BBD9B007EF4A5 /* PluginProcessMessages.h in Headers */,
 				1A0EC75E124BC7B2007EF4A5 /* PluginProcessProxy.h in Headers */,
@@ -8070,7 +8050,6 @@
 				4A3CC18D19B0641900D14AEF /* UserMediaPermissionRequestProxy.h in Headers */,
 				E4E864931B16750700C82F40 /* VersionChecks.h in Headers */,
 				2D125C5E1857EA05003BA3CB /* ViewGestureController.h in Headers */,
-				510F59111DDE297000412FF5 /* _WKLinkIconParameters.h in Headers */,
 				2D1B5D5E185869C8006C6596 /* ViewGestureControllerMessages.h in Headers */,
 				2D819BA21862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h in Headers */,
 				2D6CD119189058A500E5A4A0 /* ViewSnapshotStore.h in Headers */,
@@ -8437,7 +8416,6 @@
 				1AA13212191D5924009C1489 /* WKNavigationResponsePrivate.h in Headers */,
 				2D3A65DF1A7C3A7D00CAC637 /* WKNavigationResponseRef.h in Headers */,
 				318BE17914743E6F00A8FBB2 /* WKNotification.h in Headers */,
-				51C0C9741DDD76000032CAD3 /* IconLoadingDelegate.h in Headers */,
 				318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */,
 				31A2EC74148D59CA00810D71 /* WKNotificationPermissionRequest.h in Headers */,
 				312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */,
@@ -9679,7 +9657,6 @@
 				BC1BE1E112D54A410004A228 /* WebGeolocationClient.cpp in Sources */,
 				BC0E5FE612D697160012A72A /* WebGeolocationManager.cpp in Sources */,
 				BC0E606112D6BA910012A72A /* WebGeolocationManagerMessageReceiver.cpp in Sources */,
-				510F59121DDE297700412FF5 /* _WKLinkIconParameters.mm in Sources */,
 				BC54CACC12D64291005C67B0 /* WebGeolocationManagerProxy.cpp in Sources */,
 				BC0E618212D6CB1D0012A72A /* WebGeolocationManagerProxyMessageReceiver.cpp in Sources */,
 				BC0E607412D6BC200012A72A /* WebGeolocationPosition.cpp in Sources */,
@@ -9776,7 +9753,6 @@
 				BCD59800112B57BE00EC8C23 /* WebPreferences.cpp in Sources */,
 				7C85FD7F19341665000177C4 /* WebPreferencesKeys.cpp in Sources */,
 				BC84EB1812A7100C0083F2DA /* WebPreferencesMac.mm in Sources */,
-				51C0C9751DDD76030032CAD3 /* IconLoadingDelegate.mm in Sources */,
 				BCD598AD112B7FDF00EC8C23 /* WebPreferencesStore.cpp in Sources */,
 				BC111AE4112F5C2600337BAB /* WebProcess.cpp in Sources */,
 				7C6E70FB18B2DC7A00F24E2E /* WebProcessCocoa.mm in Sources */,

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (209598 => 209599)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2016-12-09 08:08:41 UTC (rev 209599)
@@ -1755,25 +1755,4 @@
     webPage->didRestoreScrollPosition();
 }
 
-bool WebFrameLoaderClient::useIconLoadingClient()
-{
-    return m_useIconLoadingClient;
-}
-
-void WebFrameLoaderClient::getLoadDecisionForIcon(const LinkIcon& icon, uint64_t callbackID)
-{
-    if (WebPage* webPage { m_frame->page() })
-        webPage->send(Messages::WebPageProxy::GetLoadDecisionForIcon(icon, callbackID));
-}
-
-void WebFrameLoaderClient::finishedLoadingIcon(uint64_t loadIdentifier, SharedBuffer* data)
-{
-    if (WebPage* webPage { m_frame->page() }) {
-        if (data)
-            webPage->send(Messages::WebPageProxy::FinishedLoadingIcon(loadIdentifier, { reinterpret_cast<const uint8_t*>(data->data()), data->size() }));
-        else
-            webPage->send(Messages::WebPageProxy::FinishedLoadingIcon(loadIdentifier, { nullptr, 0 }));
-    }
-}
-
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (209598 => 209599)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -46,8 +46,6 @@
 
     bool frameHasCustomContentProvider() const { return m_frameHasCustomContentProvider; }
 
-    void setUseIconLoadingClient(bool useIconLoadingClient) { m_useIconLoadingClient = useIconLoadingClient; }
-
 private:
     void frameLoaderDestroyed() override;
 
@@ -257,10 +255,6 @@
 
     void didRestoreScrollPosition() override;
 
-    bool useIconLoadingClient() override;
-    void getLoadDecisionForIcon(const WebCore::LinkIcon&, uint64_t callbackID) override;
-    void finishedLoadingIcon(uint64_t loadIdentifier, WebCore::SharedBuffer*) override;
-
     WebFrame* m_frame;
     RefPtr<PluginView> m_pluginView;
     bool m_hasSentResponseToPluginView;
@@ -267,7 +261,6 @@
     bool m_didCompletePageTransition;
     bool m_frameHasCustomContentProvider;
     bool m_frameCameFromPageCache;
-    bool m_useIconLoadingClient { false };
 };
 
 // As long as EmptyFrameLoaderClient exists in WebCore, this can return 0.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (209598 => 209599)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-12-09 08:08:41 UTC (rev 209599)
@@ -5651,15 +5651,4 @@
 }
 #endif
 
-void WebPage::didGetLoadDecisionForIcon(bool decision, uint64_t loadIdentifier, uint64_t newCallbackID)
-{
-    if (auto* documentLoader = corePage()->mainFrame().loader().documentLoader())
-        documentLoader->didGetLoadDecisionForIcon(decision, loadIdentifier, newCallbackID);
-}
-
-void WebPage::setUseIconLoadingClient(bool useIconLoadingClient)
-{
-    static_cast<WebFrameLoaderClient&>(corePage()->mainFrame().loader().client()).setUseIconLoadingClient(useIconLoadingClient);
-}
-
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (209598 => 209599)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-12-09 08:08:41 UTC (rev 209599)
@@ -971,9 +971,6 @@
     void didLosePointerLock();
 #endif
 
-    void didGetLoadDecisionForIcon(bool decision, uint64_t loadIdentifier, uint64_t newCallbackID);
-    void setUseIconLoadingClient(bool);
-
 private:
     WebPage(uint64_t pageID, const WebPageCreationParameters&);
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (209598 => 209599)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2016-12-09 07:45:56 UTC (rev 209598)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2016-12-09 08:08:41 UTC (rev 209599)
@@ -448,9 +448,6 @@
 
     SetUserInterfaceLayoutDirection(uint32_t direction)
 
-    DidGetLoadDecisionForIcon(bool decision, uint64_t loadIdentifier, uint64_t newCallbackID)
-    SetUseIconLoadingClient(bool useIconLoadingClient)
-
 #if ENABLE(GAMEPAD)
     GamepadActivity(Vector<WebKit::GamepadData> gamepadDatas)
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to