WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
230541
[GTK] Allow sending precise mouse wheel events in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=230541
Summary
[GTK] Allow sending precise mouse wheel events in LayoutTests
Chris Lord
Reported
2021-09-21 02:55:43 PDT
Currently in TestRunner you can send a mouse wheel event with start/end phases, but you can't actually send pixel or sub-pixel precise mouse-wheel events. This is a bit of a pain for GTK specifically because kinetic scrolling can only be exercised with precise mouse-wheel events. This is actually the same for other platforms that use sync scrolling and the base scroll animation classes, but I suspect GTK is the main consumer here (and the only one I can easily test). We may well want this behaviour on other non-Mac/iOS platforms, such as WPE, but I'm dealing with GTK first as it's the easiest to test.
Attachments
Patch
(13.21 KB, patch)
2021-09-21 03:05 PDT
,
Chris Lord
no flags
Details
Formatted Diff
Diff
Patch
(13.20 KB, patch)
2021-09-22 02:36 PDT
,
Chris Lord
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Lord
Comment 1
2021-09-21 03:05:24 PDT
Created
attachment 438799
[details]
Patch
EWS Watchlist
Comment 2
2021-09-21 03:06:36 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Simon Fraser (smfr)
Comment 3
2021-09-21 09:20:46 PDT
Comment on
attachment 438799
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=438799&action=review
> Source/WebKit/UIProcess/API/gtk/WebKitWebViewBaseInternal.h:48 > +WK_EXPORT void webkitWebViewBaseSetWheelEventsArePrecise(WebKitWebViewBase*, bool);
HasPreciseDeltas
> Tools/WebKitTestRunner/EventSenderProxy.h:66 > + void setMouseWheelIsPrecise(bool);
I think setMouseWheelHasPreciseDeltas() would be a better name.
> Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:41 > + undefined setMouseWheelIsPrecise(boolean isPrecise);
setMouseWheelHasPreciseDeltas
> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:382 > + WKBundlePageForceRepaint(InjectedBundle::singleton().page()->page()); // Triggers a scrolling tree commit.
This is a weird thing to do here, and could affect test behavior.
> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h:61 > + void setMouseWheelIsPrecise(bool);
setMouseWheelHasPreciseDeltas
Chris Lord
Comment 4
2021-09-22 02:36:48 PDT
Created
attachment 438936
[details]
Patch
Chris Lord
Comment 5
2021-09-22 02:40:09 PDT
(In reply to Simon Fraser (smfr) from
comment #3
)
> Comment on
attachment 438799
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=438799&action=review
> > > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBaseInternal.h:48 > > +WK_EXPORT void webkitWebViewBaseSetWheelEventsArePrecise(WebKitWebViewBase*, bool); > > HasPreciseDeltas > > > Tools/WebKitTestRunner/EventSenderProxy.h:66 > > + void setMouseWheelIsPrecise(bool); > > I think setMouseWheelHasPreciseDeltas() would be a better name. > > > Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:41 > > + undefined setMouseWheelIsPrecise(boolean isPrecise); > > setMouseWheelHasPreciseDeltas > > > Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:382 > > + WKBundlePageForceRepaint(InjectedBundle::singleton().page()->page()); // Triggers a scrolling tree commit. > > This is a weird thing to do here, and could affect test behavior. > > > Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h:61 > > + void setMouseWheelIsPrecise(bool); > > setMouseWheelHasPreciseDeltas
All sounds good, I went with the shorter setWheelHasPreciseDeltas, but don't mind changing it if you don't like that.
EWS
Comment 6
2021-09-23 01:18:53 PDT
Committed
r282952
(
242042@main
): <
https://commits.webkit.org/242042@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 438936
[details]
.
Radar WebKit Bug Importer
Comment 7
2021-09-23 01:19:18 PDT
<
rdar://problem/83436653
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug