WebKitTools:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2007 01:24:53 +0000 (01:24 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2007 01:24:53 +0000 (01:24 +0000)
        Reviewed by Darin Adler and Sam Weinig.

        - fix <rdar://problem/5134075> fast/forms/select-type-ahead-non-latin.html fails on boomer

        * DumpRenderTree/win/EventSender.cpp:
        (keyDownCallback): For characters that cannot be entered on the active
        keyboard layout, send a WM_CHAR message with the character along with
        a WM_KEYDOWN message with a virtual key code of 255.

LayoutTests:

        Reviewed by Darin Adler and Sam Weinig.

        - remove fast/forms/select-type-ahead-non-latin.html after fixing <rdar://problem/5134075>

        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27863 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/win/Skipped
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/win/EventSender.cpp

index d91d6afaf2d7d70b5532b82fb07a87b2baad3e31..3bcff51aa7c61f8e984206bce06216a6562b7271 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-16  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Darin Adler and Sam Weinig.
+
+        - remove fast/forms/select-type-ahead-non-latin.html after fixing <rdar://problem/5134075>
+
+        * platform/win/Skipped:
+
 2007-11-16  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Rubberstamped by Eric.
index 61c2c059a48bea56ab4c9072d8b6efb43b9170d9..3fe9dff169cf7d3b800aa8f4bf665456a9520e8c 100644 (file)
@@ -293,9 +293,6 @@ fast/forms/drag-into-textarea.html
 # This test uses Mac-specific key codes <rdar://problem/5076426>
 fast/events/arrow-navigation.html
 
-# fast/forms/select-type-ahead-non-latin.html fails on boomer <rdar://problem/5134075>
-fast/forms/select-type-ahead-non-latin.html
-
 # Selection seems to fail for some LayoutTests <rdar://problem/5130762>
 editing/selection/4402375.html
 editing/selection/image-before-linebreak.html
index a2581814bb39b1785030fb62e5b110dfbc9c4ae5..6a432ea549f73066199c20f332c1c2215d774196 100644 (file)
@@ -1,3 +1,14 @@
+2007-11-16  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Darin Adler and Sam Weinig.
+
+        - fix <rdar://problem/5134075> fast/forms/select-type-ahead-non-latin.html fails on boomer
+
+        * DumpRenderTree/win/EventSender.cpp:
+        (keyDownCallback): For characters that cannot be entered on the active
+        keyboard layout, send a WM_CHAR message with the character along with
+        a WM_KEYDOWN message with a virtual key code of 255.
+
 2007-11-16  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Tim Hatcher.
index e27423e01ae69557168eadb7a87fc4c243b9260e..be9d6471725923ce0c580a2b44deca20e1b062c8 100644 (file)
@@ -252,10 +252,11 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
     JSStringRef character = JSValueToStringCopy(context, arguments[0], exception);
     ASSERT(!*exception);
     int virtualKeyCode;
+    int charCode = 0;
     if (JSStringIsEqualToUTF8CString(character, "rightArrow")) {
         virtualKeyCode = VK_RIGHT;
     } else {
-        int charCode = JSStringGetCharactersPtr(character)[0];
+        charCode = JSStringGetCharactersPtr(character)[0];
         virtualKeyCode = toupper(LOBYTE(VkKeyScan(charCode)));
     }
     JSStringRelease(character);
@@ -290,8 +291,15 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
     }
 
     MSG msg = makeMsg(webViewWindow, WM_KEYDOWN, virtualKeyCode, 0);
-    dispatchMessage(&msg);
-    
+    if (virtualKeyCode != 255)
+        dispatchMessage(&msg);
+    else {
+        // For characters that do not exist in the active keyboard layout,
+        // ::Translate will not work, so we post an WM_CHAR event ourselves.
+        ::PostMessage(webViewWindow, WM_CHAR, charCode, 0);
+        ::DispatchMessage(&msg);
+    }
+
     if (argumentCount > 1)
         ::SetKeyboardState(keyState);