Commit 205aa706 authored by yosin's avatar yosin Committed by Commit bot

Get rid of a redundant FrameSelection::setSelection() with VisibleSelectionInFlatTree

This patch gets rid of a redundant |FrameSelection::setSelection()| with
|VisibleSelectionInFlatTree|, since there is one call site, to simplify
source code for improving code health.

BUG=n/a
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2020143002
Cr-Commit-Position: refs/heads/master@{#396792}
parent 786659de
......@@ -262,7 +262,8 @@ void FrameSelection::setNonDirectionalSelectionIfNeededAlgorithm(const VisibleSe
if (visibleSelection<Strategy>() == newSelection)
return;
setSelection(newSelection, granularity);
const SetSelectionOptions options = CloseTyping | ClearTypingStyle;
setSelection(newSelection, options, CursorAlignOnScroll::IfNeeded, granularity);
}
void FrameSelection::setNonDirectionalSelectionIfNeeded(const VisibleSelection& passedNewSelection, TextGranularity granularity, EndPointsAdjustmentMode endpointsAdjustmentMode)
......
......@@ -115,7 +115,6 @@ public:
// TODO(yosin) We should get rid of two parameters version of
// |setSelection()| to avoid conflict of four parameters version.
void setSelection(const VisibleSelection& selection, TextGranularity granularity) { setSelection(selection, CloseTyping | ClearTypingStyle, CursorAlignOnScroll::IfNeeded, granularity); }
void setSelection(const VisibleSelectionInFlatTree& selection, TextGranularity granularity) { setSelection(selection, CloseTyping | ClearTypingStyle, CursorAlignOnScroll::IfNeeded, granularity); }
// TODO(yosin) We should get rid of |Range| version of |setSelectedRagne()|
// for Oilpan.
bool setSelectedRange(Range*, TextAffinity, SelectionDirectionalMode = SelectionDirectionalMode::NonDirectional, SetSelectionOptions = CloseTyping | ClearTypingStyle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment