From 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 9 Feb 2012 14:16:12 +0100 Subject: Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223) --- Tools/DumpRenderTree/chromium/WebViewHost.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Tools/DumpRenderTree/chromium/WebViewHost.cpp') diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp index 32b20dbf0..befa3b718 100644 --- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp +++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp @@ -471,7 +471,10 @@ void WebViewHost::finishLastTextCheck() m_spellcheck.spellCheckWord(WebString(text.characters(), text.length()), &misspelledPosition, &misspelledLength); if (!misspelledLength) break; - results.append(WebTextCheckingResult(WebTextCheckingResult::ErrorSpelling, offset + misspelledPosition, misspelledLength)); + Vector suggestions; + m_spellcheck.fillSuggestionList(WebString(text.characters() + misspelledPosition, misspelledLength), &suggestions); + results.append(WebTextCheckingResult(WebTextCheckingTypeSpelling, offset + misspelledPosition, misspelledLength, + suggestions.isEmpty() ? WebString() : suggestions[0])); text = text.substring(misspelledPosition + misspelledLength); offset += misspelledPosition + misspelledLength; } -- cgit v1.2.1