From 62245d13ec60e3c0fc78221f0a8f754f33c2b6a1 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 5 Jan 2004 02:10:59 +0000 Subject: [project @ 2004-01-05 02:10:59 by jmb] Add ability to turn off browser features in build. This may be useful when hunting down bugs. svn path=/import/netsurf/; revision=480 --- render/html.c | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) (limited to 'render/html.c') diff --git a/render/html.c b/render/html.c index 21a428a8d..c7cb76ba3 100644 --- a/render/html.c +++ b/render/html.c @@ -9,6 +9,7 @@ #include #include #include +#include "netsurf/utils/config.h" #include "netsurf/content/content.h" #include "netsurf/content/fetch.h" #include "netsurf/content/fetchcache.h" @@ -202,17 +203,23 @@ void html_convert_css_callback(content_msg msg, struct content *css, c->active--; c->data.html.stylesheet_content[i] = fetchcache( error, c->url, html_convert_css_callback, - c, (void*)i, css->width, css->height, true, 0, 0, false); + c, (void*)i, css->width, css->height, true, 0, 0 +#ifdef WITH_COOKIES + , false +#endif + ); if (c->data.html.stylesheet_content[i] != 0 && c->data.html.stylesheet_content[i]->status != CONTENT_STATUS_DONE) c->active++; break; +#ifdef WITH_AUTH case CONTENT_MSG_AUTH: c->data.html.stylesheet_content[i] = 0; c->active--; c->error = 1; break; +#endif default: assert(0); @@ -273,7 +280,11 @@ void html_find_stylesheets(struct content *c, xmlNode *head) #endif c->url, html_convert_css_callback, - c, 0, c->width, c->height, true, 0, 0, false); + c, 0, c->width, c->height, true, 0, 0 +#ifdef WITH_COOKIES + , false +#endif + ); assert(c->data.html.stylesheet_content[0] != 0); if (c->data.html.stylesheet_content[0]->status != CONTENT_STATUS_DONE) c->active++; @@ -327,7 +338,11 @@ void html_find_stylesheets(struct content *c, xmlNode *head) (i + 1) * sizeof(*c->data.html.stylesheet_content)); c->data.html.stylesheet_content[i] = fetchcache(url, c->url, html_convert_css_callback, c, (void*)i, - c->width, c->height, true, 0, 0, false); + c->width, c->height, true, 0, 0 +#ifdef WITH_COOKIES + , false +#endif + ); if (c->data.html.stylesheet_content[i] && c->data.html.stylesheet_content[i]->status != CONTENT_STATUS_DONE) c->active++; @@ -417,9 +432,13 @@ void html_fetch_object(struct content *c, char *url, struct box *box) c->data.html.object[i].content = fetchcache(url, c->url, html_object_callback, c, (void*)i, c->width, c->height, - true, 0, 0, false); /* we don't know the object's - dimensions yet; use - parent's as an estimate */ + true, 0, 0 +#ifdef WITH_COOKIES + , false +#endif + ); /* we don't know the object's + dimensions yet; use + parent's as an estimate */ if (c->data.html.object[i].content) { c->active++; if (c->data.html.object[i].content->status == CONTENT_STATUS_DONE) @@ -507,7 +526,11 @@ void html_object_callback(content_msg msg, struct content *object, c->data.html.object[i].url = xstrdup(error); c->data.html.object[i].content = fetchcache( error, c->url, html_object_callback, - c, (void*)i, 0, 0, true, 0, 0, false); + c, (void*)i, 0, 0, true, 0, 0 +#ifdef WITH_COOKIES + , false +#endif + ); if (c->data.html.object[i].content) { c->active++; if (c->data.html.object[i].content->status == CONTENT_STATUS_DONE) @@ -519,11 +542,13 @@ void html_object_callback(content_msg msg, struct content *object, case CONTENT_MSG_REFORMAT: break; +#ifdef WITH_AUTH case CONTENT_MSG_AUTH: c->data.html.object[i].content = 0; c->active--; c->error = 1; break; +#endif default: assert(0); @@ -552,7 +577,11 @@ void html_revive(struct content *c, unsigned int width, unsigned int height) c->data.html.object[i].content = fetchcache( c->data.html.object[i].url, c->url, html_object_callback, - c, (void*)i, 0, 0, true, 0, 0, false); + c, (void*)i, 0, 0, true, 0, 0 +#ifdef WITH_COOKIES + , false +#endif + ); if (c->data.html.object[i].content && c->data.html.object[i].content->status != CONTENT_STATUS_DONE) c->active++; -- cgit v1.2.3