Community
Participate
Working Groups
Investigate support for embedding Safari into the SWT Browser widget on the Mac.
The attached code implements a WebKit (Safari) based brower widget for SWT (see screenshot). Be aware it works only with Panther.
Created attachment 5838 [details] Safari widget inside SWT applications
Created attachment 5839 [details] The code
Andre, that's great! Thanks. We are going to look at it and see how we can support the current org.eclipse.swt.browser.Browser api with this.
If you want me to do a first implementation of the new SWT Browser based on this (or if you don't have access to Panther), let me know...
Andre, 1) Is there a reason why your code could not work on Mac OS 10.2 with Safari 1.0 installed? We need to support this platform It depends how much time you can give to this and on 1). We would need some implementation working on the current OS 10.2 pretty quickly (<= 2 weeks). If this sounds OK with you, yes your help and mac experience is very appreciated. Chris
1) on 10.2 if the Java VM runs in the main thread loading the WebKit dll results in a native crash. (Apple itself suggested to run the Java VM in the main thread). If we run the Java VM in thread 1, we can load WebKit but deadlock in Color- and FontDialog (see bug #40003). On Panther we can both load WebKit and run Color/FontDailogs without deadlocks. 2) No, I don't think I'm able to resolve the issues with Safari under 10.2.
The 3.0 draft plan from January 30, 2004 states that "Apple Mac OS X 10.3" is the reference platform. Doesn't this imply that Panther is the minimum OS X version that needs to be supported? I for one would be in favor of dumping Jaguar support, considering that WebKit embedding isn't the only problem with Jaguar AFAICT.
Correct, 10.3 will be required for the final version of Eclipse 3.0.
Well, then why is this bug still open? Why hasn't the code been committed yet (or has it)?
No, it hasn't (we are still working on issues).
Created attachment 8456 [details] here's an updated Makefile for Panther with JDK 1.4.2 installed and Safari 1.2 If its of any help I hacked the Makefile to work on my Panther box with JDK 1.4.2 installed.
Note that I can run the webkit browser fine via the command line... make run But if I try to install the WebKit inside eclipse 3.0 M5 I get the usual stack trace exception when trying to open the browser.
v>20040427 - The Browser widget is now available on the Mac (Panther OS X.3 required). SWT FAQ has been updated. Special thanks to Andre Weinand for contributing the initial implementation!