diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp index 0eadf244c68..c7d12003794 100644 --- a/mozilla/content/html/style/src/nsCSSParser.cpp +++ b/mozilla/content/html/style/src/nsCSSParser.cpp @@ -2062,8 +2062,10 @@ void CSSParserImpl::ParseAttributeSelector(PRInt32& aDataMask, static const char* caseSensitiveHTMLAttribute[] = { // list based on http://www.w3.org/TR/REC-html40/index/attributes.html "abbr", "alt", "label", - "prompt", "standby", "summary", - "title", nsnull + "prompt", "standby", "summary", + "title", "class", "archive", + "cite", "datetime", "href", + "name", nsnull }; short i = 0; const char* htmlAttr; diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index 29bbf712c16..a9a14ad2c24 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -3423,8 +3423,13 @@ static PRBool AttrMatchesValue(const nsAttrSelector* aAttrSelector, nsCaseInsensitiveStringComparator()); } case NS_ATTR_FUNC_CONTAINSMATCH: - return FindInReadable(aAttrSelector->mValue, aValue, - nsCaseInsensitiveStringComparator()); + if (isCaseSensitive) { + return FindInReadable(aAttrSelector->mValue, aValue); + } + else { + return FindInReadable(aAttrSelector->mValue, aValue, + nsCaseInsensitiveStringComparator()); + } default: NS_NOTREACHED("Shouldn't be ending up here"); return PR_FALSE; diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index 0eadf244c68..c7d12003794 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -2062,8 +2062,10 @@ void CSSParserImpl::ParseAttributeSelector(PRInt32& aDataMask, static const char* caseSensitiveHTMLAttribute[] = { // list based on http://www.w3.org/TR/REC-html40/index/attributes.html "abbr", "alt", "label", - "prompt", "standby", "summary", - "title", nsnull + "prompt", "standby", "summary", + "title", "class", "archive", + "cite", "datetime", "href", + "name", nsnull }; short i = 0; const char* htmlAttr; diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index 29bbf712c16..a9a14ad2c24 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -3423,8 +3423,13 @@ static PRBool AttrMatchesValue(const nsAttrSelector* aAttrSelector, nsCaseInsensitiveStringComparator()); } case NS_ATTR_FUNC_CONTAINSMATCH: - return FindInReadable(aAttrSelector->mValue, aValue, - nsCaseInsensitiveStringComparator()); + if (isCaseSensitive) { + return FindInReadable(aAttrSelector->mValue, aValue); + } + else { + return FindInReadable(aAttrSelector->mValue, aValue, + nsCaseInsensitiveStringComparator()); + } default: NS_NOTREACHED("Shouldn't be ending up here"); return PR_FALSE;