Bug 228572 - REGRESSION(r279564): [GTK] Mouse wheel scrolling scrolls too little (take two)
Summary: REGRESSION(r279564): [GTK] Mouse wheel scrolling scrolls too little (take two)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-28 16:13 PDT by Michael Catanzaro
Modified: 2021-07-31 08:43 PDT (History)
5 users (show)

See Also:


Attachments
Patch (10.13 KB, patch)
2021-07-30 06:28 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2021-07-28 16:13:34 PDT
This is a repeat of bug #224686, we broke mouse wheel scroll speed again. I've started bisecting and am currently at r279963 as first known bad commit and r279541 as last known good. I see a few scrolling commits within this range, and will probably find the culprit when I continue bisecting tomorrow.
Comment 1 Michael Catanzaro 2021-07-29 10:50:03 PDT
I'm almost done bisecting and it looks like the bad commit is probably r279564 "[css-scroll-snap] Triggering a layout during scroll causes jittery scrolling on Mac when dragging the scrollbar." Hi Martin, do you have time to take a look?
Comment 2 Martin Robinson 2021-07-29 13:15:05 PDT
Yeah, I can take a look at this tomorrow or Monday. Thanks for the bisection.
Comment 3 Martin Robinson 2021-07-30 05:32:30 PDT
This problem shows up when you scroll rapidly with scroll wheel and with smooth scrolling turned on. The issue here seems to be that when ScrollAnimator handles a wheel event, it calculates the destination based on the current position, rather than the current target position for the running animation.

r279564 uncovered this issue by fixing a bug in ScrollAnimationSmooth that disregarded the requested position in favor of a bogus one, but also making the scrolling by delta relative to the current position (rather than the desired one).

This effectively means that the faster you scroll, the slower WebKit scrolls. This is, to say the least, wrong.
Comment 4 Martin Robinson 2021-07-30 06:28:27 PDT
Created attachment 434617 [details]
Patch
Comment 5 Michael Catanzaro 2021-07-30 06:32:31 PDT
Comment on attachment 434617 [details]
Patch

Nice test!
Comment 6 EWS 2021-07-31 08:43:45 PDT
Committed r280515 (240147@main): <https://commits.webkit.org/240147@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434617 [details].