summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-07-27 11:55:43 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-07-27 11:55:43 (GMT)
commitbe1e08209a1cef9ff15fc5cc49d4d1d611d917cb (patch)
tree028b44dbeec75fd4dadda02e4dc4e5d6955070ac /src
parentdb501e24d460231590c7e30cb8704c132efc3e8e (diff)
downloadQt-be1e08209a1cef9ff15fc5cc49d4d1d611d917cb.zip
Qt-be1e08209a1cef9ff15fc5cc49d4d1d611d917cb.tar.gz
Qt-be1e08209a1cef9ff15fc5cc49d4d1d611d917cb.tar.bz2
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')
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog16
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp26
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp23
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 <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.
+
2010-06-18 Simon Hausmann <simon.hausmann@nokia.com>
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<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)
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;