wiki:SourceDirectory

Source is basically made up of the following:

JavaScriptCore

Web Template Framework

WTF is an internal library, which contains various utilities used as part of the JavaScriptCore and WebCore. Example of such classes are Vector, HashMap, RefCounted (classes to that implements multiple ownership), RefPtr, etc...

YARR! or Yet Another Regex Runtime

This is a faster replacement for our regexp engine.

JavaScriptCore

The JavaScript engine. This is completely cross-platform (though there are various platform-specific JIT backends). This can be used as a separate entity from the rest of WebKit.

JSC is split in different directories inside the directory. Those directories include dfg, assembler and jit.

The API directory contains the JavaScriptCore C API.

WebCore

This is the core of WebKit (WebKit Core). It contains the cross-port code of WebKit as well as some code that sits on top of the underlying libraries.

DOM

DOM is where the object related to the Document Object Model lives. Most of the DOM tree objects are here, the rest being in the specialized directory (like HTML for HTML elements).

HTML

This directory holds everything related to HTML. There are the different elements (HTMLIFrameElement for <iframe>) as well as the HTML parser and the rendering logic for canvas.

CSS

This hosts the code that handles CSS. There is the CSSParser and the supporting objects for the representing the parsed output (StyleSelector for example). It also includes CSSStyleSelector which is responsible to apply the CSS information on the DOM tree to create the computed style.

SVG

This directory holds the classes involved in the SVG DOM. The root class for the SVG DOM is SVGElement.

loader

The loader are involved whenever some resources need to be loaded from the network. For more information about the different loader, see Darin Adler's reply on webkit-help or Adam Barth's major object diagram.

Inside loader/appcache resides the offline web-application mechanism.

rendering

This contains all the code related to rendering a page. The RenderTree objects live in this directory. The root class of any render tree object is RenderObject and each objects that needs a specialized behavior has a custom class. For more information about rendering, check out WebCoreRendering.

Some notable directories there are:

  • style which contains the computed style as present in the RenderTree.
  • svg which contains the SVG classes involved in rendering

bindings

This is where the JavaScript bindings live. Most of the JavaScript bindings are auto-generated from the IDL files using the script contained in scripts.

What is present in this directory is what is not auto-generated because it needs special attention (same origin checks for example) or because our scripts do not support autogenerating the code.

Each JS engine has its own directory for its own bindings: JSC and V8. There is also a common directory for bindings that can be shared between the engine.

platform

Each platform has specific logic here. It is meant to be an abstraction layer on top of the underlying port's library. The OS-specific and rendering (Skia, CG, Cairo) backends are implemented in the different subdirectories.

Covered in this directory are:

  • graphics
  • networking
  • text
  • image decoding / encoding
  • sql
  • ...

accessibility

bridge

editing

fileapi

history

inspector

manual-tests

mathml

notifications

page

plugins

storage

testing

webaudio

websockets

workers

xml

FIXME: Fill the details about those directories.

WebKit

The front-end layer used by applications. Each GUI platform (windows, Cocoa, Gtk+, Qt) provides a different implementation of this. Generally, the goal is to make this a client to the WebCore layer, basically just 'shimming' WebCore to the specific Os/Platform that will be using WebKit.

The remaining projects are autogenerated bindings to the DOM, etc.

(Taken from Brent's email to webkit-help)


The WebKit source tree also contains the following project:

JavaScriptGlue

This is a legacy component needed for compatibility with some older Mac OS X software. It will eventually be retired and should not receive any new development.

(Information taken from a Bugzilla comment by Darin)

Last modified 6 years ago Last modified on Jul 12, 2011 1:58:09 PM