Friday, April 9th, 2010

WebKit 2: Baking split process model into the renderer

Category: Browsers, WebKit

Anders Carlsson and Sam Weinig announced that Apple has been working on “WebKit2” for awhile, and it bakes in a split process model a la Chrome:

This is a heads-up that we will shortly start landing patches for a new WebKit framework that we at Apple have been working on for a while. We currently call this new framework “WebKit2”.

WebKit2 is designed from the ground up to support a split process model, where the web content (JavaScript, HTML, layout, etc) lives in a separate process. This model is similar to what Google Chrome offers, with the major difference being that we have built the process split model directly into the framework, allowing other clients to use it.

The documentation lists out the high level API:

One goal of WebKit2 is to provide a stable C-based non-blocking API. In order to achieve the goal of a non-blocking API, several techniques are used to make the API usable while still providing a comprehensive set of features to the embedder. These techniques include:

  • Notification style client callbacks (e.g. didFinishLoadForFrame) These inform the embedder that something has happened, but do not give them the chance to do anything about it.
  • Policy style clients callbacks (e.g. decidePolicyForNavigationAction) These allow the embedder to decide on an action at their leisure, notifying the page through a listener object.
  • Policy settings (e.g. WKContextSetCacheModel, WKContextSetPopupPolicy) These allow the embedder to opt into a predefined policy without any callbacks into the UIProcess. These can either be an enumerated set of specific policies, or something more fine-grained, such as a list of strings with wildcards.
  • Injected code (e.g. WebBundle) Code can be loaded into the WebProcess for cases where all the other options fail. This can useful when access to the DOM is required. [Planned, but not currently implemented]

There have been a few comments here and there that the Apple folk haven’t been as vocal and people wondered what they were hacking on…. maybe now we know!

Posted by Dion Almaer at 1:58 am
1 Comment

4.8 rating from 22 votes

1 Comment »

Comments feed TrackBack URI

Well, that’s pretty nice. Let’s hope that it will, in fact, really be available for everyone.

Comment by Veej — April 9, 2010

Leave a comment

You must be logged in to post a comment.