aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-14 19:48:23 +0800
committerXan Lopez <xan@igalia.com>2012-03-14 19:48:23 +0800
commit1b941be52d0ed9ec90036efe4987740076c501a2 (patch)
treea4dd0fcbf6d55f215df06043641d5218209b873f /embed/ephy-web-view.c
parent6f220733c22c7c2f04ba8894a470ba7b7c64d8bd (diff)
downloadgsoc2013-epiphany-1b941be52d0ed9ec90036efe4987740076c501a2.tar.gz
gsoc2013-epiphany-1b941be52d0ed9ec90036efe4987740076c501a2.tar.zst
gsoc2013-epiphany-1b941be52d0ed9ec90036efe4987740076c501a2.zip
ephy-web-view: move history management to EphyWebView
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 55aa51d44..47f7c0b24 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1936,12 +1936,14 @@ load_status_cb (WebKitWebView *web_view,
const gchar* uri;
EphyWebViewSecurityLevel security_level;
+ /* Title and location. */
uri = webkit_web_view_get_uri (web_view);
ephy_web_view_location_changed (view,
uri);
ephy_web_view_set_title (view, NULL);
+ /* Security status. */
if (uri && g_str_has_prefix (uri, "https")) {
WebKitWebFrame *frame;
WebKitWebDataSource *source;
@@ -1963,7 +1965,25 @@ load_status_cb (WebKitWebView *web_view,
ephy_web_view_set_security_level (EPHY_WEB_VIEW (web_view), security_level);
+ /* Zoom level. */
restore_zoom_level (view, uri);
+
+ /* History. */
+ if (!ephy_web_view_is_loading_homepage (view)) {
+ char *history_uri = NULL;
+
+ /* TODO: move the normalization down to the history service? */
+ if (g_str_has_prefix (uri, EPHY_ABOUT_SCHEME))
+ history_uri = g_strdup_printf ("about:%s", uri + EPHY_ABOUT_SCHEME_LEN + 1);
+ else
+ history_uri = g_strdup (uri);
+
+ ephy_history_service_visit_url (priv->history_service,
+ history_uri,
+ priv->visit_type);
+
+ g_free (history_uri);
+ }
}
break;
case WEBKIT_LOAD_FINISHED: {