Move away from AsyncHitTest messages to handle long press.
authorAntonio Gomes <a1.gomes@samsung.com>
Wed, 26 Aug 2015 23:11:05 +0000 (19:11 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commit3bc2c309804fac56c14f3fbdaeed7e1b40692c27
tree91415bb9e9682dafd8f23424b2e2390ee04c425f
parent6875cba3039a56ec8a4b64cf59fe796a9267358d
Move away from AsyncHitTest messages to handle long press.

As another step to move our text selection implementation
away from hit test messages, patch makes use of the existing
FrameHostMsg_ContextMenu message in order to update the
context menu data. Flow:

0- (..)
1- RenderFrameImpl::showContextMenu
2-       <<IPC>>
3- RenderFrameHostImpl::OnContextMenu
4- WebContentsViewDelegateEwk::ShowContextMenu
5- EWebView::ShowContextMenu
6- SelectionControllerEfl::HandleLongPressEvent
7- (..)

Note that EWebView::ShowContextMenu *needs* to get called twiced
when long press is being handled: First, when long press event
processing itself happens. This is called as part of the chain
that handles message FrameHostMsg_ContextMenu (see stable above).
The second call to EWebView::ShowContextMenu used to happen
when user lifts its finger, and context menu should actually
get shown.

Additionally, patch moves in advance the moment when
long_mouse_press_ is set to true: instead of setting it
in SelectionControllerEfl::HandleLongEventPrivate, it is
now set in ::HandleGesture. That allows EWebView::ShowContextMenu
to check for it reliably instead of checking for ::IsShowingMagnifier
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=6663

Original beta/m42 patches:
- http://165.213.202.130/gerrit/#/c/85895/ , reviewed by
DONGJUN KiM, Janusz Majnert, Arnaud Renevier.
- http://165.213.202.130/gerrit/#/c/86028/ , reviewed by
Janusz Majnert, Arnaud Renevier.

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

Reviewed by: Janusz Majnert

Change-Id: I3eabb73f56d1003cff738c817e42ba8eae4e14c6
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h
tizen_src/ewk/efl_integration/eweb_view.cc