Fix 'repeat' state of a DOM KeyboardEvent on Windows

The WM_KEYDOWN-to-WebKeyboardEvent mapping was incorrect, probably
because MSDN is not helpful. Bits 0-15 of lParam are the number of
coalesced events that this message represents (which is 1 unless
you're not pumping messages fast enough). Bit 30 of lParam represents
the previous key state - i.e. if it was already down; if so, this
is a repeat.

This manifests in the 'repeat' state of a DOM KeyboardEvent.

BUG=263724,394907
TEST=window.onkeydown=function(e){console.log(e.repeat);};

Review URL: https://codereview.chromium.org/419283003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286090 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed