Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| index 5e71a42497cf11a979fea3b59ff801262adae7b8..1f166a5e64ee127e0fa7f312f4c653cb2da949ea 100644 |
| --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| @@ -123,10 +123,24 @@ void DocumentMarkerController::Clear() { |
| possibly_existing_marker_types_ = 0; |
| } |
| -void DocumentMarkerController::AddMarker(const Position& start, |
| - const Position& end, |
| - DocumentMarker::MarkerType type, |
| - const String& description) { |
| +void DocumentMarkerController::AddSpellingMarker(const Position& start, |
| + const Position& end, |
| + const String& description) { |
| + AddSpellCheckMarker(start, end, DocumentMarker::kSpelling, description); |
| +} |
| + |
| +void DocumentMarkerController::AddGrammarMarker(const Position& start, |
| + const Position& end, |
| + const String& description) { |
| + AddSpellCheckMarker(start, end, DocumentMarker::kGrammar, description); |
| +} |
| + |
| +void DocumentMarkerController::AddSpellCheckMarker( |
| + const Position& start, |
| + const Position& end, |
| + DocumentMarker::MarkerType type, |
| + const String& description) { |
| + DCHECK(type == DocumentMarker::kSpelling || type == DocumentMarker::kGrammar); |
|
yosin_UTC9
2017/05/23 09:35:04
nit: s/);/) << type;/
|
| // Use a TextIterator to visit the potentially multiple nodes the range |
| // covers. |
| for (TextIterator marked_text(start, end); !marked_text.AtEnd(); |