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

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

Issue 176863009: Have NodeWithIndex deal with references instead of pointers (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/Document.h ('k') | Source/core/dom/NodeWithIndex.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 decf449ee5f21a7225701cf6a2a15cd459db43a6..adc9ddbfad6e22b4e84c40189b27cca8ad6b7c3c 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3667,7 +3667,7 @@ void Document::didRemoveText(Node* text, unsigned offset, unsigned length)
m_markers->shiftMarkers(text, offset + length, 0 - length);
}
-void Document::didMergeTextNodes(Text* oldNode, unsigned offset)
+void Document::didMergeTextNodes(Text& oldNode, unsigned offset)
{
if (!m_ranges.isEmpty()) {
NodeWithIndex oldNodeWithIndex(oldNode);
@@ -3677,12 +3677,12 @@ void Document::didMergeTextNodes(Text* oldNode, unsigned offset)
}
if (m_frame)
- m_frame->selection().didMergeTextNodes(*oldNode, offset);
+ m_frame->selection().didMergeTextNodes(oldNode, offset);
// FIXME: This should update markers for spelling and grammar checking.
}
-void Document::didSplitTextNode(Text* oldNode)
+void Document::didSplitTextNode(Text& oldNode)
{
if (!m_ranges.isEmpty()) {
HashSet<Range*>::const_iterator end = m_ranges.end();
@@ -3691,7 +3691,7 @@ void Document::didSplitTextNode(Text* oldNode)
}
if (m_frame)
- m_frame->selection().didSplitTextNode(*oldNode);
+ m_frame->selection().didSplitTextNode(oldNode);
// FIXME: This should update markers for spelling and grammar checking.
}
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/NodeWithIndex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698