Move away from synchronous hit testing.
authorAntonio Gomes <a1.gomes@samsung.com>
Sun, 26 Oct 2014 03:15:39 +0000 (23:15 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
commitbc7b63d98fa213e003c313c11c6428c8ca73b640
treefb9c9ed060c5baba8846f5957e005c93a6931057
parent0c1866c0831981d8f23ffb44ae1ea3d8f184ea72
Move away from synchronous hit testing.

After [1], we have both sync and async hit test mechanisms
available in dev/. One of the current clients of the sync
approach is our text selection update routine
(SelectionControllerEfl::ShowHandleAndContextMenuIfRequiredCallback).

At debug builds, we were hitting an assert at this method
because it is not allowed to perform sync waits on the UI
thread.
For it to be fully functional, the sync approach requires
that we patch ThreadRestrictions::ScopedAllowWait located
at (base/threading/thread_restrictions.h) and remove a BRINGUP
guards (see [2]).

However, beta/ branch has moved away from it, and changed
the call site method to use the async approach. Patch follows
the idea and does the same for dev/.

In practice, it also fixes the folowing message on standard
error output followed by a crash:
"Waiting is not allowed to be used on this thread to
prevent jank and deadlock".

Steps to reproduce the crash:
0) debug build
1) load gmail.com
2) type into the passwd field.

Note that the existing selection functionality (broken or not)
remains untouched.

[1] http://165.213.202.130:8080/#/c/70137/
[2] http://165.213.202.130:8080/#/c/70907/

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=8073
     http://107.108.218.239/bugzilla/show_bug.cgi?id=5456
Reviewed by: Balazs Kelemen, Kamil Klimek, SeungSeop Park, Viatcheslav Ostapenko, arno renevier

Change-Id: Id73891da55788fae3aa84d3916ab731955bb22a2
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/impl/selection_controller_efl.cc
tizen_src/impl/selection_controller_efl.h