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

Unified Diff: Source/core/editing/VisibleSelection.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
Index: Source/core/editing/VisibleSelection.cpp
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index 2ef64380a1ca35dff680130a93f3d22e570d48cf..3bda17171bc2ae98ba7ec2127e7aa7b5ebc1e3a8 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -242,10 +242,7 @@ bool VisibleSelection::intersectsNode(Node* node) const
PassRefPtrWillBeRawPtr<Range> VisibleSelection::toNormalizedRange() const
{
- const EphemeralRange range = toNormalizedEphemeralRange();
- if (range.isNull())
- return nullptr;
- return Range::create(range.document(), range.startPosition(), range.endPosition());
+ return createRange(toNormalizedEphemeralRange());
}
template <typename Strategy>
« no previous file with comments | « Source/core/editing/InputMethodController.cpp ('k') | Source/core/editing/spellcheck/TextCheckingHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698