On Thu, 11 Feb 2021 16:32:36 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Stanimir Stamenkov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8260687: Replace line-endings in BodyInheritedFontSize.java
>
> The fix looks good to me too. It passes the set of the four tests related to 
> the recent fixes:
> 
> - javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java
> - javax/swing/text/html/CSS/4765271/bug4765271.java
> - javax/swing/text/html/StyleSheet/TestWrongCSSFontSize.java
> - javax/swing/text/html/StyleSheet/8260687/BodyInheritedFontSize.java
> 
> I've just updated BodyInheritedFontSize.java on [my JDK-8260687 
> branch](https://github.com/aivanov-jdk/jdk/tree/JDK-8260687) to include your 
> test case with `font-size: 100%`.

I have copied the changes from the aivanov-jdk/jdk@f9e997776fe4 branch earlier 
and made my revision to include the `font-size: 100%` case.  I have the 
following adjustments that don't appear included in @aivanov-jdk's latest 
change:

-   The `<p style="font-size: 100%">...</p>` has to be before the `<p>...</p>` 
to trigger the pre-existing problem (f.e. in Java 11);
-   Replace `StyleConstants.getFontSize()` for `GlyphView.getFont().getSize()`
    
    The former is unreliable as it doesn't explicitly send a `StyleSheet` 
context and depends on a generally unknown state of the 
`CSS.styleSheet.w3cLengthUnits` the `FontSize` declaration has been 
instantiated from.  At the end, it doesn't report the actual font set to the 
view – it computes a new result that might differ from the actual.

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

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

Reply via email to