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

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 13:24:45 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4fbe01c9d65451e0d491bb1f73bb56ba07125db8
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 14 19:02:57 2010 +0000

    2010-09-14  Andreas Kling  <andreas.kling at nokia.com>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Numpad Enter key returns keyCode 0 instead of 13
            https://bugs.webkit.org/show_bug.cgi?id=45014
    
            Original patch by Jarred Nicholls <jarred.nicholls at gmail.com>
    
            There is a missing case statement in the PlatformKeyboardEventQt.cpp
            file to handle the Enter button on the number pad.  Because it is not
            handled, the keyCode returned in a JavaScript event is 0 rather than 13.
    
            Test: manual-tests/qt/numpad-enter-key.html
    
            * manual-tests/qt/numpad-enter-key.html: Added.
            * platform/qt/PlatformKeyboardEventQt.cpp:
            (WebCore::windowsKeyCodeForKeyEvent):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0503617..87b7472 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-14  Andreas Kling  <andreas.kling at nokia.com>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Numpad Enter key returns keyCode 0 instead of 13
+        https://bugs.webkit.org/show_bug.cgi?id=45014
+
+        Original patch by Jarred Nicholls <jarred.nicholls at gmail.com>
+
+        There is a missing case statement in the PlatformKeyboardEventQt.cpp
+        file to handle the Enter button on the number pad.  Because it is not
+        handled, the keyCode returned in a JavaScript event is 0 rather than 13.
+
+        Test: manual-tests/qt/numpad-enter-key.html
+
+        * manual-tests/qt/numpad-enter-key.html: Added.
+        * platform/qt/PlatformKeyboardEventQt.cpp:
+        (WebCore::windowsKeyCodeForKeyEvent):
+
 2010-09-14  Evan Martin  <evan at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/manual-tests/qt/numpad-enter-key.html b/WebCore/manual-tests/qt/numpad-enter-key.html
new file mode 100644
index 0000000..ea9b800
--- /dev/null
+++ b/WebCore/manual-tests/qt/numpad-enter-key.html
@@ -0,0 +1,22 @@
+<html>
+<head>
+    <script type="text/javascript">
+        window.onload = function() {
+            document.getElementById('test').addEventListener('keypress', function(e) {
+                out = document.getElementById('out');
+                out.innerHTML = 'keyCode: ' + e.keyCode + ' (should be 13)';
+                if (e.keyCode == 13)
+                    out.style.background = '#6f6';
+                else
+                    out.style.background = '#f66';
+            }, false);
+            document.getElementById('test').focus()
+        };
+    </script>
+</head>
+<body>
+    <p>Press the numpad Enter key while the input box below is focused:</p>
+    <p><input type="text" id="test" /></p>
+    <p id="out"></p>
+</body>
+</html>
diff --git a/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
index d0edb16..33e9552 100644
--- a/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
+++ b/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
@@ -188,6 +188,9 @@ int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
             return VK_RIGHT; // (27) RIGHT ARROW key
         case Qt::Key_Down:
             return VK_DOWN; // (28) DOWN ARROW key
+        case Qt::Key_Enter:
+        case Qt::Key_Return:
+            return VK_RETURN; // (0D) Return key
         case Qt::Key_Insert:
             return VK_INSERT; // (2D) INS key
         case Qt::Key_Delete:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list