aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-06-27 19:16:16 +0800
committerXan Lopez <xan@igalia.com>2012-06-27 19:16:16 +0800
commit39931fc51a3a668d04f938fa555bdf9a4abf3056 (patch)
treedbcb06f4b2b4f12d1bc841d9b4bace04a5d7f920 /embed/ephy-web-view.c
parent8118e5fb00fc3514940ce629ca6e1a7aeb5a3b1d (diff)
downloadgsoc2013-epiphany-39931fc51a3a668d04f938fa555bdf9a4abf3056.tar.gz
gsoc2013-epiphany-39931fc51a3a668d04f938fa555bdf9a4abf3056.tar.zst
gsoc2013-epiphany-39931fc51a3a668d04f938fa555bdf9a4abf3056.zip
ephy-web-view: fix anchor links' URI update
Use again notify::uri, but do nothing if we receive it when the page is not loading (ie, before STARTED was reached). This fixes the difference in semantincs between WK1 and WK2.
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index ffd3f68d8..83a89bf94 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1162,15 +1162,17 @@ uri_changed_cb (WebKitWebView *web_view,
GParamSpec *spec,
gpointer data)
{
-#ifdef HAVE_WEBKIT2
- /* TODO: update adress when clicking anchor links. */
-#else
char *uri;
const char *current_address;
g_object_get (web_view, "uri", &uri, NULL);
current_address = ephy_web_view_get_address (EPHY_WEB_VIEW (web_view));
+#ifdef HAVE_WEBKIT2
+ if (!EPHY_WEB_VIEW (web_view)->priv->is_loading)
+ return;
+#endif
+
/* We need to check if we get URI notifications without going
through the usual load process, as this can happen when changing
location within a page */
@@ -1178,7 +1180,6 @@ uri_changed_cb (WebKitWebView *web_view,
ephy_web_view_set_address (EPHY_WEB_VIEW (web_view), uri);
g_free (uri);
-#endif
}
#ifdef HAVE_WEBKIT2