On Fri, 15 Jan 2021 09:38:16 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> Stanimir Stamenkov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   fixup! 8257664: Fix font-size inheritance with percentage values
>>   
>>   -   Renamed bug8257665.java -> TestWrongCSSFontSize.java
>>   -   Added full copyright statement
>>   -   Removed redundant @key headless
>>   -   Corrected bug no. 8257665 -> 8257664
>
> src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 
> 3423:
> 
>> 3421:      */
>> 3422:     static final Object FONT_SIZE_INHERIT =
>> 3423:             new CSS().new FontSize().parseCssValue("100%");
> 
> Do we need to instantiate new CSS object here? Can't we reuse "css" variable 
> which is already initialized?

I hadn't previously realized the `ViewAttributeSet` class is not static, so it 
should be possible to reuse the instance `css`.  Not sure if a separate 
instance per style sheet is necessary, but I'll prepare a revision.

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

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

Reply via email to