[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

weinig at apple.com weinig at apple.com
Wed Dec 22 17:59:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a347556ac416317f8f6ea4db5f60c6cc30a44518
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 4 21:51:57 2010 +0000

    WebKit2: Need client functions to notify app when the url changes due to a fragment navigation
    https://bugs.webkit.org/show_bug.cgi?id=50511
    
    Reviewed by Jon Honeycutt.
    
    WebKit2:
    
    Pipe didChangeLocationWithinPageForFrame up through the UIProcess to the WKPageLoadClient,
    updating the WebFrameProxy's URL on the way.
    
    Test: PageLoadDidChangeLocationWithinPageForFrame
    
    * UIProcess/API/C/WKPage.h:
    * UIProcess/API/qt/qwkpage.cpp:
    (QWKPage::QWKPage):
    * UIProcess/WebFrameProxy.cpp:
    (WebKit::WebFrameProxy::didChangeURLWithoutNavigation):
    * UIProcess/WebFrameProxy.h:
    * UIProcess/WebLoaderClient.cpp:
    (WebKit::WebLoaderClient::didChangeLocationWithinPageForFrame):
    * UIProcess/WebLoaderClient.h:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::didChangeLocationWithinPageForFrame):
    * UIProcess/WebPageProxy.h:
    * UIProcess/WebPageProxy.messages.in:
    * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
    * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
    (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
    (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
    (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
    * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
    (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect): Fix typo.
    (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
    
    WebKitTools:
    
    Update tools for new didChangeLocationWithinPageForFrame client function (and changed bundle
    signature) and added a test for the functionality (PageLoadDidChangeLocationWithinPageForFrame.cpp)
    
    * MiniBrowser/mac/BrowserWindowController.m:
    (didChangeLocationWithinPageForFrame):
    (-[BrowserWindowController awakeFromNib]):
    (-[BrowserWindowController didChangeLocationWithinPageForFrame:]):
    * TestWebKitAPI/PlatformUtilities.cpp:
    (TestWebKitAPI::Util::toWK):
    * TestWebKitAPI/PlatformUtilities.h:
    (TestWebKitAPI::Util::adoptWK):
    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp: Added.
    (TestWebKitAPI::nullJavaScriptCallback):
    (TestWebKitAPI::didFinishLoadForFrame):
    (TestWebKitAPI::didChangeLocationWithinPageForFrame):
    (TestWebKitAPI::TEST):
    * TestWebKitAPI/Tests/WebKit2/file-with-anchor.html: Added.
    * TestWebKitAPI/win/TestWebKitAPI.vcproj:
    * TestWebKitAPI/win/copy-resources.cmd:
    * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
    (WTR::InjectedBundlePage::InjectedBundlePage):
    (WTR::InjectedBundlePage::didChangeLocationWithinPageForFrame):
    * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
    * WebKitTestRunner/TestController.cpp:
    (WTR::TestController::initialize):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73336 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 82145dd..0cc3a7d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,38 @@
+2010-12-04  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Jon Honeycutt.
+
+        WebKit2: Need client functions to notify app when the url changes due to a fragment navigation
+        https://bugs.webkit.org/show_bug.cgi?id=50511
+
+        Pipe didChangeLocationWithinPageForFrame up through the UIProcess to the WKPageLoadClient,
+        updating the WebFrameProxy's URL on the way.
+
+        Test: PageLoadDidChangeLocationWithinPageForFrame
+
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPage::QWKPage):
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::didChangeURLWithoutNavigation):
+        * UIProcess/WebFrameProxy.h:
+        * UIProcess/WebLoaderClient.cpp:
+        (WebKit::WebLoaderClient::didChangeLocationWithinPageForFrame):
+        * UIProcess/WebLoaderClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didChangeLocationWithinPageForFrame):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+        (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
+        (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect): Fix typo.
+        (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
+
 2010-12-03  Timothy Hatcher  <timothy at apple.com>
 
         Make the Web Inspector window show and be usable on Mac.
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 4dadbd9..603108d 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -58,6 +58,7 @@ typedef void (*WKPageDidCommitLoadForFrameCallback)(WKPageRef page, WKFrameRef f
 typedef void (*WKPageDidFinishDocumentLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidFinishLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidFailLoadWithErrorForFrameCallback)(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void *clientInfo);
+typedef void (*WKPageDidChangeLocationWithinPageForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidReceiveTitleForFrameCallback)(WKPageRef page, WKStringRef title, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidFirstLayoutForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
@@ -90,6 +91,7 @@ struct WKPageLoaderClient {
     WKPageDidFinishDocumentLoadForFrameCallback                         didFinishDocumentLoadForFrame;
     WKPageDidFinishLoadForFrameCallback                                 didFinishLoadForFrame;
     WKPageDidFailLoadWithErrorForFrameCallback                          didFailLoadWithErrorForFrame;
+    WKPageDidChangeLocationWithinPageForFrameCallback                   didChangeLocationWithinPageForFrame;
     WKPageDidReceiveTitleForFrameCallback                               didReceiveTitleForFrame;
     WKPageDidFirstLayoutForFrameCallback                                didFirstLayoutForFrame;
     WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback                didFirstVisuallyNonEmptyLayoutForFrame;
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index e3a03b5..fa60e00 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -317,6 +317,7 @@ QWKPage::QWKPage(WKPageNamespaceRef namespaceRef)
         qt_wk_didFinishDocumentLoadForFrame,
         qt_wk_didFinishLoadForFrame,
         qt_wk_didFailLoadWithErrorForFrame,
+        0, /* didChangeLocationWithinPageForFrame */
         qt_wk_didReceiveTitleForFrame,
         qt_wk_didFirstLayoutForFrame,
         qt_wk_didFirstVisuallyNonEmptyLayoutForFrame,
diff --git a/WebKit2/UIProcess/WebFrameProxy.cpp b/WebKit2/UIProcess/WebFrameProxy.cpp
index d91eb81..6ea4f89 100644
--- a/WebKit2/UIProcess/WebFrameProxy.cpp
+++ b/WebKit2/UIProcess/WebFrameProxy.cpp
@@ -115,6 +115,11 @@ void WebFrameProxy::didFailLoad()
     m_loadState = LoadStateFinished;
 }
 
+void WebFrameProxy::didChangeURLWithoutNavigation(const String& url)
+{
+    m_url = url;
+}
+
 void WebFrameProxy::didReceiveTitle(const String&)
 {
 }
diff --git a/WebKit2/UIProcess/WebFrameProxy.h b/WebKit2/UIProcess/WebFrameProxy.h
index 402fa33..987d340 100644
--- a/WebKit2/UIProcess/WebFrameProxy.h
+++ b/WebKit2/UIProcess/WebFrameProxy.h
@@ -95,6 +95,7 @@ public:
     void didCommitLoad();
     void didFinishLoad();
     void didFailLoad();
+    void didChangeURLWithoutNavigation(const String&); // eg. anchor navigation, session state change.
     void didReceiveTitle(const String&);
 
     void receivedPolicyDecision(WebCore::PolicyAction, uint64_t listenerID);
diff --git a/WebKit2/UIProcess/WebLoaderClient.cpp b/WebKit2/UIProcess/WebLoaderClient.cpp
index d7bdafa..3cd0b00 100644
--- a/WebKit2/UIProcess/WebLoaderClient.cpp
+++ b/WebKit2/UIProcess/WebLoaderClient.cpp
@@ -88,6 +88,14 @@ void WebLoaderClient::didFailLoadWithErrorForFrame(WebPageProxy* page, WebFrameP
     m_client.didFailLoadWithErrorForFrame(toAPI(page), toAPI(frame), toAPI(error), toAPI(userData), m_client.clientInfo);
 }
 
+void WebLoaderClient::didChangeLocationWithinPageForFrame(WebPageProxy* page, WebFrameProxy* frame, APIObject* userData)
+{
+    if (!m_client.didChangeLocationWithinPageForFrame)
+        return;
+
+    m_client.didChangeLocationWithinPageForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
+}
+
 void WebLoaderClient::didReceiveTitleForFrame(WebPageProxy* page, const String& title, WebFrameProxy* frame, APIObject* userData)
 {
     if (!m_client.didReceiveTitleForFrame)
diff --git a/WebKit2/UIProcess/WebLoaderClient.h b/WebKit2/UIProcess/WebLoaderClient.h
index 5be6834..514ccb2 100644
--- a/WebKit2/UIProcess/WebLoaderClient.h
+++ b/WebKit2/UIProcess/WebLoaderClient.h
@@ -52,6 +52,7 @@ public:
     void didFinishDocumentLoadForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
     void didFinishLoadForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
     void didFailLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy*, const WebCore::ResourceError&, APIObject*);
+    void didChangeLocationWithinPageForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
     void didReceiveTitleForFrame(WebPageProxy*, const String&, WebFrameProxy*, APIObject*);
     void didFirstLayoutForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
     void didFirstVisuallyNonEmptyLayoutForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index da6c957..01df04f 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -862,6 +862,19 @@ void WebPageProxy::didFailLoadForFrame(uint64_t frameID, const ResourceError& er
     m_loaderClient.didFailLoadWithErrorForFrame(this, frame, error, userData.get());
 }
 
+void WebPageProxy::didChangeLocationWithinPageForFrame(uint64_t frameID, const String& url, CoreIPC::ArgumentDecoder* arguments)
+{
+    RefPtr<APIObject> userData;
+    WebContextUserMessageDecoder messageDecoder(userData, pageNamespace()->context());
+    if (!arguments->decode(messageDecoder))
+        return;
+
+    WebFrameProxy* frame = process()->webFrame(frameID);
+    frame->didChangeURLWithoutNavigation(url);
+
+    m_loaderClient.didChangeLocationWithinPageForFrame(this, frame, userData.get());
+}
+
 void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 846f30e..fc1fa8c 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -283,6 +283,7 @@ private:
     void didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
     void didFinishLoadForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
     void didFailLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::ArgumentDecoder*);
+    void didChangeLocationWithinPageForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
     void didReceiveTitleForFrame(uint64_t frameID, const String&, CoreIPC::ArgumentDecoder*);
     void didFirstLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, CoreIPC::ArgumentDecoder*);
diff --git a/WebKit2/UIProcess/WebPageProxy.messages.in b/WebKit2/UIProcess/WebPageProxy.messages.in
index 0b33ed9..fa5c8f5 100644
--- a/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -86,6 +86,7 @@ messages -> WebPageProxy {
     DidReceiveTitleForFrame(uint64_t frameID, WTF::String title, WebKit::InjectedBundleUserMessageEncoder userData)
     DidDisplayInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
     DidRunInsecureContentForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData)
+    DidChangeLocationWithinPageForFrame(uint64_t frameID, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
 
     FrameDidBecomeFrameSet(uint64_t frameID, bool value)
 
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
index fb81930..889a3d8 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
@@ -73,6 +73,7 @@ typedef void (*WKBundlePageDidDocumentFinishLoadForFrameCallback)(WKBundlePageRe
 typedef void (*WKBundlePageDidFinishLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidFinishDocumentLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidFailLoadWithErrorForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef error, WKTypeRef* userData, const void *clientInfo);
+typedef void (*WKBundlePageDidChangeLocationWithinPageForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidReceiveTitleForFrameCallback)(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidFirstLayoutForFrame)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidFirstVisuallyNonEmptyLayoutForFrame)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
@@ -83,7 +84,6 @@ typedef void (*WKBundlePageDidRunInsecureContentForFrameCallback)(WKBundlePageRe
 typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleScriptWorldRef world, const void *clientInfo);
 typedef void (*WKBundlePageDidCancelClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
 typedef void (*WKBundlePageWillPerformClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void *clientInfo);
-typedef void (*WKBundlePageDidChangeLocationWithinPageForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
 typedef void (*WKBundlePageDidHandleOnloadEventsForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
 
 
@@ -97,6 +97,7 @@ struct WKBundlePageLoaderClient {
     WKBundlePageDidFinishDocumentLoadForFrameCallback                   didFinishDocumentLoadForFrame;
     WKBundlePageDidFinishLoadForFrameCallback                           didFinishLoadForFrame;
     WKBundlePageDidFailLoadWithErrorForFrameCallback                    didFailLoadWithErrorForFrame;
+    WKBundlePageDidChangeLocationWithinPageForFrameCallback             didChangeLocationWithinPageForFrame;
     WKBundlePageDidReceiveTitleForFrameCallback                         didReceiveTitleForFrame;
     WKBundlePageDidFirstLayoutForFrame                                  didFirstLayoutForFrame;
     WKBundlePageDidFirstVisuallyNonEmptyLayoutForFrame                  didFirstVisuallyNonEmptyLayoutForFrame;
@@ -108,7 +109,6 @@ struct WKBundlePageLoaderClient {
     WKBundlePageDidClearWindowObjectForFrameCallback                    didClearWindowObjectForFrame;
     WKBundlePageDidCancelClientRedirectForFrameCallback                 didCancelClientRedirectForFrame;
     WKBundlePageWillPerformClientRedirectForFrameCallback               willPerformClientRedirectForFrame;
-    WKBundlePageDidChangeLocationWithinPageForFrameCallback             didChangeLocationWithinPageForFrame;
     WKBundlePageDidHandleOnloadEventsForFrameCallback                   didHandleOnloadEventsForFrame;
 };
 typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
index 80c4e78..38e254c 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
@@ -105,6 +105,16 @@ void InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame(WebPage* page,
     userData = adoptRef(toImpl(userDataToPass));
 }
 
+void InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
+{
+    if (!m_client.didChangeLocationWithinPageForFrame)
+        return;
+
+    WKTypeRef userDataToPass = 0;
+    m_client.didChangeLocationWithinPageForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.clientInfo);
+    userData = adoptRef(toImpl(userDataToPass));
+}
+
 void InjectedBundlePageLoaderClient::didReceiveTitleForFrame(WebPage* page, const String& title, WebFrame* frame, RefPtr<APIObject>& userData)
 {
     if (!m_client.didReceiveTitleForFrame)
@@ -145,6 +155,26 @@ void InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy(WebPage* page ,
     userData = adoptRef(toImpl(userDataToPass));
 }
 
+void InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
+{
+    if (!m_client.didDisplayInsecureContentForFrame)
+        return;
+
+    WKTypeRef userDataToPass = 0;
+    m_client.didDisplayInsecureContentForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.clientInfo);
+    userData = adoptRef(toImpl(userDataToPass));
+}
+
+void InjectedBundlePageLoaderClient::didRunInsecureContentForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
+{
+    if (!m_client.didRunInsecureContentForFrame)
+        return;
+
+    WKTypeRef userDataToPass = 0;
+    m_client.didRunInsecureContentForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.clientInfo);
+    userData = adoptRef(toImpl(userDataToPass));
+}
+
 void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, DOMWrapperWorld* world)
 {
     if (!m_client.didClearWindowObjectForFrame)
@@ -169,14 +199,6 @@ void InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame(WebPage*
     m_client.willPerformClientRedirectForFrame(toAPI(page), toAPI(frame), toURLRef(url.impl()), delay, date, m_client.clientInfo);
 }
 
-void InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame(WebPage* page, WebFrame* frame)
-{
-    if (!m_client.didChangeLocationWithinPageForFrame)
-        return;
-
-    m_client.didChangeLocationWithinPageForFrame(toAPI(page), toAPI(frame), m_client.clientInfo);
-}
-
 void InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame(WebPage* page, WebFrame* frame)
 {
     if (!m_client.didHandleOnloadEventsForFrame)
@@ -185,24 +207,4 @@ void InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame(WebPage* page
     m_client.didHandleOnloadEventsForFrame(toAPI(page), toAPI(frame), m_client.clientInfo);
 }
 
-void InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
-{
-    if (!m_client.didDisplayInsecureContentForFrame)
-        return;
-
-    WKTypeRef userDataToPass = 0;
-    m_client.didDisplayInsecureContentForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.clientInfo);
-    userData = adoptRef(toImpl(userDataToPass));
-}
-
-void InjectedBundlePageLoaderClient::didRunInsecureContentForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
-{
-    if (!m_client.didRunInsecureContentForFrame)
-        return;
-
-    WKTypeRef userDataToPass = 0;
-    m_client.didRunInsecureContentForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.clientInfo);
-    userData = adoptRef(toImpl(userDataToPass));
-}
-
 } // namespace WebKit
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
index 6e36581..07c1b6f 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
@@ -51,18 +51,18 @@ public:
     void didFinishDocumentLoadForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
     void didFinishLoadForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
     void didFailLoadWithErrorForFrame(WebPage*, WebFrame*, const WebCore::ResourceError&, RefPtr<APIObject>& userData);
+    void didChangeLocationWithinPageForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
     void didReceiveTitleForFrame(WebPage*, const String&, WebFrame*, RefPtr<APIObject>& userData);
     void didFirstLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
     void didFirstVisuallyNonEmptyLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
     void didRemoveFrameFromHierarchy(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
+    void didDisplayInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
+    void didRunInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
 
     void didClearWindowObjectForFrame(WebPage*, WebFrame*, WebCore::DOMWrapperWorld*);
     void didCancelClientRedirectForFrame(WebPage*, WebFrame*);
     void willPerformClientRedirectForFrame(WebPage*, WebFrame*, const String& url, double delay, double date);
-    void didChangeLocationWithinPageForFrame(WebPage*, WebFrame*);
     void didHandleOnloadEventsForFrame(WebPage*, WebFrame*);
-    void didDisplayInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
-    void didRunInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
 };
 
 } // namespace WebKit
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index 88dd99e..efe9306 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -256,7 +256,7 @@ void WebFrameLoaderClient::dispatchDidCancelClientRedirect()
         return;
 
     // Notify the bundle client.
-    webPage->injectedBundleLoaderClient().didChangeLocationWithinPageForFrame(webPage, m_frame);
+    webPage->injectedBundleLoaderClient().didCancelClientRedirectForFrame(webPage, m_frame);
 }
 
 void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double interval, double fireDate)
@@ -275,8 +275,13 @@ void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage()
     if (!webPage)
         return;
 
+    RefPtr<APIObject> userData;
+
     // Notify the bundle client.
-    webPage->injectedBundleLoaderClient().didChangeLocationWithinPageForFrame(webPage, m_frame);
+    webPage->injectedBundleLoaderClient().didChangeLocationWithinPageForFrame(webPage, m_frame, userData);
+
+    // Notify the UIProcess.
+    webPage->send(Messages::WebPageProxy::DidChangeLocationWithinPageForFrame(m_frame->frameID(), m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchDidPushStateWithinPage()
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index f5c7de9..68ec285 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,37 @@
+2010-12-04  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Jon Honeycutt.
+
+        WebKit2: Need client functions to notify app when the url changes due to a fragment navigation
+        https://bugs.webkit.org/show_bug.cgi?id=50511
+
+        Update tools for new didChangeLocationWithinPageForFrame client function (and changed bundle
+        signature) and added a test for the functionality (PageLoadDidChangeLocationWithinPageForFrame.cpp)
+
+        * MiniBrowser/mac/BrowserWindowController.m:
+        (didChangeLocationWithinPageForFrame):
+        (-[BrowserWindowController awakeFromNib]):
+        (-[BrowserWindowController didChangeLocationWithinPageForFrame:]):
+        * TestWebKitAPI/PlatformUtilities.cpp:
+        (TestWebKitAPI::Util::toWK):
+        * TestWebKitAPI/PlatformUtilities.h:
+        (TestWebKitAPI::Util::adoptWK):
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp: Added.
+        (TestWebKitAPI::nullJavaScriptCallback):
+        (TestWebKitAPI::didFinishLoadForFrame):
+        (TestWebKitAPI::didChangeLocationWithinPageForFrame):
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebKit2/file-with-anchor.html: Added.
+        * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+        * TestWebKitAPI/win/copy-resources.cmd:
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::InjectedBundlePage):
+        (WTR::InjectedBundlePage::didChangeLocationWithinPageForFrame):
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::initialize):
+
 2010-11-08  Antonio Gomes  <agomes at rim.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index e3238af..ed7a5ae 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -38,6 +38,7 @@
 - (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame;
 - (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame;
 - (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame;
+- (void)didChangeLocationWithinPageForFrame:(WKFrameRef)frame;
 @end
 
 @implementation BrowserWindowController
@@ -283,6 +284,11 @@ static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErr
     [(BrowserWindowController *)clientInfo didFailLoadWithErrorForFrame:frame];
 }
 
+static void didChangeLocationWithinPageForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo)
+{
+    [(BrowserWindowController *)clientInfo didChangeLocationWithinPageForFrame:frame];
+}
+
 static void didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, WKTypeRef userData, const void *clientInfo)
 {
     CFStringRef cfTitle = WKStringCopyCFString(0, title);
@@ -548,6 +554,7 @@ static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKF
         didFinishDocumentLoadForFrame,
         didFinishLoadForFrame,
         didFailLoadWithErrorForFrame,
+        didChangeLocationWithinPageForFrame,
         didReceiveTitleForFrame,
         didFirstLayoutForFrame,
         didFirstVisuallyNonEmptyLayoutForFrame,
@@ -672,6 +679,10 @@ static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKF
     [self updateProvisionalURLForFrame:frame];
 }
 
+- (void)didChangeLocationWithinPageForFrame:(WKFrameRef)frame
+{
+}
+
 - (void)didCommitLoadForFrame:(WKFrameRef)frame
 {
 }
diff --git a/WebKitTools/TestWebKitAPI/PlatformUtilities.cpp b/WebKitTools/TestWebKitAPI/PlatformUtilities.cpp
index 23678a0..2353975 100644
--- a/WebKitTools/TestWebKitAPI/PlatformUtilities.cpp
+++ b/WebKitTools/TestWebKitAPI/PlatformUtilities.cpp
@@ -25,8 +25,6 @@
 
 #include "PlatformUtilities.h"
 
-#include <WebKit2/WKRetainPtr.h>
-#include <WebKit2/WebKit2.h>
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/PassOwnArrayPtr.h>
 
@@ -60,5 +58,10 @@ std::string toSTD(WKStringRef string)
     return std::string(buffer.get(), stringLength - 1);
 }
 
