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

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

Issue 2387993002: Prune createVisibleSelectionDeprecated from Editor (Closed)
Patch Set: Created 4 years, 2 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/commands/EditorCommand.cpp » ('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 ca383617acb6bc8022ccc6a668807793ee75f99a..b47f4549d04ffe0838ec485231446e109ae099e6 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -174,10 +174,11 @@ VisibleSelection Editor::selectionForCommand(Event* event) {
if (textFromControlOfTarget &&
(selection.start().isNull() ||
textFromControlOfTarget != textFormControlOfSelectionStart)) {
- if (Range* range = textFromControlOfTarget->selection())
- return createVisibleSelectionDeprecated(EphemeralRange(range),
- TextAffinity::Downstream,
- selection.isDirectional());
+ if (Range* range = textFromControlOfTarget->selection()) {
+ return createVisibleSelection(EphemeralRange(range),
+ TextAffinity::Downstream,
+ selection.isDirectional());
+ }
}
return selection;
}
@@ -1193,7 +1194,7 @@ void Editor::transpose() {
const EphemeralRange range = makeRange(previous, next);
if (range.isNull())
return;
- VisibleSelection newSelection = createVisibleSelectionDeprecated(range);
+ VisibleSelection newSelection = createVisibleSelection(range);
// Transpose the two characters.
String text = plainText(range);
@@ -1326,7 +1327,7 @@ bool Editor::findString(const String& target, FindOptions options) {
return false;
frame().selection().setSelection(
- createVisibleSelectionDeprecated(EphemeralRange(resultRange)));
+ createVisibleSelection(EphemeralRange(resultRange)));
frame().selection().revealSelection();
return true;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698