Remove InjectedBundle processing of back/forward lists
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 14:29:53 +0000 (14:29 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 14:29:53 +0000 (14:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190459

Reviewed by Chris Dumez.

Source/WebCore:

The uses of these functions are dead code I removed in rdar://problem/45180545
Removing these functions is a step towards fixing the PSON history bugs.

* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::goToItem):

Source/WebKit:

* Shared/API/c/WKDeprecated.h:
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::willGoToBackForwardListItem):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willGoToBackForwardListItem):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
(API::InjectedBundle::PageLoaderClient::shouldGoToBackForwardListItem): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
(WKBundleBackForwardListItemCopyOriginalURL):
(WKBundleBackForwardListItemCopyTitle):
(WKBundleBackForwardListItemIsTargetItem):
(WKBundleBackForwardListItemIsInPageCache):
(WKBundleBackForwardListItemHasCachedPageExpired):
* WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
* WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h:
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
(WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::shouldGoToHistoryItem const):

Source/WebKitLegacy/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::shouldGoToHistoryItem const):
* WebCoreSupport/WebFrameLoaderClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237102 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyFrameLoaderClient.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/HistoryController.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/API/c/WKDeprecated.h
Source/WebKit/UIProcess/API/APINavigationClient.h
Source/WebKit/UIProcess/Cocoa/NavigationState.h
Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h

index 7fa9739..94601d7 100644 (file)
@@ -1,3 +1,18 @@
+2018-10-15  Alex Christensen  <achristensen@webkit.org>
+
+        Remove InjectedBundle processing of back/forward lists
+        https://bugs.webkit.org/show_bug.cgi?id=190459
+
+        Reviewed by Chris Dumez.
+
+        The uses of these functions are dead code I removed in rdar://problem/45180545
+        Removing these functions is a step towards fixing the PSON history bugs.
+
+        * loader/EmptyFrameLoaderClient.h:
+        * loader/FrameLoaderClient.h:
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::goToItem):
+
 2018-10-14  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
 
         [JSC] Remove Option::useAsyncIterator
