RFR: [WIP] 8277785: ListView scrollTo jumps to wrong location when CellHeight is changed [v7]

Christian Heilmann duke at openjdk.org
Wed Jun 22 09:38:05 UTC 2022


On Mon, 30 May 2022 08:10:36 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> When the size of a ListCell is changed and a scrollTo method is invoked without having a layout calculation in between, the old (wrong) size is used to calculcate the total estimate. This happens e.g. when the size is changed in the `updateItem` method.
>> This PR will immediately resize the cell and sets the new value in the cache containing the cellsizes.
>
> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Precalculate size of cells that are likely going to be used in rendering.
>   This avoid resizing cells after their position has been laid out, leading
>   to misalignments.
>   Relaxed some tests that check on the number of invocations on updateItem.
>   We heavily use the accumcell for calculating sizes, and that cell is released
>   every time, leading to a call to updateItem as well (but this call should
>   not do any CPU intensive work)

Hi Johan,
 
thanks for the update of the PR. From the "scrollTo" perspective, everything seems to work now. Big thanks.
We coming close to the final solution 
We found now one issue with scrolling down where it jumps to wrong position.
After a scrollTo method call, the scrolling behaves very weird. It then goes up, when scrolling down. It feels like, after the first scrolling it jump up have a cell - which is half the screen, if the cells are big.
Even after resizing and relayouting, the positions in our applications seems stable and reasonable.
After a small scrolling, they tend to jump.
Maybe there is a minor fix missing?
I attached you a video showing you the bug in the scroll behavior:
list-view-scrolling.m4v   look at  #18 when we scroll down it jumps up to #17. With this you maybe able to find the bug.

Hope you find the last remaining glitches.
 
Thanks

https://urldefense.com/v3/__https://user-images.githubusercontent.com/24911444/174996092-f8fb840d-195c-483b-9fbe-06316ad0d06b.mp4__;!!ACWV5N9M2RV99hQ!JjYnsRasZbvvvvilVgdNkBtfDDfFKslRf4n9_JlqO57nDY5weq50PqMldD93wwfp5djlCLNcV68ew2tB5Gqj$ 

-------------

PR: https://git.openjdk.org/jfx/pull/712


More information about the openjfx-dev mailing list