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

Issue 1695393002: Don't add to siblingRules for features left of ::slotted. (Closed)

Created:
4 years, 10 months ago by rune
Modified:
4 years, 10 months ago
Reviewers:
hayato, kochi
CC:
chromium-reviews, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't add to siblingRules for features left of ::slotted. Like for ::content distributed elements in shadow dom v0, slotted elements do not share style if they are assigned/distributed to different slots. Hence, we don't need to add rules to siblingRules when the combinators or simple selectors are left of the ::slotted pseudo. We need to add "::slotted(:nth-child(odd)" to siblingRules, but not ".a + ::slotted(.b)" nor ":nth-of-type(3)::slotted(*)". Similarly, nothing left of :host or :host-context will ever match, so we can treat those the same way. Selectors like "div + :host" or ":only-child:host-context(.a)" will never match. There is nothing in the CSS Scoping spec which says they're invalid, hence they're not dropped. There was a bug in https://codereview.chromium.org/1683923003/ which made us detect adjacent combinators before we had noticed the ::content following it. The detection of sibling dependent pseudo classes like :emtpy, :nth-child, etc and adjacent combinators have therefore been split in this CL so that we handle the simple selectors in a compound before we handle the combinator. Corresponding unit tests have been added. R=kochi@chromium.org,hayato@chromium.org Committed: https://crrev.com/593fca77e1a391c59c4cf14a5ecf54c35e2cef65 Cr-Commit-Position: refs/heads/master@{#375531}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -8 lines) Patch
M third_party/WebKit/Source/core/css/CSSSelector.h View 2 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.cpp View 1 chunk +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp View 2 chunks +19 lines, -1 line 0 comments Download

Messages

Total messages: 11 (4 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/1695393002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1695393002/1
4 years, 10 months ago (2016-02-16 00:18:10 UTC) #2
rune
4 years, 10 months ago (2016-02-16 00:18:14 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-16 01:26:44 UTC) #5
kochi
LGTM
4 years, 10 months ago (2016-02-16 08:00:57 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1695393002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1695393002/1
4 years, 10 months ago (2016-02-16 08:19:46 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-02-16 08:25:02 UTC) #9
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:51:44 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/593fca77e1a391c59c4cf14a5ecf54c35e2cef65
Cr-Commit-Position: refs/heads/master@{#375531}

Powered by Google App Engine
This is Rietveld 408576698