[project @ 2005-01-03 00:45:43 by jmb]

class and id attributes are case-sensitive (HTML4.01)

svn path=/import/netsurf/; revision=1427
This commit is contained in:
John Mark Bell 2005-01-03 00:45:43 +00:00
parent 64928d9a67
commit 270ae1d043
1 changed files with 4 additions and 3 deletions

View File

@ -826,7 +826,6 @@ bool css_merge_rule_lists_internal(struct css_selector *l1, struct css_selector
return true;
}
/**
* Find the style which applies to an element.
*
@ -956,8 +955,9 @@ bool css_match_detail(const struct css_selector *detail,
case CSS_SELECTOR_ID:
s = (char *) xmlGetProp(element,
(const xmlChar *) "id");
/* case sensitive, according to HTML4.01 */
if (s && strlen(s) == detail->data_length &&
strncasecmp(detail->data, s,
strncmp(detail->data, s,
detail->data_length) == 0)
match = true;
break;
@ -974,8 +974,9 @@ bool css_match_detail(const struct css_selector *detail,
length = space - word;
else
length = strlen(word);
/* case sensitive, according to HTML4.01 */
if (length == detail->data_length &&
strncasecmp(word, detail->data,
strncmp(word, detail->data,
length) == 0) {
match = true;
break;