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 a72600abe25ab1a9862fb70b50d3cb18a52e228f..5aa357810027cfd4c86ecf4282189e4649bd95fb 100644 |
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
@@ -536,7 +536,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); |
@@ -548,6 +548,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, description); |
return; |
@@ -643,7 +650,7 @@ void SpellChecker::MarkAndReplaceFor( |
continue; |
AddMarker(GetFrame().GetDocument(), paragraph.CheckingRange(), |
DocumentMarker::kSpelling, result_location, result_length, |
- result.replacement); |
+ result.replacements); |
continue; |
case kTextDecorationTypeGrammar: |
@@ -659,7 +666,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; |
} |