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

Unified Diff: third_party/WebKit/Source/core/editing/SurroundingText.cpp

Issue 2222813002: Remove the use of WebRange in ContentDetector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Maybe now fix compile. Created 4 years, 4 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
Index: third_party/WebKit/Source/core/editing/SurroundingText.cpp
diff --git a/third_party/WebKit/Source/core/editing/SurroundingText.cpp b/third_party/WebKit/Source/core/editing/SurroundingText.cpp
index dabea49cae04ca1b8250bf39f5e72de2c9bab100..bb77ee83656705c66d6993fcf8617f0ec3811272 100644
--- a/third_party/WebKit/Source/core/editing/SurroundingText.cpp
+++ b/third_party/WebKit/Source/core/editing/SurroundingText.cpp
@@ -89,27 +89,6 @@ void SurroundingText::initialize(const Position& startPosition, const Position&
DCHECK(m_contentRange);
}
-Range* SurroundingText::rangeFromContentOffsets(unsigned startOffsetInContent, unsigned endOffsetInContent)
-{
- if (startOffsetInContent >= endOffsetInContent || endOffsetInContent > content().length())
- return nullptr;
-
- CharacterIterator iterator(m_contentRange->startPosition(), m_contentRange->endPosition());
-
- DCHECK(!iterator.atEnd());
- iterator.advance(startOffsetInContent);
-
- Position start = iterator.startPosition();
-
- DCHECK(!iterator.atEnd());
- iterator.advance(endOffsetInContent - startOffsetInContent);
-
- Position end = iterator.startPosition();
-
- DCHECK(start.document());
- return Range::create(*start.document(), start, end);
-}
-
String SurroundingText::content() const
{
if (m_contentRange)
« no previous file with comments | « third_party/WebKit/Source/core/editing/SurroundingText.h ('k') | third_party/WebKit/Source/web/WebSurroundingText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698