WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
165904
Move charCode / keyCode / which attributes from UIEvent to KeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=165904
Summary
Move charCode / keyCode / which attributes from UIEvent to KeyboardEvent
Chris Dumez
Reported
2016-12-15 10:54:01 PST
Bring back KeyboardEvent's charCode / keyCode / which attributes. They are still in the specification:
https://w3c.github.io/uievents/#legacy-interface-KeyboardEvent
They are still exposed by Firefox and Chrome. They are still covered by W3C web-platform-tests. Our implementation still supports them, we merely did not expose them to the Web.
Attachments
Patch
(6.90 KB, patch)
2016-12-15 11:44 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(22.54 KB, patch)
2016-12-15 13:04 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(29.87 KB, patch)
2016-12-15 13:46 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(31.07 KB, patch)
2016-12-15 16:00 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(31.35 KB, patch)
2016-12-15 16:07 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(31.36 KB, patch)
2016-12-15 16:58 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-12-15 11:44:00 PST
Created
attachment 297206
[details]
Patch
Daniel Bates
Comment 2
2016-12-15 11:59:09 PST
Comment on
attachment 297206
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=297206&action=review
> LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors-expected.txt:37 > +PASS KeyboardEvent constructor (argument with non-default values)
Wow, this is the only test we have to cover this functionality. Can we please add more tests?
Chris Dumez
Comment 3
2016-12-15 13:04:50 PST
Created
attachment 297214
[details]
Patch
Chris Dumez
Comment 4
2016-12-15 13:46:59 PST
Created
attachment 297216
[details]
Patch
Sam Weinig
Comment 5
2016-12-15 15:56:51 PST
Looks good, but please fix GTK. r=me.
Chris Dumez
Comment 6
2016-12-15 16:00:46 PST
Created
attachment 297238
[details]
Patch
Chris Dumez
Comment 7
2016-12-15 16:07:55 PST
Created
attachment 297241
[details]
Patch
Darin Adler
Comment 8
2016-12-15 16:18:22 PST
Comment on
attachment 297241
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=297241&action=review
> LayoutTests/fast/events/script-tests/init-events.js:110 > +shouldBeUndefined("testInitEvent('Mouse', '\"a\", false, false, window, 1001, 1002, 1003, 1004, 1005, false, false, false, false, 1006, null').keyCode"); > +shouldBeUndefined("testInitEvent('Mouse', '\"a\", false, false, window, 1001, 1002, 1003, 1004, 1005, false, false, false, false, 1006, null').charCode");
I would have thought we’d do this instead: shouldBeFalse("'charCode' in xxx"); Why not test that that the property is not even present rather than testing for the weaker condition that the property’s value is undefined?
Chris Dumez
Comment 9
2016-12-15 16:35:21 PST
(In reply to
comment #8
)
> Comment on
attachment 297241
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=297241&action=review
> > > LayoutTests/fast/events/script-tests/init-events.js:110 > > +shouldBeUndefined("testInitEvent('Mouse', '\"a\", false, false, window, 1001, 1002, 1003, 1004, 1005, false, false, false, false, 1006, null').keyCode"); > > +shouldBeUndefined("testInitEvent('Mouse', '\"a\", false, false, window, 1001, 1002, 1003, 1004, 1005, false, false, false, false, 1006, null').charCode"); > > I would have thought we’d do this instead: > > shouldBeFalse("'charCode' in xxx"); > > Why not test that that the property is not even present rather than testing > for the weaker condition that the property’s value is undefined?
Ok, will fix before landing.
Chris Dumez
Comment 10
2016-12-15 16:58:23 PST
Created
attachment 297258
[details]
Patch
WebKit Commit Bot
Comment 11
2016-12-15 17:30:00 PST
Comment on
attachment 297258
[details]
Patch Clearing flags on attachment: 297258 Committed
r209895
: <
http://trac.webkit.org/changeset/209895
>
WebKit Commit Bot
Comment 12
2016-12-15 17:30:05 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug