JDK-4722949 : COMPATIBILITY: Wrong width and height parameter given to applets
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.1
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-07-30
  • Updated: 2002-08-14
  • Resolved: 2002-08-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.1 rcFixed
Related Reports
Relates :  
Description
Tested in IE 5 on Windows2000, but I believe the same is an issue at least for
XP. too.

The problem is, starting with Hopper build 11, if the applet is created within
<div ... style="visibility: hidden">, the Applet is first created with size
of (1,1) or (0,0) regardless of what parameters are passed in html file.

We believe what happens is EmbeddedFrame is created of the wrong size, then
from AxControl.cpp via
plugin.viewer.frame.IExplorerEmbeddedFrame.setFrameSize() these wrong
parameters are passed to sun.plugin.AppletViewer, and from there to applet.

This way, if the applet creates some sort of BufferedImage on initialization,
the image is created of the wrong size, and this way it seems like Applet is not
painting itself.

After the applet is shown, it is resized correctly, but the image is already
created of the wrong size, since most applets are not prepared to being resized.

Attached are the following files:
test2.java: an applet that does nothing but reports its width and height 
parameters in start() method.
test.html: "bad" html that contains hidden style. 
test1.html: "good" html that doesn't contain that style.

In Hopper b10 the results of test.html and test1.html are the same, in Hopper
b11 or later only test1 reports correctly.

This bug is causing the following compatibility failures:

From location:  http://www.real.com/games/webgames/index.html
Go with The Flow
Find the Difference Animal
Find the Difference Art
Find the Difference International - this applet passed with build 11.
Find the Difference Nature

The following applets were verified as passing by Keylabs on Hopper RC build 19:

Find the difference Art
Find the difference Animal
Find the difference International
Find the difference Nature
Go with the Flow

###@###.### 2002-08-14

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper-rc FIXED IN: hopper-rc INTEGRATED IN: hopper-rc VERIFIED IN: hopper-rc
14-06-2004

EVALUATION This problem is introduced because of #4674918, without which real.com applets runs fine. It is necessary to modify the fix for #4674918 in order to fix this issue. ###@###.### 2002-07-30 In order to allow pogo applets to work fine on IE(4674918), we were setting the height and width as 1x1 if the size notification from IE was 0x0. This causes the applet reported in this bug report and applets at real.com to fail. Therefore, we are modifying the fix #4674918 such that the width and height will be set to the size specified in the HTML tags instead of 1x1. ###@###.### 2002-08-05
05-08-2002