Bug 56103 - [WK2] Handle keyboard and mouse events on X11
Summary: [WK2] Handle keyboard and mouse events on X11
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 55659
  Show dependency treegraph
 
Reported: 2011-03-10 07:47 PST by Balazs Kelemen
Modified: 2011-03-23 15:03 PDT (History)
2 users (show)

See Also:


Attachments
Patch (8.56 KB, patch)
2011-03-10 07:54 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (8.53 KB, patch)
2011-03-10 09:37 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (7.63 KB, patch)
2011-03-22 12:24 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2011-03-10 07:47:37 PST
... so I can play Super Mario in MiniBrowser :)
Comment 1 Balazs Kelemen 2011-03-10 07:54:38 PST
Created attachment 85330 [details]
Patch
Comment 2 Early Warning System Bot 2011-03-10 08:09:45 PST
Attachment 85330 [details] did not build on qt:
Build output: http://queues.webkit.org/results/8127037
Comment 3 Balazs Kelemen 2011-03-10 09:37:28 PST
Created attachment 85342 [details]
Patch
Comment 4 Balazs Kelemen 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.
Comment 5 Andreas Kling 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?
Comment 6 Balazs Kelemen 2011-03-22 12:24:30 PDT
Created attachment 86492 [details]
Patch
Comment 7 Balazs Kelemen 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.
Comment 8 Andreas Kling 2011-03-23 12:48:58 PDT
Comment on attachment 86492 [details]
Patch

Kool. r=me
Comment 9 Balazs Kelemen 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>
Comment 10 Balazs Kelemen 2011-03-23 15:03:34 PDT
All reviewed patches have been landed.  Closing bug.