[epiphany] ephy-web-view.c: take into account FAILED status for is_loading



commit 868dc9753fc0ec7f22d4bdce84411d6b12b592e0
Author: Xan Lopez <xan gnome org>
Date:   Thu Sep 24 16:12:12 2009 +0300

    ephy-web-view.c: take into account FAILED status for is_loading
    
    When a page fails to load (for example, when the user cancels it) it
    won't go through the FINISHED state, which is the only one we are
    taking into account to decide if a page is still loading. Use the new
    WEBKIT_LOAD_FAILED status (WebKitGTK+ r48719) too.

 embed/ephy-web-view.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index bb5ce6b..ddbfa63 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1689,20 +1689,20 @@ ephy_web_view_is_loading (EphyWebView *view)
 
   status = webkit_web_view_get_load_status (WEBKIT_WEB_VIEW (view));
 
-  /* Workaround for webkit bug: https://bugs.webkit.org/show_bug.cgi?id=26409
-   * FIRST_VISUALLY_NON_EMPTY_LAYOUT might be emitted
-   * after LOAD_FINISHED. We just ignore any status
-   * other than WEBKIT_LOAD_PROVISIONAL once LOAD_FINISHED
-   * has been set, as WEBKIT_LOAD_PROVISIONAL probably means
-   * that webview has been reloaded.
+  /* FIRST_VISUALLY_NON_EMPTY_LAYOUT might be emitted after
+   * LOAD_FINISHED or LOAD_FAILED. We just ignore any status other
+   * than WEBKIT_LOAD_PROVISIONAL once LOAD_FINISHED or LOAD_FAILED
+   * have been set, as WEBKIT_LOAD_PROVISIONAL probably means that
+   * webview has started a new load.
    */
-  if (view->priv->load_status == WEBKIT_LOAD_FINISHED &&
+  if ((view->priv->load_status == WEBKIT_LOAD_FINISHED ||
+       view->priv->load_status == WEBKIT_LOAD_FAILED) &&
       status != WEBKIT_LOAD_PROVISIONAL)
     return FALSE;
 
   view->priv->load_status = status;
 
-  return status != WEBKIT_LOAD_FINISHED;
+  return status != WEBKIT_LOAD_FINISHED && status != WEBKIT_LOAD_FAILED;
 }
 
 const char *



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