With Apple just having released Safari for Windows and people wondering exactly why, I wanted to put out my thoughts on Gecko versus WebKit. I may well be wrong on some of the technical and historical points here, I’m just going on what my understanding is and my opinion on the two engines. Please do correct me in the comments, I’m sure I’ve made some mistake somewhere. I just want to put out my opinion on this.
At the moment, Gecko has the edge in terms of compatibility. There are only few sites that do not render properly in it, and it does very well as a rendering engine.
The problem is – Gecko was designed for Netscape 6 for Windows. Netscape 6 was a complete disaster, but the Gecko rendering engine survived and made it to where it is today.
Unfortunately, it still carries around baggage from those NS6 days. Gecko wasn’t really built for what it is doing today (although it is doing a pretty damn good job at it). Add to that the complexity of some of the architecture like XPCOM and XUL, Gecko starts to look quite heavyweight.
XPCOM adds a lot of code for marshalling objects between different usage contexts (eg. different languages). This leads to code bloat in XPCOM based systems. This was one of the reasons why Apple chose KHTML over the XPCOM-based Gecko rendering engine for their Web Browser. Source
Apple chose to fork KHTML and built WebKit over implementing Gecko because they saw the value of KHTML being light, speedy, developed from the ground up for these things. In the long term, WebKit’s architecture is probably a better choice for Apple.
Do you really want to carry around Netscape 6 on your iPhone?
As far as compatibility goes, I think things will only get better now that Safari runs on Windows.
As much as I love Gecko, use Firefox, advocate Firefox and will continue to use it in the future, I think Apple made and are making the right decisions with WebKit and the Safari platform.
Just my £0.02.