Chromium Code Reviews| 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 cdc6f2a23b7d8894c1a4cf2a9d0ff1f9b24bc404..674d99af094cfecb9f56b8435b9a0ae631f7b9fe 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" |
| @@ -1010,9 +1011,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 && |
|
yosin_UTC9
2017/06/01 03:29:12
How about introduce global function IsSpellingMark
|
| + marker->GetType() != DocumentMarker::kGrammar)) |
| return String(); |
| - return marker->Description(); |
| + return ToSpellCheckMarker(marker)->Description(); |
| } |
| static WTF::Optional<TextMatchMarker::MatchStatus> MatchStatusFrom( |