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

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

Issue 176933013: Pass rootNode by reference when constructing node lists / collections (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/TagCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeRareData.h
diff --git a/Source/core/dom/NodeRareData.h b/Source/core/dom/NodeRareData.h
index bb1e55f563009da7b59a0cd4eff8a3422ccae689..b127e7eed1e05be94243493905fe82bbf5d5e0b1 100644
--- a/Source/core/dom/NodeRareData.h
+++ b/Source/core/dom/NodeRareData.h
@@ -50,7 +50,7 @@ public:
toChildNodeList(m_childNodeList)->invalidateCache();
}
- PassRefPtr<ChildNodeList> ensureChildNodeList(ContainerNode* node)
+ PassRefPtr<ChildNodeList> ensureChildNodeList(ContainerNode& node)
{
if (m_childNodeList)
return toChildNodeList(m_childNodeList);
@@ -59,7 +59,7 @@ public:
return list.release();
}
- PassRefPtr<EmptyNodeList> ensureEmptyChildNodeList(Node* node)
+ PassRefPtr<EmptyNodeList> ensureEmptyChildNodeList(Node& node)
{
if (m_childNodeList)
return toEmptyNodeList(m_childNodeList);
@@ -97,7 +97,7 @@ public:
typedef HashMap<QualifiedName, TagCollection*> TagCollectionCacheNS;
template<typename T>
- PassRefPtr<T> addCache(ContainerNode* node, CollectionType collectionType, const AtomicString& name)
+ PassRefPtr<T> addCache(ContainerNode& node, CollectionType collectionType, const AtomicString& name)
{
NodeListAtomicNameCacheMap::AddResult result = m_atomicNameCaches.add(namedNodeListKey(collectionType, name), 0);
if (!result.isNewEntry)
@@ -109,7 +109,7 @@ public:
}
template<typename T>
- PassRefPtr<T> addCache(ContainerNode* node, CollectionType collectionType)
+ PassRefPtr<T> addCache(ContainerNode& node, CollectionType collectionType)
{
NodeListAtomicNameCacheMap::AddResult result = m_atomicNameCaches.add(namedNodeListKey(collectionType, starAtom), 0);
if (!result.isNewEntry)
@@ -126,7 +126,7 @@ public:
return static_cast<T*>(m_atomicNameCaches.get(namedNodeListKey(collectionType, starAtom)));
}
- PassRefPtr<TagCollection> addCache(ContainerNode* node, const AtomicString& namespaceURI, const AtomicString& localName)
+ PassRefPtr<TagCollection> addCache(ContainerNode& node, const AtomicString& namespaceURI, const AtomicString& localName)
{
QualifiedName name(nullAtom, localName, namespaceURI);
TagCollectionCacheNS::AddResult result = m_tagCollectionCacheNS.add(name, 0);
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/TagCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698