Fix matching of universal element selectors

svn path=/trunk/netsurf/; revision=11979
This commit is contained in:
John Mark Bell 2011-03-12 18:29:40 +00:00
parent 91003cbaf3
commit ffd2e6095d

View File

@ -849,9 +849,13 @@ css_error node_has_name(void *pw, void *node,
size_t len = lwc_string_length(qname->name);
const char *data = lwc_string_data(qname->name);
/* Element names are case insensitive in HTML */
*match = strlen((const char *) n->name) == len &&
if (len == 1 && data[0] == '*') {
*match = true;
} else {
/* Element names are case insensitive in HTML */
*match = strlen((const char *) n->name) == len &&
strncasecmp((const char *) n->name, data, len) == 0;
}
return CSS_OK;
}