Commit 578a6077 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Clear a leftover VisiblePosition variable from SelectionController

This VisiblePosition-typed variable should have been cleared in
crrev.com/1501035 but was left over. This CL clears it.

Bug: 657237
Change-Id: Idec9cb0e6a4709bece76e6ed36da325d7ab7fba4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1507134Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638424}
parent 0503893b
......@@ -494,8 +494,10 @@ void SelectionController::UpdateSelectionForMouseDrag(
Selection().ComputeVisibleSelectionInDOMTree().Start(),
hit_test_result.LocalPoint(), target)
: PositionWithAffinity();
VisiblePositionInFlatTree target_position = CreateVisiblePosition(
FromPositionInDOMTree<EditingInFlatTreeStrategy>(raw_target_position));
const PositionInFlatTreeWithAffinity target_position =
CreateVisiblePosition(
FromPositionInDOMTree<EditingInFlatTreeStrategy>(raw_target_position))
.ToPositionWithAffinity();
// Don't modify the selection if we're not on a node.
if (target_position.IsNull())
return;
......@@ -534,9 +536,9 @@ void SelectionController::UpdateSelectionForMouseDrag(
}
const PositionInFlatTreeWithAffinity adjusted_position =
AdjustPositionRespectUserSelectAll(
target, visible_selection.Start(), visible_selection.End(),
target_position.ToPositionWithAffinity());
AdjustPositionRespectUserSelectAll(target, visible_selection.Start(),
visible_selection.End(),
target_position);
const SelectionInFlatTree& adjusted_selection =
should_extend_selection
? ExtendSelectionAsDirectional(adjusted_position,
......
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