Not a thorough enough job of testing here. Patch coming up.
The problem is that offsetof computes byte offsets, but we were using the offsetof values as indices into a char16_t array. Fixed by adjusting the offsetof values to be char16_t offsets instead. Sorry for the breakage!
Attachment #8363026 - Flags: review?(masayuki)
Comment on attachment 8363026 [details] [diff] [review] fix offset table for GetDOMKeyName Please test some non-printable keys before landing this patch. You can use here: https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html
Attachment #8363026 - Flags: review?(masayuki) → review+
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #2) > Comment on attachment 8363026 [details] [diff] [review] > fix offset table for GetDOMKeyName > > Please test some non-printable keys before landing this patch. > > You can use here: > https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html Verified that prior to the patch, we get garbage for keys like Enter, Backspace, and VolumeMute, and that with the patch, the keys print their expected names. https://hg.mozilla.org/integration/mozilla-inbound/rev/37097cb0c3fd
Thank you for the quick fix! I'm planning automated tests for this. However, some key names are still unstable in D3E draft. Therefore, there is no tests about this. I hope I can create the test this year...
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.