diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-07-14 14:42:02 -0600 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-07-14 14:42:02 -0600 |
commit | bd244b121a20f17e7e3151f601e61133dbf73377 (patch) | |
tree | 14a0995bf89c7fc486380e8976cb593b20f19258 /render/box_construct.c | |
parent | 2e98764cdfabfc41c03bbfdd9ad8279f0281f1dc (diff) | |
parent | 6ab102c3b10b2c5934497b06978e25c656c6e19a (diff) | |
download | netsurf-bd244b121a20f17e7e3151f601e61133dbf73377.tar.gz netsurf-bd244b121a20f17e7e3151f601e61133dbf73377.tar.bz2 |
Merge branch 'vince/forms-fixed'
Conflicts:
Makefile.sources
render/box_construct.c
render/html.c
render/html_internal.h
Merge Daniel Silverstones forms branch
Diffstat (limited to 'render/box_construct.c')
-rw-r--r-- | render/box_construct.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/render/box_construct.c b/render/box_construct.c index c09b40530..5f8b092c5 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -146,25 +146,6 @@ static const struct element_entry element_table[] = { }; #define ELEMENT_TABLE_COUNT (sizeof(element_table) / sizeof(element_table[0])) -static struct form_control *binding_get_control_for_node(void *ctx, dom_node *node) -{ - /** \todo implement properly */ - struct form_control *ctl = form_new_control(node, GADGET_HIDDEN); - if (ctl != NULL) { - ctl->value = strdup(""); - ctl->initial_value = strdup(""); - ctl->name = strdup("foo"); - - if (ctl->value == NULL || ctl->initial_value == NULL || - ctl->name == NULL) { - form_free_control(ctl); - ctl = NULL; - } - } - - return ctl; -} - /** * Construct a box tree from an xml tree and stylesheets. * @@ -963,7 +944,7 @@ bool box_construct_element(struct box_construct_ctx *ctx, /* Special elements */ element = bsearch(dom_string_data(s), element_table, ELEMENT_TABLE_COUNT, sizeof(element_table[0]), - (int (*)(const void *, const void *)) strcmp); + (int (*)(const void *, const void *)) strcasecmp); dom_string_unref(s); @@ -2490,7 +2471,7 @@ bool box_input(BOX_SPECIAL_PARAMS) dom_element_get_attribute(n, kstr_type, &type); - gadget = binding_get_control_for_node(content->parser, n); + gadget = html_forms_get_control_for_node(content->forms, n); if (gadget == NULL) goto no_memory; box->gadget = gadget; @@ -2657,7 +2638,7 @@ bool box_button(BOX_SPECIAL_PARAMS) { struct form_control *gadget; - gadget = binding_get_control_for_node(content->parser, n); + gadget = html_forms_get_control_for_node(content->forms, n); if (!gadget) return false; @@ -2685,7 +2666,7 @@ bool box_select(BOX_SPECIAL_PARAMS) dom_node *next, *next2; dom_exception err; - gadget = binding_get_control_for_node(content->parser, n); + gadget = html_forms_get_control_for_node(content->forms, n); if (gadget == NULL) return false; @@ -2898,7 +2879,7 @@ bool box_textarea(BOX_SPECIAL_PARAMS) size_t len; box->type = BOX_INLINE_BLOCK; - box->gadget = binding_get_control_for_node(content->parser, n); + box->gadget = html_forms_get_control_for_node(content->forms, n); if (box->gadget == NULL) return false; box->gadget->box = box; |