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

Unified Diff: Source/core/editing/TextIterator.h

Issue 576073003: Removal of more temporary Range objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build; accidentally removed .get() call Created 6 years, 3 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 | « Source/core/editing/TextCheckingHelper.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TextIterator.h
diff --git a/Source/core/editing/TextIterator.h b/Source/core/editing/TextIterator.h
index 239de029f45130cda84d536f07b668761221ffb1..cbe398e7ffbd571bdb8c98b7a93d73fa447ff74a 100644
--- a/Source/core/editing/TextIterator.h
+++ b/Source/core/editing/TextIterator.h
@@ -51,6 +51,7 @@ enum TextIteratorBehavior {
typedef unsigned TextIteratorBehaviorFlags;
String plainText(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
+String plainText(const Position& start, const Position& end, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
PassRefPtrWillBeRawPtr<Range> findPlainText(const Range*, const String&, FindOptions);
void findPlainText(const Position& inputStart, const Position& inputEnd, const String&, FindOptions, Position& resultStart, Position& resultEnd);
@@ -124,7 +125,9 @@ public:
// also emits spaces for other non-text nodes using the
// |TextIteratorEmitsCharactersBetweenAllVisiblePosition| mode.
static int rangeLength(const Range*, bool forSelectionPreservation = false);
+ static int rangeLength(const Position& start, const Position& end, bool forSelectionPreservation = false);
static PassRefPtrWillBeRawPtr<Range> subrange(Range* entireRange, int characterOffset, int characterCount);
+ static void subrange(Position& start, Position& end, int characterOffset, int characterCount);
private:
enum IterationProgress {
@@ -381,7 +384,7 @@ private:
class WordAwareIterator {
STACK_ALLOCATED();
public:
- explicit WordAwareIterator(const Range*);
+ explicit WordAwareIterator(const Position& start, const Position& end);
~WordAwareIterator();
bool atEnd() const { return !m_didLookAhead && m_textIterator.atEnd(); }
« no previous file with comments | « Source/core/editing/TextCheckingHelper.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698