Chromium Code Reviews| Index: Source/core/editing/VisibleSelection.cpp |
| diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp |
| index 4f780ba57ce27365d0f3cb6e760583a6f71a8b6f..9b3a0a1df98988528504b026556975697fe0bc6d 100644 |
| --- a/Source/core/editing/VisibleSelection.cpp |
| +++ b/Source/core/editing/VisibleSelection.cpp |
| @@ -230,6 +230,15 @@ PassRefPtrWillBeRawPtr<Range> firstRangeOf(const VisibleSelection& selection) |
| return Range::create(*start.document(), start, end); |
|
yosin_UTC9
2015/09/10 06:37:03
Please change to use |firstEphemeralRangeOf()|.
We
|
| } |
| +EphemeralRange firstEphemeralRangeOf(const VisibleSelection& selection) |
| +{ |
| + if (selection.isNone()) |
| + return EphemeralRange(); |
| + Position start = selection.start().parentAnchoredEquivalent(); |
|
yosin_UTC9
2015/09/10 06:37:03
nit: |const Position|.
|
| + Position end = selection.end().parentAnchoredEquivalent(); |
|
yosin_UTC9
2015/09/10 06:37:04
nit: |const Position|.
|
| + return EphemeralRange(start, end); |
| +} |
| + |
| EphemeralRange VisibleSelection::toNormalizedEphemeralRange() const |
| { |
| if (isNone()) |