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

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

Issue 141683004: Use more const references in HTMLCollection / LiveNodeList (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/dom/TagNodeList.cpp
diff --git a/Source/core/dom/TagNodeList.cpp b/Source/core/dom/TagNodeList.cpp
index 394463481792f77f2574d797350b8fc9b0ad77f5..1b5a461c4c486a15455d4dc6467cfe530612c7ae 100644
--- a/Source/core/dom/TagNodeList.cpp
+++ b/Source/core/dom/TagNodeList.cpp
@@ -45,13 +45,13 @@ TagNodeList::~TagNodeList()
ownerNode()->nodeLists()->removeCacheWithQualifiedName(this, m_namespaceURI, m_localName);
}
-bool TagNodeList::nodeMatches(Element* testNode) const
+bool TagNodeList::nodeMatches(const Element& testNode) const
{
// Implements http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagnamens
- if (m_localName != starAtom && m_localName != testNode->localName())
+ if (m_localName != starAtom && m_localName != testNode.localName())
return false;
- return m_namespaceURI == starAtom || m_namespaceURI == testNode->namespaceURI();
+ return m_namespaceURI == starAtom || m_namespaceURI == testNode.namespaceURI();
}
HTMLTagNodeList::HTMLTagNodeList(PassRefPtr<Node> rootNode, const AtomicString& localName)
@@ -60,7 +60,7 @@ HTMLTagNodeList::HTMLTagNodeList(PassRefPtr<Node> rootNode, const AtomicString&
{
}
-bool HTMLTagNodeList::nodeMatches(Element* testNode) const
+bool HTMLTagNodeList::nodeMatches(const Element& testNode) const
{
return nodeMatchesInlined(testNode);
}

Powered by Google App Engine
This is Rietveld 408576698