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

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

Issue 138743008: Make sure the root node of selector queries is a ContainerNode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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 | « Source/core/dom/Node.h ('k') | Source/core/dom/SelectorQuery.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index e238a3a068cbb4a7aa4713f7679787bcd3e037f4..3a49e8688ce78c631d733c37962521eea593aa8e 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -47,7 +47,6 @@
#include "core/dom/NodeTraversal.h"
#include "core/dom/ProcessingInstruction.h"
#include "core/dom/Range.h"
-#include "core/dom/SelectorQuery.h"
#include "core/dom/StaticNodeList.h"
#include "core/dom/TagNodeList.h"
#include "core/dom/TemplateContentDocumentFragment.h"
@@ -1257,32 +1256,6 @@ bool Node::inSameContainingBlockFlowElement(Node *n)
// FIXME: End of obviously misplaced HTML editing functions. Try to move these out of Node.
-PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, ExceptionState& exceptionState)
-{
- if (selectors.isEmpty()) {
- exceptionState.throwDOMException(SyntaxError, "The provided selector is empty.");
- return 0;
- }
-
- SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors, document(), exceptionState);
- if (!selectorQuery)
- return 0;
- return selectorQuery->queryFirst(*this);
-}
-
-PassRefPtr<NodeList> Node::querySelectorAll(const AtomicString& selectors, ExceptionState& exceptionState)
-{
- if (selectors.isEmpty()) {
- exceptionState.throwDOMException(SyntaxError, "The provided selector is empty.");
- return 0;
- }
-
- SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors, document(), exceptionState);
- if (!selectorQuery)
- return 0;
- return selectorQuery->queryAll(*this);
-}
-
Document* Node::ownerDocument() const
{
Document* doc = &document();
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/SelectorQuery.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698