aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-08-29 23:22:30 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-01 02:34:02 +0800
commita23f1d8e71f93ae1b28697039c71578a4d239a30 (patch)
treea3054231ac2f5dee2270f86ebec14c5679460f2b
parentea9fb4c74223c01a278e6e414c72cc4fdc089c30 (diff)
downloadgsoc2013-epiphany-a23f1d8e71f93ae1b28697039c71578a4d239a30.tar
gsoc2013-epiphany-a23f1d8e71f93ae1b28697039c71578a4d239a30.tar.gz
gsoc2013-epiphany-a23f1d8e71f93ae1b28697039c71578a4d239a30.tar.bz2
gsoc2013-epiphany-a23f1d8e71f93ae1b28697039c71578a4d239a30.tar.lz
gsoc2013-epiphany-a23f1d8e71f93ae1b28697039c71578a4d239a30.tar.xz
gsoc2013-epiphany-a23f1d8e71f93ae1b28697039c71578a4d239a30.tar.zst
gsoc2013-epiphany-a23f1d8e71f93ae1b28697039c71578a4d239a30.zip
ephy-web-view: use is_history_frozen() to avoid snapshotting error pages
Since this is used to freeze the history when an error page is being loaded, we can rely on it. Since the snapshots are taken in the FINISHED state, move the call to thaw after that.
-rw-r--r--embed/ephy-web-view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 2a417f883..4641e351b 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2342,7 +2342,6 @@ load_status_cb (WebKitWebView *web_view,
g_free (history_uri);
}
- ephy_web_view_thaw_history (view);
break;
}
case WEBKIT_LOAD_FINISHED: {
@@ -2396,8 +2395,11 @@ load_status_cb (WebKitWebView *web_view,
/* Reset visit type. */
priv->visit_type = EPHY_PAGE_VISIT_NONE;
- g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) web_view_check_snapshot, web_view, NULL);
+ if (!ephy_web_view_is_history_frozen (view)) {
+ priv->snapshot_idle_id = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) web_view_check_snapshot, web_view, NULL);
+ }
+ ephy_web_view_thaw_history (view);
break;
}
case WEBKIT_LOAD_FAILED: