Use libxml functions to loop through elements in html_head() instead of checking all nodes. Remove logging.

svn path=/trunk/netsurf/; revision=10788
This commit is contained in:
James Bursa 2010-09-16 20:46:29 +00:00
parent 1391ebe5cc
commit bce1f4c231
1 changed files with 2 additions and 5 deletions

View File

@ -570,11 +570,8 @@ bool html_head(struct content *c, xmlNode *head)
xmlNode *node;
xmlChar *s;
for (node = head->children; node != 0; node = node->next) {
if (node->type != XML_ELEMENT_NODE)
continue;
LOG(("Node: %s", node->name));
for (node = xmlFirstElementChild(head); node != 0;
node = xmlNextElementSibling(node)) {
if (c->title == NULL && strcmp((const char *) node->name,
"title") == 0) {
xmlChar *title = xmlNodeGetContent(node);