summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/box.c13
-rw-r--r--render/html.c1
2 files changed, 14 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)
diff --git a/render/html.c b/render/html.c
index e41a61633..f54939456 100644
--- a/render/html.c
+++ b/render/html.c
@@ -37,6 +37,7 @@ void html_create(struct content *c)
c->data.html.fonts = NULL;
c->data.html.length = 0;
c->data.html.source = xcalloc(0, 1);
+ c->data.html.background_colour = TRANSPARENT;
}