Chromium Code Reviews| Index: components/spellcheck/renderer/spellcheck.cc |
| diff --git a/components/spellcheck/renderer/spellcheck.cc b/components/spellcheck/renderer/spellcheck.cc |
| index 11fdc6762017271df95f1ce57c53ba8f3c8fc05e..5ff06a25adfad656be0f3c5164f03baf3c97cdcd 100644 |
| --- a/components/spellcheck/renderer/spellcheck.cc |
| +++ b/components/spellcheck/renderer/spellcheck.cc |
| @@ -399,12 +399,9 @@ bool SpellCheck::SpellCheckParagraph( |
| if (!custom_dictionary_.SpellCheckWord( |
| text, misspelling_start, misspelling_length)) { |
| - base::string16 replacement; |
| - textcheck_results.push_back(WebTextCheckingResult( |
| - blink::WebTextDecorationTypeSpelling, |
| - misspelling_start, |
| - misspelling_length, |
| - replacement)); |
| + textcheck_results.push_back( |
| + WebTextCheckingResult(blink::WebTextDecorationTypeSpelling, |
| + misspelling_start, misspelling_length)); |
|
kinuko
2017/01/23 04:37:49
If we omit replacement parameter the ctor will use
|
| } |
| position_in_text = misspelling_start + misspelling_length; |
| } |
| @@ -531,7 +528,7 @@ void SpellCheck::CreateTextCheckingResults( |
| results.push_back(WebTextCheckingResult( |
| static_cast<WebTextDecorationType>(decoration), |
| line_offset + spellcheck_result.location, spellcheck_result.length, |
| - replacement, spellcheck_result.hash)); |
| + blink::WebString::fromUTF16(replacement), spellcheck_result.hash)); |
| } |
| textcheck_results->assign(results); |