index e765bb0..e00a5a1 100644 (file)
@@ -165,7 +165,7 @@ class WEBCORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient {
 
     void updateGlobalHistory() final { }
     void updateGlobalHistoryRedirectLinks() final { }
-    bool shouldGoToHistoryItem(HistoryItem*) const final { return false; }
+    bool shouldGoToHistoryItem(HistoryItem&) const final { return false; }
     void updateGlobalHistoryItemForPage() final { }
     void saveViewStateToItem(HistoryItem&) final { }
     bool canCachePage() const final { return false; }
index 1b911a2..94e55b3 100644 (file)
@@ -220,7 +220,7 @@ public:
     virtual void updateGlobalHistory() = 0;
     virtual void updateGlobalHistoryRedirectLinks() = 0;
 
-    virtual bool shouldGoToHistoryItem(HistoryItem*) const = 0;
+    virtual bool shouldGoToHistoryItem(HistoryItem&) const = 0;
     virtual void updateGlobalHistoryItemForPage() { }
 
     // This frame has set its opener to null, disowning it for the lifetime of the frame.
index 9fba835..bed22ac 100644 (file)
@@ -304,7 +304,7 @@ void HistoryController::goToItem(HistoryItem& targetItem, FrameLoadType type, Sh
     Page* page = m_frame.page();
     if (!page)
         return;
-    if (!m_frame.loader().client().shouldGoToHistoryItem(&targetItem))
+    if (!m_frame.loader().client().shouldGoToHistoryItem(targetItem))
         return;
     if (m_defersLoading) {
         m_deferredItem = &targetItem;
index 235020f..25d0c82 100644 (file)
@@ -1,5 +1,41 @@
 2018-10-15  Alex Christensen  <achristensen@webkit.org>
 
+        Remove InjectedBundle processing of back/forward lists
+        https://bugs.webkit.org/show_bug.cgi?id=190459
+
+        Reviewed by Chris Dumez.
+
+        * Shared/API/c/WKDeprecated.h:
+        * UIProcess/API/APINavigationClient.h:
+        (API::NavigationClient::willGoToBackForwardListItem):
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::willGoToBackForwardListItem):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
+        (API::InjectedBundle::PageLoaderClient::shouldGoToBackForwardListItem): Deleted.
+        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
+        (WKBundleBackForwardListItemCopyOriginalURL):
+        (WKBundleBackForwardListItemCopyTitle):
+        (WKBundleBackForwardListItemIsTargetItem):
+        (WKBundleBackForwardListItemIsInPageCache):
+        (WKBundleBackForwardListItemHasCachedPageExpired):
+        * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
+        * WebProcess/InjectedBundle/API/c/WKBundleFileHandleRef.h:
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+        (WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
+        (WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem): Deleted.
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
+2018-10-15  Alex Christensen  <achristensen@webkit.org>
+
         WebPageProxy should always have a HistoryClient
         https://bugs.webkit.org/show_bug.cgi?id=190450
 
index e425298..47ccb75 100644 (file)
@@ -26,9 +26,9 @@
 #pragma once
 
 #ifdef _MSC_VER
-#define WK_C_API_DEPRECATED(...)
+#define WK_C_API_DEPRECATED
 #define WK_C_API_DEPRECATED_WITH_REPLACEMENT(...)
 #else
-#define WK_C_API_DEPRECATED(_message, ...) __attribute__((deprecated(_message)))
+#define WK_C_API_DEPRECATED __attribute__((deprecated("No longer supported")))
 #define WK_C_API_DEPRECATED_WITH_REPLACEMENT(_replacement, ...) __attribute__((deprecated("use " #_replacement)))
 #endif
index 6ad833a..34f0893 100644 (file)
@@ -130,7 +130,7 @@ public:
     virtual void resolveWebGLLoadPolicy(WebKit::WebPageProxy&, const WebCore::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const { completionHandler(WebCore::WebGLLoadPolicy::WebGLAllowCreation); }
 #endif
     
-    virtual bool willGoToBackForwardListItem(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&, bool inPageCache, Object*) { return false; }
+    virtual bool willGoToBackForwardListItem(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&, bool inPageCache) { return false; }
 
     virtual void didBeginNavigationGesture(WebKit::WebPageProxy&) { }
     virtual void willEndNavigationGesture(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
index 720359d..2cdf96a 100644 (file)
@@ -126,7 +126,7 @@ private:
 #if PLATFORM(MAC)
         void webGLLoadPolicy(WebPageProxy&, const WebCore::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
         void resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL&, CompletionHandler<void(WebCore::WebGLLoadPolicy)>&&) const final;
-        bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inPageCache, API::Object*) final;
+        bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inPageCache) final;
         bool didFailToInitializePlugIn(WebPageProxy&, API::Dictionary&) final;
         bool didBlockInsecurePluginVersion(WebPageProxy&, API::Dictionary&) final;
         void decidePolicyForPluginLoad(WebKit::WebPageProxy&, WebKit::PluginModuleLoadPolicy, API::Dictionary&, CompletionHandler<void(WebKit::PluginModuleLoadPolicy, const WTF::String&)>&&) final;
index bc528f7..e775aa9 100644 (file)
@@ -445,7 +445,7 @@ bool NavigationState::NavigationClient::didChangeBackForwardList(WebPageProxy&,
     return true;
 }
 
-bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem& item, bool inPageCache, API::Object*)
+bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem& item, bool inPageCache)
 {
     if (!m_navigationState.m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInPageCache)
         return false;
index d2349d5..e10e88c 100644 (file)
@@ -1294,12 +1294,12 @@ void WebPageProxy::didChangeBackForwardList(WebBackForwardListItem* added, Vecto
     m_pageLoadState.setCanGoForward(transaction, m_backForwardList->forwardItem());
 }
 
-void WebPageProxy::willGoToBackForwardListItem(const BackForwardItemIdentifier& itemID, bool inPageCache, const UserData& userData)
+void WebPageProxy::willGoToBackForwardListItem(const BackForwardItemIdentifier& itemID, bool inPageCache)
 {
     PageClientProtector protector(pageClient());
 
     if (auto* item = m_backForwardList->itemForID(itemID))
-        m_navigationClient->willGoToBackForwardListItem(*this, *item, inPageCache, m_process->transformHandlesToObjects(userData.object()).get());
+        m_navigationClient->willGoToBackForwardListItem(*this, *item, inPageCache);
 }
 
 bool WebPageProxy::shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem& item)
index 441aaff..706f7a5 100644 (file)
@@ -478,7 +478,7 @@ public:
     RefPtr<API::Navigation> goToBackForwardItem(WebBackForwardListItem&);
     void tryRestoreScrollPosition();
     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<Ref<WebBackForwardListItem>>&& removed);
-    void willGoToBackForwardListItem(const WebCore::BackForwardItemIdentifier&, bool inPageCache, const UserData&);
+    void willGoToBackForwardListItem(const WebCore::BackForwardItemIdentifier&, bool inPageCache);
 
     bool shouldKeepCurrentBackForwardListItemInList(WebBackForwardListItem&);
 
