Monthly Archives: April 2013

WebKitGTK+ 2.0.0

After more than two years of development the Igalia WebKit team is proud to announce WebKitGTK+ 2.0.0.

But what’s so special about WebKitGTK+ 2.0?

The WebKit2GTK+ API is now the default one. This means that it’s now considered stable from the API/ABI backwards compatibility point of view, and that the old WebKit1 API is in maintenance mode and kind of deprecated. We will maintain both APIs, but we don’t plan to work on WebKi1 other than fixing bugs.

We encourage everybody to port their existing WebKitGTK+ applications to WebKit2, although we know the WebKit2 GTK+ API is not ready for all applications yet. We will work on adding new API during next release cycle, so let us know if you are missing some API that prevents you from porting your project.

Epiphany, the GNOME Web browser, has been successfully ported to WebKit2 and uses it by default since GNOME 3.8.

What are the benefits of the WebKit2 GTK+ API?

We have talked several times about the advantages of the multi-process architecture of WebKit2, robustness, responsiveness, security, etc. All of the details of the multi-process separation are mostly transparent for the API users, bringing all those benefits for free to any application using WebKit2 GTK+. We have developed the API on top of this multi-process architecture, but also with the experience of several years developing and maintaining the WebKit1 GTK+ API, learning from the mistakes made in the past and keeping the good ideas. As a result, the WebKit2 API is very similar to the WebKi1 in some parts and quite different in others. We started from scratch with the following goals:

  • Simple and easy to use. Instead of porting the WebKit1 API to WebKit2, we decided to add new API on demand. We set some milestones based on porting real applications, adding new API required to port them. This also allowed us to design the API, not only thinking about what we want or need to expose, but also how the applications expect to use the API.
  • Consistency. We have tried hard to be consistent with the names of the functions, signals and properties exposed by the API.
  • Flexibility. When possible, the API allows to use your own implementation of some parts that can be adopted to different platforms. So, you can use your own file chooser, JavaScript dialogs, context menu, print dialog, etc.
  • It works by default. For all those features where a custom implementation can be used, there’s a default implementation in WebKit that just works by default.
  • Unit tests. We have enforced all new patches adding API to WebKit2 GTK+ to include also unit tests, so the whole API is covered by unit tests.

Let’s see the major changes and advantages of this new WebKi2 API.

WebKitWebView is a scrolling widget

For API users this means that WebKitWebView should not be added to a GtkScrolledWindow, the widget is scrollable by itself. Actually this is also the case of the WebKitWebView in WebKit1, but some hacks were introduced to allow the widget to be used inside a GtkScrolledWindow. This caused a lot of headaches due to the synchronization between the internal scrolling and the GTK+ scroll adjustments. So now the main scrollbars are also handled by the WebKitWebView which, among other things, fixed the problem of the double scrollbars in some web sites.

Double scrollbar issue

Embedded HTTP authentication dialog

The default implementation of the HTTP authentication embeds a dialog in the WebView instead of using a real GtkDialog. It’s also integrated with the keyring by default using libsecret.

HTTP authentication dialog

GTK+ 2 plugins (flash)

Plugins also run in a different process that is built with GTK+ 2 to support the most popular plugins like flash that still use GTK+ 2.

MiniBrowser showing a youtube video using flash plugin

Web Inspector

The Web Inspector works automatically in both docked and undocked states without requiring any API call.

Inspector docked

It also has support for remote inspecting.

Remote inspecting

Accelerated compositing

Accelerated compositing is always enabled in WebKit2.

Poster circle

Future plans

During the next release cycle we’ll work on fixing bugs and completing the API, see our RoadMap for further details, but we’ll also explore some other areas not directly related the the API:

  • Multiple web processes support
  • Sandboxing
  • Network Process

High five

Time for Midori 0.5.0. I’ll say upfront the big number 5 doesn’t convey any major amazements or surprises. What this number does mean is two things that will unfold their true meaning in the near future: We’re adding support for WebKit2 behind the scenes, much of which didn’t make the feature freeze. Another behind the scenes feature is improved extension loading, which will enable extensions in private browsing or in app mode.

A small highlight is in fact the Cookie Security Manager. What’s hiding behind this name you may wonder. Accepting, or rejecting and managing cookies per site as they come in real-time with infobars. The perfect augmentation for Cookie Manager and of course nice in combination with Clear Private Data and Adblock.

On the command line and kiosk use case front, -e or –execute has become a great deal more powerful. It’s now trivial to update any settings at startup or during runtime, as well as enabling or disabling extensions.

The speed dial has always been a cause of heated discussions. Many people want to have a custom page in new tabs, others want just the bare empty page to keep focussed on the task at hand (or even the subjective efficiency of not loading the speed dial). So we finally allow configuring what new tabs display. It’s now also possible to use speed dial as your homepage, from a bookmark or even the command line. about:version lists the new alias URLs, including about:dial and about:home.

There’s more treats to be found, such as completely configurable Mouse Gestures, waiting for a GUI to be added, maybe a good starting point for a new contributor. And History List finally supports ColorFul Tabs fully.

As of this release, any proxy server type supported by libproxy will in fact be accepted. The server including the protocol can be set via its curl-esque syntax in the preferences.

So download Midori v0.5.0 (1.1 MB) (MD5) (ChangeLog) already!

Also Midori v0.5.0 32-bit Portable for Windows (32 MB) or Midori v0.5.0 32-bit Installer for Windows (34 MB) now. You are welcome to join #midori on irc.freenode.net and help testing pre-releases for Windows. You can make the difference by helping out!