The Firefox web browser has been ported to the Qt widget toolkit through a collaborative development effort by Nokia and Mozilla. This port will facilitate much stronger visual integration between Firefox and KDE-based Linux environments and will also simplify the process of bringing Firefox to mobile platforms that support Qt.

When Mozilla was developing Firefox 3, the browser's underlying Gecko rendering engine adopted the Cairo drawing library across all platforms. In order to port Firefox to Qt, the developers had to create a new QPainter backend for Cairo. Mozilla's Vladimir Vuki?evi? contributed to that effort and wrote about some of the first steps several months ago. "I hope that in the future the Qt port will be a toplevel supported Gecko port, alongside gtk2, Win32, and OSX, but there's still a bunch of work needed to make that happen," he wrote.

The project has moved forward at a rapid pace and is now a lot more mature. A binary build that is fully compatible with Qt 4.4 was made available at the Maemo web site last week. The source code is available from a branch in Mozilla's byzantine version control repository. Mozilla is actively working to merge the branch back into the main code base, but says that it won't be displacing GTK+ support—both toolkits will be supported going forward.

I tested the binary build in openSUSE 11 with KDE 4. I ran into some rendering bugs in the user interface, but didn't encounter any problems with HTML rendering. It's not ready for mainstream use yet, but it looks like it's getting close.

Although the Qt toolkit already includes Apple's powerful WebKit HTML rendering engine, Nokia still sees a lot of value in supporting Firefox. During the recent Akademy conference, Nokia developer Oleg Romaxa told KDE's Dot news site that Firefox offers a better browsing experience and that Nokia might have some competitive concerns about Apple's control over WebKit.

"Nokia will use the best browser for the job," he said. "Currently, we cannot make a full-featured and integrated browser with WebKit in mobile. But with Mozilla, we do not need to do anything, we can take existing models and API's which are available. Also, NPAPI support is already in the Gecko web rendering engine. They are also concerned that WebKit is, to some extent, controlled by Apple, who are in competition to Nokia with their iPhone."

Nokia recently acquired Trolltech, the software company behind the Qt toolkit. The company plans to leverage the portability of Qt to provide third-party software developers with a way to create applications that can run on a broad spectrum of hardware devices, ranging from desktop computers to phones. Porting Firefox to Qt will ensure that the open source web browser is available across the entire ecosystem of Qt-compatible mobile platforms.

Qt is already supported on several flavors of mobile Linux and gained support for Windows Mobile in its latest release. Nokia is also bringing Qt to Maemo, its Linux-based software platform that's used on Internet Tablet devices.

Mozilla aggressively reduced Firefox's memory footprint during the Firefox 3 development cycle. This improvement significantly reduced the browser's bloat and made it viable in resource-constrained environments. Mozilla has also launched the Fennec project, which is exploring user interface concepts for a mobile Firefox browser and is also undertaking some experimentation with cloud computing so that users can have a seamless Firefox experience across desktop and mobile devices.

Firefox is looking like a very strong contender in the mobile space, so it's not surprising that Nokia wants to ensure that it is supported on its future mobile devices. Better integration between KDE and Firefox is also a feature that Linux users have wanted for a long time, so it is a very welcome side effect of this project. Some work still remains before Firefox is rock-solid on Qt, but the progress so far is impressive.