From 39646c040fa98000fbc5d777da543fae41a7a763 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 17 Sep 2017 05:13:31 -0400 Subject: src/tab-chrome.c: Add a comment explaining the previous commit --- 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; -- cgit v0.9.1