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

Issue 1523843004: Add support for new CSS ::slotted() pseudo element (Closed)

Created:
5 years ago by kochi
Modified:
4 years, 11 months ago
Reviewers:
Timothy Loh, hayato, rune
CC:
chromium-reviews, caseq+blink_chromium.org, blink-reviews-style_chromium.org, blink-reviews-css, devtools-reviews_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org, rwlbuis, hayato
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for new CSS ::slotted() pseudo element ::slotted() replaces ::content pseudo element in Shadow DOM V1. ::slotted() can take only one compound selector as a parameter in contrast that ::content can have arbitrary complex selector on its left. The spec is discussed at GitHub: https://github.com/w3c/webcomponents/issues/331 and will be upstreamed. BUG=531990 TEST=new added layout tests.

Patch Set 1 #

Patch Set 2 : wip #

Patch Set 3 : wip #

Patch Set 4 : WIP #

Total comments: 1

Patch Set 5 : wip #

Patch Set 6 : rebase #

Patch Set 7 : allow compound selector #

Patch Set 8 : Convert ::slotted() -> *::slotted() for real #

Patch Set 9 : UseCounter update to resolve merge conflict. #

Total comments: 1

Patch Set 10 : tentative fix for crash / querySelector test #

Total comments: 13

Patch Set 11 : rebase / fix comments for tests (FYI) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -36 lines) Patch
A third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +26 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change-expected.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-expected.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -13 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style-expected.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/selectors/querySelector-pseudo-slotted.html View 1 2 3 4 5 6 7 8 9 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSSelector.h View 1 2 3 4 5 6 7 8 9 10 8 chunks +13 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSSelector.cpp View 1 2 3 4 5 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSSelectorList.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSSelectorList.cpp View 1 2 3 4 5 6 7 2 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleSet.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleSet.cpp View 1 2 3 4 3 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/SelectorChecker.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +38 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/SelectorFilter.cpp View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSParserSelector.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParser.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp View 1 2 3 4 5 6 7 8 9 10 6 chunks +25 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 38 (16 generated)
kochi
Hi Rune, This is still work-in-progress, but my attempt to implement ::slotted() pseudo element. The ...
5 years ago (2015-12-21 10:49:43 UTC) #3
rune
On 2015/12/21 10:49:43, kochi wrote: > Hi Rune, > > This is still work-in-progress, but ...
5 years ago (2015-12-22 11:21:11 UTC) #4
rune
https://codereview.chromium.org/1523843004/diff/60001/third_party/WebKit/Source/core/css/RuleFeature.cpp File third_party/WebKit/Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/1523843004/diff/60001/third_party/WebKit/Source/core/css/RuleFeature.cpp#newcode199 third_party/WebKit/Source/core/css/RuleFeature.cpp:199: case CSSSelector::PseudoSlotted: This recalculates a bit more than necessary. ...
5 years ago (2015-12-22 14:56:53 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1523843004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1523843004/120001
4 years, 11 months ago (2016-01-06 06:46:42 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-06 08:17:37 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1523843004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1523843004/140001
4 years, 11 months ago (2016-01-07 08:24:56 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/142401) mac_chromium_gn_rel on ...
4 years, 11 months ago (2016-01-07 08:26:50 UTC) #19
kochi
Rune, Hayato, Tim, Could you review please? Rune, Hayato, please review the whole changes. Tim, ...
4 years, 11 months ago (2016-01-07 08:28:41 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1523843004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1523843004/160001
4 years, 11 months ago (2016-01-07 08:32:28 UTC) #22
kochi
https://codereview.chromium.org/1523843004/diff/160001/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp File third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp (right): https://codereview.chromium.org/1523843004/diff/160001/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp#newcode282 third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp:282: if (element().assignedSlot()) I found that this now causes assertion ...
4 years, 11 months ago (2016-01-07 09:54:09 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/162646)
4 years, 11 months ago (2016-01-07 09:55:40 UTC) #25
rune
Can we split the parser parts into a separate CL? I think we should try ...
4 years, 11 months ago (2016-01-07 10:19:27 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1523843004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1523843004/180001
4 years, 11 months ago (2016-01-07 10:36:24 UTC) #28
kochi
On 2016/01/07 10:19:27, rune wrote: > Can we split the parser parts into a separate ...
4 years, 11 months ago (2016-01-07 10:38:18 UTC) #29
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-07 12:12:48 UTC) #31
rune
On 2016/01/07 10:38:18, kochi wrote: > On 2016/01/07 10:19:27, rune wrote: > > Can we ...
4 years, 11 months ago (2016-01-08 22:12:41 UTC) #32
rune
I need another round through this when I'm more awake. Comments so far. https://codereview.chromium.org/1523843004/diff/180001/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html File ...
4 years, 11 months ago (2016-01-09 01:15:37 UTC) #33
rune
https://codereview.chromium.org/1523843004/diff/180001/third_party/WebKit/Source/core/css/SelectorChecker.cpp File third_party/WebKit/Source/core/css/SelectorChecker.cpp (right): https://codereview.chromium.org/1523843004/diff/180001/third_party/WebKit/Source/core/css/SelectorChecker.cpp#newcode470 third_party/WebKit/Source/core/css/SelectorChecker.cpp:470: case CSSSelector::ShadowSlot: It's possible to implement this without this ...
4 years, 11 months ago (2016-01-11 10:07:23 UTC) #34
rune
I have a question about pseudo elements of the slotted element: https://github.com/w3c/webcomponents/issues/331#issuecomment-170502997
4 years, 11 months ago (2016-01-11 10:39:45 UTC) #35
kochi
The parser part is split at https://codereview.chromium.org/1565263003/ And other part will also be split to ...
4 years, 11 months ago (2016-01-13 07:49:32 UTC) #36
rune
https://codereview.chromium.org/1523843004/diff/180001/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html File third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html (right): https://codereview.chromium.org/1523843004/diff/180001/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html#newcode34 third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html:34: "*::slotted(*) { color: blue; }"); On 2016/01/13 07:49:31, kochi ...
4 years, 11 months ago (2016-01-13 10:02:30 UTC) #37
kochi
4 years, 11 months ago (2016-01-21 09:05:54 UTC) #38

Powered by Google App Engine
This is Rietveld 408576698