summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-03-31 15:29:25 -0400
committerLeon Scroggins <scroggo@google.com>2010-03-31 15:29:25 -0400
commit2194b17e89b2ad4c0624f7612e417db6d69150ad (patch)
tree64a3e27ec417ac9b6dd022a34273f8c4195bafca /WebKit
parent2eba8dcfad57fc753029296850e489032f0a5c6e (diff)
downloadexternal_webkit-2194b17e89b2ad4c0624f7612e417db6d69150ad.zip
external_webkit-2194b17e89b2ad4c0624f7612e417db6d69150ad.tar.gz
external_webkit-2194b17e89b2ad4c0624f7612e417db6d69150ad.tar.bz2
Create a method to check to see if the focus has a following textfield.
Fixes http://b/issue?id=2559070 Requires a change to frameworks/base. Change-Id: I450cb8ee109e9a1f38a7290032fb3ca948dcc71a
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/nav/WebView.cpp10
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",