summaryrefslogtreecommitdiff
path: root/css/css.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-06-10 23:55:23 +0000
committerJames Bursa <james@netsurf-browser.org>2004-06-10 23:55:23 +0000
commitd938fe135b5e0fc5b4c957beac2445ae5e6d54ed (patch)
tree823ec259b37319d7790303c5a7b84528dae52fd6 /css/css.c
parentd58147aa584b8642a94d8c701d18e09252fb85f0 (diff)
downloadnetsurf-d938fe135b5e0fc5b4c957beac2445ae5e6d54ed.tar.gz
netsurf-d938fe135b5e0fc5b4c957beac2445ae5e6d54ed.tar.bz2
[project @ 2004-06-10 23:55:23 by bursa]
Split fetchcache() into fetchcache() and fetchcache_go() to solve problems of callbacks being called before fetchcache() returns. Fix <style> breakage. Error handling fixes & improvements. svn path=/import/netsurf/; revision=957
Diffstat (limited to 'css/css.c')
-rw-r--r--css/css.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/css/css.c b/css/css.c
index 8239d77bf..3072c3a47 100644
--- a/css/css.c
+++ b/css/css.c
@@ -560,19 +560,15 @@ void css_atimport(struct content *c, struct css_node *node)
c->data.css.import_count++;
i = c->data.css.import_count - 1;
c->data.css.import_url[i] = url1;
- c->data.css.import_content[i] = fetchcache(
- c->data.css.import_url[i], c->url, css_atimport_callback,
- c, (void*)i, c->width, c->height, true
-#ifdef WITH_POST
- , 0, 0
-#endif
-#ifdef WITH_COOKIES
- , false
-#endif
- );
- if (c->data.css.import_content[i] &&
- c->data.css.import_content[i]->status != CONTENT_STATUS_DONE)
+ c->data.css.import_content[i] = fetchcache(c->data.css.import_url[i],
+ css_atimport_callback, c, (void *) i,
+ c->width, c->height, true, 0, 0, false);
+ if (c->data.css.import_content[i]) {
c->active++;
+ fetchcache_go(c->data.css.import_content[i], c->url,
+ css_atimport_callback, c, (void *) i,
+ 0, 0, false);
+ }
free(url);
}
@@ -625,18 +621,17 @@ void css_atimport_callback(content_msg msg, struct content *css,
return;
}
c->data.css.import_content[i] = fetchcache(
- c->data.css.import_url[i], c->url, css_atimport_callback,
- c, (void*)i, css->width, css->height, true
-#ifdef WITH_POST
- , 0, 0
-#endif
-#ifdef WITH_COOKIES
- , false
-#endif
- );
- if (c->data.css.import_content[i] &&
- c->data.css.import_content[i]->status != CONTENT_STATUS_DONE)
+ c->data.css.import_url[i],
+ css_atimport_callback, c, (void *) i,
+ css->width, css->height, true, 0, 0,
+ false);
+ if (c->data.css.import_content[i]) {
c->active++;
+ fetchcache_go(c->data.css.import_content[i],
+ c->url, css_atimport_callback,
+ c, (void *) i,
+ 0, 0, false);
+ }
break;
default: