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

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

Issue 294073005: Extend WebSurroundingText to accept a WebRange. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase and use int Created 6 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/SurroundingText.cpp » ('j') | public/web/WebFrame.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SurroundingText.h
diff --git a/Source/core/editing/SurroundingText.h b/Source/core/editing/SurroundingText.h
index d3e04ee9eacc206c0e0d13b26284ea647e7045a2..1d11bc031bbca0fecfe6ebdf714206e4e2634f98 100644
--- a/Source/core/editing/SurroundingText.h
+++ b/Source/core/editing/SurroundingText.h
@@ -42,16 +42,21 @@ class Range;
class SurroundingText {
WTF_MAKE_NONCOPYABLE(SurroundingText);
public:
+ SurroundingText(const Position&, const Position&, unsigned maxLength);
SurroundingText(const Position&, unsigned maxLength);
String content() const;
- unsigned positionOffsetInContent() const;
+ unsigned startOffsetInContent() const;
+ unsigned endOffsetInContent() const;
PassRefPtrWillBeRawPtr<Range> rangeFromContentOffsets(unsigned startOffsetInContent, unsigned endOffsetInContent);
private:
+ void process(const Position&, const Position&, unsigned maxLength);
+
RefPtrWillBePersistent<Range> m_contentRange;
- size_t m_positionOffsetInContent;
+ size_t m_startOffsetInContent;
+ size_t m_endOffsetInContent;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/editing/SurroundingText.cpp » ('j') | public/web/WebFrame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698