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

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

Issue 2451613003: Get rid of createVisibleSelection() taking two Position (Closed)
Patch Set: 2016-10-26T15:09:55 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
Index: third_party/WebKit/Source/core/editing/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index e1b7d17f60c35f9c40bbcffc9f56357af951049f..0cb7994ce518db96f447bb39e72c2631e874382e 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -1028,10 +1028,13 @@ bool FrameSelection::setSelectedRange(const EphemeralRange& range,
// can be modified by event handlers, we should create |Range| object before
// calling it.
Range* logicalRange = createRange(range);
- VisibleSelection newSelection = createVisibleSelection(
- range.startPosition(), range.endPosition(), affinity,
- directional == SelectionDirectionalMode::Directional);
- setSelection(newSelection, options);
+ setSelection(SelectionInDOMTree::Builder()
+ .setBaseAndExtent(range)
+ .setAffinity(affinity)
+ .setIsDirectional(directional ==
+ SelectionDirectionalMode::Directional)
+ .build(),
+ options);
m_selectionEditor->setLogicalRange(logicalRange);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698