mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge backout of bug 633942, a=josh
This commit is contained in:
commit
c3c6530c38
@ -128,16 +128,12 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
|
||||
#endif // OS_WIN
|
||||
, mAsyncCallMutex("PluginInstanceChild::mAsyncCallMutex")
|
||||
#if defined(OS_MACOSX)
|
||||
#if defined(NP_NO_CARBON)
|
||||
, mEventModel(NPEventModelCocoa)
|
||||
, mDrawingModel(NPDrawingModelCoreGraphics)
|
||||
#else
|
||||
#if defined(__i386__)
|
||||
, mEventModel(NPEventModelCarbon)
|
||||
, mDrawingModel(NPDrawingModelQuickDraw)
|
||||
#endif
|
||||
, mShColorSpace(nsnull)
|
||||
, mShContext(nsnull)
|
||||
|
||||
, mDrawingModel(NPDrawingModelCoreGraphics)
|
||||
, mCurrentEvent(nsnull)
|
||||
#endif
|
||||
, mLayersRendering(false)
|
||||
@ -480,25 +476,25 @@ PluginInstanceChild::NPN_SetValue(NPPVariable aVar, void* aValue)
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
case NPPVpluginDrawingModel: {
|
||||
NPError rv;
|
||||
int drawingModel = (int16) (intptr_t) aValue;
|
||||
|
||||
NPError rv = NPERR_GENERIC_ERROR;
|
||||
if (!CallNPN_SetValue_NPPVpluginDrawingModel(drawingModel, &rv))
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
mDrawingModel = static_cast<NPDrawingModel>(drawingModel);
|
||||
mDrawingModel = drawingModel;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
case NPPVpluginEventModel: {
|
||||
NPError rv;
|
||||
int eventModel = (int16) (intptr_t) aValue;
|
||||
|
||||
NPError rv = NPERR_GENERIC_ERROR;
|
||||
if (!CallNPN_SetValue_NPPVpluginEventModel(eventModel, &rv))
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
#if defined(__i386__)
|
||||
mEventModel = static_cast<NPEventModel>(eventModel);
|
||||
#endif
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
@ -390,10 +390,12 @@ private:
|
||||
#endif // defined(OS_WIN)
|
||||
#if defined(OS_MACOSX)
|
||||
private:
|
||||
#if defined(__i386__)
|
||||
NPEventModel mEventModel;
|
||||
NPDrawingModel mDrawingModel;
|
||||
#endif
|
||||
CGColorSpaceRef mShColorSpace;
|
||||
CGContextRef mShContext;
|
||||
int16_t mDrawingModel;
|
||||
nsCARenderer mCARenderer;
|
||||
|
||||
public:
|
||||
@ -401,8 +403,9 @@ public:
|
||||
return mCurrentEvent;
|
||||
}
|
||||
|
||||
#if defined(__i386__)
|
||||
NPEventModel EventModel() { return mEventModel; }
|
||||
NPDrawingModel DrawingModel() { return mDrawingModel; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
const NPCocoaEvent *mCurrentEvent;
|
||||
|
@ -1910,13 +1910,7 @@ PluginModuleChild::AnswerPPluginInstanceConstructor(PPluginInstanceChild* aActor
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
if (getenv("NPAPI_MODEL_DEBUG")) {
|
||||
printf("OOP plugin negotiated NPAPI event model: %d\n", childInstance->EventModel());
|
||||
printf("OOP plugin negotiated NPAPI drawing model: %d\n", childInstance->DrawingModel());
|
||||
}
|
||||
|
||||
#if defined(__i386__)
|
||||
#if defined(XP_MACOSX) && defined(__i386__)
|
||||
// If an i386 Mac OS X plugin has selected the Carbon event model then
|
||||
// we have to fail. We do not support putting Carbon event model plugins
|
||||
// out of process. Note that Carbon is the default model so out of process
|
||||
@ -1931,7 +1925,6 @@ PluginModuleChild::AnswerPPluginInstanceConstructor(PPluginInstanceChild* aActor
|
||||
// Fail to instantiate.
|
||||
*rv = NPERR_MODULE_LOAD_FAILED_ERROR;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user