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

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

Issue 141683004: Use more const references in HTMLCollection / LiveNodeList (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Get rid of const_cast 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/NameNodeList.cpp ('k') | Source/core/dom/TagNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TagNodeList.h
diff --git a/Source/core/dom/TagNodeList.h b/Source/core/dom/TagNodeList.h
index 430609724424cfc693fada1888417aaf86b7d1e7..2c841da1f04fa71f59667deda5fcdb01b42fd7bb 100644
--- a/Source/core/dom/TagNodeList.h
+++ b/Source/core/dom/TagNodeList.h
@@ -50,7 +50,7 @@ public:
protected:
TagNodeList(PassRefPtr<Node> rootNode, CollectionType, const AtomicString& namespaceURI, const AtomicString& localName);
- virtual bool nodeMatches(Element*) const OVERRIDE;
+ virtual bool nodeMatches(const Element&) const OVERRIDE;
AtomicString m_namespaceURI;
AtomicString m_localName;
@@ -64,22 +64,22 @@ public:
return adoptRef(new HTMLTagNodeList(rootNode, localName));
}
- bool nodeMatchesInlined(Element*) const;
+ bool nodeMatchesInlined(const Element&) const;
private:
HTMLTagNodeList(PassRefPtr<Node> rootNode, const AtomicString& localName);
- virtual bool nodeMatches(Element*) const OVERRIDE;
+ virtual bool nodeMatches(const Element&) const OVERRIDE;
AtomicString m_loweredLocalName;
};
-inline bool HTMLTagNodeList::nodeMatchesInlined(Element* testNode) const
+inline bool HTMLTagNodeList::nodeMatchesInlined(const Element& testNode) const
{
// Implements http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagname
if (m_localName != starAtom) {
- const AtomicString& localName = testNode->isHTMLElement() ? m_loweredLocalName : m_localName;
- if (localName != testNode->localName())
+ const AtomicString& localName = testNode.isHTMLElement() ? m_loweredLocalName : m_localName;
+ if (localName != testNode.localName())
return false;
}
ASSERT(m_namespaceURI == starAtom);
« no previous file with comments | « Source/core/dom/NameNodeList.cpp ('k') | Source/core/dom/TagNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698