fixup! Enable sound effect when tapping on a link
authorAntonio Gomes <a1.gomes@samsung.com>
Wed, 29 Apr 2015 20:28:27 +0000 (16:28 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
In order to closely match follow our adjustment logic, patch
performs a hit test "for tap" (instead of a point based one)
using the same "padding" as the original tap event.
That way, as long as touch adjustment picks up a link for clicking,
we will emit a click sound.

Change-Id: Ia481fdd5b7e02ff3f433480bd5e8c1de32dedc06
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc

index 8410281..fbfcfff 100644 (file)
@@ -613,9 +613,14 @@ void RenderViewObserverEfl::OnUpdateSettings(const tizen_webview::Settings& sett
 void RenderViewObserverEfl::HandleTap(const blink::WebGestureEvent& event)
 {
   if (link_effect_enabled_) {
+    // In order to closely match our touch adjustment logic, we
+    // perform a hit test "for tap" using the same "padding" as the
+    // original tap event. That way, touch adjustment picks up a link
+    // for clicking, we will emit a click sound.
+    blink::WebSize size(event.data.tap.width, event.data.tap.height);
     const blink::WebHitTestResult web_hit_test_result =
-        render_view()->GetWebView()->hitTestResultAt(
-            blink::WebPoint(event.x, event.y));
+        render_view()->GetWebView()->hitTestResultForTap(
+            blink::WebPoint(event.x, event.y), size);
 
     if (!web_hit_test_result.absoluteLinkURL().isEmpty()) {
       // we are on a link