Bug 225764 - [GTK] Wrong smooth animation sometimes with non-async scrolling
Summary: [GTK] Wrong smooth animation sometimes with non-async scrolling
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: Gtk
Depends on:
Blocks:
 
Reported: 2021-05-13 06:33 PDT by Carlos Garcia Campos
Modified: 2021-05-13 22:52 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.48 KB, patch)
2021-05-13 06:36 PDT, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>