+WKRetainPtr<WKStringRef> toWK(const char* utf8String)
+{
+    return WKRetainPtr<WKStringRef>(AdoptWK, WKStringCreateWithUTF8CString(utf8String));
+}
+
 } // namespace Util
 } // namespace TestWebKitAPI
diff --git a/WebKitTools/TestWebKitAPI/PlatformUtilities.h b/WebKitTools/TestWebKitAPI/PlatformUtilities.h
index 0e67dfd..9fecdd5 100644
--- a/WebKitTools/TestWebKitAPI/PlatformUtilities.h
+++ b/WebKitTools/TestWebKitAPI/PlatformUtilities.h
@@ -27,6 +27,7 @@
 #define PlatformUtilities_h
 
 #include <WebKit2/WebKit2.h>
+#include <WebKit2/WKRetainPtr.h>
 #include <string>
 
 namespace TestWebKitAPI {
@@ -44,6 +45,13 @@ WKURLRef URLForNonExistentResource();
 bool isKeyDown(WKNativeEventPtr);
 
 std::string toSTD(WKStringRef string);
+WKRetainPtr<WKStringRef> toWK(const char* utf8String);
+
+
+template<typename T> static inline WKRetainPtr<T> adoptWK(T item)
+{
+    return WKRetainPtr<T>(AdoptWK, item);
+}
 
 } // namespace Util
 } // namespace TestWebKitAPI
