diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-20 21:56:43 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-20 21:56:43 +0000 |
commit | cd6ce1339ff4e259aaef71eb160b14081fed312b (patch) | |
tree | 03547d34a3c15b99570306d2e265b302ad3983a2 /render/box.c | |
parent | a33ede3c921d16ceb11eb161e96fdad89bae8d25 (diff) | |
download | netsurf-cd6ce1339ff4e259aaef71eb160b14081fed312b.tar.gz netsurf-cd6ce1339ff4e259aaef71eb160b14081fed312b.tar.bz2 |
[project @ 2004-03-20 21:56:43 by jmb]
Render <input type="button" ...>
svn path=/import/netsurf/; revision=638
Diffstat (limited to 'render/box.c')
-rw-r--r-- | render/box.c | 20 |
1 files changed, 20 insertions, 0 deletions
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, |