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

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

Issue 2829543002: [DMC #5] Add SpellCheckMarkerListImpl (Closed)
Patch Set: Leave method implementations in DocumentMarkerListEditor but change signatures 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/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)
+ ->RemoveMarkersUnderWords(ToText(node).data(), words);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698