summaryrefslogtreecommitdiff
path: root/src/html/html_document.c
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2016-01-27 16:27:50 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2016-01-27 16:30:38 +0000
commit5b6c1914915e4c6c1b69e4c56cd60705e40daff3 (patch)
tree1cc1a2e934354e75e609357d7627e16371a0e50c /src/html/html_document.c
parent13f06360888ecb87e498012cf8c937e4041f5c4a (diff)
downloadlibdom-5b6c1914915e4c6c1b69e4c56cd60705e40daff3.tar.gz
libdom-5b6c1914915e4c6c1b69e4c56cd60705e40daff3.tar.bz2
Fix longstanding failure to handle HTMLDirectoryElement specialisation.
We were looking for DIRECTORY tags, but we should have been looking for DIR elements.
Diffstat (limited to 'src/html/html_document.c')
-rw-r--r--src/html/html_document.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/html/html_document.c b/src/html/html_document.c
index d50fb52..3d2a7f3 100644
--- a/src/html/html_document.c
+++ b/src/html/html_document.c
@@ -342,6 +342,9 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
} else if (dom_string_isequal(tag_name_upper, html->elements[
DOM_HTML_ELEMENT_TYPE_MAP])) {
return DOM_HTML_ELEMENT_TYPE_MAP;
+ } else if (dom_string_isequal(tag_name_upper, html->elements[
+ DOM_HTML_ELEMENT_TYPE_DIR])) {
+ return DOM_HTML_ELEMENT_TYPE_DIR;
}
break;
case 4:
@@ -467,12 +470,6 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
return DOM_HTML_ELEMENT_TYPE_FRAMESET;
}
break;
- case 9:
- if (dom_string_isequal(tag_name_upper, html->elements[
- DOM_HTML_ELEMENT_TYPE_DIRECTORY])) {
- return DOM_HTML_ELEMENT_TYPE_DIRECTORY;
- }
- break;
case 10:
if (dom_string_isequal(tag_name_upper, html->elements[
DOM_HTML_ELEMENT_TYPE_BLOCKQUOTE])) {
@@ -577,7 +574,7 @@ _dom_html_document_create_element_internal(
exc = _dom_html_dlist_element_create(html, namespace, prefix,
(dom_html_dlist_element **) result);
break;
- case DOM_HTML_ELEMENT_TYPE_DIRECTORY:
+ case DOM_HTML_ELEMENT_TYPE_DIR:
exc = _dom_html_directory_element_create(html, namespace,
prefix, (dom_html_directory_element **) result);
break;