From 95fa6e99128685c55e9be6f4362e67c288482a74 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Tue, 15 Dec 2009 16:33:28 -0500 Subject: If the DOM changes textfield focus, make the IME work properly. Fix for http://b/issue?id=2219166 Requires a change to frameworks/base Remove the old change to update the WebTextView when a key is pressed, since the IME does not generate key events. Instead, when the focus changes, and the IME is serving the WebTextView, immediately clear the cursor and update the WebTextView, so the user can continue typing. Also, allow "Next" to work on the currently focused textfield, even if it's not the cursor. Further, check for a new action if there is a focus but not a cursor. --- WebKit/android/nav/CachedRoot.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'WebKit/android/nav/CachedRoot.h') diff --git a/WebKit/android/nav/CachedRoot.h b/WebKit/android/nav/CachedRoot.h index 435937a..5fdf8df 100644 --- a/WebKit/android/nav/CachedRoot.h +++ b/WebKit/android/nav/CachedRoot.h @@ -52,11 +52,12 @@ public: void checkForJiggle(int* ) const; bool checkRings(const WTF::Vector& rings, const WebCore::IntRect& bounds) const; - WebCore::IntPoint cursorLocation() const; // This method returns the desired ImeAction for the textfield where the - // mouse cursor currently is. If the mouse cursor is not on a textfield, + // 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 cursorTextFieldAction() const; + ImeAction currentTextFieldAction() const; + WebCore::IntPoint cursorLocation() const; int documentHeight() { return mContents.height(); } int documentWidth() { return mContents.width(); } const CachedNode* findAt(const WebCore::IntRect& , const CachedFrame** , -- cgit v1.1