|
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
Total comments: 3
|
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
|
Total messages: 9 (0 generated)
|