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

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

Issue 70063005: [Refactoring] Remove include "core/inspector/InspectorInstrumentation.h" from SelectorChecker.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/SelectorQuery.cpp
diff --git a/Source/core/dom/SelectorQuery.cpp b/Source/core/dom/SelectorQuery.cpp
index d75fe0b6fc7db09c3bdd3e0cfdcdfb55fd5bad93..5763b8a0cf478feb264a9d7baf4bc1a1a565fc51 100644
--- a/Source/core/dom/SelectorQuery.cpp
+++ b/Source/core/dom/SelectorQuery.cpp
@@ -34,6 +34,7 @@
#include "core/css/SiblingTraversalStrategies.h"
#include "core/dom/Document.h"
#include "core/dom/ElementTraversal.h"
+#include "core/dom/Node.h"
#include "core/dom/StaticNodeList.h"
namespace WebCore {
@@ -179,12 +180,6 @@ PassRefPtr<Element> SelectorDataList::queryFirst(Node& rootNode) const
return executeQueryFirst(rootNode);
}
-static inline bool isTreeScopeRoot(Node* node)
-{
- ASSERT(node);
- return node->isDocumentNode() || node->isShadowRoot();
-}
-
void SelectorDataList::collectElementsByClassName(Node& rootNode, const AtomicString& className, Vector<RefPtr<Node> >& traversalRoots) const
{
for (Element* element = ElementTraversal::firstWithin(rootNode); element; element = ElementTraversal::next(*element, &rootNode)) {
@@ -258,7 +253,7 @@ PassOwnPtr<SimpleNodeList> SelectorDataList::findTraverseRoots(Node& rootNode, b
if (selector->m_match == CSSSelector::Id && !rootNode.document().containsMultipleElementsWithId(selector->value())) {
Element* element = rootNode.treeScope().getElementById(selector->value());
Node* adjustedNode = &rootNode;
- if (element && (isTreeScopeRoot(&rootNode) || element->isDescendantOf(&rootNode)))
+ if (element && (isTreeScopeRoot(rootNode) || element->isDescendantOf(&rootNode)))
adjustedNode = element;
else if (!element || isRightmostSelector)
adjustedNode = 0;
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698