| 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 868767f5ed5246047ae20a8465fe5b89faa4106c..868599c6152a0d25c0f954d217ac88b774b68730 100644
|
| --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| @@ -455,7 +455,7 @@ void SpellChecker::markAllMisspellingsInRange(const EphemeralRange& spellingRang
|
| return;
|
|
|
| TextCheckingParagraph fullParagraphToCheck(spellingRange);
|
| - chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeSpelling, fullParagraphToCheck);
|
| + chunkAndMarkAllMisspellings(fullParagraphToCheck);
|
| }
|
|
|
| static EphemeralRange expandEndToSentenceBoundary(const EphemeralRange& range)
|
| @@ -483,10 +483,10 @@ void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(Node* node, const Ep
|
| return;
|
| EphemeralRange paragraphRange(Position::firstPositionInNode(node), Position::lastPositionInNode(node));
|
| TextCheckingParagraph textToCheck(insertedRange, paragraphRange);
|
| - chunkAndMarkAllMisspellingsAndBadGrammar(resolveTextCheckingTypeMask(TextCheckingTypeSpelling | TextCheckingTypeGrammar), textToCheck);
|
| + chunkAndMarkAllMisspellings(textToCheck);
|
| }
|
|
|
| -void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheckingOptions, const TextCheckingParagraph& fullParagraphToCheck)
|
| +void SpellChecker::chunkAndMarkAllMisspellings(const TextCheckingParagraph& fullParagraphToCheck)
|
| {
|
| if (fullParagraphToCheck.isEmpty())
|
| return;
|
| @@ -498,7 +498,7 @@ void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask
|
| // 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(resolveTextCheckingTypeMask(textCheckingOptions), TextCheckingProcessBatch, paragraphRange, paragraphRange, 0);
|
| + SpellCheckRequest* request = SpellCheckRequest::create(TextCheckingTypeSpelling, TextCheckingProcessBatch, paragraphRange, paragraphRange, 0);
|
| if (request)
|
| m_spellCheckRequester->requestCheckingFor(request);
|
| return;
|
| @@ -509,7 +509,7 @@ void SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask
|
| EphemeralRange chunkRange = checkRangeIterator.calculateCharacterSubrange(0, kChunkSize);
|
| EphemeralRange checkRange = requestNum ? expandEndToSentenceBoundary(chunkRange) : expandRangeToSentenceBoundary(chunkRange);
|
|
|
| - SpellCheckRequest* request = SpellCheckRequest::create(resolveTextCheckingTypeMask(textCheckingOptions), TextCheckingProcessBatch, checkRange, paragraphRange, requestNum);
|
| + SpellCheckRequest* request = SpellCheckRequest::create(TextCheckingTypeSpelling, TextCheckingProcessBatch, checkRange, paragraphRange, requestNum);
|
| if (request)
|
| m_spellCheckRequester->requestCheckingFor(request);
|
|
|
| @@ -891,20 +891,6 @@ bool SpellChecker::selectionStartHasSpellingMarkerFor(int from, int length) cons
|
| return selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
|
| }
|
|
|
| -TextCheckingTypeMask SpellChecker::resolveTextCheckingTypeMask(TextCheckingTypeMask textCheckingOptions)
|
| -{
|
| - bool shouldMarkSpelling = textCheckingOptions & TextCheckingTypeSpelling;
|
| - bool shouldMarkGrammar = textCheckingOptions & TextCheckingTypeGrammar;
|
| -
|
| - TextCheckingTypeMask checkingTypes = 0;
|
| - if (shouldMarkSpelling)
|
| - checkingTypes |= TextCheckingTypeSpelling;
|
| - if (shouldMarkGrammar)
|
| - checkingTypes |= TextCheckingTypeGrammar;
|
| -
|
| - return checkingTypes;
|
| -}
|
| -
|
| void SpellChecker::removeMarkers(const VisibleSelection& selection, DocumentMarker::MarkerTypes markerTypes)
|
| {
|
| const EphemeralRange range = selection.toNormalizedEphemeralRange();
|
|
|