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

1.4 REGRESSION: JEditorPane rendering of nested tables differs from 1.4

XMLWordPrintable



      Name: sv35042 Date: 10/18/2002


      FULL PRODUCT VERSION :
      java version "1.4.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
      Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

      FULL OPERATING SYSTEM VERSION : Microsoft Windows 2000
      [Version 5.00.2195]


      ADDITIONAL OPERATING SYSTEMS : Solaris 7



      A DESCRIPTION OF THE PROBLEM :
      In version 1.3 of the JDK it was possible to
      display "split" images rendered in an html table by
      specifying both width and height attributes in the <td>
      cells of the table. In version 1.4 of the JDK this is no
      longer possible. The height of the table cells is no longer
      consistant with the height of the image in that cell.


      REGRESSION. Last worked in version 1.3.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Use an html image splitter to create a table made up
      of "pieces" of the image and open the page in a JEditorPane.

      For example this page will show an un-broken image in
      version 1.3 and a broken image in 1.4

      <html>
      <table border="0" cellpadding="0" cellspacing="0">
          <tr>
              <td>
      <table border="0" cellpadding="0" cellspacing="0">
           <tr>
               <td width="56" height="20"><img
      src="pictures/ssf-sw1-11-1.jpg" width=56 height=20
      border="0"></td>
           </tr>
           <tr>
               <td width="56" height="6"><img
      src="pictures/ssf-sw1-12-1.jpg" width=56 height=6
      border="0"></td>
           </tr>
           <tr>
               <td width="56" height="29"><img
      src="pictures/ssf-sw1-13-1.jpg" width=56 height=29
      border="0"></td>
           </tr>
      </table>
      </td>
              <td width="99" height="55"><img src="pictures/ssf-
      sw1-2.jpg" width=99 height=55 border="0"></td>
              <td width="83" height="55"><img src="pictures/ssf-
      sw1-3.jpg" width=83 height=55 border="0"></td>
              <td>
      <table border="0" cellpadding="0" cellspacing="0">
           <tr>
               <td width="56" height="23"><img
      src="pictures/ssf-sw1-41-1.jpg" width=56 height=23
      border="0"></td>
           </tr>
           <tr>
               <td width="56" height="32"><img
      src="pictures/ssf-sw1-42-1.jpg" width=56 height=32
      border="0"></td>
           </tr>
      </table>
      </td>
          </tr>
      </table>
      </body>
      </html>



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Although height attributes for table cells are not part of
      the html spec, Version 1.4 should be consistant with
      version 1.3.

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Using the following to view an html page with split images:

      public class JEPTest extends java.lang.Object {

          private JEditorPane jep;
          private JFrame frame;
          public static String page;
          /** Creates new JEPTest */
          public JEPTest() {
              frame = new JFrame("Table Test");
      jep = new JEditorPane();
      jep.setEditable(false);
      frame.getContentPane().add(new JScrollPane(jep));
              frame.addWindowListener(new java.awt.event.WindowAdapter() {
                  public void windowClosing(WindowEvent evt) {
                      System.exit (0);
                  }
              }
              );
              try{
                  jep.setPage(page);
              }
              catch(IOException ioe) {
                  System.out.println(ioe.getMessage());
                  System.exit(1);
              }
              
      frame.pack();
      frame.setSize(new Dimension(600, 400));
      frame.show();
          }

          /**
          * @param args the command line arguments
          */
          public static void main (String args[]) {
              if(args.length < 1) {
                  System.out.println("Specify a url or filename.");
                  System.exit(1);
              }
              
              System.out.println("Running java version - " + System.getProperty
      ("java.version"));
              
              page = new String(args[0]);
              new JEPTest();
          }
      }

      ---------- END SOURCE ----------

      Release Regression From : 1.4
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Review ID: 153425)
      ======================================================================

            sdvsunw Sdv Sdv (Inactive)
            svioletsunw Scott Violet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: