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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp

Issue 2465743002: Trybot test for losing style (Closed)
Patch Set: 12.9 14:25 Created 4 years 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: 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());
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp ('k') | third_party/WebKit/Source/core/events/TextEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698