mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
Simplify code using xmlDocGetRootElement().
svn path=/trunk/netsurf/; revision=4201
This commit is contained in:
parent
793d466edf
commit
70da04d69e
@ -427,10 +427,7 @@ bool html_convert(struct content *c, int width, int height)
|
||||
}
|
||||
|
||||
/* locate html and head elements */
|
||||
for (html = document->children;
|
||||
html != 0 && html->type != XML_ELEMENT_NODE;
|
||||
html = html->next)
|
||||
;
|
||||
html = xmlDocGetRootElement(document);
|
||||
if (html == 0 || strcmp((const char *) html->name, "html") != 0) {
|
||||
LOG(("html element not found"));
|
||||
xmlFreeDoc(document);
|
||||
|
Loading…
Reference in New Issue
Block a user