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

Unified Diff: components/test_runner/spell_check_client.cc

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: components/test_runner/spell_check_client.cc
diff --git a/components/test_runner/spell_check_client.cc b/components/test_runner/spell_check_client.cc
index 68c663aa0a4c5763b5188bd66a62cccca9e0bf6d..6bbba32a4a7ce73ee4465b78308784b19b8451f4 100644
--- a/components/test_runner/spell_check_client.cc
+++ b/components/test_runner/spell_check_client.cc
@@ -43,34 +43,6 @@ void SpellCheckClient::spellCheck(
spell_check_.SpellCheckWord(text, &misspelled_offset, &misspelled_length);
}
-void SpellCheckClient::checkTextOfParagraph(
- const blink::WebString& text,
- blink::WebTextCheckingTypeMask mask,
- blink::WebVector<blink::WebTextCheckingResult>* web_results) {
- std::vector<blink::WebTextCheckingResult> results;
- if (mask & blink::WebTextCheckingTypeSpelling) {
- size_t offset = 0;
- base::string16 data = text;
- while (offset < data.length()) {
- int misspelled_position = 0;
- int misspelled_length = 0;
- spell_check_.SpellCheckWord(
- data.substr(offset), &misspelled_position, &misspelled_length);
- if (!misspelled_length)
- break;
- blink::WebTextCheckingResult result;
- result.decoration = blink::WebTextDecorationTypeSpelling;
- result.location = offset + misspelled_position;
- result.length = misspelled_length;
- results.push_back(result);
- offset += misspelled_position + misspelled_length;
- }
- }
- if (mask & blink::WebTextCheckingTypeGrammar)
- MockGrammarCheck::CheckGrammarOfString(text, &results);
- web_results->assign(results);
-}
-
void SpellCheckClient::requestCheckingOfText(
const blink::WebString& text,
const blink::WebVector<uint32_t>& markers,

Powered by Google App Engine
This is Rietveld 408576698