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

Unified Diff: Source/web/WebSurroundingText.cpp

Issue 323983006: Make SurroundingText work for a Range. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: apply review comments 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 | « Source/core/editing/SurroundingTextTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebSurroundingText.cpp
diff --git a/Source/web/WebSurroundingText.cpp b/Source/web/WebSurroundingText.cpp
index 2715cf57e0d84c687fffc9fb7bda3313ef2a001e..58383dcdf89ddcb3c6455ad813fe0d1384c26c1e 100644
--- a/Source/web/WebSurroundingText.cpp
+++ b/Source/web/WebSurroundingText.cpp
@@ -55,7 +55,8 @@ WebString WebSurroundingText::textContent() const
size_t WebSurroundingText::hitOffsetInTextContent() const
{
- return m_private->positionOffsetInContent();
+ ASSERT(m_private->startOffsetInContent() == m_private->endOffsetInContent());
+ return m_private->startOffsetInContent();
}
WebRange WebSurroundingText::rangeFromContentOffsets(size_t startOffsetInContent, size_t endOffsetInContent)
« no previous file with comments | « Source/core/editing/SurroundingTextTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698