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

Unified Diff: Source/core/editing/CompositeEditCommand.cpp

Issue 181693003: Have Document::markers() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/Node.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/CompositeEditCommand.cpp
diff --git a/Source/core/editing/CompositeEditCommand.cpp b/Source/core/editing/CompositeEditCommand.cpp
index 3b3ade0f3d9f22b07bacd384ee5f65d2800a7543..5c0fa47fc0e93a43a1e2b39a43d7192bbb4a5211 100644
--- a/Source/core/editing/CompositeEditCommand.cpp
+++ b/Source/core/editing/CompositeEditCommand.cpp
@@ -497,13 +497,13 @@ static void copyMarkers(const Vector<DocumentMarker*>& markerPointers, Vector<Do
void CompositeEditCommand::replaceTextInNodePreservingMarkers(PassRefPtr<Text> prpNode, unsigned offset, unsigned count, const String& replacementText)
{
RefPtr<Text> node(prpNode);
- DocumentMarkerController* markerController = document().markers();
+ DocumentMarkerController& markerController = document().markers();
Vector<DocumentMarker> markers;
- copyMarkers(markerController->markersInRange(Range::create(document(), node.get(), offset, node.get(), offset + count).get(), DocumentMarker::AllMarkers()), markers);
+ copyMarkers(markerController.markersInRange(Range::create(document(), node.get(), offset, node.get(), offset + count).get(), DocumentMarker::AllMarkers()), markers);
replaceTextInNode(node, offset, count, replacementText);
RefPtr<Range> newRange = Range::create(document(), node.get(), offset, node.get(), offset + replacementText.length());
for (size_t i = 0; i < markers.size(); ++i)
- markerController->addMarker(newRange.get(), markers[i].type(), markers[i].description());
+ markerController.addMarker(newRange.get(), markers[i].type(), markers[i].description());
}
Position CompositeEditCommand::positionOutsideTabSpan(const Position& pos)
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698