Fix for bug 104293. Do not bail on applet creation if height and width are 0. r=peterlubczynski, sr=beard.

git-svn-id: svn://10.0.0.236/trunk@113137 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bnesse%netscape.com
2002-01-29 21:08:06 +00:00
parent 207f7c02aa
commit f23dcf9eb5
2 changed files with 10 additions and 14 deletions

View File

@@ -1366,15 +1366,13 @@ void MRJContext::setWindow(nsPluginWindow* pluginWindow)
// don't do anything if the AWTContext hasn't been created yet.
if (mContext != NULL) {
if (pluginWindow != NULL) {
if (pluginWindow->height != 0 && pluginWindow->width != 0) {
mPluginWindow = pluginWindow;
mPluginWindow = pluginWindow;
// establish the GrafPort the plugin will draw in.
mPluginPort = pluginWindow->window->port;
// establish the GrafPort the plugin will draw in.
mPluginPort = pluginWindow->window->port;
if (! appletLoaded())
loadApplet();
}
if (! appletLoaded())
loadApplet();
} else {
// tell MRJ the window has gone away.
mPluginWindow = NULL;

View File

@@ -1815,15 +1815,13 @@ OSStatus MRJContext::removeEventHandlers(WindowRef window)
void MRJContext::setWindow(nsPluginWindow* pluginWindow)
{
if (pluginWindow != NULL) {
if (pluginWindow->height && pluginWindow->width && pluginWindow->x && pluginWindow->y) {
mPluginWindow = pluginWindow;
mPluginWindow = pluginWindow;
// establish the GrafPort the plugin will draw in.
mPluginPort = pluginWindow->window->port;
// establish the GrafPort the plugin will draw in.
mPluginPort = pluginWindow->window->port;
if (! appletLoaded())
loadApplet();
}
if (! appletLoaded())
loadApplet();
} else {
// tell MRJ the window has gone away.
mPluginWindow = NULL;