RFR: 8298728: Cells in VirtualFlow jump after resizing [v2]

Andy Goryachev angorya at openjdk.org
Fri Dec 23 17:28:54 UTC 2022


On Tue, 20 Dec 2022 17:49:13 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> When recalculating sizes, we often don't want the current index and/or offset to change.
>> 
>> Allow to fix the index/offset when doing recalculations.
>> 
>> Fix JDK-8298728
>
> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
> 
>   move statements to new lines.
>   Add another failing test, and a fix: when the cell that is positioned at the "current index"
>   is resized, we also need to modify the offset (wich is calculated from the top of that cell
>   to the start of the viewport).

Thank you for commenting, Johan.

Interesting.  Why would sizes change in #1 scenario, since there are no changes in the component width and the scroll bar state?  But I might disagree - it's the most natural case when pgup/pgdn results in the same state, as any text editor would demonstrate.  In fact, I have a similar problem with "If we want the position of the thumb constant," - I'd rather see the thumb reflecting reality as much as it could, so it is ok for it to jump, as long as the **selected cell** remains in the same position on screen.  It looks like the ticket talks about the "first cell" instead which would be an acceptable replacement.

As for #2 - it might be just me, I cannot translate these words into a scenario.  Are you saying that, for example, resizing and immediately issuing pgup/pgdn (via click on a scrollbar) would shift the viewport too far/not enough?  Or is there another scenario?  What are the exact steps that result in erroneous behavior, in human words?

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

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


More information about the openjfx-dev mailing list