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

web page background renders blue in JEditorPane

    XMLWordPrintable

Details

    • b10
    • x86_64
    • windows_7

    Description

      A DESCRIPTION OF THE PROBLEM :
      When displayed in JEditorPane, some web pages (ex: http://www.google.com/ ) have wrong background color (blue instead of white). This is related to https://bugs.openjdk.java.net/browse/JDK-4895924 "Strings in format #rgb not handled by Color.decode()"


      CUSTOMER SUBMITTED WORKAROUND :
      --- a/html/src/javax/swing/text/html/CSS.java
      +++ b/html/src/javax/swing/text/html/CSS.java
      @@ -1164,6 +1164,12 @@
               } else {
                   digits = value;
               }
      + if (digits.length() == 3) {
      + final String r = digits.substring(0, 1);
      + final String v = digits.substring(1, 2);
      + final String b = digits.substring(2, 3);
      + digits = String.format("%s%s%s%s%s%s", r, r, v, v, b, b);
      + }
               String hstr = "0x" + digits;
               Color c;
               try {

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: