diff options
| author | Cary Clark <cary@android.com> | 2010-04-05 11:29:47 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-04-05 11:29:47 -0700 |
| commit | c0cc84d6a4d0db0b39a9036bdbeb67f6c7e9e56e (patch) | |
| tree | 6300393eb97b99058fa9c456b5cfc65bd9f944dc /WebKit/android | |
| parent | b721be96061253a7a8e35313bb5ee794d03d9af8 (diff) | |
| parent | 2194b17e89b2ad4c0624f7612e417db6d69150ad (diff) | |
| download | external_webkit-c0cc84d6a4d0db0b39a9036bdbeb67f6c7e9e56e.zip external_webkit-c0cc84d6a4d0db0b39a9036bdbeb67f6c7e9e56e.tar.gz external_webkit-c0cc84d6a4d0db0b39a9036bdbeb67f6c7e9e56e.tar.bz2 | |
Merge "Create a method to check to see if the focus has a following textfield." into froyo
Diffstat (limited to 'WebKit/android')
| -rw-r--r-- | WebKit/android/nav/WebView.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index c83ceea..0ac6bd6 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -1221,6 +1221,14 @@ static const CachedNode* getFocusCandidate(JNIEnv *env, jobject obj, return root->currentFocus(); } +static bool focusCandidateHasNextTextfield(JNIEnv *env, jobject obj) +{ + const CachedFrame* frame; + const CachedNode* cursor = getFocusCandidate(env, obj, &frame); + if (!cursor || !cursor->isTextInput()) return false; + return frame->nextTextField(cursor, 0); +} + static const CachedNode* getFocusNode(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); @@ -1919,6 +1927,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeFindNext }, { "nativeFocusCandidateFramePointer", "()I", (void*) nativeFocusCandidateFramePointer }, + { "nativeFocusCandidateHasNextTextfield", "()Z", + (void*) focusCandidateHasNextTextfield }, { "nativeFocusCandidateIsPassword", "()Z", (void*) nativeFocusCandidateIsPassword }, { "nativeFocusCandidateIsRtlText", "()Z", |
