[epiphany/in-tab-overview] ephy-web-view: use is_history_frozen() to avoid snapshotting error pages



commit d6125f513dfea81ea57e0156f81a9b7bbd84a043
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Wed Aug 29 18:22:30 2012 +0300

    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.

 embed/ephy-web-view.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 2a417f8..4641e35 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:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]