<rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Nov 2014 21:28:53 +0000 (21:28 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Nov 2014 21:28:53 +0000 (21:28 +0000)
commit745f07e53190eca2587b71866ab213bc1266d8c1
tree456f5df3b9080fef8c2a33256537d45cb3325313
parent75fdebc5b528ac52d29d79b996627b228d315b47
<rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=138753

Reviewed by Tim Horton.

Source/WebCore:

Removed a FrameLoaderClient function that no one overrides anymore.

* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
* loader/HistoryController.cpp:
(WebCore::HistoryController::setCurrentItem): Removed call to willChangeCurrentHistoryItem.
(WebCore::HistoryController::replaceCurrentItem): Ditto.

Source/WebKit2:

Rather than having the UI process record a snapshot jut before the Web Content process’s
notion of its current back/forward list item changes, have the UI process record a snapshot
right before its own current back/forward list item changes. This ensures that the right
snapshot gets attached to the right item in the UI process.

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem): If there is a current item, record a navigation
snapshot of it before making the new item current.
(WebKit::WebBackForwardList::goToItem): If there is a current item, record a navigation
snapshot of it before making another item current.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame): Deleted.
* UIProcess/WebPageProxy.h:

* UIProcess/WebPageProxy.messages.in: Removed willChangeCurrentHistoryItemForMainFrame
message.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Removed declaration of
willChangeCurrentHistoryItem override.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame): Deleted.
* WebProcess/WebPage/WebPage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/HistoryController.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebBackForwardList.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h