On Fri, 12 Jun 2026 09:38:42 GMT, Florian Kirmaier <[email protected]> wrote:
> This PR fixes the computeSize methods not considering the gap in some cases. > > It also fixes a missed spot, in the previous PR for JDK-8092379. > > Each fix is covered by simple tests which fail before and work after the > change. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Honestly, I prefer the version where the Node itself declares the invariant. Let me explain why I think this is a more scalable testing method. I could just check the width and height against the values I already know. But by checking an invariant in the Node, I could in theory create a random GridPane configuration and verify for every Node whether its invariant is fulfilled. This way I could basically create randomized test cases - a bit like the Haskell QuickCheck library. For that, it's important that the check is defined in only one place, and as part of the Node. If we get more test cases for FixedAreaRegion, this would also make it easier to ensure all test cases are correct. I also have more test cases in the pipeline that would reuse the invariant from FixedAreaRegion. If I can't convince you, I'll change it to the suggested version. ------------- PR Comment: https://git.openjdk.org/jfx/pull/2187#issuecomment-4777803341
