Bug 51042 - REGRESSION (r70748): A Java applet on netdania.com won't load
Summary: REGRESSION (r70748): A Java applet on netdania.com won't load
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Java (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P1 Major
Assignee: Nobody
URL: http://www.netdania.com/Products/live...
Keywords: InRadar, Regression
Depends on: 45679
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-14 10:10 PST by walton.w.smith
Modified: 2011-01-26 19:40 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description walton.w.smith 2010-12-14 10:10:57 PST
The above URL opens for me with SAFARI on three MACS, 10.5.8 and 10.6.
It will not open on any of them using WebKit.
The site opens also with FireFox.
This has been the case for a couple of months now.
All of the macs are updated to the latest OS version.
WebKit is also the latest build.

Thank You
Walton Smith
Comment 1 Alexey Proskuryakov 2010-12-15 14:39:27 PST
This site complains about "Multiple Java versions installed" for me in ToT. But examples like <http://java.sun.com/applets/jdk/1.4/demo/applets/ArcTest/example1.html> work just fine.

I tested on Mac OS X 10.6.4.
Comment 2 Alexey Proskuryakov 2010-12-15 14:40:45 PST
<rdar://problem/8774407>
Comment 3 Andy Estes 2011-01-04 21:15:35 PST
Regression caused by http://trac.webkit.org/changeset/70748.
Comment 4 Andy Estes 2011-01-04 21:20:02 PST
The markup the site uses to embed the applet looks like:

<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" type="application/x-java-applet" ...>

We made the decision in r70748 to render fallback for any object with a non-empty classid attribute, which is what is happening in this case. There is discussion in that changeset's bug about being more lenient and handling object elements so long as they have a valid type attribute. Doing this would fix this regression without re-introducing the AtlasCT issue.
Comment 5 Andy Estes 2011-01-26 19:40:01 PST
Here is the snippet this site uses to load the java applet:

if(BrowserDetect.browser == "Safari" || BrowserDetect.browser == "Explorer")
{
    document.writeln('<object id="detectjvmapplet" name="detectjvmapplet" WIDTH = "1" HEIGHT = "1" codetype="application/java" type="application/x-java-applet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93">');
    document.writeln('<param name = "code" VALUE = "DetectJVM.class" />');	
    document.writeln('<param name = "codebase" VALUE = "/JavaClasses/" />');
    document.writeln('<param name = "mayscript" VALUE = "true"/>');
    document.writeln('<param name= "scriptable" VALUE="true"/>');
    document.writeln('</object>');
}	
else
{
    document.writeln('<applet code="DetectJVM.class" id="detectjvmapplet" codebase="/JavaClasses/" width="0" height="0"></applet>');
}

Of course if they didn't send Safari down an IE-specific code path everything would work fine :(

(Note that UA spoofing won't work on this site since BrowserDetect.browser is set to 'Safari' based on navigator.vendor, not navigator.userAgent).