diff --git a/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
index 69ce4dc..0aca686 100644
--- a/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
+++ b/WebKitTools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
@@ -14,6 +14,8 @@
 		BC131885117114B600B69727 /* PlatformUtilitiesMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */; };
 		BC131A9B1171316900B69727 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131A9A1171316900B69727 /* main.mm */; };
 		BC131AA9117131FC00B69727 /* TestsController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC131AA8117131FC00B69727 /* TestsController.cpp */; };
+		BC2D004912A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2D004812A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp */; };
+		BC2D006412AA04CE00E732A3 /* file-with-anchor.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = BC2D004A12A9FEB300E732A3 /* file-with-anchor.html */; };
 		BC575A90126E74D3006F0F12 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB9E9F011235BDE00A137E0 /* Cocoa.framework */; };
 		BC575A91126E74D3006F0F12 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA61DB411700EFD00460D1E /* WebKit2.framework */; };
 		BC575A92126E74D3006F0F12 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC90964D1255620C00083756 /* JavaScriptCore.framework */; };
@@ -75,6 +77,7 @@
 				1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */,
 				BC909784125571CF00083756 /* simple.html in Copy Resources */,
 				C01A23F21266156700C9ED55 /* spacebar-scrolling.html in Copy Resources */,
+				BC2D006412AA04CE00E732A3 /* file-with-anchor.html in Copy Resources */,
 			);
 			name = "Copy Resources";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -92,6 +95,8 @@
 		BC131A9A1171316900B69727 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
 		BC131A9E1171317C00B69727 /* TestWebKitAPIPrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestWebKitAPIPrefix.h; sourceTree = "<group>"; };
 		BC131AA8117131FC00B69727 /* TestsController.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = TestsController.cpp; sourceTree = "<group>"; };
+		BC2D004812A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageLoadDidChangeLocationWithinPageForFrame.cpp; sourceTree = "<group>"; };
+		BC2D004A12A9FEB300E732A3 /* file-with-anchor.html */ = {isa = PBXFileReference; explicitFileType = text.html; fileEncoding = 4; path = "file-with-anchor.html"; sourceTree = "<group>"; };
 		BC575946126E7351006F0F12 /* InjectedBundleMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMain.cpp; sourceTree = "<group>"; };
 		BC575980126E74AF006F0F12 /* InjectedBundleTestWebKitAPI.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InjectedBundleTestWebKitAPI.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
 		BC575981126E74AF006F0F12 /* InjectedBundle-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "InjectedBundle-Info.plist"; sourceTree = "<group>"; };
@@ -239,6 +244,7 @@
 				BC575AAC126E83B9006F0F12 /* InjectedBundleBasic.cpp */,
 				BC575AAF126E83C8006F0F12 /* InjectedBundleBasic_Bundle.cpp */,
 				BC909779125571AB00083756 /* PageLoadBasic.cpp */,
