On Wed, 18 Feb 2026 15:43:18 GMT, Andy Goryachev <[email protected]> wrote:

> Why changing code that handles widths would impact the vertical positioning? 
> It's unexpected, that's all. Is there anything else that have been impacted, 
> causing a regression perhaps?

The content of the flow pane is biased horizontally, so the available width is 
taken into account when determining height. 

After we aligned the horizontal and vertical compute functions to work the same 
(both taking an explicit fill parameter) to fix a bug in VBox (and also simply 
because there should not be a difference between the two), some panes, like 
FlowPane were discovered to rely on the simpler computations that the vertical 
functions used.

The fix here done in FlowPane just changes the call to get the old behavior it 
was relying on (and which is probably correct for horizontal FlowPanes). 
There's a good chance that a vertical orientated FlowPane doesn't quite do what 
you expect, but this change doesn't touch that, and if it is incorrect, then it 
probably was that way since FlowPane was created.

Whether other controls are affected is hard to say; fact is that these layout 
containers have poor test coverage, and the initial change to fix VBox should 
have triggered test failures, but none did. However, I think we caught most of 
them already.  I fixed a lot of them in the initial fix, and later 2 or 3 
regressions that were discovered, this being one of them.

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

PR Comment: https://git.openjdk.org/jfx/pull/2077#issuecomment-3921734865

Reply via email to