<Swing Dev> RFR: 8257664: HTMLEditorKit: Wrong CSS relative font sizes [v2]

Stanimir Stamenkov github.com+1247730+stanio at openjdk.java.net
Fri Jan 15 12:47:28 UTC 2021


> Fix for [JDK-8257664][] – HTMLEditorKit: Wrong CSS relative font sizes.
> 
> _Disclaimer:_ I'm the reporter of the issue and I've been advised the best chance to get it addressed is to submit a pull request against this repository.  I haven't built the JDK myself, I'll need guidance if required.  I have a proof-of-concept example – demonstrating the bug and a workaround available as a [public gist](https://gist.github.com/stanio/b79ce9348946aa6b3395328ec4c59d14).  I have included a sample test though I don't know if it is annotated properly.
> 
> **Current behavior**
> 
> <style>
>   h2, .h2 { font-size: 150% }
> </style>
> 
> <body>
> 
>   <h2>Foo</h2>            
> 
>   <div class=h2>Bar</div> 
> 
>   <ol class=h2>           
>     <li>Baz</li>          
>   </ol>
> 
>   <table class=h2>
>     <tr>
>       <td>Qux</td>        
>     </tr>
>   </table>
> 
> </body>
> 
> **Expected behavior**
> 
> All text should be displayed with a font size of the computed `<body>` font-size × 1.5.
> 
> [JDK-8257664]: https://bugs.openjdk.java.net/browse/JDK-8257664

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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1759/files
  - new: https://git.openjdk.java.net/jdk/pull/1759/files/ea857fcf..c5b6d41c

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1759&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1759&range=00-01

  Stats: 250 lines in 2 files changed: 134 ins; 116 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1759.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1759/head:pull/1759

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


More information about the swing-dev mailing list