Omnibox: After unelision, ignore tiny drags until mouseup

Right now, when the user double-clicks a word within an elided URL, we
trigger unelision on the second mousedown. During unelision, the text
shifts. If the mouse moves at all during the second mouseup, the
selection may change unexpectedly.

This is ordinarily not a problem, but since the text has shifted
underneath the user, even tiny mouse movements can cause large
selection changes.

This CL fixes that by applying a minimum threshold to any drag
movements (8px). Any drag movements smaller than that are ignored.
This threshold is active until mouseup.

Bug: 951447
Change-Id: I584b827e408e2d03e20d76bb0bd3b038e193e80c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570571
Commit-Queue: Tommy Li <tommycli@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651829}
3 files changed