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

Unified Diff: Source/core/editing/iterators/CharacterIterator.cpp

Issue 1214293002: Get rid of findPlainText() with Range parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-30T15:11:38 Get rid of unused function collapsedToBoundary() Created 5 years, 6 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 | « no previous file | Source/core/editing/iterators/TextIterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/iterators/CharacterIterator.cpp
diff --git a/Source/core/editing/iterators/CharacterIterator.cpp b/Source/core/editing/iterators/CharacterIterator.cpp
index 2e296b6320cf42ff13ce6116e7084e92f34a9103..232ab7095924a20a7fd9dc3f7084350db2c5cc32 100644
--- a/Source/core/editing/iterators/CharacterIterator.cpp
+++ b/Source/core/editing/iterators/CharacterIterator.cpp
@@ -547,13 +547,6 @@ nextMatch:
return matchedLength;
}
-static PassRefPtrWillBeRawPtr<Range> collapsedToBoundary(const Range* range, bool forward)
-{
- RefPtrWillBeRawPtr<Range> result = range->cloneRange();
- result->collapse(!forward);
- return result.release();
-}
-
// Check if there's any unpaird surrogate code point.
// Non-character code points are not checked.
static bool isValidUTF16(const String& s)
@@ -622,26 +615,6 @@ tryAgain:
static const TextIteratorBehaviorFlags iteratorFlagsForFindPlainText = TextIteratorEntersTextControls | TextIteratorEntersOpenShadowRoots | TextIteratorDoesNotBreakAtReplacedElement;
-PassRefPtrWillBeRawPtr<Range> findPlainText(const Range* range, const String& target, FindOptions options)
-{
- // First, find the text.
- size_t matchStart;
- size_t matchLength;
- {
- CharacterIterator findIterator(range, iteratorFlagsForFindPlainText);
- matchLength = findPlainTextInternal(findIterator, target, options, matchStart);
- if (!matchLength)
- return collapsedToBoundary(range, !(options & Backwards));
- }
-
- // Then, find the document position of the start and the end of the text.
- CharacterIterator computeRangeIterator(range, iteratorFlagsForFindPlainText);
- Position resultStart;
- Position resultEnd;
- computeRangeIterator.calculateCharacterSubrange(matchStart, matchLength, resultStart, resultEnd);
- return Range::create(range->ownerDocument(), resultStart, resultEnd);
-}
-
void findPlainText(const Position& inputStart, const Position& inputEnd, const String& target, FindOptions options, Position& resultStart, Position& resultEnd)
{
resultStart.clear();
« no previous file with comments | « no previous file | Source/core/editing/iterators/TextIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698