AnchorPane's measurement and layout calculations are not correct when 
pixel-snapping is enabled. The following problems are fixed in this PR:

* Stretched sizes and right/bottom positions are not snapped:
   `computeChildWidth`/`computeChildHeight` subtract anchors and insets from 
raw `getWidth()`/`getHeight()`, while `layoutChildren()` passes those values 
directly to `resizeRelocate`.
* Content-biased measurement and layout use different dependent dimensions:
   `computeWidth()` passes `fillHeight=false`, while layout eventually uses 
`fillHeight=true`
* Result of snapped calculations is not re-snapped.
* Anchors use `snapPositionX/Y`. However, anchors are empty space and should 
use `snapSpaceX/Y`.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - fix
 - tests

Changes: https://git.openjdk.org/jfx/pull/2264/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2264&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8390608
  Stats: 442 lines in 2 files changed: 360 ins; 11 del; 71 mod
  Patch: https://git.openjdk.org/jfx/pull/2264.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2264/head:pull/2264

PR: https://git.openjdk.org/jfx/pull/2264

Reply via email to