Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/PlainTextRange.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp |
| index 7cfb84d3ba034f28437dd9c0c45e3f34382c3cb6..04b40313287814b6d6cc314fd635c2e949d43b83 100644 |
| --- a/third_party/WebKit/Source/core/editing/PlainTextRange.cpp |
| +++ b/third_party/WebKit/Source/core/editing/PlainTextRange.cpp |
| @@ -148,8 +148,11 @@ EphemeralRange PlainTextRange::createRangeFor(const ContainerNode& scope, GetRan |
| docTextPosition += len; |
| } |
| - if (!startRangeFound) |
| - return EphemeralRange(); |
| + if (!startRangeFound) { |
|
Changwan Ryu
2016/04/04 06:23:13
Could you leave some comment on how startRangeFoun
yabinh
2016/04/04 08:31:51
OK.
|
| + // If cursor position exceeds the right boundary, it should stay at the right boundary |
| + resultStart = textRunEndPosition; |
| + resultEnd = textRunEndPosition; |
| + } |
| if (length() && end() > docTextPosition) { // end() is out of bounds |
| resultEnd = textRunEndPosition; |