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

Unified Diff: Source/core/dom/Element.cpp

Issue 103303005: Revert "Implement Element.matches(selectors)" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698