JDK-4818601 : Applets with a percentage width not render correctly an html table
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2003-02-14
  • Updated: 2003-03-08
  • Resolved: 2003-03-08
Related Reports
Duplicate :  
Description
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

Environment: RedHat Linux 8.0, Mozilla 1.2.1, Java Plugin 1.4.1.
[davidson@cerebus-pc NervousText]$ uname -a
Linux cerebus-pc 2.4.18-14smp #1 SMP Wed Sep 4 12:34:47 EDT 2002 i686 i686 i386 GNU/Linux

When the width of an applet is specified as a percentage and that applet is in an html table cell then the is will not render correctly.

Also, outside of the table, if the applet dimension are specified as a percentage of the browser width, part of the area will be cropped.

To reproduce: Put the following html file in the demo/applets/NervousText/ demo and load it into Mozilla 1.2.1 on Linux.

------ bug.html ------------
<html>
  <head>
    <title>Nervous Text 1.1</title>
  </head>
  <body>
    <hr>

    <table width="550" height="200">
      <tr><td>The following Applet doesn't render correctly in Linux/Mozilla 1.2.1 Plugin 1.4.1</td></tr>
      <tr>
	<td>
	  <applet code="NervousText.class" width="100%" height="100%">
	    <param name=text value="Java^T^M 2 SDK, Standard Edition v1.4">
	  </applet>
	</td>
      </tr>
      <tr><td>This is correct</td></tr>
      <tr>
	<td>
	  <applet code="NervousText.class">
	    <param name=text value="Java^T^M 2 SDK, Standard Edition v1.4">
	  </applet>
	</td>
      </tr>
    </table>
    <p>
      In this bug, specifying the width as a percentage will crop the size of the 
      applet. This is difficult to see since the applet doens't have a specific border.
    <p>
      <applet code="NervousText.class"  width="80%" height="50">
	<param name=text value="Java^T^M 2 SDK, Standard Edition v1.4">
      </applet>
    <hr>
    <a href="NervousText.java">The source.</a>
  </body>
</html>
------------- bug.html ------------

This bug seems to be a duplicate of:

4798569: Mozilla can not display Java applet with relative "width" attribute correctly.

Xiaobin has been informed.


###@###.### 2003-03-07

Comments
EVALUATION This is not a bug. In the html you limit the size of the table: <table width="550" height="200"> If you make the height of the table larger, then the first applet will fit just fine. It appears to be chopped off, but it is actually distorted (in other words "squished"), since it is trying to fit into a 100% of the table row. This is not a bug. You can try a whole bunch of test cases that I have here: http://pcne.east/~mfisher/Bug_tests/percentage As example I use Molecule Viewer applet which has gray background and it is easier to see what is happening to it. Please update the bug ASAP if you agree that this is not a bug. ###@###.### 2003-02-14 It is a dup of 4798569, not 4798506. Sorry for that mistake. ###@###.### 2003-03-07
14-02-2003