Fix the wrong position for ShowNonLocatedContextMenu
In code path of ShowNonLocatedContextMenu, if can show the context menu at the selection, here always use the first rect of the selection range to compute the position for hittest. So if there is a lot of selected text in the contenteditable box, the begin of the selection is likely to be invisible, and the value of the first rect will be negative and invalid. The CL uses one of corner point or center of the selection rect fully between the handles. Bug: 1002344 Change-Id: Iba5110cad4d8d7d2dd36ece2454c415d7dcdd419 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792426Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:
Dave Tapuska <dtapuska@chromium.org> Commit-Queue: Jinsong Fan <fanjinsong@sogou-inc.com> Cr-Commit-Position: refs/heads/master@{#706471}
Showing
Please register or sign in to comment