Index: third_party/WebKit/Source/core/testing/Internals.cpp |
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp |
index 0e9f300e2e332710f2db273a5f143d58ac87bf60..6512225803bfc9d5c2817b8acd221033ec046fb7 100644 |
--- a/third_party/WebKit/Source/core/testing/Internals.cpp |
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp |
@@ -65,6 +65,7 @@ |
#include "core/editing/iterators/TextIterator.h" |
#include "core/editing/markers/DocumentMarker.h" |
#include "core/editing/markers/DocumentMarkerController.h" |
+#include "core/editing/markers/SpellCheckMarker.h" |
#include "core/editing/markers/TextMatchMarker.h" |
#include "core/editing/serializers/Serialization.h" |
#include "core/editing/spellcheck/IdleSpellCheckCallback.h" |
@@ -1014,9 +1015,10 @@ String Internals::markerDescriptionForNode(Node* node, |
unsigned index, |
ExceptionState& exception_state) { |
DocumentMarker* marker = MarkerAt(node, marker_type, index, exception_state); |
- if (!marker) |
+ if (!marker || (marker->GetType() != DocumentMarker::kSpelling && |
+ marker->GetType() != DocumentMarker::kGrammar)) |
return String(); |
- return marker->Description(); |
+ return ToSpellCheckMarker(marker)->Description(); |
} |
static WTF::Optional<TextMatchMarker::MatchStatus> MatchStatusFrom( |