diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2016-01-27 12:14:12 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2016-01-27 15:20:27 +0000 |
commit | 6d600214268e64e6bc83df61d8abfdf8963acdad (patch) | |
tree | d43adeb39b6e76c61fe434fb15ead4e20d39e4ea /src/html/html_tablesection_element.c | |
parent | 410274173d434e34a5eb085d13228d68cd44d509 (diff) | |
download | libdom-6d600214268e64e6bc83df61d8abfdf8963acdad.tar.gz libdom-6d600214268e64e6bc83df61d8abfdf8963acdad.tar.bz2 |
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.
Diffstat (limited to 'src/html/html_tablesection_element.c')
-rw-r--r-- | src/html/html_tablesection_element.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/html/html_tablesection_element.c b/src/html/html_tablesection_element.c index dbc0902..9718612 100644 --- a/src/html/html_tablesection_element.c +++ b/src/html/html_tablesection_element.c @@ -50,7 +50,8 @@ dom_exception _dom_html_table_section_element_create(struct dom_html_document *d node->base.vtable = &_dom_html_element_vtable; node->vtable = &_protect_vtable; - return _dom_html_table_section_element_initialise(doc, tag_name, namespace, prefix, *ele); + return _dom_html_table_section_element_initialise(doc, tag_name, + namespace, prefix, *ele); } /** @@ -168,9 +169,10 @@ SIMPLE_GET_SET(v_align); /* The callback function for _dom_html_collection_create*/ bool table_section_callback(struct dom_node_internal *node, void *ctx) { + dom_html_document *doc = ctx; if(node->type == DOM_ELEMENT_NODE && dom_string_caseless_isequal(node->name, - ((dom_html_document *)ctx)->memoised[hds_TR])) { + doc->elements[DOM_HTML_ELEMENT_TYPE_TR])) { return true; } return false; |