Hi Jules,
Right, I’m really confused by this one.
The demo browser plug-in (and also my own plug-in…) only works properly under Safari, if I run it directly with the debugger.
NB: I’ve copied the file to the right folder (I know this as it works OK from Firefox!).
If I run-up Safari without using the debugger, and open the test page, the plug-in doesn’t display, but it does respond to scripting. So: that proves that the plug-in is there… but makes me think the display area isn’t initialised properly.
If I enable the DGB output in the release build, I get this in the log.txt file that you create… (this from loading the plug-in test page, then refreshing, then quitting…) (NB the sizes of 178 etc. are just the sizes I’m happening to use for the plug-in in this test…)
NP_Initialize
NP_GetEntryPoints
NPP_New
initialiseJuce_GUI()
BrowserPluginHolderComponent created
plugin window clip: 445 80 178 206
plugin window target: 445 80 178 206
plugin window intersection: 445 80 178 206
wx: 0 0 951 662 128 321 951 684
parent:
plugin window clip: 445 80 178 206
plugin window target: 445 80 178 206
plugin window intersection: 445 80 178 206
wx: 206 -2147483648 0 178 0 0 0 -1
parent:
plugin window clip: 445 96 178 206
plugin window target: 445 96 178 206
plugin window intersection: 445 96 178 206
wx: 0 0 0 0 0 0 0 0
parent:
NPP_Destroy
BrowserPluginHolderComponent deleted
shutdownJuce_GUI()
NP_Shutdown
That second set of coordinates looks VERY weird!! Is there maybe an uninitialised memory thing going on?
There are also some console messages you can see that might give you a clue as to what is going wrong…! … which seem pretty interesting.
Hoping you can help!
My first thought was that this because the plug-in isn’t signed … if I look inside the package contents for the pre-installed plug-ins, that they have Contents/_CodeSignature folders… !!!
So, I ran through the steps for self-signing the plug-in before copying it, which are in the “Code Signing Guide” in XCode… only to find that didn’t actually solve the problem.
BTW, I found some interesting source code here: https://dev.mobileread.com/svn/webkitbrowser/trunk/WebKit-r30377/WebKit/mac/Carbon/CarbonWindowAdapter.m … and http://codenotifier.com/projects/218/commits/7107
@implementation CarbonWindowAdapter
117 111
... ... @@ -169,25 +163,15 @@
169 163
170 164 // Find out the window's Carbon window attributes.
171 osStatus = GetWindowAttributes(inWindowRef, &windowAttributes);
172 if (osStatus!=noErr) NSLog(@"A Carbon window's attributes couldn't be gotten.");
165 GetWindowAttributes(inWindowRef, &windowAttributes);
173 166
174 167 // Find out the window's Carbon window features.
175 osStatus = GetWindowFeatures(inWindowRef, &windowFeatures);
176 if (osStatus!=noErr) NSLog(@"A Carbon window's features couldn't be gotten.");
168 GetWindowFeatures(inWindowRef, &windowFeatures);
Best wishes,
Pete