+				BC2D004812A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp */,
 				333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */,
 				C02B77F1126612140026BF0F /* SpacebarScrolling.cpp */,
 				BC7B619A1299FE9E00D174A4 /* WKPreferences.cpp */,
@@ -259,6 +265,7 @@
 		BC90977B125571AE00083756 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				BC2D004A12A9FEB300E732A3 /* file-with-anchor.html */,
 				1A02C84B125D4A5E00E3F4BD /* find.html */,
 				BCBD372E125ABBE600D2C29F /* icon.png */,
 				BC909778125571AB00083756 /* simple.html */,
@@ -385,6 +392,7 @@
 				1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */,
 				333B9CE21277F23100FEFCE3 /* PreventEmptyUserAgent.cpp in Sources */,
 				BC7B61AA129A038700D174A4 /* WKPreferences.cpp in Sources */,
+				BC2D004912A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp b/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
new file mode 100644
index 0000000..684cc54
--- /dev/null
+++ b/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "Test.h"
+
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include <WebKit2/WebKit2.h>
+#include <WebKit2/WKRetainPtr.h>
+
+namespace TestWebKitAPI {
+
+static void nullJavaScriptCallback(WKStringRef, WKErrorRef error, void*)
+{
+}
+
+static bool didFinishLoad;
+static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
+{
+    didFinishLoad = true;
+}
+
+static bool didChangeLocationWithinPage;
+static void didChangeLocationWithinPageForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
+{
+    didChangeLocationWithinPage = true;
+}
+
+TEST(WebKit2, PageLoadDidChangeLocationWithinPageForFrame)
+{
+    WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+    WKRetainPtr<WKPageNamespaceRef> pageNamespace(AdoptWK, WKPageNamespaceCreate(context.get()));
+
+    PlatformWebView webView(pageNamespace.get());
+
+    WKPageLoaderClient loaderClient;
+    memset(&loaderClient, 0, sizeof(loaderClient));
+    loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
+    loaderClient.didChangeLocationWithinPageForFrame = didChangeLocationWithinPageForFrame;
+    WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+    WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("file-with-anchor", "html"));
+    WKPageLoadURL(webView.page(), url.get());
+    Util::run(&didFinishLoad);
+
+    WKRetainPtr<WKURLRef> initialURL = Util::adoptWK(WKFrameCopyURL(WKPageGetMainFrame(webView.page())));
+
+    WKPageRunJavaScriptInMainFrame(webView.page(), Util::toWK("clickLink()").get(), 0, nullJavaScriptCallback);
+    Util::run(&didChangeLocationWithinPage);
+
+    WKRetainPtr<WKURLRef> urlAfterAnchorClick = Util::adoptWK(WKFrameCopyURL(WKPageGetMainFrame(webView.page())));
+
+    TEST_ASSERT(!WKURLIsEqual(initialURL.get(), urlAfterAnchorClick.get()));
+}
+
+} // namespace TestWebKitAPI
diff --git a/WebKitTools/TestWebKitAPI/Tests/WebKit2/file-with-anchor.html b/WebKitTools/TestWebKitAPI/Tests/WebKit2/file-with-anchor.html
new file mode 100644
index 0000000..8ea866b
--- /dev/null
+++ b/WebKitTools/TestWebKitAPI/Tests/WebKit2/file-with-anchor.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+  <script>
+    function clickLink()
+    {
+      var evt = document.createEvent("MouseEvent");
+      evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+      var link = document.querySelector('a');
+      link.dispatchEvent(evt);
+    }
+  </script>
+</head>
+<body>
+  <a href="#anchor">Link to anchor</a><br>
+  In between.<br>
+  <span id="anchor">Anchor</span><br>
+  After the anchor.<br>
+  </body>
+</html>
diff --git a/WebKitTools/TestWebKitAPI/win/TestWebKitAPI.vcproj b/WebKitTools/TestWebKitAPI/win/TestWebKitAPI.vcproj
index 28c9c6b..a2412ef 100644
--- a/WebKitTools/TestWebKitAPI/win/TestWebKitAPI.vcproj
+++ b/WebKitTools/TestWebKitAPI/win/TestWebKitAPI.vcproj
@@ -420,6 +420,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\Tests\WebKit2\file-with-anchor.html"
+					>
+				</File>
+				<File
 					RelativePath="..\Tests\WebKit2\Find.cpp"
 					>
 				</File>
