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 e6eb23a536823ecf8c691e22078af60c14dc27e6..d1eb7eadf1c34c1831a9c4597a380185e12595a2 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 |
@@ -334,6 +334,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
contentViewCore.mIsMobileOptimizedHint = false; |
contentViewCore.hidePopupsAndClearSelection(); |
contentViewCore.resetScrollInProgress(); |
+ contentViewCore.resetImeAdapter(); |
} |
private void determinedProcessVisibility() { |
@@ -934,6 +935,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
mWebContentsObserver = null; |
setSmartClipDataListener(null); |
setZoomControlsDelegate(null); |
+ mImeAdapter.reset(); |
// TODO(igsolla): address TODO in ContentViewClient because ContentViewClient is not |
// currently a real Null Object. |
// |
@@ -3095,6 +3097,11 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
} |
} |
+ @VisibleForTesting |
+ public WebContentsObserver getWebContentsObserverForTest() { |
+ return mWebContentsObserver; |
+ } |
+ |
/** |
* Offer a long press gesture to the embedding View, primarily for WebView compatibility. |
* |
@@ -3120,6 +3127,10 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen |
if (potentiallyActiveFlingCount > 0) updateGestureStateListener(GestureEventType.FLING_END); |
} |
+ private void resetImeAdapter() { |
+ mImeAdapter.reset(); |
+ } |
+ |
private float getWheelScrollFactorInPixels() { |
if (mWheelScrollFactorInPixels == 0) { |
TypedValue outValue = new TypedValue(); |