| Index: Source/core/editing/VisibleSelection.cpp
|
| diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
|
| index 4f780ba57ce27365d0f3cb6e760583a6f71a8b6f..ca39a0b963dc4d8f57ac1df4f4b0c0d754ba71e1 100644
|
| --- a/Source/core/editing/VisibleSelection.cpp
|
| +++ b/Source/core/editing/VisibleSelection.cpp
|
| @@ -221,13 +221,18 @@ PositionInComposedTree VisibleSelection::endInComposedTree() const
|
| return m_endInComposedTree;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<Range> firstRangeOf(const VisibleSelection& selection)
|
| +EphemeralRange firstEphemeralRangeOf(const VisibleSelection& selection)
|
| {
|
| if (selection.isNone())
|
| - return nullptr;
|
| + return EphemeralRange();
|
| Position start = selection.start().parentAnchoredEquivalent();
|
| Position end = selection.end().parentAnchoredEquivalent();
|
| - return Range::create(*start.document(), start, end);
|
| + return EphemeralRange(start, end);
|
| +}
|
| +
|
| +PassRefPtrWillBeRawPtr<Range> firstRangeOf(const VisibleSelection& selection)
|
| +{
|
| + return createRange(firstEphemeralRangeOf(selection));
|
| }
|
|
|
| EphemeralRange VisibleSelection::toNormalizedEphemeralRange() const
|
|
|