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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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.cpp ('k') | Source/core/dom/StyleSheetCollections.h » ('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 82baa86acad77a30e9c487db255558d39a121fc0..fc5d820a512c2d4083476603a6e9429d0280aa25 100644
--- a/Source/core/dom/SelectorQuery.cpp
+++ b/Source/core/dom/SelectorQuery.cpp
@@ -246,7 +246,7 @@ PassOwnPtr<SimpleNodeList> SelectorDataList::findTraverseRoots(Node* rootNode, b
for (const CSSSelector* selector = m_selectors[0].selector; selector; selector = selector->tagHistory()) {
if (selector->m_match == CSSSelector::Id && !rootNode->document().containsMultipleElementsWithId(selector->value())) {
- Element* element = rootNode->treeScope().getElementById(selector->value());
+ Element* element = rootNode->treeScope()->getElementById(selector->value());
if (element && (isTreeScopeRoot(rootNode) || element->isDescendantOf(rootNode)))
rootNode = element;
else if (!element || isRightmostSelector)
@@ -317,7 +317,7 @@ void SelectorDataList::executeQueryAll(Node* rootNode, Vector<RefPtr<Node> >& ma
break;
// Just the same as getElementById.
- Element* element = rootNode->treeScope().getElementById(firstSelector->value());
+ Element* element = rootNode->treeScope()->getElementById(firstSelector->value());
if (element && (isTreeScopeRoot(rootNode) || element->isDescendantOf(rootNode)))
matchedElements.append(element);
return;
@@ -375,7 +375,7 @@ Node* SelectorDataList::findTraverseRoot(Node* rootNode, bool& matchTraverseRoot
bool startFromParent = false;
for (const CSSSelector* selector = m_selectors[0].selector; selector; selector = selector->tagHistory()) {
if (selector->m_match == CSSSelector::Id && !rootNode->document().containsMultipleElementsWithId(selector->value())) {
- Element* element = rootNode->treeScope().getElementById(selector->value());
+ Element* element = rootNode->treeScope()->getElementById(selector->value());
if (element && (isTreeScopeRoot(rootNode) || element->isDescendantOf(rootNode)))
rootNode = element;
else if (!element || matchSingleNode)
@@ -429,7 +429,7 @@ Element* SelectorDataList::executeQueryFirst(Node* rootNode) const
{
if (rootNode->document().containsMultipleElementsWithId(selector->value()))
break;
- Element* element = rootNode->treeScope().getElementById(selector->value());
+ Element* element = rootNode->treeScope()->getElementById(selector->value());
return element && (isTreeScopeRoot(rootNode) || element->isDescendantOf(rootNode)) ? element : 0;
}
case CSSSelector::Class:
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/StyleSheetCollections.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698