<Swing Dev> RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_LENGTH_UNITS

Alexey Ivanov aivanov at openjdk.java.net
Sat Jan 30 18:06:47 UTC 2021


On Fri, 29 Jan 2021 23:17:23 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> > The test passes for me with the fresh build of JDK, even without the fix applied.
> > Indeed, I get the same frame dimensions in both cases: 150×42.
> > However, the test fails when run with JDK 11.0.10 or JDK 15, the dimension of `htmlPane` is 409×76.
> 
> [JDK-8257664](https://bugs.openjdk.java.net/browse/JDK-8257664): HTMLEditorKit: Wrong CSS relative font sizes
> has changed the behaviour. With the fix reverted, I get frame size of 409×76 as in previous versions.

I have submitted [JDK-8260687](https://bugs.openjdk.java.net/browse/JDK-8260687): _Inherited font size is smaller than expected when using StyleSheet to add styles_.

I suggest declaring the `font-size` property on the `<body>` element in `style` attribute.

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

PR: https://git.openjdk.java.net/jdk/pull/2256


More information about the swing-dev mailing list