mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
Fix invalidation of unwanted contents.
svn path=/trunk/netsurf/; revision=3214
This commit is contained in:
parent
f261e4426a
commit
9c048ad076
11
css/css.c
11
css/css.c
@ -899,6 +899,17 @@ void css_atimport_callback(content_msg msg, struct content *css,
|
||||
if (css->type != CONTENT_CSS) {
|
||||
content_remove_user(css, css_atimport_callback,
|
||||
(intptr_t) c, i);
|
||||
if (!css->user_list->next) {
|
||||
/* We were only user and we don't
|
||||
* want this content, so stop it
|
||||
* fetching and mark it as having
|
||||
* an error so it gets removed from
|
||||
* the cache next time
|
||||
* content_clean() gets called */
|
||||
fetch_abort(css->fetch);
|
||||
css->fetch = 0;
|
||||
css->status = CONTENT_STATUS_ERROR;
|
||||
}
|
||||
c->data.css.import_content[i] = 0;
|
||||
c->active--;
|
||||
content_add_error(c, "NotCSS", 0);
|
||||
|
@ -897,7 +897,7 @@ void html_convert_css_callback(content_msg msg, struct content *css,
|
||||
content_remove_user(css,
|
||||
html_convert_css_callback,
|
||||
(intptr_t) c, i);
|
||||
if (!css->user_list) {
|
||||
if (!css->user_list->next) {
|
||||
/* we were the only user and we
|
||||
* don't want this content, so
|
||||
* stop it fetching and mark it
|
||||
@ -1144,6 +1144,17 @@ void html_object_callback(content_msg msg, struct content *object,
|
||||
content_broadcast(c, CONTENT_MSG_STATUS, data);
|
||||
content_remove_user(object, html_object_callback,
|
||||
(intptr_t) c, i);
|
||||
if (!object->user_list->next) {
|
||||
/* we were the only user and we
|
||||
* don't want this content, so
|
||||
* stop it fetching and mark it
|
||||
* as having an error so it gets
|
||||
* removed from the cache next time
|
||||
* content_clean() gets called */
|
||||
fetch_abort(object->fetch);
|
||||
object->fetch = 0;
|
||||
object->status = CONTENT_STATUS_ERROR;
|
||||
}
|
||||
html_object_failed(box, c,
|
||||
c->data.html.object[i].background);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user