RFR: 8277785: ListView scrollTo jumps to wrong location when CellHeight is changed [v4]
Florian Kirmaier
fkirmaier at openjdk.java.net
Mon May 9 07:50:02 UTC 2022
On Sun, 8 May 2022 18:56:45 GMT, Johan Vos <jvos at openjdk.org> wrote:
>> @johanvos
>> As requested, we've made a unit test, which tests this bug.
>> It's based on your test and our original test class. It can be added to the ListViewTest.
>> You can find it, in the JDK ticket.
>>
>> Btw, adding the cells incrementally seems to make a difference - which is why the new test class tests both cases.
>>
>> It accepts various inputs of cell sizes - and should work with any inputs.
>> It should catch all the cases from the original test class.
>> Because it works with all possible inputs - one could even make a random test-cases generator to make sure it works in every case.
>>
>> It basically only works well, when the sizes are only 20s - in most other cases it fails.
>
> The later reported issues were due to the fact that the estimatedSize got updated during the layoutChildren call. That makes things much more complicated and leads to discrepancies. I disabled the updates to the estimated size during the layoutChildren call, so that all operations that are happening in that call are using a consistent value of the estimated size. We now pass all the tests added by @FlorianKirmaier on the JBS issue . Those tests are great regression tests.
@johanvos
Hi Johan,
Great to see all these unit tests getting green so fast!
Unfortunately, the provided Test Application still behaves very buggy - I would even say it still is equally buggy, which is quite a suprise.
Nevertheless, this is a great step forward.
So there must be something the tests are missing. I haven't found out yet what.
Maybe they will behave different, if they are executed as a system test, with a real window?
I will keep you posted, when we've updated the tests.
-------------
PR: https://git.openjdk.java.net/jfx/pull/712
More information about the openjfx-dev
mailing list