DescriptionUse ASCII case-insensitive matching for attribute selectors
When matching attribute selectors in a case-insensitive manner, the
match should be performed using "ASCII case-insensitive" matching per
the "document language" specification (HTML) [1]. Similarly when the "i"
modifier is used [2].
New behavior matches Gecko (for [1]) and WebKit (for [1] and [2]).
This requires adding some new functions to support the various matching
operations: startsWith, endsWith and find.
Add TextCaseSensitivity value TextCaseASCIIInsensitive and
implementations for the methods mentioned above.
Replace current use of startsWithIgnoringASCIICase with startsWith,
passing TextCaseASCIIInsensitive.
[1] https://html.spec.whatwg.org/multipage/scripting.html#case-sensitivity
[2] https://drafts.csswg.org/selectors-4/#attribute-case
BUG=565878
Committed: https://crrev.com/bc595d0595a6d1d86a42cd9bc303f6ace91b51e4
Cr-Commit-Position: refs/heads/master@{#364703}
Patch Set 1 #Patch Set 2 : Refactoring. #Patch Set 3 : Rebase. #
Total comments: 4
Patch Set 4 : WTF -> StringTest #
Messages
Total messages: 19 (10 generated)
|