diff options
Diffstat (limited to 'Source/WebKit/chromium/src/EditorClientImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/EditorClientImpl.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/WebKit/chromium/src/EditorClientImpl.cpp b/Source/WebKit/chromium/src/EditorClientImpl.cpp index 38d4f5e..6f2231d 100644 --- a/Source/WebKit/chromium/src/EditorClientImpl.cpp +++ b/Source/WebKit/chromium/src/EditorClientImpl.cpp @@ -54,6 +54,7 @@ #include "WebNode.h" #include "WebPasswordAutocompleteListener.h" #include "WebRange.h" +#include "WebSpellCheckClient.h" #include "WebTextAffinity.h" #include "WebTextCheckingCompletionImpl.h" #include "WebViewClient.h" @@ -856,8 +857,8 @@ void EditorClientImpl::checkSpellingOfString(const UChar* text, int length, int spellLength = 0; // Check to see if the provided text is spelled correctly. - if (isContinuousSpellCheckingEnabled() && m_webView->client()) - m_webView->client()->spellCheck(WebString(text, length), spellLocation, spellLength); + if (isContinuousSpellCheckingEnabled() && m_webView->spellCheckClient()) + m_webView->spellCheckClient()->spellCheck(WebString(text, length), spellLocation, spellLength); else { spellLocation = 0; spellLength = 0; @@ -873,7 +874,8 @@ void EditorClientImpl::checkSpellingOfString(const UChar* text, int length, void EditorClientImpl::requestCheckingOfString(SpellChecker* sender, int identifier, const String& text) { - m_webView->client()->requestCheckingOfText(text, new WebTextCheckingCompletionImpl(identifier, sender)); + if (m_webView->spellCheckClient()) + m_webView->spellCheckClient()->requestCheckingOfText(text, new WebTextCheckingCompletionImpl(identifier, sender)); } String EditorClientImpl::getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) @@ -888,7 +890,9 @@ String EditorClientImpl::getAutoCorrectSuggestionForMisspelledWord(const String& return String(); } - return m_webView->client()->autoCorrectWord(WebString(misspelledWord)); + if (m_webView->spellCheckClient()) + return m_webView->spellCheckClient()->autoCorrectWord(WebString(misspelledWord)); + return String(); } void EditorClientImpl::checkGrammarOfString(const UChar*, int length, @@ -911,20 +915,20 @@ void EditorClientImpl::updateSpellingUIWithGrammarString(const String&, void EditorClientImpl::updateSpellingUIWithMisspelledWord(const String& misspelledWord) { - if (m_webView->client()) - m_webView->client()->updateSpellingUIWithMisspelledWord(WebString(misspelledWord)); + if (m_webView->spellCheckClient()) + m_webView->spellCheckClient()->updateSpellingUIWithMisspelledWord(WebString(misspelledWord)); } void EditorClientImpl::showSpellingUI(bool show) { - if (m_webView->client()) - m_webView->client()->showSpellingUI(show); + if (m_webView->spellCheckClient()) + m_webView->spellCheckClient()->showSpellingUI(show); } bool EditorClientImpl::spellingUIIsShowing() { - if (m_webView->client()) - return m_webView->client()->isShowingSpellingUI(); + if (m_webView->spellCheckClient()) + return m_webView->spellCheckClient()->isShowingSpellingUI(); return false; } |