Bug 1614636: simplify arguments of nsFrameSelection::HandleClick. r=jfkthame

Simplifies understanding its dependent methods.

Differential Revision: https://phabricator.services.mozilla.com/D62433
This commit is contained in:
Mirko Brodesser
2020-02-11 15:12:26 +00:00
parent 32e372b041
commit 5d52b8f1c1
7 changed files with 91 additions and 52 deletions

View File

@@ -723,7 +723,10 @@ TextInputSelectionController::CompleteMove(bool aForward, bool aExtend) {
}
}
frameSelection->HandleClick(parentDIV, offset, offset, aExtend, false, hint);
const nsFrameSelection::FocusMode focusMode =
aExtend ? nsFrameSelection::FocusMode::kExtendSelection
: nsFrameSelection::FocusMode::kCollapseToNewPoint;
frameSelection->HandleClick(parentDIV, offset, offset, focusMode, hint);
// if we got this far, attempt to scroll no matter what the above result is
return CompleteScroll(aForward);