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

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

Issue 2374183004: Make non-null VisibleSelections creatable only by createVisibleSelection[Deprecated] (Closed)
Patch Set: Fix mac compile error Created 4 years, 3 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
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 fb4d38efb0921a32a6cbb6442e0da96eb1549ef5..524f0a3c567ef4210aa66e8b961b9a527ff3382a 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -160,7 +160,7 @@ VisibleSelection Editor::selectionForCommand(Event* event)
HTMLTextFormControlElement* textFromControlOfTarget = isHTMLTextFormControlElement(*event->target()->toNode()) ? toHTMLTextFormControlElement(event->target()->toNode()) : 0;
if (textFromControlOfTarget && (selection.start().isNull() || textFromControlOfTarget != textFormControlOfSelectionStart)) {
if (Range* range = textFromControlOfTarget->selection())
- return VisibleSelection(EphemeralRange(range), TextAffinity::Downstream, selection.isDirectional());
+ return createVisibleSelectionDeprecated(EphemeralRange(range), TextAffinity::Downstream, selection.isDirectional());
}
return selection;
}
@@ -1113,7 +1113,7 @@ void Editor::transpose()
const EphemeralRange range = makeRange(previous, next);
if (range.isNull())
return;
- VisibleSelection newSelection(range);
+ VisibleSelection newSelection = createVisibleSelectionDeprecated(range);
// Transpose the two characters.
String text = plainText(range);
@@ -1232,7 +1232,7 @@ bool Editor::findString(const String& target, FindOptions options)
if (!resultRange)
return false;
- frame().selection().setSelection(VisibleSelection(EphemeralRange(resultRange)));
+ frame().selection().setSelection(createVisibleSelectionDeprecated(EphemeralRange(resultRange)));
frame().selection().revealSelection();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698