summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-08-30 21:45:03 +0000
committerJames Bursa <james@netsurf-browser.org>2003-08-30 21:45:03 +0000
commitcdf0601420e087afd14aabca4b00224b59f0660a (patch)
tree6103c98ee4b2b4c3b701077e761a4a868d093646 /render/box.c
parenta842b765fa72584629d98e40fa47645810bc1f20 (diff)
downloadnetsurf-cdf0601420e087afd14aabca4b00224b59f0660a.tar.gz
netsurf-cdf0601420e087afd14aabca4b00224b59f0660a.tar.bz2
[project @ 2003-08-30 21:45:03 by bursa]
Make page background colour work properly. svn path=/import/netsurf/; revision=263
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/render/box.c b/render/box.c
index 27a017930..256b5c0bf 100644
--- a/render/box.c
+++ b/render/box.c
@@ -56,6 +56,8 @@ static struct css_style * box_get_style(struct content ** stylesheet,
xmlNode * n, struct css_selector * selector, unsigned int depth);
static struct result box_a(xmlNode *n, struct status *status,
struct css_style *style);
+static struct result box_body(xmlNode *n, struct status *status,
+ struct css_style *style);
static struct result box_image(xmlNode *n, struct status *status,
struct css_style *style);
static struct result box_form(xmlNode *n, struct status *status,
@@ -99,6 +101,7 @@ struct element_entry {
static const struct element_entry element_table[] = {
{"a", box_a},
{"applet", box_applet},
+ {"body", box_body},
{"embed", box_embed},
{"form", box_form},
{"iframe", box_iframe},
@@ -573,6 +576,15 @@ struct result box_a(xmlNode *n, struct status *status,
return (struct result) {box, 1};
}
+struct result box_body(xmlNode *n, struct status *status,
+ struct css_style *style)
+{
+ struct box *box;
+ status->content->data.html.background_colour = style->background_color;
+ box = box_create(style, status->href, status->title);
+ return (struct result) {box, 1};
+}
+
struct result box_image(xmlNode *n, struct status *status,
struct css_style *style)
{
@@ -1347,6 +1359,7 @@ void box_free_box(struct box *box)
free(box->text);
xmlFree(box->title);
+ free(box->col);
/* only free href if we're the top most user */
/*if (box->href != 0)