| 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 fadc5589c455c3d52914c97327959907893f469d..d08c0004b666e728eba26422a4dd7857bd06bea9 100644
|
| --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| @@ -537,7 +537,7 @@ static void AddMarker(Document* document,
|
| DocumentMarker::MarkerType type,
|
| int location,
|
| int length,
|
| - const String& description) {
|
| + const Vector<String>& descriptions) {
|
| DCHECK(type == DocumentMarker::kSpelling || type == DocumentMarker::kGrammar)
|
| << type;
|
| DCHECK_GT(length, 0);
|
| @@ -549,6 +549,13 @@ static void AddMarker(Document* document,
|
| 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]);
|
| + }
|
| +
|
| if (type == DocumentMarker::kSpelling) {
|
| document->Markers().AddSpellingMarker(range_to_mark.StartPosition(),
|
| range_to_mark.EndPosition(),
|
| @@ -644,7 +651,7 @@ void SpellChecker::MarkAndReplaceFor(
|
| continue;
|
| AddMarker(GetFrame().GetDocument(), paragraph.CheckingRange(),
|
| DocumentMarker::kSpelling, result_location, result_length,
|
| - result.replacement);
|
| + result.replacements);
|
| continue;
|
|
|
| case kTextDecorationTypeGrammar:
|
| @@ -660,7 +667,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;
|
| }
|
|
|