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

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

Issue 210363006: Add a constructor to TextIterator taking two Positions as iteration range. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | Source/core/editing/TextIterator.cpp » ('j') | Source/core/editing/TextIterator.cpp » ('J')
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 9d73d8add4d2efc3cdb64e76554a2bc2982e141d..73832fcaa9f1f8f269fc0a8c59d7a5ff2689f4a9 100644
--- a/Source/core/editing/TextIterator.h
+++ b/Source/core/editing/TextIterator.h
@@ -87,6 +87,8 @@ private:
class TextIterator {
public:
explicit TextIterator(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
+ // [start, end] indicates the document range that the iteration should take place within (both ends inclusive).
+ TextIterator(const Position& start, const Position& end, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
~TextIterator();
bool atEnd() const { return !m_positionNode || m_shouldStop; }
@@ -128,6 +130,8 @@ private:
HandledChildren
};
+ void initialize(const Position& start, const Position& end);
+
int startOffset() const { return m_positionStartOffset; }
const String& string() const { return m_text; }
void exitNode();
« no previous file with comments | « no previous file | Source/core/editing/TextIterator.cpp » ('j') | Source/core/editing/TextIterator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698