Hello Anton

Looks good
alexp

On 6/24/2014 8:31 PM, anton nashatyrev wrote:
Hello,
    could you please review the following fix:

fix: http://cr.openjdk.java.net/~anashaty/8044371/9/webrev.00/ <http://cr.openjdk.java.net/%7Eanashaty/8044371/9/webrev.00/>
bug: https://bugs.openjdk.java.net/browse/JDK-8044371

Problem:
After the ScrollPane which is scrolled to the bottom resized to the width 0 and then back its vertical scroll position changes.

Evaluation:
this is the regression from the fix JDK-4502121 <https://bugs.openjdk.java.net/browse/JDK-4502121>. When the viewport size is 0 the ScrollPaneLayout.layoutContainer decides not to paint/layout the scrollbars and the viewport height is calculated with no respect to horizontal scrollbar height. The viewport height thus becomes larger and its position shifts 25 pixels (the height of the horisontal scrollbar) up. The expand action doesn't revert the position which is a normal behavior.

Fix:
modify the fix for JDK-4502121 <https://bugs.openjdk.java.net/browse/JDK-4502121>, so it still solves the original problem, but doesn't add the unwanted behavior: the layout should take into account the scrollbars even if the size of the scrollpane is 0.

Thanks!
Anton.

Reply via email to