Handle known HTML elements without specialisations.

This commit is contained in:
Michael Drake 2016-02-01 18:48:42 +00:00
parent 94b913e5b3
commit 9fb755b754

View File

@ -342,10 +342,16 @@ static void dukky_html_element_class_from_tag_type(dom_html_element_type type,
break; break;
case DOM_HTML_ELEMENT_TYPE__COUNT: case DOM_HTML_ELEMENT_TYPE__COUNT:
assert(type != DOM_HTML_ELEMENT_TYPE__COUNT); assert(type != DOM_HTML_ELEMENT_TYPE__COUNT);
default:
case DOM_HTML_ELEMENT_TYPE__UNKNOWN: case DOM_HTML_ELEMENT_TYPE__UNKNOWN:
SET_HTML_CLASS(UNKNOWN) SET_HTML_CLASS(UNKNOWN)
break; break;
default:
/* Known HTML element without a specialisation */
*html_class = PROTO_NAME(HTMLELEMENT);
*html_class_len =
SLEN(PROTO_NAME(HTML)) +
SLEN("ELEMENT");
break;
} }
return; return;
} }