Title: [162653] trunk/Source/WebKit2
Revision
162653
Author
ander...@apple.com
Date
2014-01-23 15:22:47 -0800 (Thu, 23 Jan 2014)

Log Message

Remove an unneeded synchronous back/forward message
https://bugs.webkit.org/show_bug.cgi?id=127516

Reviewed by Tim Horton.

* UIProcess/WebLoaderClient.cpp:
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeLoaderClient):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (162652 => 162653)


--- trunk/Source/WebKit2/ChangeLog	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-23 23:22:47 UTC (rev 162653)
@@ -1,5 +1,25 @@
 2014-01-23  Anders Carlsson  <ander...@apple.com>
 
+        Remove an unneeded synchronous back/forward message
+        https://bugs.webkit.org/show_bug.cgi?id=127516
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/WebLoaderClient.cpp:
+        * UIProcess/WebLoaderClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::initializeLoaderClient):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+
+2014-01-23  Anders Carlsson  <ander...@apple.com>
+
         Rename WKPreferences.h to WKPreferencesRef.h and add a stubbed out WKPreferences class
         https://bugs.webkit.org/show_bug.cgi?id=127512
 

Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp (162652 => 162653)


--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp	2014-01-23 23:22:47 UTC (rev 162653)
@@ -250,17 +250,6 @@
     m_client.didChangeBackForwardList(toAPI(page), toAPI(addedItem), toAPI(removedItemsArray.get()), m_client.base.clientInfo);
 }
 
-bool WebLoaderClient::shouldGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item)
-{
-    // We should only even considering sending the shouldGoToBackForwardListItem() client callback
-    // for version 0 clients. Later versioned clients should get willGoToBackForwardListItem() instead,
-    // but due to XPC race conditions this one might have been called instead.
-    if (m_client.base.version > 0 || !m_client.shouldGoToBackForwardListItem)
-        return true;
-
-    return m_client.shouldGoToBackForwardListItem(toAPI(page), toAPI(item), m_client.base.clientInfo);
-}
-
 void WebLoaderClient::willGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item, API::Object* userData)
 {
     if (m_client.willGoToBackForwardListItem)

Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.h (162652 => 162653)


--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.h	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.h	2014-01-23 23:22:47 UTC (rev 162653)
@@ -95,7 +95,6 @@
     void processDidCrash(WebPageProxy*);
 
     void didChangeBackForwardList(WebPageProxy*, WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems);
-    bool shouldGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*);
     void willGoToBackForwardListItem(WebPageProxy*, WebBackForwardListItem*, API::Object*);
 
 #if ENABLE(NETSCAPE_PLUGIN_API)

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (162652 => 162653)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-01-23 23:22:47 UTC (rev 162653)
@@ -416,8 +416,6 @@
 
     if (milestones)
         m_process->send(Messages::WebPage::ListenForLayoutMilestones(milestones), m_pageID);
-
-    m_process->send(Messages::WebPage::SetWillGoToBackForwardItemCallbackEnabled(loadClient->version > 0), m_pageID);
 }
 
 void WebPageProxy::setPolicyClient(std::unique_ptr<API::PolicyClient> policyClient)
@@ -835,12 +833,6 @@
     m_loaderClient.didChangeBackForwardList(this, added, removed);
 }
 
-void WebPageProxy::shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardItem)
-{
-    WebBackForwardListItem* item = m_process->webBackForwardItem(itemID);
-    shouldGoToBackForwardItem = item && m_loaderClient.shouldGoToBackForwardListItem(this, item);
-}
-
 void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder& decoder)
 {
     RefPtr<API::Object> userData;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (162652 => 162653)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2014-01-23 23:22:47 UTC (rev 162653)
@@ -400,7 +400,6 @@
     void goToBackForwardItem(WebBackForwardListItem*);
     void tryRestoreScrollPosition();
     void didChangeBackForwardList(WebBackForwardListItem* addedItem, Vector<RefPtr<API::Object>>* removedItems);
-    void shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGoToBackForwardListItem);
     void willGoToBackForwardListItem(uint64_t itemID, IPC::MessageDecoder&);
 
     bool willHandleHorizontalScrollEvents() const;

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (162652 => 162653)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2014-01-23 23:22:47 UTC (rev 162653)
@@ -182,7 +182,6 @@
     BackForwardBackListCount() -> (int32_t count)
     BackForwardForwardListCount() -> (int32_t count)
     BackForwardClear()
-    ShouldGoToBackForwardListItem(uint64_t itemID) -> (bool shouldGoToBackForwardListItem)
     WillGoToBackForwardListItem(uint64_t itemID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
 
     # Undo/Redo messages

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (162652 => 162653)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-23 23:22:47 UTC (rev 162653)
@@ -942,15 +942,8 @@
     if (!shouldGoToBackForwardListItem)
         return false;
     
-    if (webPage->willGoToBackForwardItemCallbackEnabled()) {
-        webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(itemID, InjectedBundleUserMessageEncoder(userData.get())));
-        return true;
-    }
-    
-    if (!webPage->sendSync(Messages::WebPageProxy::ShouldGoToBackForwardListItem(itemID), Messages::WebPageProxy::ShouldGoToBackForwardListItem::Reply(shouldGoToBackForwardListItem)))
-        return false;
-    
-    return shouldGoToBackForwardListItem;
+    webPage->send(Messages::WebPageProxy::WillGoToBackForwardListItem(itemID, InjectedBundleUserMessageEncoder(userData.get())));
+    return true;
 }
 
 bool WebFrameLoaderClient::shouldStopLoadingForHistoryItem(HistoryItem*) const

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (162652 => 162653)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2014-01-23 23:22:47 UTC (rev 162653)
@@ -275,7 +275,6 @@
 #if ENABLE(CONTEXT_MENUS)
     , m_isShowingContextMenu(false)
 #endif
-    , m_willGoToBackForwardItemCallbackEnabled(true)
 #if PLATFORM(IOS)
     , m_shouldReturnWordAtSelection(false)
 #endif

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (162652 => 162653)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2014-01-23 23:22:47 UTC (rev 162653)
@@ -622,8 +622,6 @@
     void numWheelEventHandlersChanged(unsigned);
     void recomputeShortCircuitHorizontalWheelEventsState();
 
-    bool willGoToBackForwardItemCallbackEnabled() const { return m_willGoToBackForwardItemCallbackEnabled; }
-
     void setVisibilityStatePrerender();
     void updateVisibilityState(bool isInitialState = false);
 
@@ -769,8 +767,6 @@
 
     void didRemoveBackForwardItem(uint64_t);
 
-    void setWillGoToBackForwardItemCallbackEnabled(bool enabled) { m_willGoToBackForwardItemCallbackEnabled = enabled; }
-    
     void setDrawsBackground(bool);
     void setDrawsTransparentBackground(bool);
 
@@ -1039,8 +1035,6 @@
     bool m_isShowingContextMenu;
 #endif
     
-    bool m_willGoToBackForwardItemCallbackEnabled;
-
 #if PLATFORM(IOS)
     RefPtr<WebCore::Node> m_assistedNode;
     RefPtr<WebCore::Range> m_currentWordRange;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (162652 => 162653)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2014-01-23 23:13:23 UTC (rev 162652)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in	2014-01-23 23:22:47 UTC (rev 162653)
@@ -99,7 +99,6 @@
     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
 
     DidRemoveBackForwardItem(uint64_t backForwardItemID)
-    SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
 
     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to