[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 18:05:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a7fa43769ca8ebdf154453522ae51bacda0e0963
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 7 00:33:18 2010 +0000

    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: http://svn.webkit.org/repository/webkit/trunk@73412 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index f369ff7..0dfaf55 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,57 @@
+2010-12-06  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Generalize didChangeLocationWithinPageForFrame for all same document navigations
+        https://bugs.webkit.org/show_bug.cgi?id=50584
+
+          - 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.
+
 2010-12-06  Jessie Berlin  <jberlin at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebKit2/Shared/API/c/WKPageLoadTypes.h b/WebKit2/Shared/API/c/WKPageLoadTypes.h
new file mode 100644
index 0000000..ec8ae99
--- /dev/null
+++ b/WebKit2/Shared/API/c/WKPageLoadTypes.h
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+
+#ifndef WKPageLoadTypes_h
+#define WKPageLoadTypes_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+    kWKFrameNavigationTypeLinkClicked = 0,
+    kWKFrameNavigationTypeFormSubmitted = 1,
+    kWKFrameNavigationTypeBackForward = 2,
+    kWKFrameNavigationTypeReload = 3,
+    kWKFrameNavigationTypeFormResubmitted = 4,
+    kWKFrameNavigationTypeOther = 5
+};
+typedef uint32_t WKFrameNavigationType;
+
+enum {
+    kWKSameDocumentNavigationAnchorNavigation,
+    kWKSameDocumentNavigationSessionStatePush,
+    kWKSameDocumentNavigationSessionStateReplace,
+    kWKSameDocumentNavigationSessionStatePop
+};
+typedef uint32_t WKSameDocumentNavigationType;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKPageLoadTypes_h */
diff --git a/WebKit2/Shared/API/c/WKSharedAPICast.h b/WebKit2/Shared/API/c/WKSharedAPICast.h
index ae1b273..5047c5d 100644
--- a/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -26,11 +26,13 @@
 #ifndef WKSharedAPICast_h
 #define WKSharedAPICast_h
 
+#include "SameDocumentNavigationType.h"
 #include "WKBase.h"
 #include "WKContextMenuItemTypes.h"
 #include "WKEvent.h"
 #include "WKFindOptions.h"
 #include "WKGeometry.h"
+#include "WKPageLoadTypes.h"
 #include "WebError.h"
 #include "WebEvent.h"
 #include "WebFindOptions.h"
@@ -38,9 +40,10 @@
 #include "WebString.h"
 #include "WebURL.h"
 #include <WebCore/ContextMenuItem.h>
-#include <WebCore/IntRect.h>
 #include <WebCore/FloatRect.h>
+#include <WebCore/FrameLoaderTypes.h>
 #include <WebCore/IntPoint.h>
+#include <WebCore/IntRect.h>
 #include <wtf/TypeTraits.h>
 
 namespace WebKit {
@@ -645,6 +648,56 @@ inline FindOptions toFindOptions(WKFindOptions wkFindOptions)
     return static_cast<FindOptions>(findOptions);
 }
 
