Only show selection handles when scrolling/flinging has stopped.
authorAntonio Gomes <a1.gomes@samsung.com>
Thu, 19 Feb 2015 16:58:11 +0000 (12:58 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commitf659ee547be0590df550186078d891b6b963a64d
tree560d08c0269504b06bfec8a838ce9b68695ed654
parent4d20cd2f50e36cbb8c70a9d3219e91124bcdb55f
Only show selection handles when scrolling/flinging has stopped.

In text selection mode, handles and magnifier glance controls
are hidden while scrolling. That involves the two main scroll cases:

- user is flinging, i.e. kinetic scrolling;
- user is panning, i.e. dragging the page content around
  without lifting his finger off the screen.

In our current implementation, the following case is broken:
- load a scrollable page and enter text selection mode (by
long press, for example).
- start kinetic scroll the page

One will notice that when he lifts off his finger from the screen
text selection controls are prematurely shown while scrolling is
still active, and it becomes junky.

This happens because when user lifts off his finger a GESTURE_END type
of event is emitted and handled by RWHVEfl::HandleGestureEnd. There,
it is assumed to mean "scroll has stopped, and text selection controls
can be shown". Although it covers the panning case well, it fails for
the flinging case.

Patch fix this by moving the panning-stop code from ::HandleGestureEnd
to ::HandleGesture, when a 'ScrollEnd' type of event is emitted.
The kinetic scrolling case is then alread properly handled by the
RenderWidgetHostView hook named 'DidStopFling'.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=8773
Reviewed by: Piotr Grad, Piotr Tworek, arno renevier

Change-Id: I2ac1569ebf3a7812c5ae71b17aa11decbf5a5c9d
tizen_src/impl/browser/renderer_host/render_widget_host_view_efl.cc