mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-09 12:32:21 +03:00
html: layout: Fix to ignore non-element children of lists.
This commit is contained in:
parent
598629c736
commit
920041a131
@ -4426,15 +4426,22 @@ layout__check_element_type(
|
|||||||
const dom_node *node,
|
const dom_node *node,
|
||||||
dom_html_element_type type)
|
dom_html_element_type type)
|
||||||
{
|
{
|
||||||
dom_html_element_type node_type;
|
dom_html_element_type element_type;
|
||||||
|
dom_node_type node_type;
|
||||||
dom_exception exc;
|
dom_exception exc;
|
||||||
|
|
||||||
exc = dom_html_element_get_tag_type(node, &node_type);
|
exc = dom_node_get_node_type(node, &node_type);
|
||||||
|
if (exc != DOM_NO_ERR ||
|
||||||
|
node_type != DOM_ELEMENT_NODE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
exc = dom_html_element_get_tag_type(node, &element_type);
|
||||||
if (exc != DOM_NO_ERR) {
|
if (exc != DOM_NO_ERR) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return node_type == type;
|
return element_type == type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user