Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8260687

Inherited font size is smaller than expected when using StyleSheet to add styles

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 17
    • 11, 15, 17
    • client-libs
    • None
    • b06
    • 17
    • b10

      After the JDK-8257664 fix, the font size inherited from body is different from the font size from inline style declaration.

      The bug is only reproducible when JEditorPane.W3C_LENGTH_UNITS is in effect and when the CSS properties are added to StyleSheet from HTMLEditorKit.

      If the font-size property is declared in <style> element of the HTML or in style attribute of <body> element, it works as expected.

        1. BodyInheritedFontSize std.png
          14 kB
          Alexey Ivanov
        2. BodyInheritedFontSize.java
          6 kB
          Prasanta Sadhukhan
        3. HtmlFontSizeGUITest w3c 17-b05.png
          19 kB
          Alexey Ivanov
        4. HtmlFontSizeGUITest w3c 17-b06.png
          14 kB
          Alexey Ivanov
        5. HtmlFontSizeGUITest.java
          3 kB
          Alexey Ivanov

            psadhukhan Prasanta Sadhukhan
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: