Apply hide/restore selection controls logic to zoom in/out.
authorAntonio Gomes <a1.gomes@samsung.com>
Fri, 13 Nov 2015 05:49:11 +0000 (01:49 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
commit4980a7145dcc266331d7300d055bf1d82570e817
tree2be90836c2a21ebe2875baa43a8dfac8d68fe7d9
parent39428cfdff4122e033747cbc13b66c7412228d0f
Apply hide/restore selection controls logic to zoom in/out.

When one scrolls around, handles and context menu get temporarily
hidden, and are shown again when the gesture finishes.
In order to match s-browser behavior, patch extends that logic
to zoom in/out gestures.
In summary, once user starts to pinch, controls are temporarily
hidden (similarly to scroll). They are restored when user lift
up his fingers.
Setter and getter methods are also renamed to SetControlsTemporarilyHidden
and AreControlsTemporarilyHidden.

These are the scenarios:

Scrolls
1) when user starts to scroll one ScrollBegin gets emitted.
2) when user stops to scroll one ScrollEnd gets emitted.
So, it is a simple 1:1.

Start pinch zoom
1) When user starts to pinch zoom, first ScrollBegin is emitted, and then
PinchBegin is emitted, so we call SetControlsTemporarilyHidden(true) twice.
The first call, sets hidden status to true, and actually hide the controls.
The second call early returns on line 102.

Stop pinch zoom
1) When user lift up both fingers at the same time, ScrollEnd and PinchEnd are
emitted, so we call SetControlsTemporarilyHidden(false) twice.
The first call checks there is no finger touching the screen. If no, then it sets
status to false, and request showing the controls again. The second call earl
returns in line 102.

2) When user lifts up only one finger, and keeps another down, only PinchEnd
is called. At this point, it calls SetControlsTemporarilyHidden(false), checks
that one finger is still down, and early returns in line 111 - scrolling is
happening now. When user lifts up the last finger, ScrollEnd is emitted,
and SetControlsTemporarilyHidden(false) is called. At this point, it confirms
that no fingers are down, sets the status to false, and request showing
of controls again.

Note that to make sure no finger is on screen, patch exposes
RWHVEfl::pointer_state's GetPointerCount method.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=5007

Reviewed by: a.renevier, djmix.kim, sns.park

Change-Id: Ic627be821e9146d3c360463c4a4832d30ab68715
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h