[epiphany] Ignore load status changes after LOAD_FINISHED is emitted
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [epiphany] Ignore load status changes after LOAD_FINISHED is emitted
- Date: Tue, 4 Aug 2009 08:29:02 +0000 (UTC)
commit 0943b80b637d3db2934c97b9c77b60f1639ab0ec
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Mon Aug 3 17:30:08 2009 +0200
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
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 5a6baaa..2f6c169 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]