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

Unified Diff: Source/core/editing/commands/TypingCommand.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 | « Source/core/editing/commands/InsertTextCommand.cpp ('k') | Source/core/layout/PendingSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/commands/TypingCommand.cpp
diff --git a/Source/core/editing/commands/TypingCommand.cpp b/Source/core/editing/commands/TypingCommand.cpp
index f9b70e6c809f016e17fa59c793496772bbeecb14..43e7548afc450f2f8b4bf6bcf6b274291b4d5bef 100644
--- a/Source/core/editing/commands/TypingCommand.cpp
+++ b/Source/core/editing/commands/TypingCommand.cpp
@@ -475,7 +475,7 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing)
if (granularity == CharacterGranularity && selectionToDelete.end().computeContainerNode() == selectionToDelete.start().computeContainerNode()
&& selectionToDelete.end().computeOffsetInContainerNode() - selectionToDelete.start().computeOffsetInContainerNode() > 1) {
// If there are multiple Unicode code points to be deleted, adjust the range to match platform conventions.
- selectionToDelete.setWithoutValidation(selectionToDelete.end(), selectionToDelete.end().previous(BackwardDeletion));
+ selectionToDelete.setWithoutValidation(selectionToDelete.end(), previousPositionOf(selectionToDelete.end(), PositionMoveType::BackwardDeletion));
}
if (!startingSelection().isRange() || selectionToDelete.base() != startingSelection().start()) {
« no previous file with comments | « Source/core/editing/commands/InsertTextCommand.cpp ('k') | Source/core/layout/PendingSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698