Skip to content

Commit 64b4f16

Browse files
author
Michael Kolb
committed
Support spellcheck attribute in WebTextView
Bug: 5267547 set no suggestions for WebTextView when spellcheck attribute is false depends on CL: https://android-git.corp.google.com/g/#/c/141326/2 Change-Id: I4ad476270607e9d600567bbb4d9fd321893707b1
1 parent 99f3668 commit 64b4f16

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

core/java/android/webkit/WebTextView.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,9 @@ private void setMaxLength(int maxLength) {
10021002
| InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT;
10031003
int imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
10041004
| EditorInfo.IME_FLAG_NO_FULLSCREEN;
1005+
if (!mWebView.nativeFocusCandidateIsSpellcheck()) {
1006+
inputType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
1007+
}
10051008
if (TEXT_AREA != type
10061009
&& mWebView.nativeFocusCandidateHasNextTextfield()) {
10071010
imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_NEXT;

core/java/android/webkit/WebView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9459,6 +9459,7 @@ private native int nativeFindAll(String findLower, String findUpper,
94599459
private native boolean nativeFocusCandidateIsTextInput();
94609460
/* package */ native int nativeFocusCandidateMaxLength();
94619461
/* package */ native boolean nativeFocusCandidateIsAutoComplete();
9462+
/* package */ native boolean nativeFocusCandidateIsSpellcheck();
94629463
/* package */ native String nativeFocusCandidateName();
94639464
private native Rect nativeFocusCandidateNodeBounds();
94649465
/**

0 commit comments

Comments
 (0)