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

Unified Diff: Source/core/html/HTMLCollection.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/TagNodeList.cpp ('k') | Source/core/html/HTMLCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCollection.h
diff --git a/Source/core/html/HTMLCollection.h b/Source/core/html/HTMLCollection.h
index 797b6ad70017ba5073da42903e75fe15860cfa14..be1f01d240c9fd9b5051d171865bae7532dbce89 100644
--- a/Source/core/html/HTMLCollection.h
+++ b/Source/core/html/HTMLCollection.h
@@ -61,8 +61,8 @@ public:
virtual Element* virtualItemAfter(Element*) const;
- Element* traverseToFirstElement(ContainerNode& root) const;
- Element* traverseForwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset, ContainerNode* root) const;
+ Element* traverseToFirstElement(const ContainerNode& root) const;
+ Element* traverseForwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset, const ContainerNode& root) const;
protected:
HTMLCollection(Node* base, CollectionType, ItemAfterOverrideType);
@@ -78,8 +78,8 @@ protected:
void appendNameCache(const AtomicString& name, Element* element) const { append(m_nameCache, name, element); }
private:
- bool checkForNameMatch(Element*, bool checkName, const AtomicString& name) const;
- Element* traverseNextElement(Element& previous, ContainerNode* root) const;
+ bool checkForNameMatch(const Element&, bool checkName, const AtomicString& name) const;
+ Element* traverseNextElement(Element& previous, const ContainerNode& root) const;
static void append(NodeCacheMap&, const AtomicString&, Element*);
void invalidateIdNameCacheMaps() const
« no previous file with comments | « Source/core/dom/TagNodeList.cpp ('k') | Source/core/html/HTMLCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698