Case studies: Porting from Mozilla® Gecko to WebKit
guide prepared January 2009
by Nuanti Ltd.
This report chronicles some of the community work we've done at Nuanti to restore and enhance functionality in GNOME applications that were limited by the Mozilla Gecko browser engine.
In some cases, the issues were severe enough that the applications were dropped by distributors, leading to popular and successful software failing to reach end-users — a worst-case scenario for any Open Source project.
For each of these applications, Nuanti engineers were available to replace (or assist in replacing) the faulty Gecko component with WebKit GTK+, restoring full functionality as well as introducing new capabilities and enhancing application performance.
Devhelp
Devhelp, an API documentation browser for GTK+, is an essential tool for any developer on the GNOME desktop project. By early 2008, Devhelp was suffering from a series of critical issues that, when combined, made hacking on GNOME a little more tedious for everyone.
Symptoms
- Instability (crashes, hangs) due to Mozilla Gecko engine
- Slow and CPU-consuming application start-up time due to Mozilla Gecko engine
- Constant patching required by vendors due to ever-changing Mozilla Gecko developer SDK
- Restricted portability due to limitations in Mozilla Gecko engine
The port
We ported Devhelp to WebKit over the space of a few weeks, working on and off and consulting users for feedback on our changes as we went. Development was done on a NDesk git branch of the Devhelp GNOME SVN repository to avoid disruption to users.
The port was a success and the git branch was merged to SVN in r1008. All issues were resolved, and WebKit brought additional support for documentation hard-copy printing, text scaling and zooming. Ports have since been made to Mac OS X and Windows thanks to the increased portability afforded by the new WebKit engine.
Monodoc
Monodoc is the Mono documentation viewer.
Symptoms
- Application removed from Linux distributions including Debian and Ubuntu as it was no longer buildable against Mozilla Gecko
The port
Our Monodoc port to WebKit was complete in a matter of hours. Development was done directly in the mono-tools SVN repository. There was no risk of disruption to users since Monodoc deploys a light runtime-pluggable browser abstraction layer and progress was rapid thanks to the high-level C# language Monodoc is written in.
The port was a success and Monodoc was added back into the Linux distributions from which it was removed within a few months. All issues were resolved, and WebKit brought additional support for text scaling and zooming.
Blam
Blam is a GTK+ RSS feed reader.
Symptoms
- Application removed from Linux distributions including Debian and Ubuntu as it was no longer buildable against Mozilla Gecko
The port
We ported Blam to WebKit in a couple of days. Development was done directly in the Blam GNOME SVN repository. There was little risk of disruption to users since the application was crippled to the point of unusability by Gecko prior to the port, and progress was rapid thanks to the high-level C# language Blam is written in.
The port was a success and Blam was added back into Linux distributions within a few months. All issues were resolved, and WebKit brought additional support for RSS feed hard-copy printing and text scaling and zooming.
After completing the port, we took a few extra moments to port Blam over to NDesk D-Bus for IPC. Hand in hand with the WebKit modifications, this change removed the last portion on unmanaged code from Blam, making it not only portable but also architecture-independent (Build Once Run Everywhere) for the first time.
Summary
In all cases, porting to WebKit yielded benefits across the board for the majority of users and developers. In all cases, the port we developed was adopted and released by the Open Source project in question and included in the subsequent commercial release where applicable. In all but one case (Monodoc), the pre-existing Mozilla Gecko support was removed entirely from the project to reduce the high maintenance overhead associated with Mozilla Gecko.
Find out more
Nuanti Ltd. is a software firm that develops solutions built around WebKit. Porting and development of open and commercial software that embeds web content is one of our core competencies and we invite anyone looking for these services to get in touch.
If you found these case studies useful, look out for further reports on nuanti.com covering our involvement in the ongoing port of Epiphany, Epiphany Extensions and the Yelp documentation viewer to WebKit.