| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| index 6e4155c04220df4d79f2c0df59e0f90ec7f46bab..db0e9556769580d5375b6489e467ef4c1f0b59a2 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| @@ -718,8 +718,8 @@ public class ContentViewCore
|
| boolean isNavigationToDifferentPage, boolean isFragmentNavigation) {
|
| if (!isNavigationToDifferentPage) return;
|
| hidePopupsAndClearSelection();
|
| + if (mNativeContentViewCore != 0) nativeResetPendingInput(mNativeContentViewCore);
|
| resetScrollInProgress();
|
| - resetGestureDetection();
|
| }
|
|
|
| @Override
|
| @@ -1107,10 +1107,6 @@ public class ContentViewCore
|
| || eventAction == MotionEvent.ACTION_POINTER_UP;
|
| }
|
|
|
| - public void setIgnoreRemainingTouchEvents() {
|
| - resetGestureDetection();
|
| - }
|
| -
|
| public boolean isScrollInProgress() {
|
| return mTouchScrollInProgress || mPotentiallyActiveFlingCount > 0;
|
| }
|
| @@ -1349,11 +1345,6 @@ public class ContentViewCore
|
| return mActionMode != null;
|
| }
|
|
|
| - private void resetGestureDetection() {
|
| - if (mNativeContentViewCore == 0) return;
|
| - nativeResetGestureDetection(mNativeContentViewCore);
|
| - }
|
| -
|
| /**
|
| * @see View#onAttachedToWindow()
|
| */
|
| @@ -1507,7 +1498,10 @@ public class ContentViewCore
|
| * @see View#onWindowFocusChanged(boolean)
|
| */
|
| public void onWindowFocusChanged(boolean hasWindowFocus) {
|
| - if (!hasWindowFocus) resetGestureDetection();
|
| + if (!hasWindowFocus) {
|
| + if (mNativeContentViewCore == 0) return;
|
| + nativeCancelActiveTouchSequence(mNativeContentViewCore);
|
| + }
|
| }
|
|
|
| public void onFocusChanged(boolean gainFocus) {
|
| @@ -3000,7 +2994,9 @@ public class ContentViewCore
|
|
|
| private native void nativeHideTextHandles(long nativeContentViewCoreImpl);
|
|
|
| - private native void nativeResetGestureDetection(long nativeContentViewCoreImpl);
|
| + private native void nativeCancelActiveTouchSequence(long nativeContentViewCoreImpl);
|
| +
|
| + private native void nativeResetPendingInput(long nativeContentViewCoreImpl);
|
|
|
| private native void nativeSetDoubleTapSupportEnabled(
|
| long nativeContentViewCoreImpl, boolean enabled);
|
|
|