From cd6ce1339ff4e259aaef71eb160b14081fed312b Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 20 Mar 2004 21:56:43 +0000 Subject: [project @ 2004-03-20 21:56:43 by jmb] Render svn path=/import/netsurf/; revision=638 --- render/box.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/render/box.c b/render/box.c index 6fdf26416..e1dbdcce8 100644 --- a/render/box.c +++ b/render/box.c @@ -1100,6 +1100,26 @@ struct result box_input(xmlNode *n, struct status *status, box_add_child(inline_container, inline_box); box_add_child(box, inline_container); } + else if (stricmp(type, "button") == 0) + { + struct result result = box_button(n, status, style); + struct box *inline_container, *inline_box; + box = result.box; + inline_container = box_create(0, 0, 0, + status->content->data.html.box_pool); + inline_container->type = BOX_INLINE_CONTAINER; + inline_box = box_create(style, 0, 0, + status->content->data.html.box_pool); + inline_box->type = BOX_INLINE; + inline_box->style_clone = 1; + if ((s = (char *) xmlGetProp(n, (const xmlChar *) "value"))) { + inline_box->text = s; + } + inline_box->length = strlen(inline_box->text); + inline_box->font = font_open(status->content->data.html.fonts, style); + box_add_child(inline_container, inline_box); + box_add_child(box, inline_container); + } else if (stricmp(type, "image") == 0) { box = box_create(style, NULL, 0, -- cgit v1.2.3