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

Unified Diff: Source/core/css/SelectorChecker.cpp

Issue 1082023003: Allow "::content /deep/" to match. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/shadow/content-deep-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index cff70da5bf3d5b3080ae8f813134c603f44ac2aa..3700398372d804cfed902f4923e74603d43b7a0b 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -350,6 +350,14 @@ SelectorChecker::Match SelectorChecker::matchForRelation(const SelectorCheckingC
case CSSSelector::ShadowDeep:
{
+ if (context.selector->relationIsAffectedByPseudoContent()) {
+ for (Element* element = context.element; element; element = parentOrShadowHostButDisallowEscapingClosedShadowTree(*element)) {
+ if (matchForShadowDistributed(element, siblingTraversalStrategy, nextContext, result) == SelectorMatches)
+ return SelectorMatches;
+ }
+ return SelectorFailsCompletely;
+ }
+
nextContext.isSubSelector = false;
nextContext.elementStyle = 0;
for (nextContext.element = parentOrShadowHostButDisallowEscapingClosedShadowTree(*context.element); nextContext.element; nextContext.element = parentOrShadowHostButDisallowEscapingClosedShadowTree(*nextContext.element)) {
« no previous file with comments | « LayoutTests/fast/dom/shadow/content-deep-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698