index ab46a8e..8c40ad9 100644 (file)
@@ -233,7 +233,7 @@ messages -> WebPageProxy {
     BackForwardBackListCount() -> (int32_t count)
     BackForwardForwardListCount() -> (int32_t count)
     BackForwardClear()
-    WillGoToBackForwardListItem(struct WebCore::BackForwardItemIdentifier itemID, bool inPageCache, WebKit::UserData userData)
+    WillGoToBackForwardListItem(struct WebCore::BackForwardItemIdentifier itemID, bool inPageCache)
 
     # Undo/Redo messages
     RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction)
index 08ddbbe..d3b1ad9 100644 (file)
@@ -58,7 +58,6 @@ public:
     virtual void willLoadURLRequest(WebKit::WebPage&, const WebCore::ResourceRequest&, API::Object*) { }
     virtual void willLoadDataRequest(WebKit::WebPage&, const WebCore::ResourceRequest&, WebCore::SharedBuffer*, const WTF::String&, const WTF::String&, const WebCore::URL&, API::Object*) { }
 
-    virtual bool shouldGoToBackForwardListItem(WebKit::WebPage&, WebKit::InjectedBundleBackForwardListItem&, RefPtr<API::Object>&) { return true; }
     virtual void didStartProvisionalLoadForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
     virtual void didReceiveServerRedirectForProvisionalLoadForFrame(WebKit::WebPage&, WebKit::WebFrame&, RefPtr<API::Object>&) { }
     virtual void didFailProvisionalLoadWithErrorForFrame(WebKit::WebPage&, WebKit::WebFrame&, const WebCore::ResourceError&, RefPtr<API::Object>&) { }
