On Tue, 9 Feb 2021 12:21:28 GMT, Johan Vos <j...@openjdk.org> wrote: > This PR introduces a refactory for VirtualFlow, fixing a number of issues > reported about inconsistent scrolling speed (see > https://bugs.openjdk.java.net/browse/JDK-8089589) > The problem mentioned in the JBS issue (and in related issues) is that the > VirtualFlow implementation depends on cell index and cell count, instead of > on pixel count. The latter is unknown when the VirtualFlow is created, and > pre-calculating the size of a large set of items would be very expensive. > Therefore, this PR uses a combination of a gradual calculation of the total > size in pixels (estimatedSize) and a smoothing part that prevents the > scrollback to scroll in the reverse direction as the requested change. > This PR currently breaks a number of tests that hard-coded depend on a number > of evaluations. This is inherit to the approach of this PR: if we want to > estimate the total size, we need to do some additional calculations. In this > PR, I try to balance between consistent behavior and performance.
This pull request has now been integrated. Changeset: 8e547571 Author: Johan Vos <j...@openjdk.org> URL: https://git.openjdk.java.net/jfx/commit/8e547571 Stats: 570 lines in 6 files changed: 427 ins; 92 del; 51 mod 8089589: [ListView] ScrollBar content moves toward-backward during scrolling. Reviewed-by: kcr, aghaisas ------------- PR: https://git.openjdk.java.net/jfx/pull/398