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

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 nits 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5f0b66d71a7289b337e46ae6c2cb7203da3f3f19 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() << "Unhanded marker type: " << marker->GetType();
+ return;
}
void GenericDocumentMarkerListImpl::Clear() {
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698