Disambiguate ShowContextMenu implementation.
In the regular chromium flow, there is a hook invoked when
a long press gesture happens. The terminology used in the
messages and methods involved is "show context menu".
However, upon a long press gesture, chromium-efl does not
necessarily show a context menu right way. It might, for instance,
enter selection mode if the long press gesture happens on a
text (non anchor) content, and only tries to show an actual
context menu when user lifts up his finger.
Alternatively, it might show a context menu right away
in case the gesture happens on an <image> or a link.
For both cases, the same chromium hook is called by chromium,
whereas the former performs a second pass on the chromium hook,
which is confusing. Our current implementation ends up like:
EWebView::ShowContextMenu() {
if (called by chromium)
do this;
else // called by EWK on a second pass
do that;
}
Problem is that this is a constant source of issues because
it requires control of state variables to handle each passes
on the method.
Patch makes that separation clear by disambiguate this logic:
- EWebView::HandleLongPressEvent calls SelectionController
- SelectionController calls out to EWebView::ShowContextMenu.
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=14304
Reviewed by: a.renevier, djmix.kim, j.majnert, sns.park
Change-Id: I2bf2a1b24e20d7f0f50e6881144cb3cf8cc62925
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>