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

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

Issue 49153006: Have ContainerNodeAlgorithms deal with references instead of pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/ContainerNode.cpp » ('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 61034cb569cc430a1615a4ac42f926fdc434bf5b..16d09422fd7a8b138f534050a1570ca351ef3ff1 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -37,8 +37,8 @@ class HTMLCollection;
namespace Private {
template<class GenericNode, class GenericNodeContainer>
- void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer*);
-};
+ void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer&);
+}
class NoEventDispatchAssertion {
public:
@@ -105,7 +105,7 @@ public:
// They don't send DOM mutation events or handle reparenting.
// However, arbitrary code may be run by beforeload handlers.
void parserAppendChild(PassRefPtr<Node>);
- void parserRemoveChild(Node*);
+ void parserRemoveChild(Node&);
void parserInsertBefore(PassRefPtr<Node> newChild, Node* refChild);
void parserTakeAllChildrenFrom(ContainerNode*);
@@ -135,18 +135,18 @@ protected:
ContainerNode(TreeScope*, ConstructionType = CreateContainer);
template<class GenericNode, class GenericNodeContainer>
- friend void appendChildToContainer(GenericNode* child, GenericNodeContainer*);
+ friend void appendChildToContainer(GenericNode& child, GenericNodeContainer&);
template<class GenericNode, class GenericNodeContainer>
- friend void Private::addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer*);
+ friend void Private::addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer&);
void removeDetachedChildren();
void setFirstChild(Node* child) { m_firstChild = child; }
void setLastChild(Node* child) { m_lastChild = child; }
private:
- void removeBetween(Node* previousChild, Node* nextChild, Node* oldChild);
- void insertBeforeCommon(Node* nextChild, Node* oldChild);
+ void removeBetween(Node* previousChild, Node* nextChild, Node& oldChild);
+ void insertBeforeCommon(Node& nextChild, Node& oldChild);
void attachChildren(const AttachContext& = AttachContext());
void detachChildren(const AttachContext& = AttachContext());
@@ -246,8 +246,8 @@ class ChildNodesLazySnapshot {
WTF_MAKE_NONCOPYABLE(ChildNodesLazySnapshot);
WTF_MAKE_FAST_ALLOCATED;
public:
- explicit ChildNodesLazySnapshot(Node* parentNode)
- : m_currentNode(parentNode->firstChild())
+ explicit ChildNodesLazySnapshot(Node& parentNode)
+ : m_currentNode(parentNode.firstChild())
, m_currentIndex(0)
{
m_nextSnapshot = latestSnapshot;
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/dom/ContainerNode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698