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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Issue 2740603003: Hide SpellCheckRequest from other classes in editing/spellcheck (Closed)
Patch Set: Created 3 years, 9 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/core/editing/spellcheck/SpellChecker.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
index 25f60f163f27973c6d1c8a2585a635c2d5b08483..7518e70bf1a327ba015a95d6175c5c6e4c6c82eb 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -500,9 +500,7 @@ void SpellChecker::chunkAndMarkAllMisspellings(
// Check the full paragraph instead if the paragraph is short, which saves
// the cost on sentence boundary finding.
if (fullParagraphToCheck.rangeLength() <= kChunkSize) {
- SpellCheckRequest* request = SpellCheckRequest::create(paragraphRange, 0);
- if (request)
- m_spellCheckRequester->requestCheckingFor(request);
+ m_spellCheckRequester->requestCheckingFor(paragraphRange);
return;
}
@@ -518,10 +516,7 @@ void SpellChecker::chunkAndMarkAllMisspellings(
? expandEndToSentenceBoundary(chunkRange)
: expandRangeToSentenceBoundary(chunkRange);
- SpellCheckRequest* request =
- SpellCheckRequest::create(checkRange, requestNum);
- if (request)
- m_spellCheckRequester->requestCheckingFor(request);
+ m_spellCheckRequester->requestCheckingFor(checkRange, requestNum);
if (!checkRangeIterator.atEnd()) {
checkRangeIterator.advance(1);

Powered by Google App Engine
This is Rietveld 408576698