Changeset 64725 in webkit


Ignore:
Timestamp:
Aug 5, 2010 2:19:24 AM (14 years ago)
Author:
Simon Hausmann
Message:

[Qt] Input mode states are not reset after entering a password field
https://bugs.webkit.org/show_bug.cgi?id=43530

Patch by David Leong <david.leong@nokia.com> on 2010-08-05
Reviewed by Simon Hausmann.

Input mode hints are not reset if clicking on password <input> elements then
clicking on <textarea> elements

  • WebCoreSupport/EditorClientQt.cpp:

(WebCore::EditorClientQt::setInputMethodState):

  • tests/qwebview/resources/input_types.html:
  • tests/qwebview/tst_qwebview.cpp:

(tst_QWebView::focusInputTypes):

Location:
trunk/WebKit/qt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r64679 r64725  
     12010-08-05  David Leong  <david.leong@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Input mode states are not reset after entering a password field
     6        https://bugs.webkit.org/show_bug.cgi?id=43530
     7
     8        Input mode hints are not reset if clicking on password <input> elements then
     9        clicking on <textarea> elements
     10
     11        * WebCoreSupport/EditorClientQt.cpp:
     12        (WebCore::EditorClientQt::setInputMethodState):
     13        * tests/qwebview/resources/input_types.html:
     14        * tests/qwebview/tst_qwebview.cpp:
     15        (tst_QWebView::focusInputTypes):
     16
     17
    1182010-08-04  Pierre Rossi  <pierre.rossi@nokia.com>
    219
  • trunk/WebKit/qt/WebCoreSupport/EditorClientQt.cpp

    r64120 r64725  
    597597    if (webPageClient) {
    598598#if QT_VERSION >= 0x040600
     599        // Make sure to reset input method hint
     600        webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, false);
     601        webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, false);
     602        webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, false);
     603        webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, false);
     604        webPageClient->setInputMethodHint(Qt::ImhHiddenText, false);
     605
    599606        HTMLInputElement* inputElement = 0;
    600607        Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
  • trunk/WebKit/qt/tests/qwebview/resources/input_types.html

    r60958 r64725  
    55<input type='number' style='position: absolute; left: 10px; top: 150px; height: 50px; width: 100px;'/><br>
    66<input type='email' style='position: absolute; left: 10px; top: 200px; height: 50px; width: 100px;'/><br>
    7 <input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>"
     7<input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>
     8<textarea style='position: absolute; left: 10px; top: 310px; height: 50px; width: 100px;' rows="2" cols="20">blah blah blah blah</textarea><br>
    89</body></html>
  • trunk/WebKit/qt/tests/qwebview/tst_qwebview.cpp

    r64120 r64725  
    265265    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
    266266#endif
     267    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    267268
    268269    // 'password' field
    269270    webView->fireMouseClick(QPoint(20, 60));
    270271    QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
     272    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    271273
    272274    // 'tel' field
    273275    webView->fireMouseClick(QPoint(20, 110));
    274276    QVERIFY(webView->inputMethodHints() == Qt::ImhDialableCharactersOnly);
     277    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    275278
    276279    // 'number' field
    277280    webView->fireMouseClick(QPoint(20, 160));
    278281    QVERIFY(webView->inputMethodHints() == Qt::ImhDigitsOnly);
     282    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    279283
    280284    // 'email' field
    281285    webView->fireMouseClick(QPoint(20, 210));
    282286    QVERIFY(webView->inputMethodHints() == Qt::ImhEmailCharactersOnly);
     287    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    283288
    284289    // 'url' field
    285290    webView->fireMouseClick(QPoint(20, 260));
    286291    QVERIFY(webView->inputMethodHints() == Qt::ImhUrlCharactersOnly);
     292    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    287293
    288294    // 'password' field
    289295    webView->fireMouseClick(QPoint(20, 60));
    290296    QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
     297    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    291298
    292299    // 'text' type
     
    298305    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
    299306#endif
     307    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     308
     309    // 'password' field
     310    webView->fireMouseClick(QPoint(20, 60));
     311    QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
     312    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
     313
     314    qWarning("clicking on text area");
     315    // 'text area' field
     316    webView->fireMouseClick(QPoint(20, 320));
     317    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
     318    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
    300319
    301320    delete webView;
Note: See TracChangeset for help on using the changeset viewer.