diff options
author | Leon Scroggins <scroggo@google.com> | 2010-02-08 11:34:36 -0500 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-02-09 10:31:15 -0500 |
commit | a2aaeda3cab40ff823fc40ebff51b828d1a9bc1c (patch) | |
tree | 0d206af9ea6c9a201c1ac1126265a944710e1a33 /WebKit | |
parent | 18a7eb20d5f2c5ff04fc2bc74824ff92de2cb0a2 (diff) | |
download | external_webkit-a2aaeda3cab40ff823fc40ebff51b828d1a9bc1c.zip external_webkit-a2aaeda3cab40ff823fc40ebff51b828d1a9bc1c.tar.gz external_webkit-a2aaeda3cab40ff823fc40ebff51b828d1a9bc1c.tar.bz2 |
Remove code which retrieves the action associated with a textfield.
This code was written because we previously only had one action
button on the IME for textfields. Now that textfields can always
have a next button, we no longer need it.
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/nav/CachedRoot.cpp | 32 | ||||
-rw-r--r-- | WebKit/android/nav/CachedRoot.h | 11 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 11 |
3 files changed, 0 insertions, 54 deletions
diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp index 5805e5f..54e0c15 100644 --- a/WebKit/android/nav/CachedRoot.cpp +++ b/WebKit/android/nav/CachedRoot.cpp @@ -756,38 +756,6 @@ bool CachedRoot::checkRings(const WTF::Vector<WebCore::IntRect>& rings, return ringCheck.success(); } -CachedRoot::ImeAction CachedRoot::currentTextFieldAction() const -{ - const CachedFrame* currentFrame; - const CachedNode* current = currentCursor(¤tFrame); - if (!current || !current->isTextInput()) { - // Although the cursor is not on a textfield, a textfield may have - // focus. Find the action for that textfield. - current = currentFocus(¤tFrame); - if (!current || !current->isTextInput()) - // Error case. No cursor and no focus. - return FAILURE; - } - const CachedNode* firstTextfield = nextTextField(0, 0, false); - if (!firstTextfield) { - // Error case. There are no textfields in this tree. - return FAILURE; - } - // Now find the next textfield/area starting with the cursor - const CachedFrame* potentialFrame; - const CachedNode* potentialNext - = currentFrame->nextTextField(current, &potentialFrame, true); - if (potentialNext && currentFrame->textInput(current)->formPointer() - == potentialFrame->textInput(potentialNext)->formPointer()) { - // There is a textfield/area after the cursor in the same form, - // so the textfield under the cursor should have the NEXT action - return NEXT; - } - // If this line is reached, we know that the textfield under the cursor is - // the last one. Make it GO to allow a submit - return GO; -} - const CachedNode* CachedRoot::findAt(const WebCore::IntRect& rect, const CachedFrame** framePtr, int* x, int* y, bool checkForHidden) const { diff --git a/WebKit/android/nav/CachedRoot.h b/WebKit/android/nav/CachedRoot.h index 5fdf8df..dc0cea8 100644 --- a/WebKit/android/nav/CachedRoot.h +++ b/WebKit/android/nav/CachedRoot.h @@ -40,23 +40,12 @@ class CachedNode; class CachedRoot : public CachedFrame { public: - enum ImeAction { - FAILURE = -1, - NEXT = 0, - GO = 1, - DONE = 2 - }; bool adjustForScroll(BestData* , Direction , WebCore::IntPoint* scrollPtr, bool findClosest); int checkForCenter(int x, int y) const; void checkForJiggle(int* ) const; bool checkRings(const WTF::Vector<WebCore::IntRect>& rings, const WebCore::IntRect& bounds) const; - // This method returns the desired ImeAction for the textfield where the - // mouse cursor currently is, or where the focus is if there is no mouse - // cursor. If the mouse cursor is not on a textfield, - // it will return FAILURE - ImeAction currentTextFieldAction() const; WebCore::IntPoint cursorLocation() const; int documentHeight() { return mContents.height(); } int documentWidth() { return mContents.width(); } diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index e2a7708..79e53f9 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -2018,15 +2018,6 @@ static void nativeMoveCursorToNextTextInput(JNIEnv *env, jobject obj) view->getWebViewCore()->m_moveGeneration++; } -static jint nativeTextFieldAction(JNIEnv *env, jobject obj) -{ - WebView* view = GET_NATIVE_VIEW(env, obj); - CachedRoot* root = view->getFrameCache(WebView::DontAllowNewer); - if (!root) - return static_cast<jint>(CachedRoot::FAILURE); - return static_cast<jint>(root->currentTextFieldAction()); -} - static int nativeMoveGeneration(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); @@ -2211,8 +2202,6 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeSetFollowedLink }, { "nativeSetHeightCanMeasure", "(Z)V", (void*) nativeSetHeightCanMeasure }, - { "nativeTextFieldAction", "()I", - (void*) nativeTextFieldAction }, { "nativeTextGeneration", "()I", (void*) nativeTextGeneration }, { "nativeUpdateCachedTextfield", "(Ljava/lang/String;I)V", |