Bug 718287 - Remove plugins ForceRedraw functions; r=bz

This commit is contained in:
Ms2ger 2012-02-10 11:04:45 +01:00
parent 78225b5654
commit e7718fdf3a
6 changed files with 3 additions and 48 deletions

View File

@ -605,12 +605,6 @@ nsDummyJavaPluginOwner::InvalidateRegion(NPRegion invalidRegion)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDummyJavaPluginOwner::ForceRedraw()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDummyJavaPluginOwner::GetNetscapeWindow(void *value)
{

View File

@ -49,7 +49,9 @@ class nsPluginEvent;
[ptr] native nsNPAPIPluginInstancePtr(nsNPAPIPluginInstance);
[uuid(17E89C1F-AE62-448E-83D5-C33FA6E07A19)]
// Do not make this interface scriptable, because the virtual functions in C++
// blocks will make script call the wrong functions.
[uuid(23bd0a76-a5dc-4a1d-be76-13d7a0dfd9ff)]
interface nsIPluginInstanceOwner : nsISupports
{
/**
@ -116,11 +118,6 @@ interface nsIPluginInstanceOwner : nsISupports
*/
void invalidateRegion(in NPRegion aRegion);
/**
* Force a redraw
*/
void forceRedraw();
/**
* Get NetscapeWindow, corresponds to NPNVnetscapeWindow
*/

View File

@ -1308,22 +1308,6 @@ _invalidateregion(NPP npp, NPRegion invalidRegion)
void NP_CALLBACK
_forceredraw(NPP npp)
{
if (!NS_IsMainThread()) {
NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_forceredraw called from the wrong thread\n"));
return;
}
NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_ForceDraw: npp=%p\n", (void*)npp));
if (!npp || !npp->ndata) {
NS_WARNING("_forceredraw: npp or npp->ndata == 0");
return;
}
nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance*)npp->ndata;
PluginDestructionGuard guard(inst);
inst->ForceRedraw();
}
NPObject* NP_CALLBACK

View File

@ -1349,20 +1349,6 @@ nsNPAPIPluginInstance::InvalidateRegion(NPRegion invalidRegion)
return owner->InvalidateRegion(invalidRegion);
}
nsresult
nsNPAPIPluginInstance::ForceRedraw()
{
if (RUNNING != mRunning)
return NS_OK;
nsCOMPtr<nsIPluginInstanceOwner> owner;
GetOwner(getter_AddRefs(owner));
if (!owner)
return NS_ERROR_FAILURE;
return owner->ForceRedraw();
}
nsresult
nsNPAPIPluginInstance::GetMIMEType(const char* *result)
{

View File

@ -115,7 +115,6 @@ public:
nsresult GetPluginAPIVersion(PRUint16* version);
nsresult InvalidateRect(NPRect *invalidRect);
nsresult InvalidateRegion(NPRegion invalidRegion);
nsresult ForceRedraw();
nsresult GetMIMEType(const char* *result);
nsresult GetJSContext(JSContext* *outContext);
nsresult GetOwner(nsIPluginInstanceOwner **aOwner);

View File

@ -674,11 +674,6 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRegion(NPRegion invalidRegion)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsPluginInstanceOwner::ForceRedraw()
{
return NS_OK;
}
NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value)
{
if (!mObjectFrame) {