summaryrefslogtreecommitdiff
path: root/src/3rdparty/webkit/WebKit/qt/WebCoreSupport
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-07-27 13:55:43 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2010-07-27 13:55:43 +0200
commitbe1e08209a1cef9ff15fc5cc49d4d1d611d917cb (patch)
tree028b44dbeec75fd4dadda02e4dc4e5d6955070ac /src/3rdparty/webkit/WebKit/qt/WebCoreSupport
parentdb501e24d460231590c7e30cb8704c132efc3e8e (diff)
downloadqt4-tools-be1e08209a1cef9ff15fc5cc49d4d1d611d917cb.tar.gz
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( d521d7d81e8f0297c94be9ebd8af67ee130d0edb )
Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2010-07-27 Simon Hausmann <simon.hausmann@nokia.com> 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.
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/WebCoreSupport')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 3255c8e006..cb0758be69 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<HTMLInputElement*>(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)