Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1273)

Unified Diff: third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp

Issue 2228293002: Remove dead code in spell checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DeprecateTextCheckingType
Patch Set: 201608101257 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp b/third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp
index 3dbc908deca454c3caa331d6ea94dd9d70f0e53b..8337e2305f1236d7820083ef751fcf9bfad03071 100644
--- a/third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp
+++ b/third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp
@@ -153,33 +153,7 @@ void SpellCheckerClientImpl::checkGrammarOfString(const String& text, WTF::Vecto
*badGrammarLocation = -1;
if (badGrammarLength)
*badGrammarLength = 0;
-
- if (!m_webView->spellCheckClient())
- return;
- WebVector<WebTextCheckingResult> webResults;
- m_webView->spellCheckClient()->checkTextOfParagraph(text, WebTextCheckingTypeGrammar, &webResults);
- if (!webResults.size())
- return;
-
- // Convert a list of WebTextCheckingResults to a list of GrammarDetails. If
- // the converted vector of GrammarDetails has grammar errors, we set
- // badGrammarLocation and badGrammarLength to tell WebKit that the input
- // text has grammar errors.
- for (size_t i = 0; i < webResults.size(); ++i) {
- if (webResults[i].decoration == WebTextDecorationTypeGrammar) {
- GrammarDetail detail;
- detail.location = webResults[i].location;
- detail.length = webResults[i].length;
- detail.userDescription = webResults[i].replacement;
- details.append(detail);
- }
- }
- if (!details.size())
- return;
- if (badGrammarLocation)
- *badGrammarLocation = 0;
- if (badGrammarLength)
- *badGrammarLength = text.length();
+ return;
}
void SpellCheckerClientImpl::updateSpellingUIWithMisspelledWord(const String& misspelledWord)

Powered by Google App Engine
This is Rietveld 408576698