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

Unified Diff: Source/core/editing/EphemeralRange.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/EphemeralRange.h ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EphemeralRange.cpp
diff --git a/Source/core/editing/EphemeralRange.cpp b/Source/core/editing/EphemeralRange.cpp
index 3e1d87b21cc3aecf526bcaa274c165215e73ba35..05253b23128bc0387893767dd98513c75c2c9b39 100644
--- a/Source/core/editing/EphemeralRange.cpp
+++ b/Source/core/editing/EphemeralRange.cpp
@@ -144,6 +144,13 @@ bool EphemeralRangeTemplate<Strategy>::isValid() const
}
#endif
+PassRefPtrWillBeRawPtr<Range> createRange(const EphemeralRange& range)
+{
+ if (range.isNull())
+ return nullptr;
+ return Range::create(range.document(), range.startPosition(), range.endPosition());
+}
+
template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingStrategy>;
template class CORE_TEMPLATE_EXPORT EphemeralRangeTemplate<EditingInComposedTreeStrategy>;
« no previous file with comments | « Source/core/editing/EphemeralRange.h ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698