Skip to content

Commit

Permalink
Prune ComputeVisibleSelectionInDOMTreeDeprecated from GranularityStra…
Browse files Browse the repository at this point in the history
…tegy

This patch prunes the deprecated function GranularityStrategy::UpdateExtent
(both overrides) and its caller FrameSelection::MoveRangeSelectionExtent.
The change is safe because these functions are reachable only from
WebLocalFrameImpl::MoveRangeSelectionExtent, where layout has been updated.

BUG=698633
TEST=n/a; no behavioral changes.

Review-Url: https://codereview.chromium.org/2856603002
Cr-Commit-Position: refs/heads/master@{#469949}
  • Loading branch information
xiaochengh authored and Commit bot committed May 8, 2017
1 parent 8d205af commit a56b13d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion third_party/WebKit/Source/core/editing/FrameSelection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ GranularityStrategy* FrameSelection::GetGranularityStrategy() {
}

void FrameSelection::MoveRangeSelectionExtent(const IntPoint& contents_point) {
if (ComputeVisibleSelectionInDOMTreeDeprecated().IsNone())
if (ComputeVisibleSelectionInDOMTree().IsNone())
return;

const SetSelectionOptions kOptions =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SelectionInDOMTree CharacterGranularityStrategy::UpdateExtent(
const VisiblePosition& extent_position =
VisiblePositionForContentsPoint(extent_point, frame);
const VisibleSelection& selection =
frame->Selection().ComputeVisibleSelectionInDOMTreeDeprecated();
frame->Selection().ComputeVisibleSelectionInDOMTree();
if (extent_position.IsNull() || selection.VisibleBase().DeepEquivalent() ==
extent_position.DeepEquivalent())
return selection.AsSelection();
Expand Down Expand Up @@ -102,7 +102,7 @@ SelectionInDOMTree DirectionGranularityStrategy::UpdateExtent(
const IntPoint& extent_point,
LocalFrame* frame) {
const VisibleSelection& selection =
frame->Selection().ComputeVisibleSelectionInDOMTreeDeprecated();
frame->Selection().ComputeVisibleSelectionInDOMTree();

if (state_ == StrategyState::kCleared)
state_ = StrategyState::kExpanding;
Expand Down

0 comments on commit a56b13d

Please sign in to comment.