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

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

Issue 2952973002: Introduce VisibleSelection::CreateWithoutValidationDeprecated() (Closed)
Patch Set: 2017-06-23T09:54:35 Created 3 years, 6 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 | « third_party/WebKit/Source/core/editing/VisibleSelection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698