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

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

Issue 75463008: Revert 162247 "Revert 162180 "[Refactoring] Remove include "core..." (Closed) Base URL: svn://svn.chromium.org/blink/
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 | « trunk/Source/core/dom/Node.h ('k') | trunk/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/dom/SelectorQuery.cpp
===================================================================
--- trunk/Source/core/dom/SelectorQuery.cpp (revision 162247)
+++ trunk/Source/core/dom/SelectorQuery.cpp (working copy)
@@ -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 @@
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 @@
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 | « trunk/Source/core/dom/Node.h ('k') | trunk/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698