Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 2939783002: Fixing mouse focus on WebView (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index bc68d1897a740f9736db19f3b90ad314eab719c3..43e8de712e4fc0053dcd4eac870d7231f16d6e44 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -541,9 +541,9 @@ void ContentViewCoreImpl::OnGestureEventAck(const blink::WebGestureEvent& event,
bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) {
if (event.GetType() != WebInputEvent::kGestureTap &&
- event.GetType() != WebInputEvent::kGestureDoubleTap &&
event.GetType() != WebInputEvent::kGestureLongTap &&
- event.GetType() != WebInputEvent::kGestureLongPress)
+ event.GetType() != WebInputEvent::kGestureLongPress &&
+ event.GetType() != WebInputEvent::kMouseDown)
return false;
JNIEnv* env = AttachCurrentThread();
@@ -551,6 +551,11 @@ bool ContentViewCoreImpl::FilterInputEvent(const blink::WebInputEvent& event) {
if (j_obj.is_null())
return false;
+ Java_ContentViewCore_requestFocus(env, j_obj);
aelias_OOO_until_Jul13 2017/06/13 22:22:55 This doesn't really have anything to do with filte
aelias_OOO_until_Jul13 2017/06/15 22:14:30 OK, Pedro explained offline this approach doesn't
+
+ if (event.GetType() == WebInputEvent::kMouseDown)
+ return false;
+
const blink::WebGestureEvent& gesture =
static_cast<const blink::WebGestureEvent&>(event);
int gesture_type = ToGestureEventType(event.GetType());
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698