Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index f1c68f71d24408a3f1385ee21a752a5ace58cd1d..f0b7b12554dac75334e698614c4d248274eebca2 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -2690,9 +2690,14 @@ RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const |
return 0; |
} |
-bool Element::matches(const String& selectors, ExceptionState& exceptionState) |
+bool Element::webkitMatchesSelector(const String& selector, ExceptionState& exceptionState) |
{ |
- SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors, document(), exceptionState); |
+ if (selector.isEmpty()) { |
+ exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); |
+ return false; |
+ } |
+ |
+ SelectorQuery* selectorQuery = document().selectorQueryCache().add(selector, document(), exceptionState); |
if (!selectorQuery) |
return false; |
return selectorQuery->matches(*this); |