Generalize didChangeLocationWithinPageForFrame for all same document navigations
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2010 00:33:18 +0000 (00:33 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2010 00:33:18 +0000 (00:33 +0000)
commitb2d2287c830b4e80cdc2d137d3ab13e4a2c3cd4b
tree591333d31393e280103134ef39293f16d6d168ae
parent804eb6ab763ced1fc5b5c753443d5aacac87df47
Generalize didChangeLocationWithinPageForFrame for all same document navigations
https://bugs.webkit.org/show_bug.cgi?id=50584

Reviewed by Anders Carlsson.

WebKit2:

  - Rename didChangeLocationWithinPageForFrame callbacks to didSameDocumentNavigationForFrame
  - Add WKSameDocumentNavigationType to didChangeLocationWithinPageForFrame.
  - Call didSameDocumentNavigationForFrame for HTML session state changes.

* Shared/API/c/WKPageLoadTypes.h: Added.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
Moved WKFrameNavigationType here from WKPage.h and add WKSameDocumentNavigationType.

* Shared/SameDocumentNavigationType.h: Added.
* UIProcess/API/C/WKAPICast.h:
Moved WKFrameNavigationType conversion from here.

* UIProcess/API/C/WKPage.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
Update comment.

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didSameDocumentNavigation):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
Pipe new name through.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
Call didChangeLocationWithinPageForFrame for session state changes.

* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Add new files.

WebKitTools:

* MiniBrowser/mac/BrowserWindowController.m:
(didSameDocumentNavigationForFrame):
(-[BrowserWindowController awakeFromNib]):
(-[BrowserWindowController didSameDocumentNavigationForFrame:]):
* TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp:
(TestWebKitAPI::didSameDocumentNavigationForFrame):
(TestWebKitAPI::TEST):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::didSameDocumentNavigationForFrame):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
WebKit2/ChangeLog
WebKit2/Shared/API/c/WKPageLoadTypes.h [new file with mode: 0644]
WebKit2/Shared/API/c/WKSharedAPICast.h
WebKit2/Shared/SameDocumentNavigationType.h [new file with mode: 0644]
WebKit2/UIProcess/API/C/WKAPICast.h
WebKit2/UIProcess/API/C/WKPage.h
WebKit2/UIProcess/API/qt/qwkpage.cpp
WebKit2/UIProcess/WebFrameProxy.cpp
WebKit2/UIProcess/WebFrameProxy.h
WebKit2/UIProcess/WebLoaderClient.cpp
WebKit2/UIProcess/WebLoaderClient.h
WebKit2/UIProcess/WebPageProxy.cpp
WebKit2/UIProcess/WebPageProxy.h
WebKit2/UIProcess/WebPageProxy.messages.in
WebKit2/WebKit2.pro
WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
WebKit2/win/WebKit2.vcproj
WebKit2/win/WebKit2Generated.make
WebKitTools/ChangeLog
WebKitTools/MiniBrowser/mac/BrowserWindowController.m
WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
WebKitTools/WebKitTestRunner/TestController.cpp