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

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

Issue 1563783003: Optimizations to Spellchecking Chunk Generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp b/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp
index 719b31ae545f90102418a2dc5782e7bd34da70b9..a992fd284584bfb214849d37cbd1ac5cb9aa8a48 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp
@@ -95,21 +95,6 @@ static void findMisspellings(TextCheckerClient& client, const UChar* text, int s
}
}
-// TODO(yosin): We should move |expandRangeToSentenceBoundary()| to
-// "SpellChcker.cpp" as static function, since there is only one call site in
-// |SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar()|.
-EphemeralRange expandRangeToSentenceBoundary(const EphemeralRange& range)
-{
- ASSERT(range.isNotNull());
- const VisiblePosition& visibleStart = createVisiblePosition(range.startPosition());
- ASSERT(visibleStart.isNotNull());
- const Position& sentenceStart = startOfSentence(visibleStart).deepEquivalent();
- const VisiblePosition& visibleEnd = createVisiblePosition(range.endPosition());
- ASSERT(visibleEnd.isNotNull());
- const Position& sentenceEnd = endOfSentence(visibleEnd).deepEquivalent();
- return EphemeralRange(sentenceStart.isNull() ? range.startPosition() : sentenceStart, sentenceEnd.isNull() ? range.endPosition() : sentenceEnd);
-}
-
static EphemeralRange expandToParagraphBoundary(const EphemeralRange& range)
{
return EphemeralRange(startOfParagraph(createVisiblePosition(range.startPosition())).deepEquivalent(), endOfParagraph(createVisiblePosition(range.endPosition())).deepEquivalent());
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698