summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 05:13:31 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 05:13:31 (EDT)
commit39646c040fa98000fbc5d777da543fae41a7a763 (patch)
tree0ddac033eabeefe481bc6e4b1fdd76c885e29057 /src
parentaef05e105fb157d8856863c7858d1ce596bd6f2e (diff)
downloadmarquee-39646c040fa98000fbc5d777da543fae41a7a763.zip
marquee-39646c040fa98000fbc5d777da543fae41a7a763.tar.gz
marquee-39646c040fa98000fbc5d777da543fae41a7a763.tar.bz2
src/tab-chrome.c: Add a comment explaining the previous commit
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 719d362..d99f8bf 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -200,6 +200,13 @@ static void
load_progress_cb(WebKitWebView *web_view,
GParamSpec __attribute__((unused)) *paramspec, MqTabChrome *chrome)
{
+ /*
+ * If loading fails, the WebKitWebView's "estimated-load-progress" is
+ * set to 1.0 after signals like "load-changed" and "load-failed" are
+ * emitted. So the only way to avoid leaving behind a full progress bar
+ * after, for example, canceling a page load is to save a flag on a
+ * failed load and only update the progress bar if the flag is unset.
+ */
if (chrome->load_failed) {
chrome->load_failed = FALSE;
return;