diff options
Diffstat (limited to 'Source/WebKit2/UIProcess/WebLoaderClient.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/WebLoaderClient.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/WebKit2/UIProcess/WebLoaderClient.cpp b/Source/WebKit2/UIProcess/WebLoaderClient.cpp index 87feea062..2aae01617 100644 --- a/Source/WebKit2/UIProcess/WebLoaderClient.cpp +++ b/Source/WebKit2/UIProcess/WebLoaderClient.cpp @@ -241,12 +241,21 @@ void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page, WebBackForwar bool WebLoaderClient::shouldGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item) { - if (!m_client.shouldGoToBackForwardListItem) + // We should only even considering sending the shouldGoToBackForwardListItem() client callback + // for version 0 clients. Later versioned clients should get willGoToBackForwardListItem() instead, + // but do to XPC race conditions this one might have been called instead. + if (m_client.version > 0 || !m_client.shouldGoToBackForwardListItem) return true; - + return m_client.shouldGoToBackForwardListItem(toAPI(page), toAPI(item), m_client.clientInfo); } +void WebLoaderClient::willGoToBackForwardListItem(WebPageProxy* page, WebBackForwardListItem* item) +{ + if (m_client.willGoToBackForwardListItem) + m_client.willGoToBackForwardListItem(toAPI(page), toAPI(item), m_client.clientInfo); +} + void WebLoaderClient::didFailToInitializePlugin(WebPageProxy* page, const String& mimeType) { if (!m_client.didFailToInitializePlugin) |