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

Unified Diff: third_party/WebKit/Source/core/css/RuleFeature.cpp

Issue 1872343002: Allow multiple host pseudos in same compound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... and a test with :host() Created 4 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
Index: third_party/WebKit/Source/core/css/RuleFeature.cpp
diff --git a/third_party/WebKit/Source/core/css/RuleFeature.cpp b/third_party/WebKit/Source/core/css/RuleFeature.cpp
index 7d665f6057df23c93869a1da4565b0fdfba17404..d3aaa9ba30c1584d487682a4e917b06939d02b4c 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp
@@ -610,10 +610,13 @@ RuleFeatureSet::SelectorPreMatch RuleFeatureSet::collectFeaturesFromSelector(con
break;
case CSSSelector::PseudoHost:
case CSSSelector::PseudoHostContext:
- if (relation == CSSSelector::SubSelector)
+ if (!foundHostPseudo && relation == CSSSelector::SubSelector)
return SelectorNeverMatches;
- if (!current->isLastInTagHistory() && current->tagHistory()->match() != CSSSelector::PseudoElement)
+ if (!current->isLastInTagHistory()
+ && current->tagHistory()->match() != CSSSelector::PseudoElement
+ && !current->tagHistory()->isHostPseudoClass()) {
return SelectorNeverMatches;
+ }
foundHostPseudo = true;
// fall through.
default:

Powered by Google App Engine
This is Rietveld 408576698