aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-09-26 14:28:50 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-09-27 17:43:43 +0800
commit7f170008834107468882edfd29c872310506d9fd (patch)
tree19b43a4a18cfce8cfb061c7155db80140e22c547 /embed
parent3ad970f76f2ede63152cdfd3b5c882aa80aad3cc (diff)
downloadgsoc2013-epiphany-7f170008834107468882edfd29c872310506d9fd.tar
gsoc2013-epiphany-7f170008834107468882edfd29c872310506d9fd.tar.gz
gsoc2013-epiphany-7f170008834107468882edfd29c872310506d9fd.tar.bz2
gsoc2013-epiphany-7f170008834107468882edfd29c872310506d9fd.tar.lz
gsoc2013-epiphany-7f170008834107468882edfd29c872310506d9fd.tar.xz
gsoc2013-epiphany-7f170008834107468882edfd29c872310506d9fd.tar.zst
gsoc2013-epiphany-7f170008834107468882edfd29c872310506d9fd.zip
ephy-web-view: Use webkit_web_view_is_loading() in WebKit2
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 453789ca1..0d44ea9a8 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -76,9 +76,6 @@ struct _EphyWebViewPrivate {
guint is_blank : 1;
guint visibility : 1;
guint is_setting_zoom : 1;
-#ifdef HAVE_WEBKIT2
- guint is_loading : 1;
-#endif
guint load_failed : 1;
guint history_frozen : 1;
@@ -1238,7 +1235,11 @@ uri_changed_cb (WebKitWebView *web_view,
const char *current_address;
#ifdef HAVE_WEBKIT2
- if (!EPHY_WEB_VIEW (web_view)->priv->is_loading)
+ /* We already update the URI manually while loading, so only
+ * update the URI when it changes after the page has been loaded
+ * which is usually the result of navigation within the same page action.
+ */
+ if (webkit_web_view_is_loading (web_view))
return;
#endif
@@ -2134,7 +2135,6 @@ load_changed_cb (WebKitWebView *web_view,
case WEBKIT_LOAD_STARTED: {
const char *loading_uri = NULL;
- priv->is_loading = TRUE;
priv->load_failed = FALSE;
loading_uri = webkit_web_view_get_uri (web_view);
@@ -2206,8 +2206,6 @@ load_changed_cb (WebKitWebView *web_view,
case WEBKIT_LOAD_FINISHED: {
SoupURI *uri;
- priv->is_loading = FALSE;
-
g_free (priv->status_message);
priv->status_message = NULL;
g_object_notify (object, "status-message");
@@ -3268,7 +3266,7 @@ gboolean
ephy_web_view_is_loading (EphyWebView *view)
{
#ifdef HAVE_WEBKIT2
- return view->priv->is_loading;
+ return webkit_web_view_is_loading (WEBKIT_WEB_VIEW (view));
#else
WebKitLoadStatus status;