On 24.08.16 19:20, Semyon Sadetsky wrote:
Based on logs the size and positions are the same, what else can cause
this notification called 6 time?
When scroll bars change visibility the extent size is changed and the
scrolled component is relayouted which changes the view size.
The size of the view is the same in the latest 3 notifications:
Bounds JViewport = java.awt.Rectangle[x=2,y=2,width=15,height=46]
Bounds View = java.awt.Rectangle[x=0,y=0,width=96,height=46]
Bounds JViewport = java.awt.Rectangle[x=2,y=2,width=15,height=46]
Bounds View = java.awt.Rectangle[x=0,y=0,width=15,height=46]
Bounds JViewport = java.awt.Rectangle[x=2,y=2,width=0,height=46]
Bounds View = java.awt.Rectangle[x=0,y=0,width=15,height=46]
Bounds JViewport = java.awt.Rectangle[x=2,y=2,width=0,height=46]
Bounds View = java.awt.Rectangle[x=0,y=0,width=0,height=144]
Bounds JViewport = java.awt.Rectangle[x=2,y=2,width=0,height=46]
Bounds View = java.awt.Rectangle[x=0,y=0,width=0,height=144]
Bounds JViewport = java.awt.Rectangle[x=2,y=2,width=0,height=46]
Bounds View = java.awt.Rectangle[x=0,y=0,width=0,height=144]
As I already mentioned it can cause several layout iterations depending
on the scroll policy, L&F, etc. So, once again, it is expected behavior,
and moreover it is unrelated to the current fix.
The bug is that we call notification more time than expected, we should
calculate how many times it should be called and check this in the test.
I assume that each notification should be called when the size of
JViewport or View were changed?
On 23.08.16 11:59, Alexander Scherbatiy wrote:
The fix looks good to me.
Thanks,
Alexandr.
On 23/08/16 11:40, Semyon Sadetsky wrote:
Hello,
Please review fix for JDK9:
bug: https://bugs.openjdk.java.net/browse/JDK-8163167
webrev: http://cr.openjdk.java.net/~ssadetsky/8163167/webrev.00/
The cause of this test bug is revalidating JScrollPane layout may
take
various number of iterations on different L&Fs.
To fix the test the counter listener is added after the layout
revalidation has been started.
--Semyon
--
Best regards, Sergey.