Saturday, May 21, 2011

WebKit

I have been working on WebKit for quite some time and here are some basics which can help people to get around the code base. I will be talking about the gtk port and working on ubuntu 11.04. Some one was asking what is the debugger to use it is GDB.
So first to start with webkit.org will give you the code , either download the nightly builds if you are just interested in using it or checkout the code from svn or git if you want to be the tip of tree and/or contribute patches to webkit.

The directory structure of webkit has gone through quite a few modifications.
The current code base has following directories of interest in the root directory->
Source =>has the entire code base
Tools =>has the sample applications like WinLauncher,GtkLauncher etc; scripts folder has many perl scripts for building, updating,create patches and run webkit tests to name a few
Inside Source
WebCore => has the code for html parser,tokenizer, css parser, loader,graphics,svg rendering,html rendering,websockets, webworkers and any new rendering engine related features code will be found here.
JavaScriptCore => has the code for javascript parser,interpreter/runtime compiler.
There are two other important folders WebKit and WebKit2 these are basically port dependent glue code and they have the API layer that is exposed to the applications.
The essential difference between WebKit and WebKit2 is that WebKit2 is a new API layer for WebKit designed to support a split process model, where the rendering engine runs in a separate process from the application UI.
In the next few posts i will try and take up each path and explain in detail..leave me comments if you want to know about some thing in specific

1 comment:

  1. Thanks for this post. I have been on reading Webkit source code and wondering how to extract CSS parser code in my project. Any suggestion?
    The CSS source code mainly in folder Source/webcore/css, yet, i donot know how to use it, i have not sample code. Also, The css parser has many dependence on headers from other folder. Thaks.

    ReplyDelete