Changes between Version 8 and Version 9 of WebKit2


Ignore:
Timestamp:
Apr 9, 2010 4:42:54 AM (10 years ago)
Author:
mjs@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKit2

    v8 v9  
    33WebKit2 is a new API layer for WebKit designed from the ground up to support a split process model, where the web content (JavaScript, HTML, layout, etc) lives in a separate process from the application UI. This model is very 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 of WebKit to use it.
    44
     5== Why is it named WebKit2? ==
     6
     7The somewhat pedestrian reason is that it's an incomptible API change from the original WebKit, so it will probably be installed as something like /System/Library/WebKit2.framework on Mac.
     8
    59== C API: ==
    610
    7 WebKit2 will provide a stable C-based non-blocking API that is mostly platform agnostic.  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:
     11WebKit2 will provide a stable C-based non-blocking API that is mostly platform agnostic.  In order to achieve the goal of a nonblocking API, several techniques are used to make the API usable while still providing a comprehensive set of features to the embedder. These techniques include:
    812  - Notification style client callbacks (e.g. didFinishLoadForFrame)
    913    These inform the embedder that something has happened, but do not give
     
    3943    a HWND. On the Mac, it inherits from NSView.
    4044
     45Note that the requirement to be fully nonblocking requires an incompatible API break - many features of most existing WebKit APIs cannot be fulfilled in a nonblocking manner. Since we needed the API break anyway, we also took advantage of the opportunity to clean up and simplify the API.
     46
    4147== Port-Specific APIs ==
    4248
     
    6369
    6470
    65 == How is This Different from Chromium? ==
     71== How is This Different from Chromium WebKit? ==
    6672
     73Chromium takes a different approach to multiprocess:
     74
     75[[Image(chromium-webkit-stack.png)]]
     76
     77Notice that in this case, the the process boundary is *above* the API boundary. Chromium WebKit does not directly provide a multiprocess framework, rather, it is optimized for use as a component of a multiprocess application, which does all the proxying and process management itself. The Chrome team at Google did a great job at trailblaizing multiprocess browsing with Chrome. But it's difficult to reuse their work, because the critical logic for process management, proxying between processes and sandboxing is all part of the Chrome application, rather than part of the APU layer. So if another WebKit-based application or another port wanted to do multiprocess based on Chromium WebKit, it would be necessary to reinvent or cut & paste a great deal of code.
     78
     79That was an understandable choice for Google - Chrome was developed as a secret project for many years, and is deeply invested in this approach. Also, there are not any other significant API clients. There is Google Chrome, and then there is the closely related Chrome Frame.
     80
     81WebKit2 has a different goal - we want process management to be part of what is provided by WebKit itself, so that it is easy for any application to use. We would like chat clients, mail clients, twitter clients, and all the creative applications that people build with WebKit to be able to take advantage of this technology. We believe this is fundamentally part of what a web content engine should provide.
    6782
    6883
     
    7893 * Run Loops
    7994 * Work Queues
     95
     96== Current Status ==
     97
     98WebKit2 should be considered an early technology demo. It is not yet production quality. But it's possible to try it out and see how it works at this early stage.
     99
     100== How to try it Out ==
     101
     102Use the build-webkit2 command to build everything. Then you should be able to run the Minibrowser demo. WebKit2 will not work with the shipping version of Safari. Because WebKit2 is an incompatible API break, it requires a custom testbed to run it.