@@ -444,6 +448,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\Tests\WebKit2\PageLoadDidChangeLocationWithinPageForFrame.cpp"
+					>
+				</File>
+				<File
 					RelativePath="..\Tests\WebKit2\PreventEmptyUserAgent.cpp"
 					>
 				</File>
diff --git a/WebKitTools/TestWebKitAPI/win/copy-resources.cmd b/WebKitTools/TestWebKitAPI/win/copy-resources.cmd
index a5b8406..4b209d4 100755
--- a/WebKitTools/TestWebKitAPI/win/copy-resources.cmd
+++ b/WebKitTools/TestWebKitAPI/win/copy-resources.cmd
@@ -8,6 +8,7 @@ if "%1" EQU "rebuild" call :clean
 echo Copying resources...
 mkdir 2>NUL "%ResourcesDirectory%"
 for %%f in (
+    ..\Tests\WebKit2\file-with-anchor.html
     ..\Tests\WebKit2\find.html
     ..\Tests\WebKit2\icon.png
     ..\Tests\WebKit2\simple.html
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index d852dd2..5037a74 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -180,6 +180,7 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
         didFinishDocumentLoadForFrame,
         didFinishLoadForFrame,
         didFailLoadWithErrorForFrame,
+        didChangeLocationWithinPageForFrame,
         didReceiveTitleForFrame,
         0,
         0,
@@ -189,7 +190,6 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
         didClearWindowForFrame,
         didCancelClientRedirectForFrame,
         willPerformClientRedirectForFrame,
-        didChangeLocationWithinPageForFrame,
         didHandleOnloadEventsForFrame
     };
     WKBundlePageSetLoaderClient(m_page, &loaderClient);
