Version: (using KDE Devel) Installed from: Compiled sources W3C's HTML4 describes a particular format of <OBJECT> as an example to invoke a Java applet. This format is supported by Mozilla, Opera, even IE6 and Netscape 4, among others. KHTML does not support it, so Konqueror and Safari display nothing where the applet should be. Format of this tag is: <OBJECT classid="java:appletname" codetype="application/java" codebase="..." width="..." height="..."> <param name="..." value="..." /> [...] [alternate rendering] </OBJECT> 'codetype' is not necessary, as the "java:" indicates all that one should need to know. Some browsers require it anyway. Some allow "application/x-java-applet" or versioned forms thereof as the type. No browser that supports this tag bothers to check the version information against an installed plugin. Support for 'archive' attribute is necessary, as well as 'codebase'. 'appletname' should not require the ".class" suffix. Use of the 'data' attribute is not applicable to this form of the <OBJECT> tag. Sample URL: http://www.well.com/~mcow/OBJ_.html
Subject: Re: New: (rfe) Request KHTML support for W3C-style <OBJECT> for applets Koos is already ontop of this! He has some patches already made, so you can expect support for this too. Maybe even in 3.1.1, but certainly 3.2.0. On Tuesday 04 February 2003 16:26, Mike Cowperthwaite wrote: > W3C's HTML4 describes a particular format of <OBJECT> as an example to > invoke a Java applet. This format is supported by Mozilla, Opera, even IE6 > and Netscape 4, among others. KHTML does not support it, so Konqueror and > Safari display nothing where the applet should be. > > Format of this tag is: > <OBJECT classid="java:appletname" codetype="application/java" > codebase="..." width="..." height="..."> > <param name="..." value="..." /> [...] > [alternate rendering] > </OBJECT> > > 'codetype' is not necessary, as the "java:" indicates all that one should > need to know. Some browsers require it anyway. Some allow > "application/x-java-applet" or versioned forms thereof as the type. No > browser that supports this tag bothers to check the version information > against an installed plugin. Support for 'archive' attribute is necessary, > as well as 'codebase'. 'appletname' should not require the ".class" > suffix. Use of the 'data' attribute is not applicable to this form of the > <OBJECT> tag. > > Sample URL: > http://www.well.com/~mcow/OBJ_.html > _______________________________________________ > Konq-bugs mailing list > Konq-bugs@mail.kde.org > http://mail.kde.org/mailman/listinfo/konq-bugs
bug, not whichlist, as this is part of an W3C standard
Looks like its not implemented yet (at least the test page doesn't show the applet).
I just checked my test page and it was slightly out of date; it wasn't rendering under Opera or Gecko either. I've updated it to the 'correct' form. Please double-check that it's still not working under KHTML. (I'm running only Windows here, I have no means to test it myself).
*** Bug 74746 has been marked as a duplicate of this bug. ***
kdelibs/khtml/html/html_objectimpl.cpp:151 Around these line: else m_render = new (getDocument()->renderArena())RenderPartObject(this); Maybe add a little condition before the "new", something like: if ( url.isEmpty() && !classId.isEmpty() && classId.startsWith("java:") ) { url = classId.substr(5,to_the_end); } Question: Does URL should be concatened with the codebase attribute? ie. getAttribute( ATTR_CODEBASE )
Hum, sorry it's already in kdelibs/khtml/rendering/render_frames.cpp:670 I think the problem in the first test case is the codetype="application/java" work find with codetype="application/x-java-applet" Some tests case (text/html for all) http://yansanmo.no-ip.org:8080/test/html/object_java.php http://yansanmo.no-ip.org:8080/test/html/java/object_java.php http://yansanmo.no-ip.org:8080/test/html/java/object_java_absolute.php On my computer, firefox fails all tag with url inside data="". Another bug maybe, when you look at application/x-java-applet test, the <ul> disapear. W3C HTML4.01 Specs: http://www.w3.org/TR/html401/struct/objects.html#h-13.3.3
Created attachment 8064 [details] Patch for application/java I don't know if application/java comparaison should be case-sensitive or not.
CVS commit by vriezen: Alias for x-java CCBUG: 54099 A java.desktop 1.1
CVS commit by vriezen: Support more application/x-java and indirectly application/java mimetype CCBUG: 54099 M +1 -1 kjavaappletviewer.desktop 1.61 --- kdelibs/khtml/java/kjavaappletviewer.desktop #1.60:1.61 @@ -60,5 +60,5 @@ X-KDE-Library=kjavaappletviewer Icon=java -MimeType=application/x-java-applet; +MimeType=application/x-java-applet;application/x-java; ServiceTypes=KParts/ReadOnlyPart,Browser/View Type=Service
There was also this patch (inside my first patch) When "java:" is found, application/x-java-applet is automatically use even if the service type isn't given with codetype="". The patch is needed to conform with first example in W3C Specs (HTML401). If we do not put serviceType = objectbase->serviceType before the if, then this line: serviceType = "application/x-java-applet"; is dead code. Index: kdelibs/khtml/rendering/render_frames.cpp =================================================================== RCS file: /home/kde/kdelibs/khtml/rendering/render_frames.cpp,v retrieving revision 1.190 diff -u -3 -p -r1.190 render_frames.cpp --- kdelibs/khtml/rendering/render_frames.cpp 23 Oct 2004 19:34:06 -0000 1.190 +++ kdelibs/khtml/rendering/render_frames.cpp 30 Oct 2004 05:51:32 -0000 @@ -667,6 +667,7 @@ void RenderPartObject::updateWidget() if (!objbase->getAttribute(ATTR_HEIGHT).isEmpty()) params.append( QString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) ); + serviceType = objbase->serviceType; if (url.isEmpty() && objbase->classId.startsWith("java:")) { if ( serviceType.isEmpty() ) serviceType = "application/x-java-applet"; url = objbase->classId.mid(5); @@ -675,8 +676,7 @@ void RenderPartObject::updateWidget() // render embed object url = embed->url; serviceType = embed->serviceType; - } else - serviceType = objbase->serviceType; + } if(serviceType.isEmpty() && !objbase->classId.isEmpty()) { // We have a clsid, means this is activex (Niko)
CVS commit by vriezen: The classid check for "java:" was undone. CCBUG: 54099 Thanks for noticing, changed it so serviceType is assigned only once (the EMBED only case) M +4 -5 render_frames.cpp 1.191 --- kdelibs/khtml/rendering/render_frames.cpp #1.190:1.191 @@ -668,12 +668,11 @@ void RenderPartObject::updateWidget() params.append( QString::fromLatin1("HEIGHT=\"%1\"").arg( objbase->getAttribute(ATTR_HEIGHT).string() ) ); - if (url.isEmpty() && objbase->classId.startsWith("java:")) { - serviceType = "application/x-java-applet"; - url = objbase->classId.mid(5); - } if ( embed ) { // render embed object url = embed->url; serviceType = embed->serviceType; + } else if (url.isEmpty() && objbase->classId.startsWith("java:")) { + serviceType = "application/x-java-applet"; + url = objbase->classId.mid(5); } else serviceType = objbase->serviceType;
not fixed?
yes, it should be fixed by now.
*** Bug has been marked as fixed ***.