JDK-8204568 : Relative CSS-Attributes don't work all time
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u212,openjfx11
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-06-07
  • Updated: 2021-05-17
  • Resolved: 2021-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u281Fixed openjfx11.0.12Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Description
Running the attached snippet and execute the following steps:
* Click "Print info"
* Click "Flip size"
* Click "Print info"

Results in the following output
Default Font: 13.0
    0.2857142857142857em == 3.714285714285714
    0.3333333333333333em == 4.333333333333333
============
Default:
    Padding: Insets [top=4.0, right=4.0, bottom=4.0, left=4.0]
    Corner: CornerRadii [uniform radius = 3.7]
Rel:
    Padding: Insets [top=4.3, right=4.3, bottom=4.3, left=4.3]
    Corner: CornerRadii [uniform radius = 3.7]
============
Default:
    Padding: Insets [top=8.0, right=8.0, bottom=8.0, left=8.0]
    Corner: CornerRadii [uniform radius = 3.7]
Rel:
    Padding: Insets [top=4.3, right=4.3, bottom=4.3, left=4.3]
    Corner: CornerRadii [uniform radius = 3.7]

Expectation:
* CornerRadii is always 4 & 8
* Padding is always 4 & 8

Observation 1: The CornerRadii is relative to the default font
Observation 2: The CornerRadii does not change
Observation 3: The padding if the font is relative  uses the default font for the size calculation
Observation 4: The padding does not change if the font is relative 
Comments
Changeset: 9c7cf172 Author: Ambarish Rapte <arapte@openjdk.org> Date: 2021-03-08 16:46:30 +0000 URL: https://git.openjdk.java.net/jfx/commit/9c7cf172
08-03-2021

Fix for JDK-8201285 was pushed recently (It was a regression reversal) That might have corrected the CornerRadii-issue.
08-06-2018

Github issue with potential fix - https://github.com/javafxports/openjdk-jfx/issues/93
07-06-2018

Ok running on latest master it looks like the CornerRadii-issue is gone Default Font: 13.0 0.2857142857142857em == 3.714285714285714 0.3333333333333333em == 4.333333333333333 ============ Default: Padding: Insets [top=4.0, right=4.0, bottom=4.0, left=4.0] Corner: CornerRadii [uniform radius = 4.0] Rel: Padding: Insets [top=4.3, right=4.3, bottom=4.3, left=4.3] Corner: CornerRadii [uniform radius = 3.7] ============ Default: Padding: Insets [top=8.0, right=8.0, bottom=8.0, left=8.0] Corner: CornerRadii [uniform radius = 8.0] Rel: Padding: Insets [top=4.3, right=4.3, bottom=4.3, left=4.3] Corner: CornerRadii [uniform radius = 3.7]
07-06-2018