From cdf0601420e087afd14aabca4b00224b59f0660a Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 30 Aug 2003 21:45:03 +0000 Subject: [project @ 2003-08-30 21:45:03 by bursa] Make page background colour work properly. svn path=/import/netsurf/; revision=263 --- render/box.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'render/box.c') 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) -- cgit v1.2.3