Hackability: Gecko vs WebKit
This post has been brewing for a while, but I've been prompted to actually write it by seeing John Gruber's offhand remark on his most recent linked list entry, about CSS gradients in WebKit:
No, it's not just him. WebKit, and Opera's layout engine Presto, raced towards Acid3 compliance in March, with both effectively reaching a photo finish on the 26th. Meanwhile, Microsoft hasn't even shipped a non-beta Acid2 passing browser¹; no surprise there. But where's Gecko, the Mozilla layout engine, the one that powers Firefox?Just me, or is WebKit racing way ahead of Gecko in terms of support for cool new stuff?
Well, to be blunt, it doesn't look as if they care much. We have one developer saying that Acid3 is basically worthless, and another (more diplomatically) stating that it's a missed opportunity and an exercise in making browsers jump hoops, rather than improve "real" functionality. As others (almost certainly more qualified than I am) have noted, this sounds a lot like the noises from Microsoft around the time of Acid2's release.
The thing is, I'm not here to kick Gecko, but to understand its problems, if it has them. Does the team's response to Acid3 mean it does? Possibly not on its own, but coupled with events like the move of Epiphany to WebKit², and the aforementioned speed of development on WebKit (and to a lesser extent Opera's Presto³) I have to wonder. Why is development there so slow?
One stated reason is that the Mozilla Foundation is on a rush to release Firefox 3, and it's certainly true that it is coming up for release. On the other hand, Apple certainly seem to be able to keep the open-source WebKit tree distinct from the version used in releases - Safari 3.1 shipped with an Acid3 score of 75 when nightlies were scoring 90-odd - so I should hope that's not the real reason. Maybe they're pulling people off the layout engine to work on the browser? That's not as stupid as it sounds for most apps, given the way the Firefox UI is set out using XUL, a markup language. Even so, it feels like a bad use of engineering. Maybe Gecko's reached that point where extending it's no fun. The language the team themselves uses, with talk of Gecko 2, makes me wonder if that's true.
I don't have answers, anyway, but I'd love to hear from people who do why Gecko is giving the appearance of stagnation, while WebKit seems full of life.
¹ Bafflingly, it seems that Microsoft develops not one, but four layout engines: Trident, for IE/Win, Tasman, originally for IE/Mac and now part of Office:Mac, and two unnamed engines, one in Word and Outlook 2007, and another in Expression Web Designer.
² Admittedly that's got contributing factors beyond merely Gecko; it sounds like the wrapper they were using to embed it (GTKMozEmbed) had some seriously nasty issues of its own.
³ I mentioned to Tom Insam that I was surprised I'd never heard of the name of this engine, but he sagely noted that, as it's not open source or embeddable, there's no reason I would have.
Comments
I also wonder if the fact that Gecko is older than WebKit (although it's not that much older than Khtml and whatever its predecessor was) is a factor.
To flip it round the other way though - why are Opera and Safari's plugin architectures so much suckier than Firefox? Personally I far prefer having AdBlock, Firebug, GreaseMonkey et al than a rendering engine that can handle what you've got to admit are some fairly esoteric tests.
Firstly, Gecko 2 does sound like it deserves the version number leap, and I can accept that there's little point trying to hack around issues in the 1.x series when a refactoring that will help things in the future is forthcoming (Opera's Presto itself came out of a rebuild of a previous in-house engine that wasn't as dynamic). Possibly WebKit quietly got this out of the way a couple of years ago and is now reaping the benefit; I don't know.
Secondly, speaking of years ago, I had a look at the history of Gecko and KHTML, and both turn ten this year. I don't think that you can really claim that age is serious part of the issue. Had I got around to editing the post, I think the point I'd have made is that the Gecko project page is pretty dry and unwelcoming; in contrast, WebKit has a lovely site, part of which is a list of project goals. One of them is "hackability":
Maybe this is the real difference between the projects, and it's to Apple's credit that, when choosing a layout engine all those years ago (my goodness, it's over five years since the Safari beta was announced) they picked what I still think was a good choice.
Finally, regarding plugins, I'm not really an expert on Opera, but Safari's lack of extendability is pretty standard for Apple. Personally I'm not massively bothered by it (I'm coping fairly well without the one input manager hack I used to use, AcidSearch), but I can see how other people do find it an important factor in their choice of browser.