index c6ef6ad..4fefbd0 100644 (file)
@@ -44,7 +44,7 @@ bool WKBundleBackForwardListItemIsSame(WKBundleBackForwardListItemRef itemRef1,
 
 WKURLRef WKBundleBackForwardListItemCopyOriginalURL(WKBundleBackForwardListItemRef itemRef)
 {
-    return toCopiedURLAPI(toImpl(itemRef)->originalURL());
+    return nullptr;
 }
 
 WKURLRef WKBundleBackForwardListItemCopyURL(WKBundleBackForwardListItemRef itemRef)
@@ -54,7 +54,7 @@ WKURLRef WKBundleBackForwardListItemCopyURL(WKBundleBackForwardListItemRef itemR
 
 WKStringRef WKBundleBackForwardListItemCopyTitle(WKBundleBackForwardListItemRef itemRef)
 {
-    return toCopiedAPI(toImpl(itemRef)->title());
+    return nullptr;
 }
 
 WKStringRef WKBundleBackForwardListItemCopyTarget(WKBundleBackForwardListItemRef itemRef)
@@ -69,12 +69,12 @@ bool WKBundleBackForwardListItemIsTargetItem(WKBundleBackForwardListItemRef item
 
 bool WKBundleBackForwardListItemIsInPageCache(WKBundleBackForwardListItemRef itemRef)
 {
-    return toImpl(itemRef)->isInPageCache();
+    return false;
 }
 
 bool WKBundleBackForwardListItemHasCachedPageExpired(WKBundleBackForwardListItemRef itemRef)
 {
-    return toImpl(itemRef)->hasCachedPageExpired();
+    return false;
 }
 
 WKArrayRef WKBundleBackForwardListItemCopyChildren(WKBundleBackForwardListItemRef itemRef)
index 409c16f..649f522 100644 (file)
@@ -27,6 +27,7 @@
 #define WKBundleBackForwardListItem_h
 
 #include <WebKit/WKBase.h>
+#include <WebKit/WKDeprecated.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -36,15 +37,15 @@ WK_EXPORT WKTypeID WKBundleBackForwardListItemGetTypeID();
 
 WK_EXPORT bool WKBundleBackForwardListItemIsSame(WKBundleBackForwardListItemRef item1, WKBundleBackForwardListItemRef item2);
 
-WK_EXPORT WKURLRef WKBundleBackForwardListItemCopyOriginalURL(WKBundleBackForwardListItemRef item);
+WK_EXPORT WKURLRef WKBundleBackForwardListItemCopyOriginalURL(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
 WK_EXPORT WKURLRef WKBundleBackForwardListItemCopyURL(WKBundleBackForwardListItemRef item);
-WK_EXPORT WKStringRef WKBundleBackForwardListItemCopyTitle(WKBundleBackForwardListItemRef item);
+WK_EXPORT WKStringRef WKBundleBackForwardListItemCopyTitle(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
 
 WK_EXPORT WKStringRef WKBundleBackForwardListItemCopyTarget(WKBundleBackForwardListItemRef item);
 WK_EXPORT bool WKBundleBackForwardListItemIsTargetItem(WKBundleBackForwardListItemRef item);
 
-WK_EXPORT bool WKBundleBackForwardListItemIsInPageCache(WKBundleBackForwardListItemRef item);
-WK_EXPORT bool WKBundleBackForwardListItemHasCachedPageExpired(WKBundleBackForwardListItemRef item);
+WK_EXPORT bool WKBundleBackForwardListItemIsInPageCache(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
+WK_EXPORT bool WKBundleBackForwardListItemHasCachedPageExpired(WKBundleBackForwardListItemRef item) WK_C_API_DEPRECATED;
 
 WK_EXPORT WKArrayRef WKBundleBackForwardListItemCopyChildren(WKBundleBackForwardListItemRef item);
 
index d4941f8..eee1bc3 100644 (file)
@@ -33,7 +33,7 @@
 extern "C" {
 #endif
 
-WK_EXPORT WKBundleFileHandleRef WKBundleFileHandleCreateWithPath(WKStringRef path) WK_C_API_DEPRECATED("No longer supported");
+WK_EXPORT WKBundleFileHandleRef WKBundleFileHandleCreateWithPath(WKStringRef path) WK_C_API_DEPRECATED;
 
 #ifdef __cplusplus
 }
index 5517c54..0a0b1c4 100644 (file)
@@ -56,7 +56,7 @@ WK_EXPORT WKBundleFrameRef WKBundleFrameForJavaScriptContext(JSContextRef contex
 
 WK_EXPORT JSValueRef WKBundleFrameGetJavaScriptWrapperForNodeForWorld(WKBundleFrameRef frame, WKBundleNodeHandleRef nodeHandle, WKBundleScriptWorldRef world);
 WK_EXPORT JSValueRef WKBundleFrameGetJavaScriptWrapperForRangeForWorld(WKBundleFrameRef frame, WKBundleRangeHandleRef rangeHandle, WKBundleScriptWorldRef world);
-WK_EXPORT JSValueRef WKBundleFrameGetJavaScriptWrapperForFileForWorld(WKBundleFrameRef frame, WKBundleFileHandleRef fileHandle, WKBundleScriptWorldRef world) WK_C_API_DEPRECATED("No longer supported");
+WK_EXPORT JSValueRef WKBundleFrameGetJavaScriptWrapperForFileForWorld(WKBundleFrameRef frame, WKBundleFileHandleRef fileHandle, WKBundleScriptWorldRef world) WK_C_API_DEPRECATED;
 
 WK_EXPORT WKBundlePageRef WKBundleFrameGetPage(WKBundleFrameRef frame);
 
index f55b6fe..1fb1357 100644 (file)
@@ -48,6 +48,7 @@ using namespace WebCore;
 InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient(const WKBundlePageLoaderClientBase* client)
 {
     initialize(client);
+    ASSERT(!m_client.shouldGoToBackForwardListItem);
 }
 
 void InjectedBundlePageLoaderClient::willLoadURLRequest(WebPage& page, const ResourceRequest& request, API::Object* userData)
@@ -78,18 +79,6 @@ void InjectedBundlePageLoaderClient::willLoadDataRequest(WebPage& page, const Re
     m_client.willLoadDataRequest(toAPI(&page), toAPI(request), toAPI(data.get()), toAPI(MIMEType.impl()), toAPI(encodingName.impl()), toURLRef(unreachableURL.string().impl()), toAPI(userData), m_client.base.clientInfo);
 }
 
-bool InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem(WebPage& page, InjectedBundleBackForwardListItem& item, RefPtr<API::Object>& userData)
-{
-    if (!m_client.shouldGoToBackForwardListItem)
-        return true;
-
-    WKTypeRef userDataToPass = nullptr;
-    bool result = m_client.shouldGoToBackForwardListItem(toAPI(&page), toAPI(&item), &userDataToPass, m_client.base.clientInfo);
-    userData = adoptRef(toImpl(userDataToPass));
-    
-    return result;
-}
-
 void InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame(WebPage& page, WebFrame& frame, RefPtr<API::Object>& userData)
 {
     if (!m_client.didStartProvisionalLoadForFrame)
index 4935661..a428fbf 100644 (file)
@@ -50,7 +50,6 @@ public:
     void willLoadURLRequest(WebPage&, const WebCore::ResourceRequest&, API::Object*) override;
     void willLoadDataRequest(WebPage&, const WebCore::ResourceRequest&, WebCore::SharedBuffer*, const WTF::String&, const WTF::String&, const WebCore::URL&, API::Object*) override;
 
-    bool shouldGoToBackForwardListItem(WebPage&, InjectedBundleBackForwardListItem&, RefPtr<API::Object>&) override;
     void didStartProvisionalLoadForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
     void didReceiveServerRedirectForProvisionalLoadForFrame(WebPage&, WebFrame&, RefPtr<API::Object>&) override;
     void didFailProvisionalLoadWithErrorForFrame(WebPage&, WebFrame&, const WebCore::ResourceError&, RefPtr<API::Object>&) override;
index c235395..5ddc685 100644 (file)
@@ -1116,21 +1116,12 @@ void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
     }
 }
 
-bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem* item) const
+bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem& item) const
 {
     WebPage* webPage = m_frame->page();
     if (!webPage)
         return false;
-
-    RefPtr<InjectedBundleBackForwardListItem> bundleItem = InjectedBundleBackForwardListItem::create(item);
-    RefPtr<API::Object> userData;
-
-    // Ask the bundle client first
-    bool shouldGoToBackForwardListItem = webPage->injectedBundleLoaderClient().shouldGoToBackForwardListItem(*webPage, *bundleItem, userData);
-    if (!shouldGoToBackForwardListItem)
-        return false;
-
-    webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(item->identifier(), bundleItem->isInPageCache(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
+    webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(item.identifier(), item.isInPageCache()));
     return true;
 }
 
index c1b9cd0..7e7a760 100644 (file)
@@ -152,7 +152,7 @@ private:
     void updateGlobalHistory() final;
     void updateGlobalHistoryRedirectLinks() final;
     
-    bool shouldGoToHistoryItem(WebCore::HistoryItem*) const final;
+    bool shouldGoToHistoryItem(WebCore::HistoryItem&) const final;
 
     void didDisplayInsecureContent() final;
     void didRunInsecureContent(WebCore::SecurityOrigin&, const WebCore::URL&) final;
index 6362823..fdf0fb3 100644 (file)
@@ -1,3 +1,14 @@
+2018-10-15  Alex Christensen  <achristensen@webkit.org>
+
+        Remove InjectedBundle processing of back/forward lists
+        https://bugs.webkit.org/show_bug.cgi?id=190459
+
+        Reviewed by Chris Dumez.
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::shouldGoToHistoryItem const):
+
 2018-10-14  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
 
         [JSC] Remove Option::useAsyncIterator
index 77182d2..7ab5029 100644 (file)
@@ -155,7 +155,7 @@ private:
     void updateGlobalHistory() final;
     void updateGlobalHistoryRedirectLinks() final;
 
-    bool shouldGoToHistoryItem(WebCore::HistoryItem*) const final;
+    bool shouldGoToHistoryItem(WebCore::HistoryItem&) const final;
     void updateGlobalHistoryItemForPage() final;
 
     void didDisplayInsecureContent() final;
index f508522..99b3042 100644 (file)
@@ -1097,12 +1097,10 @@ void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
     }
 }
 
-bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem* item) const
+bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem& item) const
 {
     WebView* view = getWebView(m_webFrame.get());
-    WebHistoryItem *webItem = kit(item);
-    
-    return [[view _policyDelegateForwarder] webView:view shouldGoToHistoryItem:webItem];
+    return [[view _policyDelegateForwarder] webView:view shouldGoToHistoryItem:kit(&item)];
 }
 
 void WebFrameLoaderClient::updateGlobalHistoryItemForPage()
index ec82d49..0ee3735 100644 (file)
@@ -1,3 +1,14 @@
+2018-10-15  Alex Christensen  <achristensen@webkit.org>
+
+        Remove InjectedBundle processing of back/forward lists
+        https://bugs.webkit.org/show_bug.cgi?id=190459
+
+        Reviewed by Chris Dumez.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::shouldGoToHistoryItem const):
+        * WebCoreSupport/WebFrameLoaderClient.h:
+
 2018-10-02  Alex Christensen  <achristensen@webkit.org>
 
         Remove ParsedURLString
index e9ff3b7..e4fe9c9 100644 (file)
@@ -765,7 +765,7 @@ void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
     }
 }
 
-bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem*) const
+bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem&) const
 {
     return true;
 }
index 39cd1c1..7e3d8ce 100644 (file)
@@ -136,7 +136,7 @@ public:
 
     void updateGlobalHistory() override;
     void updateGlobalHistoryRedirectLinks() override;
-    bool shouldGoToHistoryItem(WebCore::HistoryItem*) const override;
+    bool shouldGoToHistoryItem(WebCore::HistoryItem&) const override;
     void updateGlobalHistoryItemForPage() override;
 
     void didDisplayInsecureContent() override;