[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
kov at webkit.org
kov at webkit.org
Tue Jan 5 23:56:34 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit efcc05179b9ec8c49366e5823d5cc0efe19c6e83
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Dec 20 18:07:35 2009 +0000
2009-12-20 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
Make sure we get the URI that is being loaded when updating
WebKitWebFrame's knowledge of it. This was causing problems now
that page cache is enabled.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidCommitLoad):
* tests/testloading.c:
(load_goback_status_changed_cb):
(load_wentback_status_changed_cb):
(test_loading_goback):
(main):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index ee7f2a8..8fb3b71 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-20 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Make sure we get the URI that is being loaded when updating
+ WebKitWebFrame's knowledge of it. This was causing problems now
+ that page cache is enabled.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
+ * tests/testloading.c:
+ (load_goback_status_changed_cb):
+ (load_wentback_status_changed_cb):
+ (test_loading_goback):
+ (main):
+
2009-12-20 Alejandro G. Castro <alex at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index a2e3ca7..1a3267b 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -741,7 +741,7 @@ void FrameLoaderClient::dispatchDidCommitLoad()
WebKitWebFramePrivate* priv = m_frame->priv;
g_free(priv->uri);
- priv->uri = g_strdup(core(m_frame)->loader()->url().prettyURL().utf8().data());
+ priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().prettyURL().utf8().data());
g_free(priv->title);
priv->title = NULL;
g_object_notify(G_OBJECT(m_frame), "uri");
diff --git a/WebKit/gtk/tests/testloading.c b/WebKit/gtk/tests/testloading.c
index c1f0fac..8838d7b 100644
--- a/WebKit/gtk/tests/testloading.c
+++ b/WebKit/gtk/tests/testloading.c
@@ -220,6 +220,84 @@ static void test_loading_cancelled(WebLoadingFixture* fixture, gconstpointer dat
g_main_loop_run(fixture->loop);
}
+static void load_goback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+ WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+
+ switch(status) {
+ case WEBKIT_LOAD_PROVISIONAL:
+ g_assert(!fixture->has_been_provisional);
+ fixture->has_been_provisional = TRUE;
+ break;
+ case WEBKIT_LOAD_COMMITTED:
+ g_assert(fixture->has_been_provisional);
+ fixture->has_been_committed = TRUE;
+ break;
+ case WEBKIT_LOAD_FAILED:
+ g_assert_not_reached();
+ break;
+ case WEBKIT_LOAD_FINISHED:
+ g_assert(fixture->has_been_provisional);
+ g_assert(fixture->has_been_committed);
+ fixture->has_been_finished = TRUE;
+ g_main_loop_quit(fixture->loop);
+ break;
+ default:
+ break;
+ }
+}
+
+static void load_wentback_status_changed_cb(GObject* object, GParamSpec* pspec, WebLoadingFixture* fixture)
+{
+ WebKitLoadStatus status = webkit_web_view_get_load_status(WEBKIT_WEB_VIEW(object));
+
+ switch(status) {
+ case WEBKIT_LOAD_PROVISIONAL:
+ g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, "http://www.debian.org/distrib/");
+ break;
+ case WEBKIT_LOAD_COMMITTED:
+ g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, "http://www.debian.org/");
+ break;
+ case WEBKIT_LOAD_FAILED:
+ g_assert_not_reached();
+ break;
+ case WEBKIT_LOAD_FINISHED:
+ g_assert_cmpstr(webkit_web_view_get_uri(fixture->webView), ==, "http://www.debian.org/");
+ g_main_loop_quit(fixture->loop);
+ break;
+ default:
+ break;
+ }
+}
+
+static void test_loading_goback(WebLoadingFixture* fixture, gconstpointer data)
+{
+ g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_goback_status_changed_cb), fixture);
+
+ webkit_web_view_load_uri(fixture->webView, "http://www.debian.org/");
+ g_main_loop_run(fixture->loop);
+
+ fixture->has_been_provisional = FALSE;
+ fixture->has_been_committed = FALSE;
+ fixture->has_been_first_visually_non_empty_layout = FALSE;
+ fixture->has_been_finished = FALSE;
+ fixture->has_been_failed = FALSE;
+ fixture->has_been_load_error = FALSE;
+
+ webkit_web_view_load_uri(fixture->webView, "http://debian.org/distrib/");
+ g_main_loop_run(fixture->loop);
+
+ fixture->has_been_provisional = FALSE;
+ fixture->has_been_committed = FALSE;
+ fixture->has_been_first_visually_non_empty_layout = FALSE;
+ fixture->has_been_finished = FALSE;
+ fixture->has_been_failed = FALSE;
+ fixture->has_been_load_error = FALSE;
+
+ g_signal_connect(fixture->webView, "notify::load-status", G_CALLBACK(load_wentback_status_changed_cb), fixture);
+ webkit_web_view_go_back(fixture->webView);
+}
+
int main(int argc, char** argv)
{
g_thread_init(NULL);
@@ -241,6 +319,11 @@ int main(int argc, char** argv)
web_loading_fixture_setup,
test_loading_cancelled,
web_loading_fixture_teardown);
+ g_test_add("/webkit/loading/goback",
+ WebLoadingFixture, NULL,
+ web_loading_fixture_setup,
+ test_loading_goback,
+ web_loading_fixture_teardown);
return g_test_run();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list