OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
10 import android.content.ContentResolver; | 10 import android.content.ContentResolver; |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 return eventActionMasked; | 1164 return eventActionMasked; |
1165 } | 1165 } |
1166 } | 1166 } |
1167 | 1167 |
1168 /** | 1168 /** |
1169 * @see View#onTouchEvent(MotionEvent) | 1169 * @see View#onTouchEvent(MotionEvent) |
1170 */ | 1170 */ |
1171 public boolean onTouchEvent(MotionEvent event) { | 1171 public boolean onTouchEvent(MotionEvent event) { |
1172 TraceEvent.begin("onTouchEvent"); | 1172 TraceEvent.begin("onTouchEvent"); |
1173 try { | 1173 try { |
1174 cancelRequestToScrollFocusedEditableNodeIntoView(); | 1174 int eventAction = event.getActionMasked(); |
1175 | 1175 |
1176 int eventAction = event.getActionMasked(); | 1176 if (eventAction == MotionEvent.ACTION_DOWN) { |
| 1177 cancelRequestToScrollFocusedEditableNodeIntoView(); |
| 1178 } |
1177 | 1179 |
1178 if (isSPenSupported(mContext)) | 1180 if (isSPenSupported(mContext)) |
1179 eventAction = convertSPenEventAction(eventAction); | 1181 eventAction = convertSPenEventAction(eventAction); |
1180 | 1182 |
1181 // Only these actions have any effect on gesture detection. Other | 1183 // Only these actions have any effect on gesture detection. Other |
1182 // actions have no corresponding WebTouchEvent type and may confuse
the | 1184 // actions have no corresponding WebTouchEvent type and may confuse
the |
1183 // touch pipline, so we ignore them entirely. | 1185 // touch pipline, so we ignore them entirely. |
1184 if (eventAction != MotionEvent.ACTION_DOWN | 1186 if (eventAction != MotionEvent.ACTION_DOWN |
1185 && eventAction != MotionEvent.ACTION_UP | 1187 && eventAction != MotionEvent.ACTION_UP |
1186 && eventAction != MotionEvent.ACTION_CANCEL | 1188 && eventAction != MotionEvent.ACTION_CANCEL |
(...skipping 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3392 | 3394 |
3393 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3395 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3394 int x, int y, int w, int h); | 3396 int x, int y, int w, int h); |
3395 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3397 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3396 | 3398 |
3397 private native void nativeResumeResponseDeferredAtStart( | 3399 private native void nativeResumeResponseDeferredAtStart( |
3398 long nativeContentViewCoreImpl); | 3400 long nativeContentViewCoreImpl); |
3399 private native void nativeSetHasPendingNavigationTransitionForTesting( | 3401 private native void nativeSetHasPendingNavigationTransitionForTesting( |
3400 long nativeContentViewCoreImpl); | 3402 long nativeContentViewCoreImpl); |
3401 } | 3403 } |
OLD | NEW |