Only consider a favicon for redraw/done if an event *caused* it to become ready
svn path=/trunk/netsurf/; revision=11239
This commit is contained in:
parent
68f8fa1059
commit
72683554b4
|
@ -188,6 +188,7 @@ nserror favicon_callback(hlcache_handle *icon,
|
||||||
const hlcache_event *event, void *pw)
|
const hlcache_event *event, void *pw)
|
||||||
{
|
{
|
||||||
struct content *c = pw;
|
struct content *c = pw;
|
||||||
|
bool consider_redraw = false;
|
||||||
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case CONTENT_MSG_LOADING:
|
case CONTENT_MSG_LOADING:
|
||||||
|
@ -201,6 +202,7 @@ nserror favicon_callback(hlcache_handle *icon,
|
||||||
hlcache_handle_release(icon);
|
hlcache_handle_release(icon);
|
||||||
c->data.html.favicon = NULL;
|
c->data.html.favicon = NULL;
|
||||||
c->active -= 1;
|
c->active -= 1;
|
||||||
|
consider_redraw = true;
|
||||||
|
|
||||||
content_add_error(c, "NotFavIco", 0);
|
content_add_error(c, "NotFavIco", 0);
|
||||||
|
|
||||||
|
@ -213,6 +215,7 @@ nserror favicon_callback(hlcache_handle *icon,
|
||||||
break;
|
break;
|
||||||
case CONTENT_MSG_DONE:
|
case CONTENT_MSG_DONE:
|
||||||
c->active -= 1;
|
c->active -= 1;
|
||||||
|
consider_redraw = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CONTENT_MSG_ERROR:
|
case CONTENT_MSG_ERROR:
|
||||||
|
@ -224,6 +227,7 @@ nserror favicon_callback(hlcache_handle *icon,
|
||||||
content_add_error(c, "?", 0);
|
content_add_error(c, "?", 0);
|
||||||
|
|
||||||
c->active -= 1;
|
c->active -= 1;
|
||||||
|
consider_redraw = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CONTENT_MSG_STATUS:
|
case CONTENT_MSG_STATUS:
|
||||||
|
@ -241,7 +245,7 @@ nserror favicon_callback(hlcache_handle *icon,
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->active == 0) {
|
if (consider_redraw && (c->active == 0)) {
|
||||||
/* all objects have arrived */
|
/* all objects have arrived */
|
||||||
content__reformat(c, c->available_width, c->height);
|
content__reformat(c, c->available_width, c->height);
|
||||||
html_set_status(c, "");
|
html_set_status(c, "");
|
||||||
|
|
Loading…
Reference in New Issue