summaryrefslogtreecommitdiff
path: root/render/html.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-01-05 02:10:59 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-01-05 02:10:59 +0000
commit62245d13ec60e3c0fc78221f0a8f754f33c2b6a1 (patch)
tree5bbe5b8a63941c2d3b7f71fc53ceedcbc1d92cd6 /render/html.c
parent91e767cdfa11225dd370471892000e107bb06726 (diff)
downloadnetsurf-62245d13ec60e3c0fc78221f0a8f754f33c2b6a1.tar.gz
netsurf-62245d13ec60e3c0fc78221f0a8f754f33c2b6a1.tar.bz2
[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
Diffstat (limited to 'render/html.c')
-rw-r--r--render/html.c45
1 files changed, 37 insertions, 8 deletions
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 <string.h>
#include <strings.h>
#include <stdlib.h>
+#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++;