Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 1499933003: Use ASCII case-insensitive matching for attribute selectors (Closed)

Created:
5 years ago by fs
Modified:
5 years ago
Reviewers:
tkent, esprehn
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-wtf_chromium.org, chromium-reviews, dglazkov+blink, Mikhail, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -28 lines) Patch
A third_party/WebKit/LayoutTests/fast/css/attribute-selector-case-insensitive-ascii.html View 1 chunk +26 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/SelectorChecker.cpp View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.h View 1 2 5 chunks +16 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 1 2 3 chunks +82 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFStringTest.cpp View 1 2 3 1 chunk +65 lines, -10 lines 0 comments Download

Messages

Total messages: 19 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1499933003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1499933003/20001
5 years ago (2015-12-08 21:51:16 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-09 00:20:47 UTC) #5
fs
PTAL I'll try to get selectors/attribute-selectors/attribute-case/ from w-p-t imported too, so some additional tests will ...
5 years ago (2015-12-10 17:29:11 UTC) #10
tkent
lgtm https://codereview.chromium.org/1499933003/diff/40001/third_party/WebKit/Source/wtf/text/WTFString.h File third_party/WebKit/Source/wtf/text/WTFString.h (right): https://codereview.chromium.org/1499933003/diff/40001/third_party/WebKit/Source/wtf/text/WTFString.h#newcode90 third_party/WebKit/Source/wtf/text/WTFString.h:90: (caseSensitivity == TextCaseASCIIInsensitive) ? op##IgnoringASCIICase args : \ ...
5 years ago (2015-12-11 00:02:45 UTC) #11
esprehn
lgtm
5 years ago (2015-12-11 10:17:46 UTC) #12
fs
https://codereview.chromium.org/1499933003/diff/40001/third_party/WebKit/Source/wtf/text/WTFString.h File third_party/WebKit/Source/wtf/text/WTFString.h (right): https://codereview.chromium.org/1499933003/diff/40001/third_party/WebKit/Source/wtf/text/WTFString.h#newcode90 third_party/WebKit/Source/wtf/text/WTFString.h:90: (caseSensitivity == TextCaseASCIIInsensitive) ? op##IgnoringASCIICase args : \ On ...
5 years ago (2015-12-11 11:43:16 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1499933003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1499933003/60001
5 years ago (2015-12-11 13:20:26 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years ago (2015-12-11 14:52:40 UTC) #17
commit-bot: I haz the power
5 years ago (2015-12-11 14:53:35 UTC) #19
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/bc595d0595a6d1d86a42cd9bc303f6ace91b51e4
Cr-Commit-Position: refs/heads/master@{#364703}

Powered by Google App Engine
This is Rietveld 408576698