| 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 e1b3417a6b83399f0e2047886d6350753b35347e..58c3ac9e8f7d8afe972dc9139dea05a5dbd2fabf 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
|
| @@ -1408,7 +1408,6 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
| } else {
|
| undoScrollFocusedEditableNodeIntoViewIfNeeded(false);
|
| }
|
| - mImeAdapter.dispatchKeyEventPreIme(event);
|
| return mContainerViewInternals.super_dispatchKeyEventPreIme(event);
|
| } finally {
|
| TraceEvent.end();
|
| @@ -1423,16 +1422,14 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
| !mImeAdapter.isNativeImeAdapterAttached() && mNativeContentViewCore != 0) {
|
| mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore));
|
| }
|
| - // The key handling logic is kind of confusing here.
|
| - // The purpose of shouldOverrideKeyEvent() is to filter out some keys that is critical
|
| - // to browser function but useless in renderer process (for example, the back button),
|
| - // so the browser can still respond to these keys in a timely manner when the renderer
|
| - // process is busy/blocked/busted. mImeAdapter.dispatchKeyEvent() forwards the key event
|
| - // to the renderer process. If mImeAdapter is bypassed or is not interested to the event,
|
| - // fall back to the default dispatcher to propagate the event to sub-views.
|
| - return (!getContentViewClient().shouldOverrideKeyEvent(event)
|
| - && mImeAdapter.dispatchKeyEvent(event))
|
| - || mContainerViewInternals.super_dispatchKeyEvent(event);
|
| +
|
| + if (getContentViewClient().shouldOverrideKeyEvent(event)) {
|
| + return mContainerViewInternals.super_dispatchKeyEvent(event);
|
| + }
|
| +
|
| + if (mKeyboardConnected && mImeAdapter.dispatchKeyEvent(event)) return true;
|
| +
|
| + return mContainerViewInternals.super_dispatchKeyEvent(event);
|
| }
|
|
|
| /**
|
|
|