Index: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
index 3a7f22ca9eda1a0fea0c744a5b5a4a42dd52d6b3..a43633bcc65d794c948b905501e3eea6d03479d8 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
@@ -809,10 +809,12 @@ void TypingCommand::DeleteKeyPressed(TextGranularity granularity, |
1) { |
// If there are multiple Unicode code points to be deleted, adjust the |
// range to match platform conventions. |
- selection_to_delete.SetWithoutValidation( |
- selection_to_delete.End(), |
- PreviousPositionOf(selection_to_delete.End(), |
- PositionMoveType::kBackwardDeletion)); |
+ selection_to_delete = |
+ VisibleSelection::CreateWithoutValidationDeprecated( |
+ selection_to_delete.End(), |
+ PreviousPositionOf(selection_to_delete.End(), |
+ PositionMoveType::kBackwardDeletion), |
+ selection_to_delete.Affinity()); |
} |
if (!StartingSelection().IsRange() || |
@@ -823,8 +825,10 @@ void TypingCommand::DeleteKeyPressed(TextGranularity granularity, |
// have been in the original document. We can't let the VisibleSelection |
// class's validation kick in or it'll adjust for us based on the |
// current state of the document and we'll get the wrong result. |
- selection_after_undo.SetWithoutValidation(StartingSelection().End(), |
- selection_to_delete.Extent()); |
+ selection_after_undo = |
+ VisibleSelection::CreateWithoutValidationDeprecated( |
+ StartingSelection().End(), selection_to_delete.Extent(), |
+ selection_after_undo.Affinity()); |
} |
break; |
} |
@@ -955,8 +959,10 @@ void TypingCommand::ForwardDeleteKeyPressed(TextGranularity granularity, |
extent.ComputeContainerNode(), |
extent.ComputeOffsetInContainerNode() + extra_characters); |
} |
- selection_after_undo.SetWithoutValidation(StartingSelection().Start(), |
- extent); |
+ selection_after_undo = |
+ VisibleSelection::CreateWithoutValidationDeprecated( |
+ StartingSelection().Start(), extent, |
+ selection_after_undo.Affinity()); |
} |
break; |
} |