@@ -302,7 +302,7 @@ void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page,
     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(frame, url, delay, date);
 }
 
-void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
+void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void* clientInfo)
 {
     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChangeLocationWithinPageForFrame(frame);
 }
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index b95744f..6a9ab13 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -60,7 +60,7 @@ private:
     static void didClearWindowForFrame(WKBundlePageRef, WKBundleFrameRef, WKBundleScriptWorldRef, const void*);
     static void didCancelClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     static void willPerformClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef, WKURLRef url, double delay, double date, const void*);
-    static void didChangeLocationWithinPageForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
+    static void didChangeLocationWithinPageForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
     static void didHandleOnloadEventsForFrame(WKBundlePageRef, WKBundleFrameRef, const void*);
     static void didDisplayInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
     static void didRunInsecureContentForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index aa2d47c..8a0c1c4 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -251,6 +251,7 @@ void TestController::initialize(int argc, const char* argv[])
         0, // didFinishDocumentLoadForFrame
         didFinishLoadForFrame,
         0, // didFailLoadWithErrorForFrame
+        0, // didChangeLocationWithinPageForFrame
         0, // didReceiveTitleForFrame
         0, // didFirstLayoutForFrame
         0, // didFirstVisuallyNonEmptyLayoutForFrame

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list