Fixing bug 401053. Make sure to initialize LiveConnect any time a Java applet is loaded, no matter what markup was used to load the applet. r+sr=dveditz@cruzio.com, a=dsicore@mozilla.com

This commit is contained in:
2007-10-31 15:52:11 -07:00
parent ad4db1143c
commit 738fce3ed2
6 changed files with 51 additions and 49 deletions

View File

@@ -108,7 +108,6 @@
#include "nsDisplayList.h"
#include "nsAttrName.h"
#include "nsDataHashtable.h"
#include "nsGlobalWindow.h"
// headers for plugin scriptability
#include "nsIScriptGlobalObject.h"
@@ -1405,21 +1404,6 @@ nsObjectFrame::PrepareInstanceOwner()
NS_ADDREF(mInstanceOwner);
mInstanceOwner->Init(PresContext(), this, GetContent());
#ifdef OJI
if (mContent->Tag() == nsGkAtoms::applet) {
nsGlobalWindow *win =
(nsGlobalWindow *)mContent->GetOwnerDoc()->GetScriptGlobalObject();
if (win) {
// Initialize Java properties on the window object to make sure
// LiveConnect gets initialized if needed. This can be removed
// for Mozilla2 once there is no more LiveConnect.
win->InitJavaProperties();
}
}
#endif
return NS_OK;
}