From 72683554b469e55285332b08d459328461c3d7d9 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 7 Jan 2011 12:12:47 +0000 Subject: Only consider a favicon for redraw/done if an event *caused* it to become ready svn path=/trunk/netsurf/; revision=11239 --- render/favicon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'render/favicon.c') diff --git a/render/favicon.c b/render/favicon.c index abab3eb7c..ba9c93f56 100644 --- a/render/favicon.c +++ b/render/favicon.c @@ -10,7 +10,7 @@ * * NetSurf is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License @@ -188,6 +188,7 @@ nserror favicon_callback(hlcache_handle *icon, const hlcache_event *event, void *pw) { struct content *c = pw; + bool consider_redraw = false; switch (event->type) { case CONTENT_MSG_LOADING: @@ -201,6 +202,7 @@ nserror favicon_callback(hlcache_handle *icon, hlcache_handle_release(icon); c->data.html.favicon = NULL; c->active -= 1; + consider_redraw = true; content_add_error(c, "NotFavIco", 0); @@ -213,6 +215,7 @@ nserror favicon_callback(hlcache_handle *icon, break; case CONTENT_MSG_DONE: c->active -= 1; + consider_redraw = true; break; case CONTENT_MSG_ERROR: @@ -224,6 +227,7 @@ nserror favicon_callback(hlcache_handle *icon, content_add_error(c, "?", 0); c->active -= 1; + consider_redraw = true; break; case CONTENT_MSG_STATUS: @@ -241,7 +245,7 @@ nserror favicon_callback(hlcache_handle *icon, assert(0); } - if (c->active == 0) { + if (consider_redraw && (c->active == 0)) { /* all objects have arrived */ content__reformat(c, c->available_width, c->height); html_set_status(c, ""); -- cgit v1.2.3