Not a thorough enough job of testing here. Patch coming up.
Created attachment 8363026 [details] [diff] [review] fix offset table for GetDOMKeyName 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!
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
(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...