Bug 36003 - Enhance GTK DRT implementation to support platform scroll wheel events.
Summary: Enhance GTK DRT implementation to support platform scroll wheel events.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Enhancement
Assignee: Nobody
Depends on:
Blocks: 88070
  Show dependency treegraph
Reported: 2010-03-10 21:58 PST by Andy Estes
Modified: 2012-09-07 08:16 PDT (History)
5 users (show)

See Also:

Patch (4.70 KB, patch)
2012-06-06 07:05 PDT, José Dapena Paz
mrobinson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2010-03-10 21:58:02 PST
DRT layout tests gained the ability to simulate mouse scroll wheel events in http://trac.webkit.org/changeset/55739.  Currently this is only supported on Mac OS 10.5 and 10.6.  The GTK DRT implementation should be enhanced to dispatch scroll wheel events, and layout tests that utilize this functionality should be removed from the Skipped file.
Comment 1 José Dapena Paz 2012-06-06 07:05:27 PDT
Created attachment 146016 [details]
Comment 2 Zan Dobersek 2012-06-26 12:07:13 PDT
CC-ing reviewers to have a look at the patch.
Comment 3 Martin Robinson 2012-06-26 13:04:20 PDT
Comment on attachment 146016 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=146016&action=review

Looks good, just a few style nits. Can't we unskip some tests now?

> Tools/DumpRenderTree/gtk/EventSender.cpp:483
> +    int horizontal = (int)JSValueToNumber(context, arguments[0], exception);
> +    g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));
> +    int vertical = (int)JSValueToNumber(context, arguments[1], exception);
> +    g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));

You should use static_cast here instead of C-style casts. Is it possible to just elminate the cast entirely here?

> Tools/DumpRenderTree/gtk/EventSender.cpp:487
> +    gboolean paged = false;
> +    if (argumentCount == 3) {
> +        paged = JSValueToBoolean(context, arguments[2]);

bool intead of gboolean would be more appropriate here. Why does paged need to be defined in outer scope? Seems like this could just be:

g_return_val_if_fail(argumentcount < 3 || !JSValueToBoolean(context, arguments[2]), JSValueMakeUndefined(context));
Comment 4 José Dapena Paz 2012-09-07 08:16:54 PDT
Fix for #88070 already includes the implementation of DumpRenderTree smooth scroll wheel events for Gtk.