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

Unified Diff: third_party/WebKit/Source/core/editing/PlainTextRange.cpp

Issue 1847583003: Fix setComposingText when newCursorPosition != 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding C++ unit test Created 4 years, 9 months 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/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;

Powered by Google App Engine
This is Rietveld 408576698