Fix overflow menu triggering due to floating-point precision error. At 1.25 display scaling on Windows, floating-point comparison errors (e.g. 109.60000000000001 > 109.6) cause the overflow menu to appear when the lefthand value is regarded as larger than the righthand value.
These should be treated as equal (and therefore not display the overflow menu). This bug can happen in both horizontal and vertical toolbar orientation. The new tests added fail without this fix, and pass with it. An existing test has been re-factored slightly to allow re-use and more flexibility in specifying the scene's root node. ------------- Commit messages: - 8366739: replacing mistakenly committed hard-coded test parameter (only intended for local testing) - 8366739: updating test comments in line with fix implementation change. - 8366739: use position snapping rather than a tolerance, to mitigate floating point operation errors. Removing epsilon. - 8366739: comment fixes - 8366739: test name improvement - 8366739: Fix floating-point precision issues in ToolBarSkin to prevent overflow menu display Changes: https://git.openjdk.org/jfx/pull/2016/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2016&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8366739 Stats: 75 lines in 2 files changed: 42 ins; 10 del; 23 mod Patch: https://git.openjdk.org/jfx/pull/2016.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2016/head:pull/2016 PR: https://git.openjdk.org/jfx/pull/2016
