summaryrefslogtreecommitdiff
path: root/render/box_construct.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/box_construct.c')
-rw-r--r--render/box_construct.c29
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;