nsAString::LowercaseEqualsLiteral doesn't do what its dom/layout consumers think it does

NEW
Unassigned

Status

()

8 years ago
a year ago

People

(Reporter: bzbarsky, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

In particular, if the nsAString contains KELVIN SIGN that will test equal to 'k' and if it contains LATIN CAPITAL LETTER I WITH DOT ABOVE that will test equal to 'i'.

My temptation is to change LowercaseEqualsLiteral to not do that.  Alternately, we need to switch a bunch of callers off it to some new nsContentUtils API (or nsContentUtils::EqualsIgnoreASCIICase, but that's just a pain to use).
Yeah, I'd ideally like to switch this function to only lowercase ascii characters. That seems to be the least surprising and most performant solution.

Do we have any callers that actually want the current behavior?

Though of course, ideally the name should be tweaked to make this more clear too :(
Fwiw, the current name implied the ascii-only behavior to me, at least...
You need to log in before you can comment on or make changes to this bug.