From 6d600214268e64e6bc83df61d8abfdf8963acdad Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 27 Jan 2016 12:14:12 +0000 Subject: Split out tag names from general string table and enum. Previously these were mixed in the the document's general memoised strings. This also gives us an enum by which HTML elements can be identified. --- src/html/html_form_element.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/html/html_form_element.c') diff --git a/src/html/html_form_element.c b/src/html/html_form_element.c index 0606ba6..ee62c02 100644 --- a/src/html/html_form_element.c +++ b/src/html/html_form_element.c @@ -70,8 +70,8 @@ dom_exception _dom_html_form_element_initialise(struct dom_html_document *doc, dom_exception err; err = _dom_html_element_initialise(doc, &ele->base, - doc->memoised[hds_FORM], - namespace, prefix); + doc->elements[DOM_HTML_ELEMENT_TYPE_FORM], + namespace, prefix); return err; } @@ -283,16 +283,16 @@ static bool _dom_is_form_control(struct dom_node_internal *node, void *ctx) /* Form controls are INPUT TEXTAREA SELECT and BUTTON*/ if (dom_string_caseless_isequal(node->name, - doc->memoised[hds_INPUT])) + doc->elements[DOM_HTML_ELEMENT_TYPE_INPUT])) return ((dom_html_input_element *)node)->form == form; if (dom_string_caseless_isequal(node->name, - doc->memoised[hds_TEXTAREA])) + doc->elements[DOM_HTML_ELEMENT_TYPE_TEXTAREA])) return ((dom_html_text_area_element *)node)->form == form; if (dom_string_caseless_isequal(node->name, - doc->memoised[hds_SELECT])) + doc->elements[DOM_HTML_ELEMENT_TYPE_SELECT])) return ((dom_html_select_element *)node)->form == form; if (dom_string_caseless_isequal(node->name, - doc->memoised[hds_BUTTON])) { + doc->elements[DOM_HTML_ELEMENT_TYPE_BUTTON])) { return ((dom_html_button_element *)node)->form == form; } -- cgit v1.2.3