Bug 162855

Summary: Add support for KeyboardEvent.getModifierState() operation
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, arv, cdumez, darin, rniwa, sam, webkit
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate
Bug Depends on:    
Bug Blocks: 162852, 162861    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-10-01 20:37:09 PDT
Add support for KeyboardEvent.getModifierState() operation:
- https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate
Comment 1 Chris Rebert 2016-10-01 20:51:20 PDT
*** Bug 40999 has been marked as a duplicate of this bug. ***
Comment 2 Chris Dumez 2016-10-02 12:39:43 PDT
Created attachment 290473 [details]
Patch
Comment 3 Darin Adler 2016-10-02 14:18:17 PDT
I’m kind of surprised we still had this function sitting around, almost unused but nt quite. Seems like the modifier name is kind of like an enumeration. Surprising that the specification just does it as a string rather than using an enumeration.

As a side note, the only existing caller of the getModifierState function, the handleKeyboardSelectionMovement function in EventHandler.cpp, should *not* be using it. It should just be calling the different boolean functions directly.
Comment 4 Chris Dumez 2016-10-02 14:52:11 PDT
Comment on attachment 290473 [details]
Patch

Clearing flags on attachment: 290473

Committed r206725: <http://trac.webkit.org/changeset/206725>
Comment 5 Chris Dumez 2016-10-02 14:52:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Chris Rebert 2016-10-02 15:07:56 PDT
Is there a follow-up bug for support of the remaining modifiers which are listed as TODO in the commit?
Comment 7 Chris Dumez 2016-10-02 15:11:56 PDT
(In reply to comment #6)
> Is there a follow-up bug for support of the remaining modifiers which are
> listed as TODO in the commit?

Not yet, I'll file one soon.