Bug 224182 - [GTK] REGRESSION: Kinetic scrolling on touchpad doesn't work with async scrolling off
Summary: [GTK] REGRESSION: Kinetic scrolling on touchpad doesn't work with async scrol...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-05 06:08 PDT by Alice Mikhaylenko
Modified: 2021-05-15 13:36 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.82 KB, patch)
2021-04-05 06:10 PDT, Alice Mikhaylenko
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Mikhaylenko 2021-04-05 06:08:26 PDT
This is very specific; it works with touch or with async scrolling. See the patch, but I'm very much not sure that's correct as it's a later regression, from the 2.32.0 cycle
Comment 1 Alice Mikhaylenko 2021-04-05 06:10:23 PDT
Created attachment 425147 [details]
Patch
Comment 2 Chris Lord 2021-04-05 08:08:02 PDT
Drive-by comments;

It does seem odd that we would stop the animation but not clear the scroll history - I'm reasonably sure this worked as expected when I originally checked in momentum scrolling, I'd be concerned that this might cause some unexpected behaviour (though obviously there currently is unexpected behaviour, so that's a bit of a moot point).

If all of these things work with async and non-async scrolling, with GTK and WPE, I think this should be fine:
- Touchscreen or touchpad scrolling without triggering a kinetic scroll animation
- Touchscreen or touchpad scrolling and triggering a kinetic scroll animation
- Increasing the velocity of a kinetic scroll animation with touchscreen or touchpad scrolling (momentum scrolling)
- Stopping a kinetic scroll animation with touchscreen or touchpad scrolling
- Smooth scrolling with a mouse-wheel and keyboard
- Mouse-wheel or keyboard scrolling interrupting animated scrolling

It's a lot to test... We briefly chatted on IRC, to reiterate what we discussed there, I think it'd be good to get API tests written for both the animation classes and the event-handling so that we can establish expected sequences and behaviours.

Given this is currently completely untested, I don't think that should hold up this particular patch, but it'd establish a good precedent to at least add a test that would catch this particular failure (unexpected clearing of scroll history when calling scroll-to api).
Comment 3 Alice Mikhaylenko 2021-04-06 00:09:36 PDT
Well, this function is called every time you scroll, resulting in the scroll history always being empty when you trigger kinetic scrolling. Maybe what changed between when you were reworking kinetic scrolling and now is it was only used in some special cases that do warrant clearing the history, and is more widely used now.

Thanks for the list, I was gonna type that there is indeed a regression after going through the list:

- Mouse-wheel or keyboard scrolling interrupting animated scrolling

But seems it's in trunk as well. :(
Comment 4 Michael Catanzaro 2021-05-15 07:12:54 PDT
(In reply to Alexander Mikhaylenko from comment #3)
> - Mouse-wheel or keyboard scrolling interrupting animated scrolling

Can you report a separate bug for this please?
Comment 5 EWS 2021-05-15 07:26:50 PDT
Committed r277539 (237767@main): <https://commits.webkit.org/237767@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425147 [details].
Comment 6 Alice Mikhaylenko 2021-05-15 13:36:25 PDT
(In reply to Michael Catanzaro from comment #4)
> Can you report a separate bug for this please?

https://bugs.webkit.org/show_bug.cgi?id=225844