Bug 13529 - DOM3 keyIdentifier text is incorrect
Summary: DOM3 keyIdentifier text is incorrect
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2007-04-27 17:15 PDT by Darin Fisher (:fishd, Google)
Modified: 2007-05-13 07:23 PDT (History)
2 users (show)

See Also:

First attempt (11.78 KB, patch)
2007-05-12 08:30 PDT, Rob Buis
mitz: review-
Details | Formatted Diff | Diff
Now with complete source code (15.86 KB, patch)
2007-05-13 01:02 PDT, Rob Buis
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2007-04-27 17:15:24 PDT
DOM3 keyIdentifier text is incorrect

When pressing the 'A' key, Safari produces 'U+000041' instead of 'U+0041' as specified here:

Maciej suggested that this is either a bug or behavior that was based on an earlier version of the DOM3 events spec.  In any case, it seems like a bug, and since no other major browsers (IE, FF, Opera) seem to support the keyIdentifier property, it is probably something that can be fixed without breaking existing pages.
Comment 1 Darin Fisher (:fishd, Google) 2007-04-27 17:18:14 PDT
Indeed, this version of the spec says 'U+000041':
Comment 2 Maciej Stachowiak 2007-04-27 18:13:38 PDT
I suggest we update it to what the latest draft says.
Comment 3 Rob Buis 2007-05-12 08:30:24 PDT
Created attachment 14518 [details]
First attempt

This causes no regressions on my mac build, I wasn't able to test others (Qt run-webkit-tests is broken here, I don't (yet) have access to the other builds).

Comment 4 mitz 2007-05-12 14:41:45 PDT
Comment on attachment 14518 [details]
First attempt

Based on the ChangeLog, the patch appears to be incomplete.
Comment 5 Rob Buis 2007-05-13 01:02:24 PDT
Created attachment 14532 [details]
Now with complete source code

Mitz was right, this one should be complete. I blame it on multiple patches in the local tree :/

Comment 6 mitz 2007-05-13 01:11:32 PDT
Comment on attachment 14532 [details]
Now with complete source code

Still missing a few?

+        * platform/gdk/KeyEventGdk.cpp:
+        (WebCore::keyIdentifierForGdkKeyCode):

+        * platform/win/KeyEventWin.cpp:
+        (WebCore::keyIdentifierForWindowsKeyCode):
+        * platform/wx/KeyEventWin.cpp:
+        (WebCore::keyIdentifierForWindowsKeyCode):
Comment 7 Darin Adler 2007-05-13 06:09:18 PDT
Comment on attachment 14532 [details]
Now with complete source code

I am worried about compatibility, but lets just get this change in and track the DOM 3 events standard.

Comment 8 Rob Buis 2007-05-13 07:23:09 PDT
Landed in r21445.