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

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.cpp

Issue 2784753002: Add TextMatchMarkerList in preparation for DocumentMarkerController refactor (Closed)
Patch Set: Remove unnecessary TextMatchMarker constructor Created 3 years, 9 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
Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.cpp
index 622932e6f9a91cbaf42cf0f61952a7d66bb84531..6926df4d0ba075e1dd81af9a73096c091a204de7 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.cpp
@@ -86,13 +86,13 @@ DocumentMarkerList::DidRemoveMarkerOrNot DocumentMarkerList::removeMarkers(
// add either of the resulting slices that are left after removing target
if (startOffset > marker->startOffset()) {
- DocumentMarker* newLeft = new DocumentMarker(*marker);
+ DocumentMarker* newLeft = marker->clone();
newLeft->setEndOffset(startOffset);
newMarkerList.push_back(newLeft);
}
if (marker->endOffset() > endOffset) {
- DocumentMarker* newRight = new DocumentMarker(*marker);
+ DocumentMarker* newRight = marker->clone();
newRight->setStartOffset(endOffset);
newMarkerList.push_back(newRight);
}

Powered by Google App Engine
This is Rietveld 408576698