Make sure that <applet> with no code falls back and that fallback notifies as

needed.  Bug 311674, r=biesi, sr=peterv
This commit is contained in:
bzbarsky%mit.edu 2005-10-10 12:28:21 +00:00
Родитель 7027689fdd
Коммит a05885355f
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -845,7 +845,7 @@ nsObjectLoadingContent::GetCapabilities() const
void
nsObjectLoadingContent::Fallback(PRBool aNotify)
{
AutoNotifier(this, aNotify);
AutoNotifier notifier(this, aNotify);
UnloadContent();
}

Просмотреть файл

@ -295,8 +295,15 @@ void
nsHTMLAppletElement::StartAppletLoad(PRBool aNotify)
{
nsAutoString uri;
GetAttr(kNameSpaceID_None, nsHTMLAtoms::code, uri);
ObjectURIChanged(uri, aNotify, NS_LITERAL_CSTRING("application/x-java-vm"), PR_TRUE);
nsresult rv = GetAttr(kNameSpaceID_None, nsHTMLAtoms::code, uri);
if (rv != NS_CONTENT_ATTR_NOT_THERE) {
ObjectURIChanged(uri, aNotify,
NS_LITERAL_CSTRING("application/x-java-vm"), PR_TRUE);
} else {
// The constructor set the type to eType_Plugin; but if we have no code
// attribute, then we aren't really a plugin
Fallback(aNotify);
}
}
PRInt32