[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hausmann at webkit.org hausmann at webkit.org
Wed Dec 22 11:43:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 90fac270d68180d6ce630a5977788a84173ba936
Author: hausmann at webkit.org <hausmann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 5 09:19:24 2010 +0000

    [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 at 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):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64725 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 38e1ceb..35da328 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,20 @@
+2010-08-05  David Leong  <david.leong at nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Input mode states are not reset after entering a password field
+        https://bugs.webkit.org/show_bug.cgi?id=43530
+
+        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):
+
+
 2010-08-04  Pierre Rossi  <pierre.rossi at nokia.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 54993b1..664d44d 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -596,6 +596,13 @@ void EditorClientQt::setInputMethodState(bool active)
     QWebPageClient* webPageClient = m_page->d->client;
     if (webPageClient) {
 #if QT_VERSION >= 0x040600
+        // Make sure to reset input method hint
+        webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, false);
+        webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, false);
+        webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, false);
+        webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, false);
+        webPageClient->setInputMethodHint(Qt::ImhHiddenText, false);
+
         HTMLInputElement* inputElement = 0;
         Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
         if (frame && frame->document() && frame->document()->focusedNode())
diff --git a/WebKit/qt/tests/qwebview/resources/input_types.html b/WebKit/qt/tests/qwebview/resources/input_types.html
index 18ab314..2e893af 100644
--- a/WebKit/qt/tests/qwebview/resources/input_types.html
+++ b/WebKit/qt/tests/qwebview/resources/input_types.html
@@ -4,5 +4,6 @@
 <input type='tel' style='position: absolute; left: 10px; top: 100px; height: 50px; width: 100px;'/><br>
 <input type='number' style='position: absolute; left: 10px; top: 150px; height: 50px; width: 100px;'/><br>
 <input type='email' style='position: absolute; left: 10px; top: 200px; height: 50px; width: 100px;'/><br>
-<input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>"
-</body></html>
\ No newline at end of file
+<input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>
+<textarea style='position: absolute; left: 10px; top: 310px; height: 50px; width: 100px;' rows="2" cols="20">blah blah blah blah</textarea><br>
+</body></html>
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index 5dc5e41..bd19578 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -264,30 +264,37 @@ void tst_QWebView::focusInputTypes()
 #else
     QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
 #endif
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     // 'password' field
     webView->fireMouseClick(QPoint(20, 60));
     QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     // 'tel' field
     webView->fireMouseClick(QPoint(20, 110));
     QVERIFY(webView->inputMethodHints() == Qt::ImhDialableCharactersOnly);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     // 'number' field
     webView->fireMouseClick(QPoint(20, 160));
     QVERIFY(webView->inputMethodHints() == Qt::ImhDigitsOnly);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     // 'email' field
     webView->fireMouseClick(QPoint(20, 210));
     QVERIFY(webView->inputMethodHints() == Qt::ImhEmailCharactersOnly);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     // 'url' field
     webView->fireMouseClick(QPoint(20, 260));
     QVERIFY(webView->inputMethodHints() == Qt::ImhUrlCharactersOnly);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     // 'password' field
     webView->fireMouseClick(QPoint(20, 60));
     QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     // 'text' type
     webView->fireMouseClick(QPoint(20, 10));
@@ -297,6 +304,18 @@ void tst_QWebView::focusInputTypes()
 #else
     QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
 #endif
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+
+    // 'password' field
+    webView->fireMouseClick(QPoint(20, 60));
+    QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+
+    qWarning("clicking on text area");
+    // 'text area' field
+    webView->fireMouseClick(QPoint(20, 320));
+    QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+    QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
 
     delete webView;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list