Bug 225764

Summary: [GTK] Wrong smooth animation sometimes with non-async scrolling
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch aperez: review+

Description Carlos Garcia Campos 2021-05-13 06:33:44 PDT
This is easy to reproduce with epiphany, opening the browser with a several of tabs. Then go tab by tab scrolling and some of them don't scroll properly, the smooth animation is wrong. This is happening because sometimes when the scrollbars are added to the scroll view, the contents size hasn't been updated yet, so that values saved by ScrollAnimationSmooth::updateVisibleLengths() are 0x0. After that the updateVisibleLengths() is not called again when the contents size is updated, so scroll happens with the wrong visible lengths. This doesn't happen with async scrolling because updateVisibleLengths()  is called every time layers are repositioned. For non-async scrolling it should be enough to update visible lengths when he contents size changes.
Comment 1 Carlos Garcia Campos 2021-05-13 06:36:12 PDT
Created attachment 428512 [details]
Patch
Comment 2 Carlos Garcia Campos 2021-05-13 22:52:55 PDT
Committed r277482 (237717@main): <https://commits.webkit.org/237717@main>