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

Issue 330043003: Add support for case-insensitive attribute value selectors (Closed)

Created:
6 years, 6 months ago by fs
Modified:
6 years, 4 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, rwlbuis, rune+blink, chrishtr
Project:
blink
Visibility:
Public.

Description

Add support for case-insensitive attribute value selectors Selectors Level 4 adds the syntax '*[foo="bar" i]' for making an attribute value selector case-insensitive. Add support for that. Does not alter the actual case-sensitivity match - i.e. matching is performed using Unicode case-insensitivity rather than ASCII which the spec expects. Based on patch by <jl@opera.com>;. BUG=366563 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179370

Patch Set 1 : Patch from https://codereview.chromium.org/252683011/ #

Patch Set 2 : append() -> appendLiteral(); string literal -> char literal. #

Patch Set 3 : Make union w/ m_attributeFlags and nth-state; Return enum type. #

Total comments: 5

Patch Set 4 : Rebase; rename caseSensitive; update comment. #

Patch Set 5 : legacyCaseSensitive->legacyCaseInsensitive; Extend tests. #

Total comments: 11

Patch Set 6 : Flags -> enum. add accessors for nth. #

Total comments: 4

Patch Set 7 : Move zero-initialization of m_bits to RareData constructor (explicitly). #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -47 lines) Patch
A LayoutTests/fast/css/attribute-selector-case-insensitive.html View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/attribute-selector-case-insensitive-expected.txt View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
M Source/core/css/CSSGrammar.y View 1 2 3 4 5 3 chunks +24 lines, -6 lines 0 comments Download
M Source/core/css/CSSParserValues.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/CSSSelector.h View 1 2 3 4 5 6 5 chunks +25 lines, -3 lines 0 comments Download
M Source/core/css/CSSSelector.cpp View 1 2 3 4 5 6 5 chunks +36 lines, -31 lines 2 comments Download
M Source/core/css/SelectorChecker.cpp View 1 2 3 4 5 2 chunks +11 lines, -6 lines 0 comments Download
M Source/core/css/parser/BisonCSSParser.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/parser/BisonCSSParser-in.cpp View 1 2 3 4 5 1 chunk +11 lines, -0 lines 2 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
fs
Attempting to reboot https://codereview.chromium.org/252683011/. I've left some comments in that review, and attempted to address ...
6 years, 5 months ago (2014-07-01 08:50:41 UTC) #1
ojan
Sorry I haven't had time to review this. Been busy with the code yellow. Tim, ...
6 years, 5 months ago (2014-07-19 02:55:13 UTC) #2
Timothy Loh
On 2014/07/19 02:55:13, ojan-only-code-yellow-reviews wrote: > Sorry I haven't had time to review this. Been ...
6 years, 5 months ago (2014-07-21 00:13:42 UTC) #3
fs
On 2014/07/19 02:55:13, ojan-only-code-yellow-reviews wrote: > Sorry I haven't had time to review this. Been ...
6 years, 5 months ago (2014-07-21 07:31:14 UTC) #4
Timothy Loh
https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp File Source/core/css/SelectorChecker.cpp (right): https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp#newcode520 Source/core/css/SelectorChecker.cpp:520: bool caseSensitive = !element.document().isHTMLDocument() || HTMLDocument::isCaseSensitiveAttribute(selectorAttr); This is super ...
6 years, 5 months ago (2014-07-22 08:51:03 UTC) #5
fs
https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp File Source/core/css/SelectorChecker.cpp (right): https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp#newcode520 Source/core/css/SelectorChecker.cpp:520: bool caseSensitive = !element.document().isHTMLDocument() || HTMLDocument::isCaseSensitiveAttribute(selectorAttr); On 2014/07/22 08:51:02, ...
6 years, 5 months ago (2014-07-22 11:06:17 UTC) #6
Timothy Loh
https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp File Source/core/css/SelectorChecker.cpp (right): https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp#newcode520 Source/core/css/SelectorChecker.cpp:520: bool caseSensitive = !element.document().isHTMLDocument() || HTMLDocument::isCaseSensitiveAttribute(selectorAttr); On 2014/07/22 11:06:17, ...
6 years, 5 months ago (2014-07-22 11:50:26 UTC) #7
fs
https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp File Source/core/css/SelectorChecker.cpp (right): https://codereview.chromium.org/330043003/diff/30001/Source/core/css/SelectorChecker.cpp#newcode520 Source/core/css/SelectorChecker.cpp:520: bool caseSensitive = !element.document().isHTMLDocument() || HTMLDocument::isCaseSensitiveAttribute(selectorAttr); On 2014/07/22 11:50:26, ...
6 years, 5 months ago (2014-07-22 14:09:04 UTC) #8
Timothy Loh
lgtm, but I wouldn't mind if someone else (eseidel?) had a look over this. We ...
6 years, 5 months ago (2014-07-23 01:46:51 UTC) #9
fs
On 2014/07/23 01:46:51, Timothy Loh wrote: > lgtm, but I wouldn't mind if someone else ...
6 years, 5 months ago (2014-07-23 11:24:44 UTC) #10
fs
On 2014/07/23 11:24:44, fs wrote: > On 2014/07/23 01:46:51, Timothy Loh wrote: > > lgtm, ...
6 years, 5 months ago (2014-07-25 17:00:09 UTC) #11
eseidel
The feature seems fine. The implementation feels a bit tacked on but it may just ...
6 years, 4 months ago (2014-07-29 15:43:23 UTC) #12
eseidel
https://codereview.chromium.org/330043003/diff/70001/Source/core/css/CSSParserValues.h File Source/core/css/CSSParserValues.h (right): https://codereview.chromium.org/330043003/diff/70001/Source/core/css/CSSParserValues.h#newcode224 Source/core/css/CSSParserValues.h:224: void setAttribute(const QualifiedName& value, unsigned flags) { m_selector->setAttribute(value, flags); ...
6 years, 4 months ago (2014-07-29 15:46:01 UTC) #13
fs
https://codereview.chromium.org/330043003/diff/70001/Source/core/css/CSSParserValues.h File Source/core/css/CSSParserValues.h (right): https://codereview.chromium.org/330043003/diff/70001/Source/core/css/CSSParserValues.h#newcode224 Source/core/css/CSSParserValues.h:224: void setAttribute(const QualifiedName& value, unsigned flags) { m_selector->setAttribute(value, flags); ...
6 years, 4 months ago (2014-07-29 17:14:32 UTC) #14
eseidel
I'm still unclear on teh zeros, otherwise still looks fine. https://codereview.chromium.org/330043003/diff/90001/Source/core/css/CSSSelector.h File Source/core/css/CSSSelector.h (right): https://codereview.chromium.org/330043003/diff/90001/Source/core/css/CSSSelector.h#newcode360 ...
6 years, 4 months ago (2014-07-30 20:12:41 UTC) #15
fs
Last round? https://codereview.chromium.org/330043003/diff/90001/Source/core/css/CSSSelector.h File Source/core/css/CSSSelector.h (right): https://codereview.chromium.org/330043003/diff/90001/Source/core/css/CSSSelector.h#newcode360 Source/core/css/CSSSelector.h:360: Bits() : m_nth() { } On 2014/07/30 ...
6 years, 4 months ago (2014-07-31 09:27:15 UTC) #16
eseidel
I guess I still don't understand "value initialized". I was always trained that c++ default ...
6 years, 4 months ago (2014-07-31 16:53:14 UTC) #17
eseidel
lgtm
6 years, 4 months ago (2014-07-31 16:53:33 UTC) #18
ojan
https://codereview.chromium.org/330043003/diff/110001/Source/core/css/CSSSelector.cpp File Source/core/css/CSSSelector.cpp (right): https://codereview.chromium.org/330043003/diff/110001/Source/core/css/CSSSelector.cpp#newcode832 Source/core/css/CSSSelector.cpp:832: , m_bits() On 2014/07/31 16:53:14, eseidel wrote: > I ...
6 years, 4 months ago (2014-07-31 17:17:15 UTC) #19
fs
https://codereview.chromium.org/330043003/diff/110001/Source/core/css/parser/BisonCSSParser-in.cpp File Source/core/css/parser/BisonCSSParser-in.cpp (right): https://codereview.chromium.org/330043003/diff/110001/Source/core/css/parser/BisonCSSParser-in.cpp#newcode1117 Source/core/css/parser/BisonCSSParser-in.cpp:1117: if (string == "i") { On 2014/07/31 16:53:14, eseidel ...
6 years, 4 months ago (2014-08-01 06:41:29 UTC) #20
fs
The CQ bit was checked by fs@opera.com
6 years, 4 months ago (2014-08-01 06:41:40 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/330043003/110001
6 years, 4 months ago (2014-08-01 06:42:59 UTC) #22
commit-bot: I haz the power
6 years, 4 months ago (2014-08-01 06:46:50 UTC) #23
Message was sent while issue was closed.
Change committed as 179370

Powered by Google App Engine
This is Rietveld 408576698