Bug 65964 - [Chromium] plugins/keyboard-events.html should pass on linux/mac
Summary: [Chromium] plugins/keyboard-events.html should pass on linux/mac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: noel gordon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 00:13 PDT by noel gordon
Modified: 2011-08-22 20:59 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.84 KB, patch)
2011-08-10 01:13 PDT, noel gordon
no flags Details | Formatted Diff | Diff
Patch sync up. (3.86 KB, patch)
2011-08-22 02:25 PDT, noel gordon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 noel gordon 2011-08-10 01:13:36 PDT
Created attachment 103450 [details]
Patch
Comment 2 noel gordon 2011-08-10 01:25:15 PDT
I note the linux result outputs an empty keycode -- that is a progression.  There is a FIXME note in the test plugin code about that:
  http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp?rev=88712#L644

The FIXME code is there, keyEventToChar(), but it produces an empty char with the chromium linux DRT. 
  http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp?rev=88712#L623

This because the chromium linux DRT creates a keyboard event but fails to fill in the native GTK keycode in that field of the event.
Comment 3 Tony Chang 2011-08-10 09:55:59 PDT
Do we know why we get an empty keycode with Chromium's DRT?  It seems to be working for GTK+.
Comment 4 noel gordon 2011-08-22 02:23:10 PDT
(In reply to comment #3)
> Do we know why we get an empty keycode with Chromium's DRT?  It seems to be working for GTK+.

The GTK port creates an honest to goodness GdkEvent keypress event
  http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/gtk/EventSender.cpp?rev=85516#L612

Chromium's DRT generates a WebKeyboardEvent, defined by the webkit api
  http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/chromium/EventSender.cpp?rev=85516#L566

and fills in the WebKeyboardEvent.windowsKeyCode field, but not the nativeKeyCode field
  http://trac.webkit.org/browser/trunk/WebKit/chromium/public/WebInputEvent.h?rev=50721#L153

The plugin is sent the nativeKeyCode value.  That works in the real browser case, but not with
the Chromium DRT.  Is there a table somewhere that maps webkit::VKEY_CODE to native key codes?
Comment 5 noel gordon 2011-08-22 02:25:35 PDT
Created attachment 104655 [details]
Patch sync up.
Comment 6 Tony Chang 2011-08-22 10:10:11 PDT
Comment on attachment 104655 [details]
Patch sync up.

Seems fine.  I filed bug 66679 about fixing the missing key codes.  Seems OK to just add a table for use by chromium's drt.
Comment 7 WebKit Review Bot 2011-08-22 11:06:13 PDT
Comment on attachment 104655 [details]
Patch sync up.

Clearing flags on attachment: 104655

Committed r93519: <http://trac.webkit.org/changeset/93519>
Comment 8 WebKit Review Bot 2011-08-22 11:06:18 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 noel gordon 2011-08-22 20:59:21 PDT
The Skia for the Mac transition is now active.  Move the chromium mac keyboard-events.html result to
platform/chromium-cg-mac while this transition happens.  http://trac.webkit.org/changeset/93554.