mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-18 10:13:24 +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 */
|
/* locate html and head elements */
|
||||||
for (html = document->children;
|
html = xmlDocGetRootElement(document);
|
||||||
html != 0 && html->type != XML_ELEMENT_NODE;
|
|
||||||
html = html->next)
|
|
||||||
;
|
|
||||||
if (html == 0 || strcmp((const char *) html->name, "html") != 0) {
|
if (html == 0 || strcmp((const char *) html->name, "html") != 0) {
|
||||||
LOG(("html element not found"));
|
LOG(("html element not found"));
|
||||||
xmlFreeDoc(document);
|
xmlFreeDoc(document);
|
||||||
|
Loading…
Reference in New Issue
Block a user