From 9fb6b3c382612e4284ca9bd38930ab94053b8888 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Tue, 12 Jan 2010 14:38:39 -0500 Subject: Ensure that the current textfield is actually a textfield before treating it like one. Fix for http://b/issue?id=2368868 --- WebKit/android/nav/CachedRoot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'WebKit/android') diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp index e783eae..d9669bd 100644 --- a/WebKit/android/nav/CachedRoot.cpp +++ b/WebKit/android/nav/CachedRoot.cpp @@ -760,11 +760,11 @@ CachedRoot::ImeAction CachedRoot::currentTextFieldAction() const { const CachedFrame* currentFrame; const CachedNode* current = currentCursor(¤tFrame); - if (!current) { + 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) + if (!current || !current->isTextInput()) // Error case. No cursor and no focus. return FAILURE; } -- cgit v1.1