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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user