Fixing bug 256711. Make object tags render their content in stead of defaulting to the 'default plugin' when we don't have a plugin suitable for the object tag. r+sr=brendan@mozilla.org, a=asa@mozilla.org

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@161191 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com
2004-08-24 22:20:51 +00:00
parent b69218b254
commit 85b179189c

View File

@@ -724,9 +724,12 @@ nsObjectFrame::Init(nsIPresContext* aPresContext,
}
else
aNewFrame->Destroy(aPresContext);
return rv;
}
// Return early here as we don't want to render the "default
// plugin" since this object tag may have children that we'll load
// correctly.
return rv;
}
nsCAutoString type;
@@ -738,18 +741,10 @@ nsObjectFrame::Init(nsIPresContext* aPresContext,
embed->GetType(tmp);
CopyUTF16toUTF8(tmp, type);
} else {
nsCOMPtr<nsIDOMHTMLObjectElement> object(do_QueryInterface(mContent));
NS_ASSERTION(aContent->Tag() == nsHTMLAtoms::applet,
"Huh, aContent should be an applet tag here!");
if (object) {
nsAutoString tmp;
object->GetType(tmp);
CopyUTF16toUTF8(tmp, type);
} else {
NS_ASSERTION(aContent->Tag() == nsHTMLAtoms::applet,
"Huh, aContent should be an applet tag here!");
type.Assign("application/x-java-vm");
}
type.Assign("application/x-java-vm");
}
nsCOMPtr<nsIPluginInstance> inst;