On Thu, 11 May 2023 20:20:01 GMT, Marius Hanl <mh...@openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/layout/AnchorPane.java >> line 349: >> >>> 347: private double computeChildHeight(Node child, Double topAnchor, >>> Double bottomAnchor, double areaHeight, double width) { >>> 348: if (topAnchor != null && bottomAnchor != null && >>> child.isResizable()) { >>> 349: return areaHeight - snappedTopInset() - >>> snappedBottomInset() - topAnchor - bottomAnchor; >> >> same comment about areaHeight - should it be snapSize'd? > > Well, given that we (should) snap everything including the calculation of the > width, I expected that the `areaWidth` and `height`, which are basically > `getWidth` and `getHeight` are already snapped. > That was at least my thinking back then, not sure now. I need to check > everything again since this was a while ago. :) I wonder. This might be a contrived example: what would happen if the parent containing the TitledPane is unsnapped, but TitledPane is? In this case getWidth() may not be snapped since the titled pane has been laid out by an unsnapped parent. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/910#discussion_r1191763338