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

Unified Diff: Source/core/dom/Document.cpp

Issue 178613003: Make Document::nodeChildrenWillBeRemoved() take a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use PassRefPtr 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/Document.h ('k') | Source/core/dom/Range.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 20777d982c6888951e29e87cd19ac26dbf2691c6..62689136a550d721db3cf6049738707a39b4898b 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3597,7 +3597,7 @@ void Document::updateRangesAfterChildrenChanged(ContainerNode* container)
}
}
-void Document::nodeChildrenWillBeRemoved(ContainerNode* container)
+void Document::nodeChildrenWillBeRemoved(ContainerNode& container)
{
NoEventDispatchAssertion assertNoEventDispatch;
if (!m_ranges.isEmpty()) {
@@ -3608,12 +3608,12 @@ void Document::nodeChildrenWillBeRemoved(ContainerNode* container)
HashSet<NodeIterator*>::const_iterator nodeIteratorsEnd = m_nodeIterators.end();
for (HashSet<NodeIterator*>::const_iterator it = m_nodeIterators.begin(); it != nodeIteratorsEnd; ++it) {
- for (Node* n = container->firstChild(); n; n = n->nextSibling())
+ for (Node* n = container.firstChild(); n; n = n->nextSibling())
(*it)->nodeWillBeRemoved(*n);
}
if (Frame* frame = this->frame()) {
- for (Node* n = container->firstChild(); n; n = n->nextSibling()) {
+ for (Node* n = container.firstChild(); n; n = n->nextSibling()) {
frame->eventHandler().nodeWillBeRemoved(*n);
frame->selection().nodeWillBeRemoved(*n);
frame->page()->dragCaretController().nodeWillBeRemoved(*n);
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Range.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698