| Index: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| index bd6fad960936c59028da2e15856885b717236563..8f683ea52b944758cbfe56aadde16da506d6eb6f 100644
|
| --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| @@ -538,7 +538,7 @@ static void AddMarker(Document* document,
|
| DocumentMarker::MarkerType type,
|
| int location,
|
| int length,
|
| - const String& description) {
|
| + const Vector<String>& descriptions) {
|
| DCHECK_GT(length, 0);
|
| DCHECK_GE(location, 0);
|
| const EphemeralRange& range_to_mark =
|
| @@ -547,6 +547,14 @@ static void AddMarker(Document* document,
|
| return;
|
| if (!SpellChecker::IsSpellCheckingEnabledAt(range_to_mark.EndPosition()))
|
| return;
|
| +
|
| + String description;
|
| + for (size_t i = 0; i < descriptions.size(); ++i) {
|
| + if (i != 0)
|
| + description.append('\n');
|
| + description.append(descriptions[i]);
|
| + }
|
| +
|
| document->Markers().AddMarker(range_to_mark.StartPosition(),
|
| range_to_mark.EndPosition(), type, description);
|
| }
|
| @@ -634,7 +642,7 @@ void SpellChecker::MarkAndReplaceFor(
|
| continue;
|
| AddMarker(GetFrame().GetDocument(), paragraph.CheckingRange(),
|
| DocumentMarker::kSpelling, result_location, result_length,
|
| - result.replacement);
|
| + result.replacements);
|
| continue;
|
|
|
| case kTextDecorationTypeGrammar:
|
| @@ -650,7 +658,7 @@ void SpellChecker::MarkAndReplaceFor(
|
| continue;
|
| AddMarker(GetFrame().GetDocument(), paragraph.CheckingRange(),
|
| DocumentMarker::kGrammar, result_location + detail.location,
|
| - detail.length, result.replacement);
|
| + detail.length, result.replacements);
|
| }
|
| continue;
|
| }
|
|
|