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

Unified Diff: Source/core/testing/Internals.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/spellcheck/TextCheckingHelper.cpp ('k') | Source/web/WebRange.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 263ba12f6687ca66842b49d3a1f48af99598472b..9dd1de88e29323a343b9ed150a9794c91e4c00f0 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1026,10 +1026,7 @@ PassRefPtrWillBeRawPtr<Range> Internals::rangeFromLocationAndLength(Element* sco
// TextIterator depends on Layout information, make sure layout it up to date.
scope->document().updateLayoutIgnorePendingStylesheets();
- const EphemeralRange range = PlainTextRange(rangeLocation, rangeLocation + rangeLength).createRange(*scope);
- if (range.isNull())
- return nullptr;
- return Range::create(range.document(), range.startPosition(), range.endPosition());
+ return createRange(PlainTextRange(rangeLocation, rangeLocation + rangeLength).createRange(*scope));
}
unsigned Internals::locationFromRange(Element* scope, const Range* range)
« no previous file with comments | « Source/core/editing/spellcheck/TextCheckingHelper.cpp ('k') | Source/web/WebRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698