diff --git a/Source/WebCore/html/HTMLObjectElement.cpp b/Source/WebCore/html/HTMLObjectElement.cpp
index 2ae7a028f042..eedecbe534db 100644
--- a/Source/WebCore/html/HTMLObjectElement.cpp
+++ b/Source/WebCore/html/HTMLObjectElement.cpp
@@ -186,17 +186,6 @@ void HTMLObjectElement::parametersForPlugin(Vector& paramNames, Vect
}
}
- // When OBJECT is used for an applet via Sun's Java plugin, the CODEBASE attribute in the tag
- // points to the Java plugin itself (an ActiveX component) while the actual applet CODEBASE is
- // in a PARAM tag. See . This means
- // we have to explicitly suppress the tag's CODEBASE attribute if there is none in a PARAM,
- // else our Java plugin will misinterpret it. [4004531]
- String codebase;
- if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) {
- codebase = "codebase"_s;
- uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM already
- }
-
// Turn the attributes of the element into arrays, but don't override values.
if (hasAttributes()) {
for (const Attribute& attribute : attributesIterator()) {
@@ -235,16 +224,6 @@ bool HTMLObjectElement::hasFallbackContent() const
return false;
}
-bool HTMLObjectElement::hasValidClassId()
-{
- if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType()) && protocolIs(attributeWithoutSynchronization(classidAttr), "java"_s))
- return true;
-
- // HTML5 says that fallback content should be rendered if a non-empty
- // classid is specified for which the UA can't find a suitable plug-in.
- return attributeWithoutSynchronization(classidAttr).isEmpty();
-}
-
// FIXME: This should be unified with HTMLEmbedElement::updateWidget and
// moved down into HTMLPluginImageElement.cpp
void HTMLObjectElement::updateWidget(CreatePlugins createPlugins)
@@ -289,9 +268,12 @@ void HTMLObjectElement::updateWidget(CreatePlugins createPlugins)
Ref protectedThis = *this; // Plugin loading can make arbitrary DOM mutations.
+ // HTML5 says that fallback content should be rendered if a non-empty
+ // classid is specified for which the UA can't find a suitable plug-in.
+ //
// Dispatching a beforeLoad event could have executed code that changed the document.
// Make sure the URL is still safe to load.
- bool success = hasValidClassId() && canLoadURL(url);
+ bool success = attributeWithoutSynchronization(classidAttr).isEmpty() && canLoadURL(url);
if (success)
success = requestObject(url, serviceType, paramNames, paramValues);
if (!success && hasFallbackContent())
diff --git a/Source/WebCore/html/HTMLObjectElement.h b/Source/WebCore/html/HTMLObjectElement.h
index 2de81e0beeec..18da9299fac5 100644
--- a/Source/WebCore/html/HTMLObjectElement.h
+++ b/Source/WebCore/html/HTMLObjectElement.h
@@ -80,8 +80,6 @@ class HTMLObjectElement final : public HTMLPlugInImageElement, public FormListed
// so that we can better share code between and .
void parametersForPlugin(Vector& paramNames, Vector& paramValues, String& url, String& serviceType);
- bool hasValidClassId();
-
void refFormAssociatedElement() const final { ref(); }
void derefFormAssociatedElement() const final { deref(); }
diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp
index 330e05696e24..ce0ae8ff991a 100644
--- a/Source/WebCore/platform/MIMETypeRegistry.cpp
+++ b/Source/WebCore/platform/MIMETypeRegistry.cpp
@@ -630,17 +630,6 @@ bool MIMETypeRegistry::isXMLEntityMIMEType(StringView mimeType)
|| equalLettersIgnoringASCIICase(mimeType, "application/xml-external-parsed-entity"_s);
}
-bool MIMETypeRegistry::isJavaAppletMIMEType(const String& mimeType)
-{
- // Since this set is very limited and is likely to remain so we won't bother with the overhead
- // of using a hash set.
- // Any of the MIME types below may be followed by any number of specific versions of the JVM,
- // which is why we use startsWith()
- return startsWithLettersIgnoringASCIICase(mimeType, "application/x-java-applet"_s)
- || startsWithLettersIgnoringASCIICase(mimeType, "application/x-java-bean"_s)
- || startsWithLettersIgnoringASCIICase(mimeType, "application/x-java-vm"_s);
-}
-
bool MIMETypeRegistry::isPDFMIMEType(const String& mimeType)
{
static constexpr SortedArraySet set { pdfMIMETypeArray };
diff --git a/Source/WebCore/platform/MIMETypeRegistry.h b/Source/WebCore/platform/MIMETypeRegistry.h
index 02565e4f321c..f393e5329406 100644
--- a/Source/WebCore/platform/MIMETypeRegistry.h
+++ b/Source/WebCore/platform/MIMETypeRegistry.h
@@ -98,9 +98,6 @@ class MIMETypeRegistry {
// Check to see if a MIME type is suitable for being loaded using >.
WEBCORE_EXPORT static bool isSupportedTextTrackMIMEType(const String& mimeType);
- // Check to see if a MIME type is a valid Java applet mime type.
- WEBCORE_EXPORT static bool isJavaAppletMIMEType(const String& mimeType);
-
// Check to see if a MIME type is a plugin implemented by the browser.
static bool isApplicationPluginMIMEType(const String& mimeType);