summaryrefslogtreecommitdiff
path: root/css
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-03-19 00:04:09 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-03-19 00:04:09 +0000
commit9c048ad076267066cbe89c0bb6218d637a92349b (patch)
tree4f026602c728f112714c2993ac3760242e2fcf7a /css
parentf261e4426a017d01ae0203dfd45d6931b1a5fed4 (diff)
downloadnetsurf-9c048ad076267066cbe89c0bb6218d637a92349b.tar.gz
netsurf-9c048ad076267066cbe89c0bb6218d637a92349b.tar.bz2
Fix invalidation of unwanted contents.
svn path=/trunk/netsurf/; revision=3214
Diffstat (limited to 'css')
-rw-r--r--css/css.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/css/css.c b/css/css.c
index 45181e71c..ecc2e16ba 100644
--- a/css/css.c
+++ b/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);