+inline WKFrameNavigationType toAPI(WebCore::NavigationType type)
+{
+    WKFrameNavigationType wkType = kWKFrameNavigationTypeOther;
+
+    switch (type) {
+    case WebCore::NavigationTypeLinkClicked:
+        wkType = kWKFrameNavigationTypeLinkClicked;
+        break;
+    case WebCore::NavigationTypeFormSubmitted:
+        wkType = kWKFrameNavigationTypeFormSubmitted;
+        break;
+    case WebCore::NavigationTypeBackForward:
+        wkType = kWKFrameNavigationTypeBackForward;
+        break;
+    case WebCore::NavigationTypeReload:
+        wkType = kWKFrameNavigationTypeReload;
+        break;
+    case WebCore::NavigationTypeFormResubmitted:
+        wkType = kWKFrameNavigationTypeFormResubmitted;
+        break;
+    case WebCore::NavigationTypeOther:
+        wkType = kWKFrameNavigationTypeOther;
+        break;
+    }
+    
+    return wkType;
+}
+
+inline WKSameDocumentNavigationType toAPI(SameDocumentNavigationType type)
+{
+    WKFrameNavigationType wkType = kWKSameDocumentNavigationAnchorNavigation;
+
+    switch (type) {
+    case SameDocumentNavigationAnchorNavigation:
+        wkType = kWKSameDocumentNavigationAnchorNavigation;
+        break;
+    case SameDocumentNavigationSessionStatePush:
+        wkType = kWKSameDocumentNavigationSessionStatePush;
+        break;
+    case SameDocumentNavigationSessionStateReplace:
+        wkType = kWKSameDocumentNavigationSessionStateReplace;
+        break;
+    case SameDocumentNavigationSessionStatePop:
+        wkType = kWKSameDocumentNavigationSessionStatePop;
+        break;
+    }
+    
+    return wkType;
+}
+
 } // namespace WebKit
 
 #endif // WKSharedAPICast_h
diff --git a/WebKit2/Shared/SameDocumentNavigationType.h b/WebKit2/Shared/SameDocumentNavigationType.h
new file mode 100644
index 0000000..41a6fc2
--- /dev/null
+++ b/WebKit2/Shared/SameDocumentNavigationType.h
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+#ifndef SameDocumentNavigationType_h
+#define SameDocumentNavigationType_h
+
+namespace WebKit {
+
+enum SameDocumentNavigationType {
+    SameDocumentNavigationAnchorNavigation,
+    SameDocumentNavigationSessionStatePush,
+    SameDocumentNavigationSessionStateReplace,
+    SameDocumentNavigationSessionStatePop
+};
+
+} // namespace WebKit
+
+#endif // SameDocumentNavigationType_h
diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h
index b4c12b6..4e1e400 100644
--- a/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -32,7 +32,6 @@
 #include "WKPage.h"
 #include "WKPreferencesPrivate.h"
 #include "WKSharedAPICast.h"
