fix #94895, Flash movie is constantly stopped and restarted, r=peterl, sr=beard

This commit is contained in:
serge%netscape.com 2002-04-11 03:27:00 +00:00
Родитель 627996e0cc
Коммит 014a6bcfd1
3 изменённых файлов: 25 добавлений и 19 удалений

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

@ -1196,10 +1196,6 @@ nsObjectFrame::InstantiatePlugin(nsIPresContext* aPresContext,
window->clipRect.right = 0;
#endif
#ifdef XP_UNIX
window->ws_info = nsnull; //XXX need to figure out what this is. MMP
#endif
// Check to see if content-policy wants to veto this
if(aURI != nsnull)
{
@ -1275,10 +1271,6 @@ nsObjectFrame::ReinstantiatePlugin(nsIPresContext* aPresContext, nsHTMLReflowMet
window->clipRect.right = NSTwipsToIntPixels(aMetrics.width, t2p);
#endif
#ifdef XP_UNIX
window->ws_info = nsnull; //XXX need to figure out what this is. MMP
#endif
return NS_OK;
}
@ -2013,6 +2005,15 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
NS_IF_RELEASE(mWidget);
mContext = nsnull;
#ifdef XP_UNIX
// the mem for this struct is allocated
// by PR_MALLOC in ns4xPluginInstance.cpp:ns4xPluginInstance::SetWindow()
if (mPluginWindow.ws_info) {
PR_Free(mPluginWindow.ws_info);
mPluginWindow.ws_info = nsnull;
}
#endif
}
/*

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

@ -1196,10 +1196,6 @@ nsObjectFrame::InstantiatePlugin(nsIPresContext* aPresContext,
window->clipRect.right = 0;
#endif
#ifdef XP_UNIX
window->ws_info = nsnull; //XXX need to figure out what this is. MMP
#endif
// Check to see if content-policy wants to veto this
if(aURI != nsnull)
{
@ -1275,10 +1271,6 @@ nsObjectFrame::ReinstantiatePlugin(nsIPresContext* aPresContext, nsHTMLReflowMet
window->clipRect.right = NSTwipsToIntPixels(aMetrics.width, t2p);
#endif
#ifdef XP_UNIX
window->ws_info = nsnull; //XXX need to figure out what this is. MMP
#endif
return NS_OK;
}
@ -2013,6 +2005,15 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
NS_IF_RELEASE(mWidget);
mContext = nsnull;
#ifdef XP_UNIX
// the mem for this struct is allocated
// by PR_MALLOC in ns4xPluginInstance.cpp:ns4xPluginInstance::SetWindow()
if (mPluginWindow.ws_info) {
PR_Free(mPluginWindow.ws_info);
mPluginWindow.ws_info = nsnull;
}
#endif
}
/*

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

@ -673,11 +673,15 @@ NS_IMETHODIMP ns4xPluginInstance::Stop(void)
NPError error;
#if defined(MOZ_WIDGET_GTK)
if (mXtBin)
if (mXtBin) {
gtk_widget_destroy(mXtBin);
mXtBin = 0;
}
#elif defined(MOZ_WIDGET_XLIB)
if (mXlibXtBin)
if (mXlibXtBin) {
mXlibXtBin->xtbin_destroy();
mXlibXtBin = 0;
}
#endif
if(!mStarted)
@ -838,7 +842,7 @@ NS_IMETHODIMP ns4xPluginInstance::SetWindow(nsPluginWindow* window)
window->width, window->height, win);
#endif
#if 1
#if 0
// if we destroyed the plugin when we left the page, we could remove this
// code (i believe) the problem here is that the window gets destroyed when
// its parent, etc does by changing a page the plugin instance is being