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
+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
2009-05-04 Adam Roben <aroben@apple.com>
Windows build fix
const AtomicString& codeBase = getAttribute(codebaseAttr);
if (!codeBase.isNull())
args.set("codeBase", codeBase);
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())
const AtomicString& name = getAttribute(document()->isHTMLDocument() ? nameAttr : idAttr);
if (!name.isNull())
paramValues.append(it->second);
}
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())
}
if (baseURLString.isEmpty())