Loading core/java/android/webkit/WebTextView.java +3 −12 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ import junit.framework.Assert; // Used to determine whether onFocusChanged was called as a result of // calling remove(). private boolean mInsideRemove; private boolean mInPassword; // Types used with setType. Keep in sync with CachedInput.h private static final int NORMAL_TEXT_FIELD = 0; Loading Loading @@ -784,22 +785,11 @@ import junit.framework.Assert; mInsideRemove = false; } /** * Move the caret/selection into view. */ /* package */ void bringIntoView() { bringPointIntoView(Selection.getSelectionEnd(getText())); } @Override public boolean bringPointIntoView(int offset) { if (mWebView == null) return false; if (mWebView.nativeFocusCandidateIsPassword()) { if (mInPassword) { return getLayout() != null && super.bringPointIntoView(offset); } // For non password text input, tell webkit to move the caret/selection // on screen, since webkit draws them. mWebView.revealSelection(); return true; } Loading Loading @@ -914,6 +904,7 @@ import junit.framework.Assert; * @param inPassword True if the textfield is a password field. */ /* package */ void setInPassword(boolean inPassword) { mInPassword = inPassword; if (inPassword) { setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo. TYPE_TEXT_VARIATION_WEB_PASSWORD); Loading core/java/android/webkit/WebView.java +1 −2 Original line number Diff line number Diff line Loading @@ -4268,7 +4268,7 @@ public class WebView extends AbsoluteLayout Rect vBox = contentToViewRect(bounds); mWebTextView.setRect(vBox.left, vBox.top, vBox.width(), vBox.height()); if (!Rect.intersects(bounds, visibleRect)) { mWebTextView.bringIntoView(); revealSelection(); } String text = nativeFocusCandidateText(); int nodePointer = nativeFocusCandidatePointer(); Loading Loading @@ -7274,7 +7274,6 @@ public class WebView extends AbsoluteLayout // this is sent after finishing resize in WebViewCore. Make // sure the text edit box is still on the screen. if (inEditingMode() && nativeCursorIsTextInput()) { mWebTextView.bringIntoView(); rebuildWebTextView(); } break; Loading Loading
core/java/android/webkit/WebTextView.java +3 −12 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ import junit.framework.Assert; // Used to determine whether onFocusChanged was called as a result of // calling remove(). private boolean mInsideRemove; private boolean mInPassword; // Types used with setType. Keep in sync with CachedInput.h private static final int NORMAL_TEXT_FIELD = 0; Loading Loading @@ -784,22 +785,11 @@ import junit.framework.Assert; mInsideRemove = false; } /** * Move the caret/selection into view. */ /* package */ void bringIntoView() { bringPointIntoView(Selection.getSelectionEnd(getText())); } @Override public boolean bringPointIntoView(int offset) { if (mWebView == null) return false; if (mWebView.nativeFocusCandidateIsPassword()) { if (mInPassword) { return getLayout() != null && super.bringPointIntoView(offset); } // For non password text input, tell webkit to move the caret/selection // on screen, since webkit draws them. mWebView.revealSelection(); return true; } Loading Loading @@ -914,6 +904,7 @@ import junit.framework.Assert; * @param inPassword True if the textfield is a password field. */ /* package */ void setInPassword(boolean inPassword) { mInPassword = inPassword; if (inPassword) { setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo. TYPE_TEXT_VARIATION_WEB_PASSWORD); Loading
core/java/android/webkit/WebView.java +1 −2 Original line number Diff line number Diff line Loading @@ -4268,7 +4268,7 @@ public class WebView extends AbsoluteLayout Rect vBox = contentToViewRect(bounds); mWebTextView.setRect(vBox.left, vBox.top, vBox.width(), vBox.height()); if (!Rect.intersects(bounds, visibleRect)) { mWebTextView.bringIntoView(); revealSelection(); } String text = nativeFocusCandidateText(); int nodePointer = nativeFocusCandidatePointer(); Loading Loading @@ -7274,7 +7274,6 @@ public class WebView extends AbsoluteLayout // this is sent after finishing resize in WebViewCore. Make // sure the text edit box is still on the screen. if (inEditingMode() && nativeCursorIsTextInput()) { mWebTextView.bringIntoView(); rebuildWebTextView(); } break; Loading