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

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

Issue 1917403002: Allow multiple host pseudos in same compound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9b08b9893cba33e57317b063378cf0216a77f722..f3f254a35d99e58da2d4441bee16dc154c980c82 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp
@@ -609,10 +609,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:
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698