views:

1318

answers:

3

Hi

Which one would you choose and why?
I'd like to hear opinions from people having experience with embedding a web browser engine in C++ application.
I should stress I need all features of web browser engine except rendering i.e. HTTP client, cookie handling, DOM style HTTP parser, JavaScript engine. How can one strip either WebKit or Gecko of rendering code to avoid coding and run-time overhead?

This is a follow up to What embedded browser for C++ project?

+2  A: 

There exists at least one project that has similar requirements and it embeds Gecko. That's Aptana's Jaxer. As far as I know, they have had good success with this. This doesn't quite answer your question, but it does demonstrate that this is certainly doable with Gecko, and there is GPL'd code available that you can look at as to how to do this (Jaxer is an open source project).

There has also been a similar question asked in the past on this. I don't agree with all those answers, as there is some misinformation there such as Firefox being the dictator of what happens in Gecko (it certainly influences, but is not the deciding factor).

Full disclosure: I work on the Mozilla codebase.

sdwilsh
As this is a subjective question I upvote sdwilsh, as he has worked with one of the asked for engines.
lothar
+2  A: 

I am biased, but I would say WebKit. Especially through the use QtWebKit, it should be easy to have a non-visual web engine (with all the bells and whistles, except painting). And if one is really concerned about excluding all the painting related code, the code base is modular enough (especially the platform abstraction layers) that this can be done in a reasonable time frame.

Ariya Hidayat
A: 

Notice that QtWebkit (and webkit in general i think) will require you to have an active x server - even though you do not show any GUI (It is required in the core of Qt as QWebPage uses QWidget). This might be a design flaw in Qt - i havent investigated further into why they might have done this.

Henrik Hofmeister