Index: Source/core/testing/Internals.cpp |
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp |
index 08b553c884e0a9f151adca4b93e340914a57ef66..0c9db5419f82213d2651f4e677803d78624dac01 100644 |
--- a/Source/core/testing/Internals.cpp |
+++ b/Source/core/testing/Internals.cpp |
@@ -424,25 +424,7 @@ bool Internals::hasSelectorForPseudoClassInShadow(Element* host, const String& p |
exceptionState.throwDOMException(InvalidAccessError, "The host element does not have a shadow."); |
return 0; |
} |
- |
- const SelectRuleFeatureSet& featureSet = host->shadow()->ensureSelectFeatureSet(); |
- if (pseudoClass == "checked") |
- return featureSet.hasSelectorForChecked(); |
- if (pseudoClass == "enabled") |
- return featureSet.hasSelectorForEnabled(); |
- if (pseudoClass == "disabled") |
- return featureSet.hasSelectorForDisabled(); |
- if (pseudoClass == "indeterminate") |
- return featureSet.hasSelectorForIndeterminate(); |
- if (pseudoClass == "link") |
- return featureSet.hasSelectorForLink(); |
- if (pseudoClass == "target") |
- return featureSet.hasSelectorForTarget(); |
- if (pseudoClass == "visited") |
- return featureSet.hasSelectorForVisited(); |
- |
- ASSERT_NOT_REACHED(); |
- return false; |
+ return host->shadow()->ensureSelectFeatureSet().hasSelectorForPseudoType(CSSSelector::parsePseudoType(AtomicString(pseudoClass), false)); |
} |
unsigned short Internals::compareTreeScopePosition(const Node* node1, const Node* node2, ExceptionState& exceptionState) const |