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

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

Issue 1315543002: Introduce createRange(const EphemeralRange&) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-24T22:18:16 Created 5 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
« no previous file with comments | « Source/core/editing/VisibleSelection.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/spellcheck/TextCheckingHelper.cpp
diff --git a/Source/core/editing/spellcheck/TextCheckingHelper.cpp b/Source/core/editing/spellcheck/TextCheckingHelper.cpp
index 9abac4c443ccfb672f7aa115bb0c092cefbb4163..8640c0578f3044c81763e9c058e4a1d39313ff48 100644
--- a/Source/core/editing/spellcheck/TextCheckingHelper.cpp
+++ b/Source/core/editing/spellcheck/TextCheckingHelper.cpp
@@ -165,10 +165,7 @@ PassRefPtrWillBeRawPtr<Range> TextCheckingParagraph::paragraphRange() const
PassRefPtrWillBeRawPtr<Range> TextCheckingParagraph::subrange(int characterOffset, int characterCount) const
{
ASSERT(m_checkingRange);
- EphemeralRange range = calculateCharacterSubrange(EphemeralRange(paragraphRange().get()), characterOffset, characterCount);
- if (range.isNull())
- return nullptr;
- return Range::create(range.document(), range.startPosition(), range.endPosition());
+ return createRange(calculateCharacterSubrange(EphemeralRange(paragraphRange().get()), characterOffset, characterCount));
}
int TextCheckingParagraph::offsetTo(const Position& position, ExceptionState& exceptionState) const
« no previous file with comments | « Source/core/editing/VisibleSelection.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698