Backport of https://bugs.openjdk.org/browse/JDK-8312529
------------- Commit messages: - Backport cc57fb51a9409f5d2a6d2ce8dcd3878d48f9cfc9 Changes: https://git.openjdk.org/jfx/pull/1185/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1185&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8312528 Stats: 20 lines in 12 files changed: 9 ins; 7 del; 4 mod Patch: https://git.openjdk.org/jfx/pull/1185.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1185/head:pull/1185 PR: https://git.openjdk.org/jfx/pull/1185