-#include <WebCore/FrameLoaderTypes.h>
 
 namespace WebKit {
 
@@ -76,34 +75,6 @@ WK_ADD_API_MAPPING(WKProtectionSpaceRef, WebProtectionSpace)
 
 /* Enum conversions */
 
-inline WKFrameNavigationType toAPI(WebCore::NavigationType type)
-{
-    WKFrameNavigationType wkType = kWKFrameNavigationTypeOther;
-
-    switch (type) {
-    case WebCore::NavigationTypeLinkClicked:
-        wkType = kWKFrameNavigationTypeLinkClicked;
-        break;
-    case WebCore::NavigationTypeFormSubmitted:
-        wkType = kWKFrameNavigationTypeFormSubmitted;
-        break;
-    case WebCore::NavigationTypeBackForward:
-        wkType = kWKFrameNavigationTypeBackForward;
-        break;
-    case WebCore::NavigationTypeReload:
-        wkType = kWKFrameNavigationTypeReload;
-        break;
-    case WebCore::NavigationTypeFormResubmitted:
-        wkType = kWKFrameNavigationTypeFormResubmitted;
-        break;
-    case WebCore::NavigationTypeOther:
-        wkType = kWKFrameNavigationTypeOther;
-        break;
-    }
-    
-    return wkType;
-}
-
 inline CacheModel toCacheModel(WKCacheModel wkCacheModel)
 {
     switch (wkCacheModel) {
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 603108d..e265732 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -31,6 +31,7 @@
 #include <WebKit2/WKFindOptions.h>
 #include <WebKit2/WKGeometry.h>
 #include <WebKit2/WKNativeEvent.h>
+#include <WebKit2/WKPageLoadTypes.h>
 
 #ifndef __cplusplus
 #include <stdbool.h>
@@ -40,16 +41,6 @@
 extern "C" {
 #endif
 
-enum {
-    kWKFrameNavigationTypeLinkClicked = 0,
-    kWKFrameNavigationTypeFormSubmitted = 1,
-    kWKFrameNavigationTypeBackForward = 2,
-    kWKFrameNavigationTypeReload = 3,
-    kWKFrameNavigationTypeFormResubmitted = 4,
-    kWKFrameNavigationTypeOther = 5
-};
-typedef uint32_t WKFrameNavigationType;
-
 // FrameLoad Client
 typedef void (*WKPageDidStartProvisionalLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
@@ -58,7 +49,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 (*WKPageDidSameDocumentNavigationForFrameCallback)(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, 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);
@@ -91,7 +82,7 @@ struct WKPageLoaderClient {
     WKPageDidFinishDocumentLoadForFrameCallback                         didFinishDocumentLoadForFrame;
     WKPageDidFinishLoadForFrameCallback                                 didFinishLoadForFrame;
     WKPageDidFailLoadWithErrorForFrameCallback                          didFailLoadWithErrorForFrame;
-    WKPageDidChangeLocationWithinPageForFrameCallback                   didChangeLocationWithinPageForFrame;
+    WKPageDidSameDocumentNavigationForFrameCallback                     didSameDocumentNavigationForFrame;
     WKPageDidReceiveTitleForFrameCallback                               didReceiveTitleForFrame;
     WKPageDidFirstLayoutForFrameCallback                                didFirstLayoutForFrame;
     WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback                didFirstVisuallyNonEmptyLayoutForFrame;
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index fa60e00..42124d5 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -317,7 +317,7 @@ QWKPage::QWKPage(WKPageNamespaceRef namespaceRef)
         qt_wk_didFinishDocumentLoadForFrame,
         qt_wk_didFinishLoadForFrame,
         qt_wk_didFailLoadWithErrorForFrame,
-        0, /* didChangeLocationWithinPageForFrame */
+        0, /* didSameDocumentNavigationForFrame */
         qt_wk_didReceiveTitleForFrame,
         qt_wk_didFirstLayoutForFrame,
         qt_wk_didFirstVisuallyNonEmptyLayoutForFrame,
diff --git a/WebKit2/UIProcess/WebFrameProxy.cpp b/WebKit2/UIProcess/WebFrameProxy.cpp
index 6ea4f89..9773523 100644
--- a/WebKit2/UIProcess/WebFrameProxy.cpp
+++ b/WebKit2/UIProcess/WebFrameProxy.cpp
@@ -115,7 +115,7 @@ void WebFrameProxy::didFailLoad()
     m_loadState = LoadStateFinished;
 }
 
-void WebFrameProxy::didChangeURLWithoutNavigation(const String& url)
+void WebFrameProxy::didSameDocumentNavigation(const String& url)
 {
     m_url = url;
 }
diff --git a/WebKit2/UIProcess/WebFrameProxy.h b/WebKit2/UIProcess/WebFrameProxy.h
index 987d340..51fc787 100644
--- a/WebKit2/UIProcess/WebFrameProxy.h
+++ b/WebKit2/UIProcess/WebFrameProxy.h
@@ -95,7 +95,7 @@ public:
     void didCommitLoad();
     void didFinishLoad();
     void didFailLoad();
-    void didChangeURLWithoutNavigation(const String&); // eg. anchor navigation, session state change.
+    void didSameDocumentNavigation(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 3cd0b00..1cd51a8 100644
--- a/WebKit2/UIProcess/WebLoaderClient.cpp
+++ b/WebKit2/UIProcess/WebLoaderClient.cpp
@@ -88,12 +88,12 @@ 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)
+void WebLoaderClient::didSameDocumentNavigationForFrame(WebPageProxy* page, WebFrameProxy* frame, SameDocumentNavigationType type, APIObject* userData)
 {
-    if (!m_client.didChangeLocationWithinPageForFrame)
+    if (!m_client.didSameDocumentNavigationForFrame)
         return;
 
-    m_client.didChangeLocationWithinPageForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo);
+    m_client.didSameDocumentNavigationForFrame(toAPI(page), toAPI(frame), toAPI(type), toAPI(userData), m_client.clientInfo);
 }
 
 void WebLoaderClient::didReceiveTitleForFrame(WebPageProxy* page, const String& title, WebFrameProxy* frame, APIObject* userData)
diff --git a/WebKit2/UIProcess/WebLoaderClient.h b/WebKit2/UIProcess/WebLoaderClient.h
index 514ccb2..b736552 100644
--- a/WebKit2/UIProcess/WebLoaderClient.h
+++ b/WebKit2/UIProcess/WebLoaderClient.h
@@ -27,6 +27,7 @@
 #define WebLoaderClient_h
 
 #include "APIClient.h"
+#include "SameDocumentNavigationType.h"
 #include "WKPage.h"
 #include <wtf/Forward.h>
 
@@ -52,7 +53,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 didSameDocumentNavigationForFrame(WebPageProxy*, WebFrameProxy*, SameDocumentNavigationType, 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 01df04f..77b8f2b 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -862,7 +862,7 @@ 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)
+void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t opaqueSameDocumentNavigationType, const String& url, CoreIPC::ArgumentDecoder* arguments)
 {
     RefPtr<APIObject> userData;
     WebContextUserMessageDecoder messageDecoder(userData, pageNamespace()->context());
@@ -870,9 +870,9 @@ void WebPageProxy::didChangeLocationWithinPageForFrame(uint64_t frameID, const S
         return;
 
     WebFrameProxy* frame = process()->webFrame(frameID);
-    frame->didChangeURLWithoutNavigation(url);
+    frame->didSameDocumentNavigation(url);
 
-    m_loaderClient.didChangeLocationWithinPageForFrame(this, frame, userData.get());
+    m_loaderClient.didSameDocumentNavigationForFrame(this, frame, static_cast<SameDocumentNavigationType>(opaqueSameDocumentNavigationType), userData.get());
 }
 
 void WebPageProxy::didReceiveTitleForFrame(uint64_t frameID, const String& title, CoreIPC::ArgumentDecoder* arguments)
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index fc1fa8c..d54109f 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -283,7 +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 didSameDocumentNavigationForFrame(uint64_t frameID, uint32_t sameDocumentNavigationType, 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 fa5c8f5..cfa7b42 100644
--- a/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -86,7 +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)
+    DidSameDocumentNavigationForFrame(uint64_t frameID, uint32_t type, WTF::String url, WebKit::InjectedBundleUserMessageEncoder userData)
 
     FrameDidBecomeFrameSet(uint64_t frameID, bool value)
 
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index c2234d6..0baec05 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -218,6 +218,7 @@ HEADERS += \
     Shared/API/c/WKContextMenuItemTypes.h \
     Shared/API/c/WKGeometry.h \
     Shared/API/c/WKNumber.h \
+    Shared/API/c/WKPageLoadTypes.h \
     Shared/API/c/WKSecurityOrigin.h \
     Shared/API/c/WKSerializedScriptValue.h \
     Shared/API/c/WKSharedAPICast.h \
@@ -241,6 +242,7 @@ HEADERS += \
     Shared/NativeWebKeyboardEvent.h \
     Shared/NotImplemented.h \
     Shared/PlatformPopupMenuData.h \
+    Shared/SameDocumentNavigationType.h \
     Shared/StringPairVector.h \
     Shared/UserMessageCoders.h \
     Shared/VisitedLinkTable.h \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index e46e917..9615ff1 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -327,6 +327,8 @@
 		BC2652171182608100243E12 /* DrawingAreaProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2652131182608100243E12 /* DrawingAreaProxy.h */; };
 		BC2652181182608100243E12 /* ChunkedUpdateDrawingAreaProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2652141182608100243E12 /* ChunkedUpdateDrawingAreaProxy.cpp */; };
 		BC2652191182608100243E12 /* ChunkedUpdateDrawingAreaProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2652151182608100243E12 /* ChunkedUpdateDrawingAreaProxy.h */; };
+		BC2D021712AC41CB00E732A3 /* SameDocumentNavigationType.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2D021612AC41CB00E732A3 /* SameDocumentNavigationType.h */; };
+		BC2D021912AC426C00E732A3 /* WKPageLoadTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2D021812AC426C00E732A3 /* WKPageLoadTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		BC2DFBA312A761A500E732A3 /* WebPreferencesCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2DFBA212A761A500E732A3 /* WebPreferencesCF.cpp */; };
 		BC2E6E871141971500A63B1E /* RunLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2E6E771141970C00A63B1E /* RunLoop.cpp */; };
 		BC2E6E881141971500A63B1E /* RunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2E6E781141970C00A63B1E /* RunLoop.h */; };
