aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2012-08-21 23:21:57 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2012-08-22 01:00:55 +0800
commitcb6d7aa9349f7b7fbe6456cc49009152a812530b (patch)
treec827a1925d875af9f37b5fcef002b6c2f2f5ccd4 /embed/ephy-web-view.c
parenteab8da2259d5a79d5e892cda83a28cdaef762471 (diff)
downloadgsoc2013-epiphany-cb6d7aa9349f7b7fbe6456cc49009152a812530b.tar
gsoc2013-epiphany-cb6d7aa9349f7b7fbe6456cc49009152a812530b.tar.gz
gsoc2013-epiphany-cb6d7aa9349f7b7fbe6456cc49009152a812530b.tar.bz2
gsoc2013-epiphany-cb6d7aa9349f7b7fbe6456cc49009152a812530b.tar.lz
gsoc2013-epiphany-cb6d7aa9349f7b7fbe6456cc49009152a812530b.tar.xz
gsoc2013-epiphany-cb6d7aa9349f7b7fbe6456cc49009152a812530b.tar.zst
gsoc2013-epiphany-cb6d7aa9349f7b7fbe6456cc49009152a812530b.zip
ephy-web-view: Use webkit_web_view_load_alternate_html() for error pages in WebKit2
webkit_web_view_replace_content() has been removed
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 4862d837e..5dede1aee 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2154,7 +2154,8 @@ load_changed_cb (WebKitWebView *web_view,
restore_zoom_level (view, uri);
/* History. */
- if (!ephy_web_view_is_loading_homepage (view)) {
+ if (!ephy_web_view_is_loading_homepage (view) &&
+ !ephy_web_view_is_history_frozen (view)) {
char *history_uri = NULL;
/* TODO: move the normalization down to the history service? */
@@ -2169,6 +2170,9 @@ load_changed_cb (WebKitWebView *web_view,
g_free (history_uri);
}
+
+ ephy_web_view_thaw_history (view);
+
break;
}
case WEBKIT_LOAD_FINISHED: {
@@ -2521,17 +2525,11 @@ ephy_web_view_load_error_page (EphyWebView *view,
g_free (button_label);
g_free (image_data);
+ /* Make our history backend ignore the next page load, since it will be an error page. */
+ ephy_web_view_freeze_history (view);
#ifdef HAVE_WEBKIT2
- webkit_web_view_replace_content (WEBKIT_WEB_VIEW (view), html->str, uri, 0);
+ webkit_web_view_load_alternate_html (WEBKIT_WEB_VIEW (view), html->str, uri, 0);
#else
- /* Make our history backend ignore the next page load, since it will be an error page.
- *
- * FIXME: at this point error pages in WebKit2 do not trigger load
- * events, so this is only needed for WebKit1. This might (probably
- * will?) change soon, so keep an eye on WebKit2 and change this
- * accordingly.
- */
- ephy_web_view_freeze_history (view);
webkit_web_frame_load_alternate_string (webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view)),
html->str, uri, uri);
#endif