What is the best HTML Rendering Engine to embed in an application?

conmulligan picture conmulligan · Oct 8, 2008 · Viewed 19.9k times · Source

At the moment, our application uses the Trident Win32 component, but we want to move away from that for a few reasons, chief among them being our desire to go cross-platform.

We're looking at WebKit and Gecko, but I'd love to get some feedback before I make a decision. Here are some of the most important requirements:

  1. It should be relatively fast, with a small footprint. Ideally, we would be able to trim away anything we don't need without too much effort.

  2. Decent documentation is important. I don't anticipate needing to do anything too unusual with it, but you never know.

  3. We're using C++, and would like to work with a well-designed object-oriented architecture, if possible.

  4. Cross-platform is a must, and good performance would be helpful in the long run (we may end up porting to mobile platforms).

Are there any considerations I need to take into account before making a decision? Has anyone worked with WebKit or Gecko before? If so, are there any articles or tutorials I might find useful?

Update:

Thanks for the responses guys. We ended up going with Qt 4.5, which includes WebKit. We're really pleased with it so far, in fact I think Qt is probably the best UI framework I've ever used; the difference between coding with the native Win32 APIs and this is staggering. It's also real easy to learn, the only major issue we had was getting used to the signals/slots paradigm.

Answer

swilliams picture swilliams · Oct 8, 2008

A little history might help in your decision. When Apple was considering which engine to use in making Safari they looked at Gecko, but decided to go with KHTML, fork it and called it WebKit. Their reasons for doing this was that Gecko had tons of legacy cruft still leftover from Netscape and was far more complicated.

KHTML/WebKit was newer, and thus had less legacy. It was also cleaner, quicker, and better documented.

One of the goals of Firefox 3 was to clean up the codebase and simplify it. From what I've heard they did do this, but I don't know how it compares with current iterations of WebKit. It apparently wasn't enough for Google when they made Chrome, and they have a significant stake in Firefox.

See here for more details.