Bug 43530

Summary: [Qt] Input mode states are not reset after entering a password field
Product: WebKit Reporter: David Leong <david.leong>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Critical CC: david.leong, hausmann, laszlo.gombos
Priority: P1 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: S60 Hardware   
OS: S60 3rd edition   
Attachments:
Description Flags
proposed change to reset input modes hausmann: review+, hausmann: commit-queue-

Description David Leong 2010-08-04 18:39:35 PDT
In Qt's implementation of void EditorClientQt::setInputMethodState(bool active), the specific input type is updated based on the input element type attribute to specify vkb handling for number, password or other special input modes.

There is a bug in this function where upon entering a password text field the input hit would be set correctly to 'hidden', but entering subsequent normal input elements the state would be stuck in the 'hidden' mode. There are other manifestations of the bug depending on the type of the text field previously entered. 

The fix is to reset the input method hints whenever EditorClientQt::setInputMethodState().

I will post up a patch as soon as possible.
Comment 1 David Leong 2010-08-04 18:52:03 PDT
Made a small mistake with the description., the use case is clicking a <input type='password'> field, which sets the input mode to 'hidden'. Next click on a <textarea> and the text area input will be stuck in the password mode.
Comment 2 David Leong 2010-08-04 19:11:02 PDT
Created attachment 63528 [details]
proposed change to reset input modes

The bug happens when the user clicks on a input field with a specific type then clicking on a text area. Because the input hints are never reset the text area inherits the wrong input hints.

The fix is to reset the state and set all flags from scratch.
Comment 3 Laszlo Gombos 2010-08-04 20:21:12 PDT
Looks good to me.
Comment 4 Simon Hausmann 2010-08-05 01:03:10 PDT
Comment on attachment 63528 [details]
proposed change to reset input modes

r=me. I'll land it manually together with a unit test.
Comment 5 Simon Hausmann 2010-08-05 02:20:07 PDT
Committed r64725: <http://trac.webkit.org/changeset/64725>
Comment 6 Simon Hausmann 2010-08-05 02:22:06 PDT
cherry-picked into qtwebkit-4.6 with commit bbff6182e525fcf58dbc7426a1fbbf8f31588214
Comment 7 Simon Hausmann 2010-08-05 05:42:59 PDT
Revision r64725 cherry-picked into qtwebkit-2.1 with commit b0aea678e59f43c4fcc556d736da887452be5aad
Comment 8 Simon Hausmann 2010-08-05 05:44:59 PDT
Revision r64725 cherry-picked into qtwebkit-2.0 with commit 31fc031c76110f1e7d8626d930559a8b5f6c8e1d