summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorjdduke <jdduke@chromium.org>2015-08-05 17:16:50 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-06 00:17:32 +0000
commit36fee7bc622102a5a616a48262d54bdbe1d30903 (patch)
treec08b9a20eb1f42d542b30b4ddeab699f068afecd /android_webview
parentf7f7383da10b2207dfeb6603dc855052240e9990 (diff)
downloadchromium_src-36fee7bc622102a5a616a48262d54bdbe1d30903.zip
chromium_src-36fee7bc622102a5a616a48262d54bdbe1d30903.tar.gz
chromium_src-36fee7bc622102a5a616a48262d54bdbe1d30903.tar.bz2
Disable tap suppression logic for WebView
WebView embedders can suppress fling animation updates, potentially confusing the tap suppression controller. As the feature isn't critical, simply disable it for WebView. Also refactor the input router settings helper to use ui::GestureConfiguration directly for configuring tap suppression. This makes it simpler for different platforms to customize behavior. BUG=514783 Review URL: https://codereview.chromium.org/1267693004 Cr-Commit-Position: refs/heads/master@{#342019}
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/android_webview.gyp1
-rw-r--r--android_webview/lib/DEPS1
-rw-r--r--android_webview/lib/main/aw_main_delegate.cc7
3 files changed, 9 insertions, 0 deletions
diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp
index 981e43c..7d3034c 100644
--- a/android_webview/android_webview.gyp
+++ b/android_webview/android_webview.gyp
@@ -201,6 +201,7 @@
'../printing/printing.gyp:printing',
'../skia/skia.gyp:skia',
'../third_party/WebKit/public/blink.gyp:blink',
+ '../ui/events/events.gyp:gesture_detection',
'../ui/gl/gl.gyp:gl',
'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
'../v8/tools/gyp/v8.gyp:v8',
diff --git a/android_webview/lib/DEPS b/android_webview/lib/DEPS
index 17b7ba6..e46fa53 100644
--- a/android_webview/lib/DEPS
+++ b/android_webview/lib/DEPS
@@ -4,5 +4,6 @@ include_rules = [
"+content/public",
"+gin/public",
"+media/base/media_switches.h", # For media command line switches.
+ "+ui/events/gesture_detection",
"+ui/gl",
]
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
index 3558a04..232bd96 100644
--- a/android_webview/lib/main/aw_main_delegate.cc
+++ b/android_webview/lib/main/aw_main_delegate.cc
@@ -36,6 +36,7 @@
#include "gpu/command_buffer/client/gl_in_process_context.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "media/base/media_switches.h"
+#include "ui/events/gesture_detection/gesture_configuration.h"
namespace android_webview {
@@ -61,6 +62,12 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
BrowserViewRenderer::CalculateTileMemoryPolicy();
+ // WebView apps can override WebView#computeScroll to achieve custom
+ // scroll/fling. As a result, fling animations may not be ticked, potentially
+ // confusing the tap suppression controller. Simply disable it for WebView.
+ ui::GestureConfiguration::GetInstance()
+ ->set_fling_touchscreen_tap_suppression_enabled(false);
+
base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
cl->AppendSwitch(switches::kUseIpcCommandBuffer);
cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling);