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 dc2881b92fbe6d4cfae34626bc7e712bcfb6ae0e..fd968340551a8341c67add0f4a9d59226d5de47a 100644 |
| --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
| @@ -38,6 +38,7 @@ |
| #include "core/editing/markers/DocumentMarkerListEditor.h" |
| #include "core/editing/markers/GenericDocumentMarkerListImpl.h" |
| #include "core/editing/markers/RenderedDocumentMarker.h" |
| +#include "core/editing/markers/SpellCheckMarkerListImpl.h" |
| #include "core/frame/FrameView.h" |
| #include "core/layout/LayoutObject.h" |
| @@ -70,6 +71,9 @@ DocumentMarkerList* CreateListForType(DocumentMarker::MarkerType type) { |
| switch (type) { |
| case DocumentMarker::kComposition: |
| return new CompositionMarkerListImpl(); |
| + case DocumentMarker::kSpelling: |
| + case DocumentMarker::kGrammar: |
| + return new SpellCheckMarkerListImpl(); |
| default: |
| return new GenericDocumentMarkerListImpl(); |
| } |
| @@ -512,7 +516,8 @@ void DocumentMarkerController::RemoveSpellingMarkersUnderWords( |
| DocumentMarkerList* const list = ListForType(markers, type); |
| if (!list) |
| continue; |
| - list->RemoveMarkersUnderWords(ToText(node).data(), words); |
| + static_cast<SpellCheckMarkerListImpl* const>(list) |
|
yosin_UTC9
2017/05/08 04:50:54
nit: s/ const//
We should use DEFINE_TYPE_CAST(),
|
| + ->RemoveMarkersUnderWords(ToText(node).data(), words); |
| } |
| } |
| } |