Add support for loading cfm plugins in OSX mach-o builds.

Changes backported from the CHIMERA_M1_0_1_BRANCH branch.
Bug #155256 r=peterl sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@133054 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
seawood%netscape.com
2002-11-06 01:24:57 +00:00
parent a4274ab9cb
commit 8ae058aa20
14 changed files with 718 additions and 417 deletions

View File

@@ -1024,6 +1024,7 @@ NS_IMETHODIMP ns4xPluginInstance::SetWindow(nsPluginWindow* window)
// XXX In the old code, we'd just ignore any errors coming
// back from the plugin's SetWindow(). Is this the correct
// behavior?!?
}
return NS_OK;
}
@@ -1123,12 +1124,11 @@ NS_IMETHODIMP ns4xPluginInstance::HandleEvent(nsPluginEvent* event, PRBool* hand
PRInt16 result = 0;
if (fCallbacks->event)
{
#ifdef XP_MAC
result = CallNPP_HandleEventProc(fCallbacks->event,
&fNPP,
(void*) event->event);
if (fCallbacks->event) {
#if defined(XP_MAC) || defined(XP_MACOSX)
result = CallNPP_HandleEventProc(fCallbacks->event,
&fNPP,
(void*) event->event);
#endif
#if defined(XP_WIN) || defined(XP_OS2)
@@ -1249,9 +1249,13 @@ NS_IMETHODIMP ns4xPluginInstance :: GetScriptablePeer(void * *aScriptablePeer)
/* readonly attribute nsIIDPtr scriptableInterface; */
NS_IMETHODIMP ns4xPluginInstance :: GetScriptableInterface(nsIID * *aScriptableInterface)
{
#if !defined(XP_MACOSX) // Workaround suspected bug
if (!aScriptableInterface)
return NS_ERROR_NULL_POINTER;
*aScriptableInterface = nsnull;
return GetValue(nsPluginInstanceVariable_ScriptableIID, (void*)aScriptableInterface);
#else
return NS_ERROR_NOT_IMPLEMENTED;
#endif
}