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

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

Issue 2842263002: [DMC #3.5] Split up DocumentMarkerListEditor::AddMarker() into two methods (Closed)
Patch Set: Fix accidental renaming, move method implementation to make patch smaller Created 3 years, 8 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/GenericDocumentMarkerListImpl.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp b/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp
index 587e67e74f607f166383a26bd66370935c324c11..3c4ceb3289296a65bf76646083c1da8976def1b4 100644
--- a/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp
@@ -14,7 +14,20 @@ bool GenericDocumentMarkerListImpl::IsEmpty() const {
}
void GenericDocumentMarkerListImpl::Add(DocumentMarker* marker) {
- DocumentMarkerListEditor::AddMarker(&markers_, marker);
+ switch (marker->GetType()) {
+ case DocumentMarker::kSpelling:
+ case DocumentMarker::kGrammar:
+ DocumentMarkerListEditor::AddMarkerAndMergeOverlapping(&markers_, marker);
+ return;
+ case DocumentMarker::kTextMatch:
+ case DocumentMarker::kComposition:
+ DocumentMarkerListEditor::AddMarkerWithoutMergingOverlapping(&markers_,
+ marker);
+ return;
+ }
+
+ NOTREACHED();
yosin_UTC9 2017/04/28 01:01:28 Let's print marker->GetType() to add more info to
+ return;
}
void GenericDocumentMarkerListImpl::Clear() {

Powered by Google App Engine
This is Rietveld 408576698