@@ -957,6 +959,8 @@
 		BC2652131182608100243E12 /* DrawingAreaProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaProxy.h; sourceTree = "<group>"; };
 		BC2652141182608100243E12 /* ChunkedUpdateDrawingAreaProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChunkedUpdateDrawingAreaProxy.cpp; sourceTree = "<group>"; };
 		BC2652151182608100243E12 /* ChunkedUpdateDrawingAreaProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChunkedUpdateDrawingAreaProxy.h; sourceTree = "<group>"; };
+		BC2D021612AC41CB00E732A3 /* SameDocumentNavigationType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SameDocumentNavigationType.h; sourceTree = "<group>"; };
+		BC2D021812AC426C00E732A3 /* WKPageLoadTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageLoadTypes.h; sourceTree = "<group>"; };
 		BC2DFBA212A761A500E732A3 /* WebPreferencesCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPreferencesCF.cpp; path = cf/WebPreferencesCF.cpp; sourceTree = "<group>"; };
 		BC2E6E771141970C00A63B1E /* RunLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoop.cpp; sourceTree = "<group>"; };
 		BC2E6E781141970C00A63B1E /* RunLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunLoop.h; sourceTree = "<group>"; };
@@ -1512,6 +1516,7 @@
 				BCC57161115ADB42001CCAF9 /* NotImplemented.h */,
 				BCC43AB8127B95DC00317F16 /* PlatformPopupMenuData.cpp */,
 				BCC43AB9127B95DC00317F16 /* PlatformPopupMenuData.h */,
