From f23dcf9eb586f534956c917251e28c8cb27113aa Mon Sep 17 00:00:00 2001 From: "bnesse%netscape.com" Date: Tue, 29 Jan 2002 21:08:06 +0000 Subject: [PATCH] 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 --- mozilla/plugin/oji/MRJ/plugin/Source/MRJContext.cp | 12 +++++------- .../plugin/oji/MRJCarbon/plugin/Source/MRJContext.cp | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/mozilla/plugin/oji/MRJ/plugin/Source/MRJContext.cp b/mozilla/plugin/oji/MRJ/plugin/Source/MRJContext.cp index ff19af03680..2798912e65d 100644 --- a/mozilla/plugin/oji/MRJ/plugin/Source/MRJContext.cp +++ b/mozilla/plugin/oji/MRJ/plugin/Source/MRJContext.cp @@ -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; diff --git a/mozilla/plugin/oji/MRJCarbon/plugin/Source/MRJContext.cp b/mozilla/plugin/oji/MRJCarbon/plugin/Source/MRJContext.cp index ed8bc5c47a2..ce0f61e357c 100644 --- a/mozilla/plugin/oji/MRJCarbon/plugin/Source/MRJContext.cp +++ b/mozilla/plugin/oji/MRJCarbon/plugin/Source/MRJContext.cp @@ -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;