On Tue, 2 Feb 2021 15:16:35 GMT, Matthias Perktold <github.com+7334069+mperkt...@openjdk.org> wrote:
> It seems Toolkit.getDefaultToolkit().getScreenResolution() can return > 93/94/95 instead of 96 in mac/linux in internal mach5 testing systems causing > failure in this test Test.java. Probably we need to make the testcase > hardcoded to 96 I guess so. Where does this `Test.java` come from? > > I also suggest fixing JDK-8260687 to not use font inherit for W3C_LENGTH_UNIT > case > > ``` > --- a/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java > +++ b/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java > @@ -2823,7 +2823,7 @@ public class StyleSheet extends StyleContext { > } > > Object doGetAttribute(Object key) { > - if (key == CSS.Attribute.FONT_SIZE && !isDefined(key)) { > + if (key == CSS.Attribute.FONT_SIZE && !isDefined(key) && > !isW3CLengthUnits()) { > // CSS.FontSize represents a specified value and we need > // to inherit a computed value so don't resolve percentage > // value from parent. > ``` Does such a fix not bring back the problem with relative units for the case where W3C_LENGTH_UNIT is enabled? ------------- PR: https://git.openjdk.java.net/jdk/pull/2256