[Webkit-unassigned] [Bug 16735] keyboard events created with DOM have keyCode and charCode of 0; thus they aren't handled correctly internally

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Nov 14 21:08:58 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=16735





--- Comment #7 from Daniel Bates <dbates at webkit.org>  2009-11-14 21:08:58 PST ---
Created an attachment (id=43240)
 --> (https://bugs.webkit.org/attachment.cgi?id=43240)
Patch (Work in progress)

Work in progress.

Possible fix for this issue.

Tested only on the Mac build (at this time). Also, neither modified
PlatformKeyboardEventChromium.cpp nor included a test case.

My thought was to create a reverse mapping from keyIdentifier to charCode, see
KeyboardEvent::keyIdentifierList(). Modified KeyboardEvent to fall back on
method KeyboardEvent::charCodeForKeyIdentifier if KeyboardEvent::m_keyEvent ==
null (i.e. this event wasn't generated by a physical key press - hence no
platform-specific event).

Since some these charCodes are platform-specific, method
KeyboardEvent::charCodeForKeyIdentifier first calls
PlatformKeyboardEvent::keyIdentifierList() to get any platform-specific
mappings. Otherwise, we fall back on KeyboardEvent::keyIdentifierList(), parse
printable ASCII characters or parse Unicode code points (of the form U+000D).

I am open to suggestions on this patch and approaches to resolve this issue, if
we choose to do so.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list