Chromium Code Reviews

Issue 15657003: Make a '::distributed' pseudo element the first-ever client who can accept a relative selector. (Closed)

Created:
7 years, 7 months ago by hayato
Modified:
7 years, 6 months ago
Reviewers:
Hajime Morrita, dglazkov, eseidel
CC:
blink-reviews, apavlov+blink_chromium.org, dglazkov+blink, eae+blinkwatch, darktears
Visibility:
Public.

Description

Make a '::distributed' pseudo element the first-ever client who can accept a relative selector. The spec of relative selectors is: http://dev.w3.org/csswg/selectors4/#relative '::distributed' can be categorized as the following use case mentioned in the spec: > if the reference element set consists of only a virtual scoping root: This patch hasn't implemented the following case, which is now treated as a parsing error. I'll address that in a follow-up patch. > 2. Otherwise, if the selector starts with any combinator other than the descendant combinator, change the selector to ‘:not(*)’. I also have a plan to support relative selectors in other use cases such as Element.find(relative_selectors). But today is not the day. BUG=234028 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151172

Patch Set 1 #

Total comments: 3

Patch Set 2 : Introduce m_relationIsForShadowDistributed #

Unified diffs Side-by-side diffs Stats (+126 lines, -49 lines)
A + LayoutTests/fast/dom/shadow/distributed-pseudo-element-relative-selector.html View 2 chunks +7 lines, -3 lines 0 comments
A + LayoutTests/fast/dom/shadow/distributed-pseudo-element-relative-selector-css-text.html View 1 chunk +2 lines, -2 lines 0 comments
A + LayoutTests/fast/dom/shadow/distributed-pseudo-element-relative-selector-css-text-expected.txt View 1 chunk +1 line, -1 line 0 comments
A LayoutTests/fast/dom/shadow/distributed-pseudo-element-relative-selector-expected.html View 1 chunk +16 lines, -0 lines 0 comments
A + LayoutTests/fast/dom/shadow/distributed-pseudo-element-relative-selector-invalid.html View 1 chunk +9 lines, -8 lines 0 comments
A LayoutTests/fast/dom/shadow/distributed-pseudo-element-relative-selector-invalid-expected.html View 1 chunk +16 lines, -0 lines 0 comments
M Source/core/css/CSSGrammar.y.in View 4 chunks +16 lines, -2 lines 0 comments
M Source/core/css/CSSParser.cpp View 1 chunk +10 lines, -3 lines 0 comments
M Source/core/css/CSSParserValues.h View 1 chunk +2 lines, -0 lines 0 comments
M Source/core/css/CSSSelector.h View 8 chunks +8 lines, -8 lines 0 comments
M Source/core/css/CSSSelector.cpp View 2 chunks +4 lines, -2 lines 0 comments
M Source/core/css/CSSSelectorList.cpp View 1 chunk +1 line, -1 line 0 comments
M Source/core/css/SelectorChecker.h View 1 chunk +4 lines, -0 lines 0 comments
M Source/core/css/SelectorChecker.cpp View 3 chunks +24 lines, -18 lines 0 comments
M Source/core/css/SelectorFilter.cpp View 3 chunks +6 lines, -1 line 0 comments

Messages

Total messages: 9 (0 generated)
hayato
r?
7 years, 7 months ago (2013-05-22 04:47:36 UTC) #1
dglazkov
https://codereview.chromium.org/15657003/diff/1/Source/core/css/CSSParser.cpp File Source/core/css/CSSParser.cpp (right): https://codereview.chromium.org/15657003/diff/1/Source/core/css/CSSParser.cpp#newcode11134 Source/core/css/CSSParser.cpp:11134: end->setRelation(CSSSelector::ShadowVirtualChild); This is where it's fairly clear that we're ...
7 years, 7 months ago (2013-05-22 17:43:43 UTC) #2
hayato
Thank you for the review. Let me expalin my thought and my approach more clearly. ...
7 years, 7 months ago (2013-05-23 07:34:44 UTC) #3
dglazkov
On 2013/05/23 07:34:44, hayato wrote: > So I've changed my mind. Now it is translated ...
7 years, 7 months ago (2013-05-23 17:23:02 UTC) #4
hayato
On 2013/05/23 17:23:02, Dimitri Glazkov wrote: > On 2013/05/23 07:34:44, hayato wrote: > > So ...
7 years, 7 months ago (2013-05-24 02:17:48 UTC) #5
hayato
I've updated the patch. r?
7 years, 7 months ago (2013-05-24 06:13:39 UTC) #6
dglazkov
lgtm
7 years, 7 months ago (2013-05-24 17:19:30 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hayato@chromium.org/15657003/10001
7 years, 6 months ago (2013-05-27 02:22:07 UTC) #8
commit-bot: I haz the power
7 years, 6 months ago (2013-05-27 04:40:02 UTC) #9
Message was sent while issue was closed.
Change committed as 151172

Powered by Google App Engine