Bug 56103

Summary: [WK2] Handle keyboard and mouse events on X11
Product: WebKit Reporter: Balazs Kelemen <kbalazs>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: kling, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 55659    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Balazs Kelemen
Reported 2011-03-10 07:47:37 PST
... so I can play Super Mario in MiniBrowser :)
Attachments
Patch (8.56 KB, patch)
2011-03-10 07:54 PST, Balazs Kelemen
no flags
Patch (8.53 KB, patch)
2011-03-10 09:37 PST, Balazs Kelemen
no flags
Patch (7.63 KB, patch)
2011-03-22 12:24 PDT, Balazs Kelemen
no flags
Balazs Kelemen
Comment 1 2011-03-10 07:54:38 PST
Early Warning System Bot
Comment 2 2011-03-10 08:09:45 PST
Balazs Kelemen
Comment 3 2011-03-10 09:37:28 PST
Balazs Kelemen
Comment 4 2011-03-10 09:39:52 PST
Tested with flash game. Unfortunately something goes wrong when loading the plugin with almost all game as opposed to videos that works all the time. Finally I find one to test with: http://www.pouetpu-games.com/index.php?section=2&game_id=1&w=640&h=480. Plain old Super Mario game :) Loading fix is not subject of this patch.
Andreas Kling
Comment 5 2011-03-18 11:52:10 PDT
Comment on attachment 85342 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=85342&action=review > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:261 > + return timestampInSeconds * 1000.0; Coding style, superfluous .0 suffix. > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:351 > +// We undefine these constants in npruntime_internal.h to avoid collosion Typo, collision. > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:356 > +const int kKeyPressType = 2; > +const int kKeyReleaseType = 3; > +const int kFocusInType = 9; > +const int kFocusOutType = 10; Not a huge fan of these. Guess it's unavoidable though. > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:415 > + ASSERT(event.type() == WebEvent::KeyDown || event.type() == WebEvent::KeyUp); // We don't generate other types. Are you sure we don't generate other types?
Balazs Kelemen
Comment 6 2011-03-22 12:24:30 PDT
Balazs Kelemen
Comment 7 2011-03-22 12:27:36 PDT
(In reply to comment #5) > (From update of attachment 85342 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=85342&action=review > > > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:261 > > + return timestampInSeconds * 1000.0; > > Coding style, superfluous .0 suffix. Fixed. > > > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:351 > > +// We undefine these constants in npruntime_internal.h to avoid collosion > > Typo, collision. Fixed. > > > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:356 > > +const int kKeyPressType = 2; > > +const int kKeyReleaseType = 3; > > +const int kFocusInType = 9; > > +const int kFocusOutType = 10; > > Not a huge fan of these. Guess it's unavoidable though. Yes we these to make it compiling. > > > Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:415 > > + ASSERT(event.type() == WebEvent::KeyDown || event.type() == WebEvent::KeyUp); // We don't generate other types. > > Are you sure we don't generate other types? Yes. Check WebEventFactory. Extended the comment to refer to that.
Andreas Kling
Comment 8 2011-03-23 12:48:58 PDT
Comment on attachment 86492 [details] Patch Kool. r=me
Balazs Kelemen
Comment 9 2011-03-23 15:03:27 PDT
Comment on attachment 86492 [details] Patch Clearing flags on attachment: 86492 Committed r81811: <http://trac.webkit.org/changeset/81811>
Balazs Kelemen
Comment 10 2011-03-23 15:03:34 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.