Chromium Code Reviews| Index: third_party/WebKit/Source/core/page/ContextMenuClient.cpp |
| diff --git a/third_party/WebKit/Source/core/page/ContextMenuClient.cpp b/third_party/WebKit/Source/core/page/ContextMenuClient.cpp |
| index 9f87cba674fb345d002b86468b3a57afed5c9422..a0c2256a93f460d0479af18e77585f14cf09a48d 100644 |
| --- a/third_party/WebKit/Source/core/page/ContextMenuClient.cpp |
| +++ b/third_party/WebKit/Source/core/page/ContextMenuClient.cpp |
| @@ -360,9 +360,15 @@ bool ContextMenuClient::ShowContextMenu(const ContextMenu* default_menu, |
| // suggestions to these markers in the background. Therefore, when a |
| // user right-clicks a mouse on a word, Chrome just needs to find a |
| // spelling marker on the word instead of spellchecking it. |
| - String description; |
| - data.misspelled_word = |
| - selected_frame->GetSpellChecker().SelectMisspellingAsync(description); |
| + Optional<std::pair<String, String>> misspelled_word_and_description = |
| + selected_frame->GetSpellChecker().SelectMisspellingAsync(); |
| + data.misspelled_word = misspelled_word_and_description |
|
yosin_UTC9
2017/07/20 01:00:54
Because both |data.misspell_word| and |description
|
| + ? misspelled_word_and_description.value().first |
| + : String(); |
| + const String& description = |
| + misspelled_word_and_description |
| + ? misspelled_word_and_description.value().second |
| + : String(); |
| if (description.length()) { |
| Vector<String> suggestions; |
| description.Split('\n', suggestions); |