diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-08-03 23:30:08 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-08-04 16:28:20 +0800 |
commit | 0943b80b637d3db2934c97b9c77b60f1639ab0ec (patch) | |
tree | 2d380fca92f772df59261617bc5ee1d5fc7e6e82 /embed/ephy-web-view.c | |
parent | 23bdbd4c4889b571a78471b89dc1a680352510d4 (diff) | |
download | gsoc2013-epiphany-0943b80b637d3db2934c97b9c77b60f1639ab0ec.tar gsoc2013-epiphany-0943b80b637d3db2934c97b9c77b60f1639ab0ec.tar.gz gsoc2013-epiphany-0943b80b637d3db2934c97b9c77b60f1639ab0ec.tar.bz2 gsoc2013-epiphany-0943b80b637d3db2934c97b9c77b60f1639ab0ec.tar.lz gsoc2013-epiphany-0943b80b637d3db2934c97b9c77b60f1639ab0ec.tar.xz gsoc2013-epiphany-0943b80b637d3db2934c97b9c77b60f1639ab0ec.tar.zst gsoc2013-epiphany-0943b80b637d3db2934c97b9c77b60f1639ab0ec.zip |
Ignore load status changes after LOAD_FINISHED is emitted
This is a workaround for webkit bug
https://bugs.webkit.org/show_bug.cgi?id=26409.
FIRST_VISUALLY_NON_EMPTY_LAYOUT might be emitted after LOAD_FINISHED, so
we just ignore any status change once LOAD_FINISHED has been set
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 5a6baaa0c..2f6c16935 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -58,6 +58,7 @@ struct _EphyWebViewPrivate { EphyWebViewSecurityLevel security_level; EphyWebViewDocumentType document_type; EphyWebViewNavigationFlags nav_flags; + WebKitLoadStatus load_status; /* Flags */ guint is_blank : 1; @@ -987,6 +988,7 @@ ephy_web_view_init (EphyWebView *web_view) priv->address_expire = EPHY_WEB_VIEW_ADDRESS_EXPIRE_NOW; priv->is_blank = TRUE; + priv->load_status = WEBKIT_LOAD_PROVISIONAL; priv->title = g_strdup (EMPTY_PAGE); priv->document_type = EPHY_WEB_VIEW_DOCUMENT_HTML; priv->security_level = EPHY_WEB_VIEW_STATE_IS_UNKNOWN; @@ -1616,6 +1618,20 @@ ephy_web_view_get_load_status (EphyWebView *view) WebKitLoadStatus status; 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. + */ + if (view->priv->load_status == WEBKIT_LOAD_FINISHED && + status != WEBKIT_LOAD_PROVISIONAL) + return FALSE; + + view->priv->load_status = status; + return status != WEBKIT_LOAD_FINISHED; } |