Closed Bug 121529 Opened 24 years ago Closed 24 years ago

Test applet doesn't load in branch builds

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 109039

People

(Reporter: pschwartau, Assigned: joe.chou)

References

()

Details

Using Netscape branch build 2002011622_0.9.4ec on WinNT, the applet in the testcase URL does not load. It DOES load in a trunk build from the same date. This bug grew out of bug 80802, as follows: ------- Additional Comment #41 From Phil Schwartau 2002-01-17 13:56 ------- Confirming what Patty has reported: The testcase http://www.hubick.com/software/Misc/LiveConnect/test5.htm is working fine in both my trunk and branch build on WinNT However, the original testcase for this bug, http://www.ccs.neu.edu/home/bcortez/mozilla_tests/80802/bug_test.html, does not work in my Netscape branch build 2002011622_0.9.4ec on WinNT. It does, however, function correctly in my Mozilla trunk build 2002011604: WHEN IT WORKS (on trunk) The applet loads and contains two buttons: "Call JavaScript function to refresh time and date" "Call JavaScript alert box directly" Both of these function correctly. This is the output in the Java Console: JSObjectTestApplet: Entering init() JSObjectTestApplet: JSObject is [object Window] WHEN IT DOESN'T WORK (on the branch) The applet doesn't display either of the buttons. And in the Java Console: JSObjectTestApplet: Entering init() netscape.javascript.JSException: JSObject.getWindow() requires mayscript attribute on this Applet at java.lang.reflect.Constructor.newInstance(Native Method) at sun.plugin.liveconnect.PrivilegedConstructObjectAction.run (Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.plugin.liveconnect.SecureInvocation.ConstructObject (Unknown Source) Here is the HTML for the applet involved: <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="100%" height="20%" align="baseline" codebase="http://java.sun.com/j2se/1.3/jre/download-windows.html"> <param NAME="code" VALUE="JSObjectTestApplet.class"> <param NAME="codebase" VALUE="lib"> <param NAME="scriptable" VALUE="true"> <param NAME="mayscript" VALUE="true"> <param NAME="type" VALUE="application/x-java-applet;version=1.3"> <embed type="application/x-java-applet;version=1.3" width="100" height="100" align="center" java_CODE=JSObjectTestApplet.class mayscript="true" pluginspage="http://java.sun.com/j2se/1.3/jre/download-windows.html"> <noembed> </COMMENT> No JDK 1.2 support for APPLET!! </noembed> </embed> </object> Note the <param NAME="mayscript" VALUE="true"> !!! ------- Additional Comment #42 From Phil Schwartau 2002-01-17 13:58 ------- Here is the HTML for the applet in the other testcase, the one that works on both trunk and branch: <object name="TestApplet" id="TestApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="300" height="100" codebase="j2re1_3_0-win.exe#Version=1,3,0,0" mayscript="true" scriptable="true"> <param name="type" value="application/x-java-applet;version=1.3"/> <param name="mayscript" value="true"/> <param name="scriptable" value="true"/> <param name="code" value="Test5Applet"/> </object><br/> ------- Additional Comment #43 From Phil Schwartau 2002-01-17 14:00 ------- Based on what Patty and I have found, reopening this bug. Again, the problem seems to be only on the branch - ------- Additional Comment #44 From bcortez@kronos.com 2002-01-17 14:12 ------- It seems that the OBJECT tag has been coded to look for the "mayscript" (and perhaps also "scriptable") setting as part of the object tag attribute list. However, according to section 13.3 of the W3C HTML 4.01 Specification (see: http://www.w3.org/TR/html401/struct/objects.html#h-13.3 ) "mayscript" is not a valid attribute. Therefore, it must be placed in the code as a PARAM, right?? Since "To specify run-time values, however, authors use the PARAM element". (Relevant snippet from W3C spec below) 13.3 Generic inclusion: the OBJECT element <!ELEMENT OBJECT - - (PARAM | %flow;)* -- generic embedded object --> <!ATTLIST OBJECT %attrs; -- %coreattrs, %i18n, %events -- declare (declare) #IMPLIED -- declare but don't instantiate flag -- classid %URI; #IMPLIED -- identifies an implementation -- codebase %URI; #IMPLIED -- base URI for classid, data, archive-- data %URI; #IMPLIED -- reference to object's data -- type %ContentType; #IMPLIED -- content type for data -- codetype %ContentType; #IMPLIED -- content type for code -- archive CDATA #IMPLIED -- space-separated list of URIs -- standby %Text; #IMPLIED -- message to show while loading -- height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- name CDATA #IMPLIED -- submit as part of form -- tabindex NUMBER #IMPLIED -- position in tabbing order -- > ------- Additional Comment #45 From Peter Lubczynski 2002-01-17 14:23 ------- In the case of an OBJECT tag, we should be checking the parameters instead of the attriubtes for "MAYSCRIPT". See: http://lxr.mozilla.org/mozilla/source/layout/html/base/src/nsObjectFrame.cpp#277 1 ------- Additional Comment #47 From Johnny Stenback 2002-01-23 15:02 ------- I don't see any proof of this not working on the 094 branch, I do see problems with the applet on the URL in this bug, but we never even get far enough to call through LiveConnect or anything like that. The applet doesn't load correctly, mozilla says the applet is loading, but the applet never draws the buttons that it's supposed to draw. Closing this bug again, since the code that deals with LiveConnect when applets are used in OBJECT tags is on the branch and AFAICT it's working. If the problem about the applet not loading correctly on the branch needs to be fixed on the branch then please open a new bug on that problem and nominate appropriately. ----------------------------------------------------------------------------- So, this is the new bug. I have cc'ed most people from the other bug.
The patch from bug 109039 needs to go in the 0.9.4 branch to correctly set the "mayscript" flag for when Java is used through an OBJECT tag. *** This bug has been marked as a duplicate of 109039 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Marking Verified Duplicate. I have added the URL from this bug into the comments of the other bug -
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.