зеркало из https://github.com/mozilla/gecko-dev.git
fix #94895, Flash movie is constantly stopped and restarted, r=peterl, sr=beard
This commit is contained in:
Родитель
627996e0cc
Коммит
014a6bcfd1
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче