Commit 43ba35c7 authored by beidson@apple.com's avatar beidson@apple.com

2009-05-04 Brady Eidson <beidson@apple.com>

        Reviewed by Sam 'The Belly' Weinig

        <rdar://problem/6828894> - Facebook photo uploader applet broken on Leopard only

        In r41568 we started adding a default codebase attribute to <applet> tags if they didn't specify one
        themselves.  Leopard's Java plug-in mishandles this case and fails to load code for the applet.

        The spirit of r41568 can be maintained by removing the "default codebase" piece and only performing
        the canLoad() check if a codebase was actually set on the applet tag.

        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::createRenderer): Don't create a default codebase attribute.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::createJavaAppletWidget): Only perform the canLoad() check if the codebase was set.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2e68f2c8
2009-05-04 Brady Eidson <beidson@apple.com>
Reviewed by Sam 'The Belly' Weinig
<rdar://problem/6828894> - Facebook photo uploader applet broken on Leopard only
In r41568 we started adding a default codebase attribute to <applet> tags if they didn't specify one
themselves. Leopard's Java plug-in mishandles this case and fails to load code for the applet.
The spirit of r41568 can be maintained by removing the "default codebase" piece and only performing
the canLoad() check if a codebase was actually set on the applet tag.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::createRenderer): Don't create a default codebase attribute.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::createJavaAppletWidget): Only perform the canLoad() check if the codebase was set.
2009-05-04 Adam Roben <aroben@apple.com>
Windows build fix
......@@ -120,8 +120,6 @@ RenderObject* HTMLAppletElement::createRenderer(RenderArena*, RenderStyle* style
const AtomicString& codeBase = getAttribute(codebaseAttr);
if (!codeBase.isNull())
args.set("codeBase", codeBase);
else
args.set("codeBase", document()->baseURL().baseAsString());
const AtomicString& name = getAttribute(document()->isHTMLDocument() ? nameAttr : idAttr);
if (!name.isNull())
......
......@@ -5109,10 +5109,12 @@ Widget* FrameLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletEleme
paramValues.append(it->second);
}
KURL codeBaseURL = completeURL(codeBaseURLString);
if (!canLoad(codeBaseURL, String(), element->document())) {
FrameLoader::reportLocalLoadFailed(m_frame, codeBaseURL.string());
return 0;
if (!codeBaseURLString.isEmpty()) {
KURL codeBaseURL = completeURL(codeBaseURLString);
if (!canLoad(codeBaseURL, String(), element->document())) {
FrameLoader::reportLocalLoadFailed(m_frame, codeBaseURL.string());
return 0;
}
}
if (baseURLString.isEmpty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment