| Index: third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp
|
| index 73404bec56e04cc7316619bf03240e7864d90514..19b4b31007f8b577f060b5ca335f26f4eab7ebab 100644
|
| --- a/third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp
|
| @@ -189,6 +189,8 @@ CharacterIteratorAlgorithm<Strategy>::calculateCharacterSubrange(int offset,
|
| advance(offset);
|
| const PositionTemplate<Strategy> startPos = startPosition();
|
|
|
| + if (!length)
|
| + return EphemeralRangeTemplate<Strategy>(startPos, startPos);
|
| if (length > 1)
|
| advance(length - 1);
|
| return EphemeralRangeTemplate<Strategy>(startPos, endPosition());
|
|
|