Bug 24699 - REGRESSION: Java Applets broken
Summary: REGRESSION: Java Applets broken
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Sam Weinig
URL: http://java.sun.com/applets/jdk/1.4/d...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-03-19 10:39 PDT by Amit Joshi
Modified: 2009-03-24 09:27 PDT (History)
4 users (show)

See Also:


Attachments
patch (2.15 KB, patch)
2009-03-23 16:05 PDT, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Joshi 2009-03-19 10:39:06 PDT
Java applets that do not specify 'codebase' in the embed/object tag do not work. This is due to a recent Revision 41568.

If codebase is not specified, then HTMLAppletElement::createRenderer sets it using args.set("codeBase", document()->baseURL().string());  This sets it to the page url instead of it's base path.
Comment 1 Finnur Thorarinsson 2009-03-19 13:08:43 PDT
Amit. Isn't that by design?

http://java.sun.com/j2se/1.4.2/docs/guide/misc/applet.html

Quote:

CODEBASE = codebaseURL
This OPTIONAL attribute specifies the base URL of the applet--the directory that contains the applet's code. If this attribute is not specified, then the document's URL is used.
Comment 2 Jon@Chromium 2009-03-19 13:57:40 PDT
Also reported against Chromium, see http://code.google.com/p/chromium/issues/detail?id=8936
Comment 3 Alexey Proskuryakov 2009-03-21 04:21:07 PDT
<rdar://problem/6707494>
Comment 4 Sam Weinig 2009-03-23 16:05:29 PDT
Created attachment 28871 [details]
patch
Comment 5 Anders Carlsson 2009-03-23 16:12:19 PDT
Comment on attachment 28871 [details]
patch

r=me
Comment 6 Sam Weinig 2009-03-23 16:19:18 PDT
FIxed in r41922.
Comment 7 Alexey Proskuryakov 2009-03-23 23:41:01 PDT
+String KURL::baseAsString() const
+{
+    return m_string.left(m_pathAfterLastSlash);
+}

It's quite confusing that KURL now uses "base"  in different meanings. It's especially so when comparing to CFURLRef/NSURL, which remember the base URL they were created with, and have accessors for it. 
Comment 8 Sam Weinig 2009-03-24 08:36:16 PDT
(In reply to comment #7)
> +String KURL::baseAsString() const
> +{
> +    return m_string.left(m_pathAfterLastSlash);
> +}
> 
> It's quite confusing that KURL now uses "base"  in different meanings. It's
> especially so when comparing to CFURLRef/NSURL, which remember the base URL
> they were created with, and have accessors for it. 
> 

Good point.  Do you have a suggestion for a better name?
Comment 9 Alexey Proskuryakov 2009-03-24 09:27:22 PDT
Maybe parentDirectoryPath()? This will also make it clearer that the method only works properly for hierarchical URL schemes.