WebKit for Windows gets Cairo support

Brent Fulgham, whose work I’ve already mentioned now has the WebKit/Cairo Windows port up and running.

This is the “native Windows port” a lot of people have been waiting for (though it’s technically no more or less native than Safari’s WebKit).

WebKit/Cairo on Windows

The taxonomy of the new port places it very close to Apple’s WebKit for Windows, which will remain the default build configuration. Both share the same foundation libraries, networking stack and build system.

The only difference is that the proprietary, non-redistributable CoreGraphics has been conditionally replaced (#16979) with the Cairo-based graphics backend developed and maintained by the WebKit GTK+ team. This conveniently lets us maintain the new code as an officially supported sub-port of WebKit without much additional infrastructure.

The result will be a WebKit Windows build that’s open and freely re-distributable for use in Open Source and proprietary/commercial applications (as long as any modifications to WebKit are made available), not just Safari.

This serves as validation of WebKit’s new porting layer, the modularity of the Windows port (Adam Roben and the Win team, you rock!) and the Cairo graphics backend.

Some technical details:

  • Provides C++ and COM APIs including a full COM DOM binding. The interfaces aren’t yet final and are expected change.
  • The Cairo backend will be used for on-screen rendering as well as printing, including native PDF output.
  • Cairo is used for rendering all content including HTML, canvas and SVG.
  • Will continue to use Apple’s Open Source CF and CFNetwork libraries for other functionality.
  • The CF/CFNetwork libraries will need to be re-built from the available APSL 2.0 source releases. There may be small differences from the Safari binaries that need to be taken into account.
  • Still needs work on basics like text rendering and build system integration. Patches welcome. Nothing available for end users yet.

For WebKit/GTK+ fans, the good news is that this work should help bring more developers and testers to the shared Cairo graphics backend. Everyone wins!