Testing performance impact of backout of part of patch from bug 115289.
See bug 123947 for details. git-svn-id: svn://10.0.0.236/trunk@114146 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -201,8 +201,9 @@ PRBool AtomKey_base::Equals(const nsHashKey* aKey) const
|
||||
const PRUnichar *theirStr = nsnull;
|
||||
theirAtom->GetUnicode(&theirStr);
|
||||
|
||||
return nsDependentString(myStr).Equals(nsDependentString(theirStr),
|
||||
nsCaseInsensitiveStringComparator());
|
||||
return Compare(nsDependentString(myStr),
|
||||
nsDependentString(theirStr),
|
||||
nsCaseInsensitiveStringComparator()) == 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3351,8 +3352,9 @@ static PRBool ValueIncludes(const nsString& aValueList, const nsString& aValue,
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (nsDependentString(value).Equals(nsDependentString(start),
|
||||
nsCaseInsensitiveStringComparator())) {
|
||||
if (!Compare(nsDependentString(value),
|
||||
nsDependentString(start),
|
||||
nsCaseInsensitiveStringComparator())) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
@@ -3646,9 +3648,9 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
||||
break;
|
||||
}
|
||||
if (isCaseSensitive)
|
||||
result = PRBool(localTrue == Substring(value, 0, selLen).Equals(attr->mValue, nsDefaultStringComparator()));
|
||||
result = PRBool(localTrue == !Compare(Substring(value, 0, selLen), attr->mValue, nsDefaultStringComparator()));
|
||||
else
|
||||
result = PRBool(localTrue == Substring(value, 0, selLen).Equals(attr->mValue, nsCaseInsensitiveStringComparator()));
|
||||
result = PRBool(localTrue == !Compare(Substring(value, 0, selLen), attr->mValue, nsCaseInsensitiveStringComparator()));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -3660,9 +3662,9 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
||||
result = localFalse;
|
||||
} else {
|
||||
if (isCaseSensitive)
|
||||
result = PRBool(localTrue == Substring(value, valLen - selLen, selLen).Equals(attr->mValue, nsDefaultStringComparator()));
|
||||
result = PRBool(localTrue == !Compare(Substring(value, valLen - selLen, selLen), attr->mValue, nsDefaultStringComparator()));
|
||||
else
|
||||
result = PRBool(localTrue == Substring(value, valLen - selLen, selLen).Equals(attr->mValue, nsCaseInsensitiveStringComparator()));
|
||||
result = PRBool(localTrue == !Compare(Substring(value, valLen - selLen, selLen), attr->mValue, nsCaseInsensitiveStringComparator()));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -3674,9 +3676,9 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
||||
result = localFalse;
|
||||
} else {
|
||||
if (isCaseSensitive)
|
||||
result = PRBool(localTrue == Substring(value, 0, selLen).Equals(attr->mValue, nsDefaultStringComparator()));
|
||||
result = PRBool(localTrue == !Compare(Substring(value, 0, selLen), attr->mValue, nsDefaultStringComparator()));
|
||||
else
|
||||
result = PRBool(localTrue == Substring(value, 0, selLen).Equals(attr->mValue, nsCaseInsensitiveStringComparator()));
|
||||
result = PRBool(localTrue == !Compare(Substring(value, 0, selLen), attr->mValue, nsCaseInsensitiveStringComparator()));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -3716,8 +3718,8 @@ static PRBool SelectorMatches(RuleProcessorData &data,
|
||||
const PRUnichar* id2Str;
|
||||
IDList->mAtom->GetUnicode(&id2Str);
|
||||
nsDependentString id2(id2Str);
|
||||
if (localTrue !=
|
||||
id1.Equals(id2, nsCaseInsensitiveStringComparator())) {
|
||||
if (localTrue ==
|
||||
(Compare(id1, id2, nsCaseInsensitiveStringComparator()) != 0)) {
|
||||
result = PR_FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user