diff options
author | Xan Lopez <xan@gnome.org> | 2009-09-24 21:12:12 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-09-24 21:13:23 +0800 |
commit | 868dc9753fc0ec7f22d4bdce84411d6b12b592e0 (patch) | |
tree | 980d24d40b758609157078bd61ea5c2b62352588 /embed | |
parent | 3a81e065d1f9f771778cb05c96ffa7ac7afe8a1a (diff) | |
download | gsoc2013-epiphany-868dc9753fc0ec7f22d4bdce84411d6b12b592e0.tar.gz gsoc2013-epiphany-868dc9753fc0ec7f22d4bdce84411d6b12b592e0.tar.zst gsoc2013-epiphany-868dc9753fc0ec7f22d4bdce84411d6b12b592e0.zip |
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.
Diffstat (limited to 'embed')
-rw-r--r-- | 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 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 * |