From 868dc9753fc0ec7f22d4bdce84411d6b12b592e0 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Thu, 24 Sep 2009 16:12:12 +0300 Subject: 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 file changed, 8 insertions(+), 8 deletions(-) (limited to 'embed') diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index bb5ce6bb3..ddbfa63a1 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 * -- cgit v1.2.3