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

Unified Diff: third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp

Issue 1868473002: Use PositionMoveType::GraphemeBoundary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/commands/InsertTextCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
index 0960b600fc7e313586d426a8e66e6e5f4c2c38a6..e9cc2e12010ec24550a924813c30a0a0267cbe2b 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
@@ -195,9 +195,7 @@ void InsertTextCommand::doApply(EditingState* editingState)
endPosition = insertTab(startPosition, editingState);
if (editingState->isAborted())
return;
- // TODO(yosin) We should use |PositionMoveType::CodePoint| for
- // |previousPositionOf()|.
- startPosition = previousPositionOf(endPosition, PositionMoveType::CodePoint);
+ startPosition = previousPositionOf(endPosition, PositionMoveType::GraphemeCluster);
if (placeholder.isNotNull())
removePlaceholderAt(placeholder);
} else {

Powered by Google App Engine
This is Rietveld 408576698