As part of the static build landing on Windows and Unix, GFX and Widget were converted into component DLLs. We need to do this on Mac too. This bug is for widget.
Simon, I am putting this in 1.0, if you want it in a different milestone, please move it
This turns out to be tricker than gfx, the main problem being that PPBrowser needs linkage with nsRepeater and nsMacMessageSink, which in turn drags in the nsMacWindow implementation. I've made it work by creating a 'GeckoSupport' library (which is actually the old widget DLL that gets linked with), containing: nsRepeater.cpp nsMessageSink.cpp nsWidgetSupport.cpp (viewer links with this) but this does not seem like a logical code split. Conrad: is there anyway we can eliminate the linkage requirements of PPBrowser on the widget code? Why aren't the generic embedding interfaces enough here?
The nsRepeater functionality should go into the embedding API. The problem with NS_DoIdleEmbeddingStuff() (besides that I can't stand that name ;-))is that it needs to take an EventRecord only on the Mac. Also, there needs to be a corresponding call for repeating. Since the idling/repeating needs are so different on the Mac, I just stuck with widget's nsRepeater functionality. The code does need to be moved so the linkage can be avoided but I'll have to look into it some more first. In terms of a 'GeckoSupport' lib, having nsRepeater.cpp and nsMessageSink is a good match because every app using Gecko on the Mac would need this. I'd avoid putting nsWidgetSupport.cpp into it because it's only used by viewer and viewer is an odd-ball that may not be long for this world anyway.
as pointed out by sfraser, this might block bug 100612, but I'm not 100% sure. See bug 94434 as well. There was talk of cleaning up the NS_DoIdleEmbedding stuff - will that fix some of the mentioned dependencies here? is there a bug on that?
Mac build changes are ready to land. Most are project changes. Minor script fixing coming up...
Comment on attachment 56647 [details] [diff] [review] Source changes in widget r=pchen
Comment on attachment 56648 [details] [diff] [review] Build script changse r=pchen
The changes do this following: * Break widget into an XPCOM module (widget.shlb) and a non-XPCOM module (GeckoSupport.shlb) * Deal with moving GetNativeTextStyle() from nsFontMetricsMac to nsFontUtils (see patch in bug 94434) * Remove some unnecessary exports in nsMacMessageSink * Add an XPCOM module file nsWidgetModule.cpp, with simplified nsScrollbar entries
Changed to use the existing nsWidgetFactory.cpp, with changes to allow for the same file to be used when building Mach-O