RFR: 8277122: SplitPane divider drag can hang the layout [v2]

Marius Hanl mhanl at openjdk.java.net
Wed Jan 26 20:08:16 UTC 2022


On Tue, 25 Jan 2022 13:38:53 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Marius Hanl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8277122: Added test for setting a negative divider position + improved readability
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/SplitPaneSkin.java line 72:
> 
>> 70:      * {@link #layoutChildren(double, double, double, double)} since we are currently doing the layout.
>> 71:      */
>> 72:     private boolean duringLayout;
> 
> would like a reference to the bug this fixes

Added it

> modules/javafx.controls/src/main/java/javafx/scene/control/skin/SplitPaneSkin.java line 226:
> 
>> 224:         // If the window is less than the min size we want to resize proportionally
>> 225:         duringLayout = true;
>> 226:         double minSize = totalMinSize();
> 
> - setting the flag belongs above the code comment to not disrupt explanation and its target (== minsize)
> - I think we don't do formatting (here: change the code comment to a single line)

Changed. 
I kept the comment since it is basically just a single line but yes you are right :)

> modules/javafx.controls/src/test/java/test/javafx/scene/control/SplitPaneTest.java line 1344:
> 
>> 1342:      * which can hang the layout as it resulted in multiple layout requests (through SplitPaneSkin.layoutChildren).
>> 1343:      */
>> 1344:     @Test
> 
> My preference would be to add the bug id to the tests as well ..

Added it

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

PR: https://git.openjdk.java.net/jfx/pull/669


More information about the openjfx-dev mailing list