RFR: 8303680 Virtual Flow freezes after calling scrollTo and scrollPixels in succession
Johan Vos
jvos at openjdk.org
Thu Mar 16 13:28:31 UTC 2023
On Mon, 6 Mar 2023 16:04:02 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:
> Possible fix for VirtualFlow freeze.
>
> I encountered the problem when experimenting with VirtualFlow.
>
> Guess @johanvos should take a look.
> All tests are still green, so with some luck, this doesn't break anything but fixes some known and unknown bugs.
Marked as reviewed by jvos (Reviewer).
The patch looks ok, and the test fails before and passes after. No regression is observed. Also, the explanation about the changed position outside the layout process makes sense.
The only hesitation I still have is why the `lastPosition = getPosition();` is there in the first place.
As I wrote before, there are many implicit rules in this class, e.g. only change layout-related properties inside the layout _cycle_ ; but there are methods that are called from within the layoutChildren method as well as from methods that are triggered by different inputs.
I'm approving this, as the removal of this line is in line with the general approach here where we don't change the lastXXX properties outside the layout process -- as Florian mentioned as well.
-------------
PR: https://git.openjdk.org/jfx/pull/1052
More information about the openjfx-dev
mailing list