From be1e08209a1cef9ff15fc5cc49d4d1d611d917cb Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 27 Jul 2010 13:55:43 +0200 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( d521d7d81e8f0297c94be9ebd8af67ee130d0edb ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2010-07-27 Simon Hausmann Reviewed by Tor Arne Vestbø. [Qt] Incorrect input method hints https://bugs.webkit.org/show_bug.cgi?id=43037 Properly set or reset all input method hints when activating input fields. * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::setInputMethodState): * tests/qwebview/tst_qwebview.cpp: (tst_QWebView::focusInputTypes): Extended unit test to verify that we reset hints. --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 16 +++++++++++++ .../WebKit/qt/WebCoreSupport/EditorClientQt.cpp | 26 ++++++++++------------ .../WebKit/qt/tests/qwebview/tst_qwebview.cpp | 23 ++++++++++++++----- 4 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index b6178b9..358024b 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 038b62085831eef4dee423361c65ecd55b7b9b1d + d521d7d81e8f0297c94be9ebd8af67ee130d0edb diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index cf335a1..7d419d5 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,19 @@ +2010-07-27 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + [Qt] Incorrect input method hints + https://bugs.webkit.org/show_bug.cgi?id=43037 + + Properly set or reset all input method hints when + activating input fields. + + * WebCoreSupport/EditorClientQt.cpp: + (WebCore::EditorClientQt::setInputMethodState): + * tests/qwebview/tst_qwebview.cpp: + (tst_QWebView::focusInputTypes): Extended unit test to verify that we + reset hints. + 2010-06-18 Simon Hausmann Reviewed by Antti Koivisto. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp index 3255c8e..cb0758b 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp @@ -608,20 +608,18 @@ void EditorClientQt::setInputMethodState(bool active) inputElement = static_cast(frame->document()->focusedNode()); if (inputElement) { - if (!active) { - // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag - // for password fields. The Qt platform is responsible for determining which widget - // will receive input method events for password fields. - active = inputElement->isPasswordField(); - webPageClient->setInputMethodHint(Qt::ImhHiddenText, active); - } else { - // Set input method hints for "number", "tel", "email", and "url" input elements. - webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, inputElement->isTelephoneField()); - webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, inputElement->isNumberField()); - webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, inputElement->isEmailField()); - webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, inputElement->isUrlField()); - webPageClient->setInputMethodHint(Qt::ImhHiddenText, inputElement->isPasswordField()); - } + // Set input method hints for "number", "tel", "email", "url" and "password" input elements. + webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, inputElement->isTelephoneField()); + webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, inputElement->isNumberField()); + webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, inputElement->isEmailField()); + webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, inputElement->isUrlField()); + // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag + // for password fields. The Qt platform is responsible for determining which widget + // will receive input method events for password fields. + bool isPasswordField = inputElement->isPasswordField(); + webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField); + if (isPasswordField) + active = true; } #if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN) diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp index 5e8e8a9..facee59 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp @@ -254,23 +254,36 @@ void tst_QWebView::focusInputTypes() // 'password' field webView->fireMouseClick(QPoint(20, 60)); - QVERIFY(webView->inputMethodHints() & Qt::ImhHiddenText); + QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText); // 'tel' field webView->fireMouseClick(QPoint(20, 110)); - QVERIFY(webView->inputMethodHints() & Qt::ImhDialableCharactersOnly); + QVERIFY(webView->inputMethodHints() == Qt::ImhDialableCharactersOnly); // 'number' field webView->fireMouseClick(QPoint(20, 160)); - QVERIFY(webView->inputMethodHints() & Qt::ImhDigitsOnly); + QVERIFY(webView->inputMethodHints() == Qt::ImhDigitsOnly); // 'email' field webView->fireMouseClick(QPoint(20, 210)); - QVERIFY(webView->inputMethodHints() & Qt::ImhEmailCharactersOnly); + QVERIFY(webView->inputMethodHints() == Qt::ImhEmailCharactersOnly); // 'url' field webView->fireMouseClick(QPoint(20, 260)); - QVERIFY(webView->inputMethodHints() & Qt::ImhUrlCharactersOnly); + QVERIFY(webView->inputMethodHints() == Qt::ImhUrlCharactersOnly); + + // 'password' field + webView->fireMouseClick(QPoint(20, 60)); + QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText); + + // 'text' type + webView->fireMouseClick(QPoint(20, 10)); +#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN) + QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase); + QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText); +#else + QVERIFY(webView->inputMethodHints() == Qt::ImhNone); +#endif delete webView; -- cgit v0.12