WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
56761
KeyboardEvent keyIdentifier is not propagated to plugins by Chromium
https://bugs.webkit.org/show_bug.cgi?id=56761
Summary
KeyboardEvent keyIdentifier is not propagated to plugins by Chromium
wez
Reported
2011-03-21 11:40:29 PDT
Overview: DOM KeyboardEvents reach plug-ins in Chromium via the WebPluginContainerImpl, which converts them to Chromium's WebKeyboardEvent. The conversion process doesn't currently propagate the keyIdentifier field (presumably because that is never currently passed to plug-ins). Steps to Reproduce: Try to use the keyIdentifier field of the WebKeyboardEvent from plug-in code. Actual Results: The keyIdentifier string will be empty. Expected Results: The keyIdentifier field should contain a character key-value (e.g. U+0041) or key function name (e.g. "Shift"). Build Date & Platform: Build 2011-03-21 on Linux w/ Chromium development build.
Attachments
Patch
(1.64 KB, patch)
2011-03-23 07:14 PDT
,
wez
ojan
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
wez
Comment 1
2011-03-23 07:14:29 PDT
Created
attachment 86613
[details]
Patch
Hajime Morrita
Comment 2
2011-04-12 14:17:02 PDT
Looks no harm. This patch would be safe to r+ for any reviewers ;-)
David Levin
Comment 3
2011-04-12 15:03:45 PDT
Comment on
attachment 86613
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=86613&action=review
> Source/WebKit/chromium/src/WebInputEventConversion.cpp:339 > + sizeof(keyIdentifier) - 1);
I dislike strncpy. It does weird things. (Why fill in all those 0's?) What about memcpy? memcpy(keyIdentifier, event.keyIdentifier().ascii().data(), std::min(sizeof(keyIdentifier) - 1, event.keyIdentifier().ascii().length()); keyIdentifier[event.keyIdentifier().ascii().length()] = '\0'; (Of course, you may want to put event.keyIdentifier().ascii() in a local and possible length as well, so I guess that makes it slightly longer.) What do you think?
David Levin
Comment 4
2011-04-12 15:05:32 PDT
fwiw, I tried to find a function in webkit that did this but failed.
Ojan Vafai
Comment 5
2011-04-26 16:54:06 PDT
Comment on
attachment 86613
[details]
Patch r- per David's last comment.
Stephen Chenney
Comment 6
2013-04-11 13:30:23 PDT
https://code.google.com/p/chromium/issues/detail?id=230550
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