Bug 54939

Summary: [Chromium] keycode is always 0 when using non-Latin keyboard layout.
Product: WebKit Reporter: James Su <suzhe>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: avi, commit-queue, dglazkov
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.6   
URL: http://unixpapa.com/js/testkey.html
Attachments:
Description Flags
Patch to fix this issue.
dglazkov: review-, commit-queue: commit-queue-
Fix email address in ChangeLog files. none

Description James Su 2011-02-21 23:28:55 PST
What steps will reproduce the problem?
1. Open http://unixpapa.com/js/testkey.html
2. Switch to a non-Latin keyboard layout, eg. Russian, Arabic.
3. Press some keys.

What is the expected output? What do you see instead?
keyCode value of key events should not be zero, but they are always zero when using non-Latin keyboard layout.

See: http://crbug.com/73119
Comment 1 James Su 2011-02-21 23:48:43 PST
Created attachment 83277 [details]
Patch to fix this issue.
Comment 2 Dimitri Glazkov (Google) 2011-02-22 08:44:55 PST
Avi, can you take a look?
Comment 3 Avi Drissman 2011-02-22 09:10:03 PST
(In reply to comment #2)
> Avi, can you take a look?

I like this. The original code was stolen from KeyEventMac, which was seriously cleaned up afterwards. We should match KeyEventMac.
Comment 4 Eric Seidel (no email) 2011-02-24 03:09:29 PST
Comment on attachment 83277 [details]
Patch to fix this issue.

Yay!  How do we test this?
Comment 5 James Su 2011-02-24 17:31:11 PST
(In reply to comment #4)
> (From update of attachment 83277 [details])
> Yay!  How do we test this?

I'm wondering if we could extend DumpRenderTree's keyDown method to support generating key event with arbitrary content, so that we could write layout tests as normal.
Comment 6 James Su 2011-02-28 10:44:07 PST
Can anybody help commit?
Comment 7 James Su 2011-03-01 20:37:37 PST
ping?
Comment 8 WebKit Commit Bot 2011-03-03 12:33:00 PST
Comment on attachment 83277 [details]
Patch to fix this issue.

Rejecting attachment 83277 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-7', 'land-a..." exit_code: 1

Last 500 characters of output:
ommit-queue/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 64, in _run
    step(tool, options).run(state)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 57, in run
    if self._has_valid_reviewer(changelog_entry):
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 42, in _has_valid_reviewer
    if changelog_entry.reviewer():
AttributeError: 'NoneType' object has no attribute 'reviewer'

Full output: http://queues.webkit.org/results/8085324
Comment 9 WebKit Commit Bot 2011-03-03 19:40:05 PST
Comment on attachment 83277 [details]
Patch to fix this issue.

Rejecting attachment 83277 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-3', 'land-a..." exit_code: 1

Last 500 characters of output:
ommit-queue/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 64, in _run
    step(tool, options).run(state)
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 57, in run
    if self._has_valid_reviewer(changelog_entry):
  File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 42, in _has_valid_reviewer
    if changelog_entry.reviewer():
AttributeError: 'NoneType' object has no attribute 'reviewer'

Full output: http://queues.webkit.org/results/8087415
Comment 10 James Su 2011-03-03 19:52:32 PST
Can anyone help me look into this problem?

(In reply to comment #9)
> (From update of attachment 83277 [details])
> Rejecting attachment 83277 [details] from commit-queue.
> 
> Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-3', 'land-a..." exit_code: 1
> 
> Last 500 characters of output:
> ommit-queue/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 64, in _run
>     step(tool, options).run(state)
>   File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 57, in run
>     if self._has_valid_reviewer(changelog_entry):
>   File "/mnt/git/webkit-commit-queue/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 42, in _has_valid_reviewer
>     if changelog_entry.reviewer():
> AttributeError: 'NoneType' object has no attribute 'reviewer'
> 
> Full output: http://queues.webkit.org/results/8087415
Comment 11 Dimitri Glazkov (Google) 2011-03-03 20:00:39 PST
Comment on attachment 83277 [details]
Patch to fix this issue.

The ChangeLog is malformed. Look at author's name. It should be in "Bob Foobar <bob@foobar.baz>" format.
Comment 12 James Su 2011-03-03 20:17:23 PST
Created attachment 84683 [details]
Fix email address in ChangeLog files.
Comment 13 James Su 2011-03-03 20:18:19 PST
My fault. New patch uploaded, please have a look.

(In reply to comment #11)
> (From update of attachment 83277 [details])
> The ChangeLog is malformed. Look at author's name. It should be in "Bob Foobar <bob@foobar.baz>" format.
Comment 14 Dimitri Glazkov (Google) 2011-03-03 20:26:51 PST
Comment on attachment 84683 [details]
Fix email address in ChangeLog files.

all systems go.
Comment 15 WebKit Commit Bot 2011-03-04 01:02:56 PST
The commit-queue encountered the following flaky tests while processing attachment 84683 [details]:

inspector/timeline/timeline-network-resource.html bug 55751 (authors: loislo@chromium.org, pfeldman@chromium.org, and yurys@chromium.org)
The commit-queue is continuing to process your patch.
Comment 16 WebKit Commit Bot 2011-03-04 01:04:58 PST
Comment on attachment 84683 [details]
Fix email address in ChangeLog files.

Clearing flags on attachment: 84683

Committed r80336: <http://trac.webkit.org/changeset/80336>
Comment 17 WebKit Commit Bot 2011-03-04 01:05:03 PST
All reviewed patches have been landed.  Closing bug.