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

Unified Diff: Source/core/editing/EditingUtilities.cpp

Issue 1305963003: Introduce {next,previous}PositionOf() as replacement of {next,previous}() member functions in Positi (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-22T00:12:04 Rebase Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/core/editing/Editor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditingUtilities.cpp
diff --git a/Source/core/editing/EditingUtilities.cpp b/Source/core/editing/EditingUtilities.cpp
index ef8a2388c5358f944c015cbc349af4687167b704..73f9ca3fdc32d5dd501e113b5560bdb8628df84b 100644
--- a/Source/core/editing/EditingUtilities.cpp
+++ b/Source/core/editing/EditingUtilities.cpp
@@ -1155,7 +1155,10 @@ static Position previousCharacterPosition(const Position& position, TextAffinity
Position currentPos = position;
while (!currentPos.atStartOfTree()) {
- currentPos = currentPos.previous();
+ // TODO(yosin) When we use |previousCharacterPosition()| other than
+ // finding leading whitespace, we should use |Character| instead of
+ // |CodePoint|.
+ currentPos = previousPositionOf(currentPos, PositionMoveType::CodePoint);
if (currentPos.anchorNode()->rootEditableElement() != fromRootEditableElement)
return position;
« no previous file with comments | « no previous file | Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698