+				BC2D021612AC41CB00E732A3 /* SameDocumentNavigationType.h */,
 				1AAB4A8C1296F0A20023952F /* SandboxExtension.h */,
 				BCBD3C3A125BFA7A00D2C29F /* StringPairVector.h */,
 				BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */,
@@ -2237,6 +2242,7 @@
 				BC4075E4124FF0270068F20A /* WKMutableDictionary.h */,
 				BC4075E5124FF0270068F20A /* WKNumber.cpp */,
 				BC4075E6124FF0270068F20A /* WKNumber.h */,
+				BC2D021812AC426C00E732A3 /* WKPageLoadTypes.h */,
 				F634445A12A885E9000612D8 /* WKSecurityOrigin.cpp */,
 				F634445B12A885E9000612D8 /* WKSecurityOrigin.h */,
 				BC4075E7124FF0270068F20A /* WKSerializedScriptValue.cpp */,
@@ -2619,6 +2625,8 @@
 				512F58FC12A88A5400629530 /* WKProtectionSpace.h in Headers */,
 				F634445612A885C8000612D8 /* WebSecurityOrigin.h in Headers */,
 				F634445D12A885E9000612D8 /* WKSecurityOrigin.h in Headers */,
+				BC2D021712AC41CB00E732A3 /* SameDocumentNavigationType.h in Headers */,
+				BC2D021912AC426C00E732A3 /* WKPageLoadTypes.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
index 889a3d8..b4a028f 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
@@ -29,6 +29,7 @@
 #include <WebKit2/WKBase.h>
 #include <WebKit2/WKEvent.h>
 #include <WebKit2/WKFindOptions.h>
+#include <WebKit2/WKPageLoadTypes.h>
 
 #ifndef __cplusplus
 #include <stdbool.h>
@@ -73,7 +74,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 (*WKBundlePageDidSameDocumentNavigationForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKSameDocumentNavigationType type, 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);
@@ -97,7 +98,7 @@ struct WKBundlePageLoaderClient {
     WKBundlePageDidFinishDocumentLoadForFrameCallback                   didFinishDocumentLoadForFrame;
     WKBundlePageDidFinishLoadForFrameCallback                           didFinishLoadForFrame;
     WKBundlePageDidFailLoadWithErrorForFrameCallback                    didFailLoadWithErrorForFrame;
-    WKBundlePageDidChangeLocationWithinPageForFrameCallback             didChangeLocationWithinPageForFrame;
+    WKBundlePageDidSameDocumentNavigationForFrameCallback               didSameDocumentNavigationForFrame;
     WKBundlePageDidReceiveTitleForFrameCallback                         didReceiveTitleForFrame;
     WKBundlePageDidFirstLayoutForFrame                                  didFirstLayoutForFrame;
     WKBundlePageDidFirstVisuallyNonEmptyLayoutForFrame                  didFirstVisuallyNonEmptyLayoutForFrame;
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
index 38e254c..a02cf8a 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
@@ -105,13 +105,13 @@ void InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame(WebPage* page,
     userData = adoptRef(toImpl(userDataToPass));
 }
 
-void InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
+void InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame(WebPage* page, WebFrame* frame, SameDocumentNavigationType type, RefPtr<APIObject>& userData)
 {
-    if (!m_client.didChangeLocationWithinPageForFrame)
+    if (!m_client.didSameDocumentNavigationForFrame)
         return;
 
     WKTypeRef userDataToPass = 0;
-    m_client.didChangeLocationWithinPageForFrame(toAPI(page), toAPI(frame), &userDataToPass, m_client.clientInfo);
+    m_client.didSameDocumentNavigationForFrame(toAPI(page), toAPI(frame), toAPI(type), &userDataToPass, m_client.clientInfo);
     userData = adoptRef(toImpl(userDataToPass));
 }
 
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
index 07c1b6f..c9bba7c 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
@@ -27,6 +27,7 @@
 #define InjectedBundlePageLoaderClient_h
 
 #include "APIClient.h"
+#include "SameDocumentNavigationType.h"
 #include "WKBundlePage.h"
 #include <JavaScriptCore/JSBase.h>
 #include <wtf/Forward.h>
@@ -51,7 +52,7 @@ 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 didSameDocumentNavigationForFrame(WebPage*, WebFrame*, SameDocumentNavigationType, 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);
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index efe9306..1cd04f1 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -278,25 +278,55 @@ void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage()
     RefPtr<APIObject> userData;
 
     // Notify the bundle client.
-    webPage->injectedBundleLoaderClient().didChangeLocationWithinPageForFrame(webPage, m_frame, userData);
+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationAnchorNavigation, userData);
 
     // Notify the UIProcess.
-    webPage->send(Messages::WebPageProxy::DidChangeLocationWithinPageForFrame(m_frame->frameID(), m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationAnchorNavigation, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchDidPushStateWithinPage()
 {
-    notImplemented();
+    WebPage* webPage = m_frame->page();
+    if (!webPage)
+        return;
+
+    RefPtr<APIObject> userData;
+
+    // Notify the bundle client.
+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStatePush, userData);
+
+    // Notify the UIProcess.
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStatePush, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchDidReplaceStateWithinPage()
 {
-    notImplemented();
+    WebPage* webPage = m_frame->page();
+    if (!webPage)
+        return;
+
+    RefPtr<APIObject> userData;
+
+    // Notify the bundle client.
+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStateReplace, userData);
+
+    // Notify the UIProcess.
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStateReplace, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchDidPopStateWithinPage()
 {
-    notImplemented();
+    WebPage* webPage = m_frame->page();
+    if (!webPage)
+        return;
+
+    RefPtr<APIObject> userData;
+
+    // Notify the bundle client.
+    webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStatePop, userData);
+
+    // Notify the UIProcess.
+    webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStatePop, m_frame->coreFrame()->loader()->url().string(), InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebFrameLoaderClient::dispatchWillClose()
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index ecc85f8..134e6a5 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -479,6 +479,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\Shared\SameDocumentNavigationType.h"
+				>
+			</File>
+			<File
 				RelativePath="..\Shared\StringPairVector.h"
 				>
 			</File>
@@ -758,6 +762,10 @@
 					>
 				</File>
 				<File
+					RelativePath="..\Shared\API\c\WKPageLoadTypes.h"
+					>
+				</File>
+				<File
 					RelativePath="..\Shared\API\c\WKSecurityOrigin.cpp"
 					>
 				</File>
diff --git a/WebKit2/win/WebKit2Generated.make b/WebKit2/win/WebKit2Generated.make
index c1d3894..df7c5c1 100644
--- a/WebKit2/win/WebKit2Generated.make
+++ b/WebKit2/win/WebKit2Generated.make
@@ -21,6 +21,7 @@ all:
     xcopy /y /d "..\Shared\API\c\WKMutableArray.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKMutableDictionary.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKNumber.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
+    xcopy /y /d "..\Shared\API\c\WKPageLoadTypes.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\C\WKSecurityOrigin.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKSerializedScriptValue.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKSerializedScriptValuePrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 67352cd..e6934d5 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,24 @@
+2010-12-06  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Generalize didChangeLocationWithinPageForFrame for all same document navigations
+        https://bugs.webkit.org/show_bug.cgi?id=50584
+
+        * 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):
+
 2010-12-06  Kinuko Yasuda  <kinuko at chromium.org>
 
         Reviewed by Ojan Vafai.
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index ed7a5ae..e015637 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -38,7 +38,7 @@
 - (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame;
 - (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame;
 - (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame;
-- (void)didChangeLocationWithinPageForFrame:(WKFrameRef)frame;
+- (void)didSameDocumentNavigationForFrame:(WKFrameRef)frame;
 @end
 
 @implementation BrowserWindowController
@@ -284,9 +284,9 @@ static void didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErr
     [(BrowserWindowController *)clientInfo didFailLoadWithErrorForFrame:frame];
 }
 
-static void didChangeLocationWithinPageForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo)
+static void didSameDocumentNavigationForFrame(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void *clientInfo)
 {
-    [(BrowserWindowController *)clientInfo didChangeLocationWithinPageForFrame:frame];
+    [(BrowserWindowController *)clientInfo didSameDocumentNavigationForFrame:frame];
 }
 
 static void didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, WKTypeRef userData, const void *clientInfo)
@@ -554,7 +554,7 @@ static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKF
         didFinishDocumentLoadForFrame,
         didFinishLoadForFrame,
         didFailLoadWithErrorForFrame,
-        didChangeLocationWithinPageForFrame,
+        didSameDocumentNavigationForFrame,
         didReceiveTitleForFrame,
         didFirstLayoutForFrame,
         didFirstVisuallyNonEmptyLayoutForFrame,
@@ -679,7 +679,7 @@ static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKF
     [self updateProvisionalURLForFrame:frame];
 }
 
-- (void)didChangeLocationWithinPageForFrame:(WKFrameRef)frame
+- (void)didSameDocumentNavigationForFrame:(WKFrameRef)frame
 {
 }
 
diff --git a/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp b/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
index 684cc54..6313fb0 100644
--- a/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
+++ b/WebKitTools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
@@ -43,8 +43,9 @@ static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
 }
 
 static bool didChangeLocationWithinPage;
-static void didChangeLocationWithinPageForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
+static void didSameDocumentNavigationForFrame(WKPageRef, WKFrameRef, WKSameDocumentNavigationType type, WKTypeRef, const void*)
 {
+    TEST_ASSERT(type == kWKSameDocumentNavigationAnchorNavigation);
     didChangeLocationWithinPage = true;
 }
 
@@ -58,7 +59,7 @@ TEST(WebKit2, PageLoadDidChangeLocationWithinPageForFrame)
     WKPageLoaderClient loaderClient;
     memset(&loaderClient, 0, sizeof(loaderClient));
     loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
-    loaderClient.didChangeLocationWithinPageForFrame = didChangeLocationWithinPageForFrame;
+    loaderClient.didSameDocumentNavigationForFrame = didSameDocumentNavigationForFrame;
     WKPageSetPageLoaderClient(webView.page(), &loaderClient);
 
     WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("file-with-anchor", "html"));
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 5037a74..da79b19 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -180,7 +180,7 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
         didFinishDocumentLoadForFrame,
         didFinishLoadForFrame,
         didFailLoadWithErrorForFrame,
-        didChangeLocationWithinPageForFrame,
+        didSameDocumentNavigationForFrame,
         didReceiveTitleForFrame,
         0,
         0,
@@ -302,9 +302,9 @@ void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page,
     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(frame, url, delay, date);
 }
 
-void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void* clientInfo)
+void InjectedBundlePage::didSameDocumentNavigationForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef*, const void* clientInfo)
 {
-    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didChangeLocationWithinPageForFrame(frame);
+    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didSameDocumentNavigationForFrame(frame, type);
 }
 
 void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo)
@@ -535,7 +535,7 @@ void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef fram
 {
 }
 
-void InjectedBundlePage::didChangeLocationWithinPageForFrame(WKBundleFrameRef frame)
+void InjectedBundlePage::didSameDocumentNavigationForFrame(WKBundleFrameRef frame, WKSameDocumentNavigationType type)
 {
 }
 
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index 6a9ab13..cb1c27b 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, WKTypeRef*, const void*);
+    static void didSameDocumentNavigationForFrame(WKBundlePageRef, WKBundleFrameRef, WKSameDocumentNavigationType, 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*);
@@ -74,7 +74,7 @@ private:
     void didClearWindowForFrame(WKBundleFrameRef, WKBundleScriptWorldRef);
     void didCancelClientRedirectForFrame(WKBundleFrameRef);
     void willPerformClientRedirectForFrame(WKBundleFrameRef, WKURLRef url, double delay, double date);
-    void didChangeLocationWithinPageForFrame(WKBundleFrameRef);
+    void didSameDocumentNavigationForFrame(WKBundleFrameRef, WKSameDocumentNavigationType);
     void didFinishDocumentLoadForFrame(WKBundleFrameRef);
     void didHandleOnloadEventsForFrame(WKBundleFrameRef);
     void didDisplayInsecureContentForFrame(WKBundleFrameRef);
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index 8a0c1c4..547b133 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -251,7 +251,7 @@ void TestController::initialize(int argc, const char* argv[])
         0, // didFinishDocumentLoadForFrame
         didFinishLoadForFrame,
         0, // didFailLoadWithErrorForFrame
-        0, // didChangeLocationWithinPageForFrame
+        0, // didSameDocumentNavigationForFrame
         0, // didReceiveTitleForFrame
         0, // didFirstLayoutForFrame
         0, // didFirstVisuallyNonEmptyLayoutForFrame

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list