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

Unified Diff: Source/core/html/HTMLCollection.h

Issue 130753004: Move isNameCacheValid member from LiveNodeListBase to HTMLCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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
« no previous file with comments | « Source/core/dom/LiveNodeList.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 71cb3695ed41d06399c02b10b617feec4c63a45c..ce6505a4fe04a16be3a6f583f792b511a2ccb29d 100644
--- a/Source/core/html/HTMLCollection.h
+++ b/Source/core/html/HTMLCollection.h
@@ -68,6 +68,8 @@ protected:
HTMLCollection(Node* base, CollectionType, ItemAfterOverrideType);
virtual void updateNameCache() const;
+ bool hasNameCache() const { return m_isNameCacheValid; }
+ void setHasNameCache() const { m_isNameCacheValid = true; }
typedef HashMap<StringImpl*, OwnPtr<Vector<Element*> > > NodeCacheMap;
Vector<Element*>* idCache(const AtomicString& name) const { return m_idCache.get(name.impl()); }
@@ -84,8 +86,10 @@ private:
{
m_idCache.clear();
m_nameCache.clear();
+ m_isNameCacheValid = false;
}
+ mutable unsigned m_isNameCacheValid : 1;
mutable NodeCacheMap m_idCache;
mutable NodeCacheMap m_nameCache;
« no previous file with comments | « Source/core/dom/LiveNodeList.cpp ('k') | Source/core/html/HTMLCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698