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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2736613003: Get rid of FrameSelection::setSelection() taking VisibleSelection (Closed)
Patch Set: 2017-03-07T13:53:20 rebase Created 3 years, 9 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 | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 3ce9536e6f79cd350201cd31130bd3514849f93c..f55d90c5dec045938e4916f3fe4f815c070c854f 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -1374,8 +1374,8 @@ void Editor::transpose() {
const EphemeralRange range = makeRange(previous, next);
if (range.isNull())
return;
- VisibleSelection newSelection = createVisibleSelection(
- SelectionInDOMTree::Builder().setBaseAndExtent(range).build());
+ const SelectionInDOMTree newSelection =
+ SelectionInDOMTree::Builder().setBaseAndExtent(range).build();
// Transpose the two characters.
String text = plainText(range);
@@ -1384,7 +1384,7 @@ void Editor::transpose() {
String transposed = text.right(1) + text.left(1);
// Select the two characters.
- if (newSelection !=
+ if (createVisibleSelection(newSelection) !=
frame().selection().computeVisibleSelectionInDOMTreeDeprecated())
frame().selection().setSelection(newSelection);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698