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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:23:43 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b64820cfe91e059a9fd42732413d5d7ba5b0f829
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 7 19:29:50 2010 +0000

    2010-10-07  Kwang Yul Seo  <skyul at company100.net>
    
            Reviewed by Kent Tamura.
    
            [BREWMP] Map non-alphabet key code to Unicode value
            https://bugs.webkit.org/show_bug.cgi?id=46002
    
            Non-alphabet key codes are not equal to the unicode values. Add conversion.
    
            * platform/brew/PlatformKeyboardEventBrew.cpp:
            (WebCore::singleCharacterString):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69328 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index de91f4d..8e238bf 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-07  Kwang Yul Seo  <skyul at company100.net>
+
+        Reviewed by Kent Tamura.
+
+        [BREWMP] Map non-alphabet key code to Unicode value
+        https://bugs.webkit.org/show_bug.cgi?id=46002
+
+        Non-alphabet key codes are not equal to the unicode values. Add conversion.
+
+        * platform/brew/PlatformKeyboardEventBrew.cpp:
+        (WebCore::singleCharacterString):
+
 2010-10-05  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Chris Fleizach.
diff --git a/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp b/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp
index 8166145..fc6a753 100644
--- a/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp
+++ b/WebCore/platform/brew/PlatformKeyboardEventBrew.cpp
@@ -148,7 +148,70 @@ static int windowsKeyCodeForKeyEvent(uint16 code)
 
 static inline String singleCharacterString(UChar c)
 {
-    return String(&c, 1);
+    UChar text;
+
+    // Some key codes are not mapped to Unicode characters. Convert them to Unicode characters here.
+    switch (c) {
+    case AVK_0:
+        text = VK_0;
+        break;
+    case AVK_1:
+        text = VK_1;
+        break;
+    case AVK_2:
+        text = VK_2;
+        break;
+    case AVK_3:
+        text = VK_3;
+        break;
+    case AVK_4:
+        text = VK_4;
+        break;
+    case AVK_5:
+        text = VK_5;
+        break;
+    case AVK_6:
+        text = VK_6;
+        break;
+    case AVK_7:
+        text = VK_7;
+        break;
+    case AVK_8:
+        text = VK_8;
+        break;
+    case AVK_9:
+        text = VK_9;
+        break;
+    case AVK_STAR:
+        text = '*';
+        break;
+    case AVK_POUND:
+        text = '#';
+        break;
+    case AVK_FUNCTION1:
+        text = '=';
+        break;
+    case AVK_FUNCTION2:
+        text = '/';
+        break;
+    case AVK_FUNCTION3:
+        text = '_';
+        break;
+    case AVK_PUNC1:
+        text = ',';
+        break;
+    case AVK_PUNC2:
+        text = '.';
+        break;
+    case AVK_SPACE:
+        text = VK_SPACE;
+        break;
+    default:
+        text = c;
+        break;
+    }
+
+    return String(&text, 1);
 }
 
 PlatformKeyboardEvent::PlatformKeyboardEvent(AEEEvent event, uint16 code, uint32 modifiers, Type type)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list