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

Unified Diff: Source/core/editing/TextCheckingHelper.cpp

Issue 1041463003: Remove methods of TextIterator that take Range objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add assertions Created 5 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 | « Source/core/editing/PlainTextRange.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TextCheckingHelper.cpp
diff --git a/Source/core/editing/TextCheckingHelper.cpp b/Source/core/editing/TextCheckingHelper.cpp
index 3362592bab1e60f86593d7b4b5a29b4835b76adc..4ae46e0c7cff2b53e539e6ad56b88c745b0b1f2f 100644
--- a/Source/core/editing/TextCheckingHelper.cpp
+++ b/Source/core/editing/TextCheckingHelper.cpp
@@ -144,7 +144,7 @@ void TextCheckingParagraph::invalidateParagraphRangeValues()
int TextCheckingParagraph::rangeLength() const
{
ASSERT(m_checkingRange);
- return TextIterator::rangeLength(paragraphRange().get());
+ return TextIterator::rangeLength(paragraphRange()->startPosition(), paragraphRange()->endPosition());
}
PassRefPtrWillBeRawPtr<Range> TextCheckingParagraph::paragraphRange() const
@@ -168,7 +168,7 @@ int TextCheckingParagraph::offsetTo(const Position& position, ExceptionState& ex
range->setEnd(position.containerNode(), position.computeOffsetInContainerNode(), exceptionState);
if (exceptionState.hadException())
return 0;
- return TextIterator::rangeLength(range.get());
+ return TextIterator::rangeLength(range->startPosition(), range->endPosition());
}
bool TextCheckingParagraph::isEmpty() const
@@ -199,7 +199,7 @@ int TextCheckingParagraph::checkingStart() const
{
ASSERT(m_checkingRange);
if (m_checkingStart == -1)
- m_checkingStart = TextIterator::rangeLength(offsetAsRange().get());
+ m_checkingStart = TextIterator::rangeLength(offsetAsRange()->startPosition(), offsetAsRange()->endPosition());
return m_checkingStart;
}
@@ -207,7 +207,7 @@ int TextCheckingParagraph::checkingEnd() const
{
ASSERT(m_checkingRange);
if (m_checkingEnd == -1)
- m_checkingEnd = checkingStart() + TextIterator::rangeLength(checkingRange().get());
+ m_checkingEnd = checkingStart() + TextIterator::rangeLength(checkingRange()->startPosition(), checkingRange()->endPosition());
return m_checkingEnd;
}
@@ -215,7 +215,7 @@ int TextCheckingParagraph::checkingLength() const
{
ASSERT(m_checkingRange);
if (-1 == m_checkingLength)
- m_checkingLength = TextIterator::rangeLength(checkingRange().get());
+ m_checkingLength = TextIterator::rangeLength(checkingRange()->startPosition(), checkingRange()->endPosition());
return m_checkingLength;
}
« no previous file with comments | « Source/core/editing/PlainTextRange.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698