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

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

Issue 1307763003: Get rid of VisibleSelection constructor with Range parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | Source/core/editing/VisibleSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Editor.cpp
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index 2414b6525e8db3143cbade4554f5c20f031421a3..a042c8226e69d676663fb34245f313ea36c33576 100644
--- a/Source/core/editing/Editor.cpp
+++ b/Source/core/editing/Editor.cpp
@@ -119,7 +119,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 (RefPtrWillBeRawPtr<Range> range = textFromControlOfTarget->selection())
- return VisibleSelection(range.get(), TextAffinity::Downstream, selection.isDirectional());
+ return VisibleSelection(EphemeralRange(range.get()), TextAffinity::Downstream, selection.isDirectional());
}
return selection;
}
@@ -1154,7 +1154,7 @@ bool Editor::findString(const String& target, FindOptions options)
if (!resultRange)
return false;
- frame().selection().setSelection(VisibleSelection(resultRange.get()));
+ frame().selection().setSelection(VisibleSelection(EphemeralRange(resultRange.get())));
frame().selection().revealSelection();
return true;
}
« no previous file with comments | « no previous file | Source/core/editing/VisibleSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698