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 71a48a56cc62fbfd9098153f1efa18d809a453f9..dcdeea76139141acdfc23d338e2a4ed057e1bea8 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; |
} |