fix incorrect key names after bug 957659

RESOLVED FIXED in mozilla29

Status

()

Core
DOM
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: froydnj, Unassigned)

Tracking

unspecified
mozilla29
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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!
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
Flags: in-testsuite-
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...
https://hg.mozilla.org/mozilla-central/rev/37097cb0c3fd
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.