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

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

Issue 342283005: Make collection caching code more consistent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Stop including NodeListsNodeData.h in ContainerNode.h Created 6 years, 5 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 | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/dom/NodeListsNodeData.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.h
diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
index c23523427f589018ac24c004ef6447bee9c136ec..64de0397f6a00edb16abcc5accb1220f66d248fc 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -26,6 +26,7 @@
#include "bindings/core/v8/ExceptionStatePlaceholder.h"
#include "core/dom/Node.h"
+#include "core/html/CollectionType.h"
#include "wtf/OwnPtr.h"
#include "wtf/Vector.h"
@@ -185,7 +186,14 @@ protected:
void setFirstChild(Node* child) { m_firstChild = child; }
void setLastChild(Node* child) { m_lastChild = child; }
+ // Utility functions for NodeListsNodeData API.
+ template <typename Collection> PassRefPtrWillBeRawPtr<Collection> ensureCachedCollection(CollectionType);
+ template <typename Collection> PassRefPtrWillBeRawPtr<Collection> ensureCachedCollection(CollectionType, const AtomicString& name);
+ template <typename Collection> PassRefPtrWillBeRawPtr<Collection> ensureCachedCollection(CollectionType, const AtomicString& namespaceURI, const AtomicString& localName);
+ template <typename Collection> Collection* cachedCollection(CollectionType);
+
private:
+ NodeListsNodeData& ensureNodeLists();
void removeBetween(Node* previousChild, Node* nextChild, Node& oldChild);
void insertBeforeCommon(Node& nextChild, Node& oldChild);
void appendChildCommon(Node& child);
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/dom/NodeListsNodeData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698