Loading core/java/android/webkit/WebView.java +10 −0 Original line number Diff line number Diff line Loading @@ -7144,6 +7144,16 @@ public class WebView extends AbsoluteLayout setContentScrollTo(msg.arg1, msg.arg2); break; case SCROLL_TO_MSG_ID: if (((Boolean) msg.obj).booleanValue()) { // This scroll is intended to bring the textfield into // view, but is only necessary if the IME is showing InputMethodManager imm = InputMethodManager.peekInstance(); if (imm == null || !imm.isAcceptingText() || (!imm.isActive(WebView.this) && (!inEditingMode() || !imm.isActive(mWebTextView)))) { break; } } if (setContentScrollTo(msg.arg1, msg.arg2)) { // if we can't scroll to the exact position due to pin, // send a message to WebCore to re-scroll when we get a Loading core/java/android/webkit/WebViewCore.java +3 −2 Original line number Diff line number Diff line Loading @@ -2120,7 +2120,7 @@ final class WebViewCore { } // called by JNI private void contentScrollTo(int x, int y) { private void contentScrollTo(int x, int y, boolean onlyIfImeIsShowing) { if (!mBrowserFrame.firstLayoutDone()) { /* * WebKit restore state will be called before didFirstLayout(), Loading @@ -2133,7 +2133,8 @@ final class WebViewCore { } if (mWebView != null) { Message msg = Message.obtain(mWebView.mPrivateHandler, WebView.SCROLL_TO_MSG_ID, x, y); WebView.SCROLL_TO_MSG_ID, x, y, Boolean.valueOf(onlyIfImeIsShowing)); if (mDrawIsScheduled) { mEventHub.sendMessage(Message.obtain(null, EventHub.MESSAGE_RELAY, msg)); Loading Loading
core/java/android/webkit/WebView.java +10 −0 Original line number Diff line number Diff line Loading @@ -7144,6 +7144,16 @@ public class WebView extends AbsoluteLayout setContentScrollTo(msg.arg1, msg.arg2); break; case SCROLL_TO_MSG_ID: if (((Boolean) msg.obj).booleanValue()) { // This scroll is intended to bring the textfield into // view, but is only necessary if the IME is showing InputMethodManager imm = InputMethodManager.peekInstance(); if (imm == null || !imm.isAcceptingText() || (!imm.isActive(WebView.this) && (!inEditingMode() || !imm.isActive(mWebTextView)))) { break; } } if (setContentScrollTo(msg.arg1, msg.arg2)) { // if we can't scroll to the exact position due to pin, // send a message to WebCore to re-scroll when we get a Loading
core/java/android/webkit/WebViewCore.java +3 −2 Original line number Diff line number Diff line Loading @@ -2120,7 +2120,7 @@ final class WebViewCore { } // called by JNI private void contentScrollTo(int x, int y) { private void contentScrollTo(int x, int y, boolean onlyIfImeIsShowing) { if (!mBrowserFrame.firstLayoutDone()) { /* * WebKit restore state will be called before didFirstLayout(), Loading @@ -2133,7 +2133,8 @@ final class WebViewCore { } if (mWebView != null) { Message msg = Message.obtain(mWebView.mPrivateHandler, WebView.SCROLL_TO_MSG_ID, x, y); WebView.SCROLL_TO_MSG_ID, x, y, Boolean.valueOf(onlyIfImeIsShowing)); if (mDrawIsScheduled) { mEventHub.sendMessage(Message.obtain(null, EventHub.MESSAGE_RELAY, msg)); Loading