WebKit Introduction and summary (1)

Source: Internet
Author: User

1. Introduction to WebKit

WebKit is an open-source web browser engine. The initial code comes from KDE's khtml and KJS (both open-source ). Apple has done a lot of optimization and improvement work on the basis of WebKit. At this time, Apple WebKit has already had many differences with WebKit, and finally developed the famous safari, it can be said that safari is a very successful product, but Safari is not open source code.

WebKit-based browser products include Apple's Safari and iPhone, Google's chrome and Android, Nokia's s60, and aoyou 3 (maxthon3 );

WebKit currently supports html4/5, css1/2, dom1/2, HTTP/file, GIF/JPEG/PNG, XML, SVG, rss2.0, etc;

Similar browser engines include: Trident (ie kernel), gechko (Netscape, Mozilla and Firefox kernel), presto (opera kernel, not free), Tasman (ie for Mac kernel ), and so on. Because of its powerful functionality, fast speed, and free, WebKit is very popular.

Ii. databases used:
In addition to the platform-related libraries, WebKit uses the following major background libraries:

ICU: International Components for Unicode, a mature and widely used set of global Unicode support software for C/C ++ and Java libraries;

XSLT: Extensible Stylesheet Language transformation, W3C-defined specification for XML document conversion;

Curl: a command line data transmission tool that uses the URL syntax. It is based on libcurl.

SQLite: SQLite is an SQL database engine that implements the sql92 standard. It can combine database engines and interfaces in a library to store all data in a single file;

Gperf: A perfect hash function generator;

Flex: Fast Lex, fast lexical analysis generator;

Bison: syntax analysis generator. It can convert a annotated context-independent syntax into lalr or GLR syntax;

Enchant: a spelling check database that provides spelling check, correction, and other functions for words;

Iii. Code directory structure

Webkittools
Some programs that test WebKit implementation functions;

Webkitlibraries
Library used by WebKit and system call interface definition;

Webkitexampleplugins
Some plug-ins from Netscape, such as input methods, animations, and cocoa environments;

Webkitsite: saves

WebKit
This directory is located at the top of WebKit and defines some application-related interfaces. Therefore, it is platform-related. Each subdirectory is a complete implementation of the corresponding platform:

Cf: Core Foundation, system-level C language API interface on Mac OS X;

Win: windows;

Mac: Mac OS X;

Qt: Q toolkit, which has been acquired by Nokia;

GTK: gimp toolkit;

Scripts: Some scripts. Currently, there is only one WebKit script program;

Chromium: Google Chrome development platform;

Wx: wxwindows, a portable C ++ and Python GUI toolkit, by Julian smart;

Haiku: an open-source OS, which comes from BEOs and is the first version of 2001;

EFL: Enlightenment Foundation libraries, enlightenment platform;
WebCore
The core part of WebKit defines browsing-related data I/O, page loading, script analysis, UI organization, event processing, network analysis, and platform-related implementation.

XML: Provides XML-related content;
HTML: provides HTML-related content. The canvas directory under it defines the 3D canvas and webgl library-related content;
WML: Wireless markup language;
CSS: Provides CSS-related content;
DOM: Provides dom-related content;
Editing: Edit related functions;
Page: browsing related content is not a page we see. In a browser session, there is only one instance;
Rendering: page rendering content. After DOM tree analysis on page scripts, these elements must be rendered and displayed;
Notification: event communication between internal modules;
History: Page browsing history related content;
SVG: The vector graphics function, which has options: -- SVG;
MathML: W3C is a standard for mathematical expressions on webpages. It has the compilation option -- MathML;
Loader: Load resources and cache;
Workers: "web workers provides a method for running scripts on Web Front-end web pages in background processes. Once it is created, Web workers can send a task request to the task pool through postmessage (), and then use postmessage () return the message to the event handler specified by the creator (capture through onmessage ).
The Web workers process can process tasks without affecting the user interface, and it can also use XMLHttpRequest to process I/O, regardless of whether the responsexml and channel attributes are null ."
Storage: Web storage-related content. Storing page data can be seen as a cookie upgrade;
Websockets: content related to network connections;
Bridge: mainly including npplugin (Netscape plugin) interface access and other content;
Binding: the function of binding Dom to javascriptcore;
Accessibility: Provides controls related to availability. Accessibility is often used to describe the function support for some special groups of people, such as the disabled and the elderly;
ICU: contains the ICU header files specially compiled for Mac OS X 10.4;
Platform: provides specific implementation of the platform, such as Event Response, localization, and network connection;
Plugins: plug-in related content;
Forwardingheaders: header file;
INSPECTOR: Inspector is a tool provided by WebKit to view the webpage source code, DOM tree, and debug scripts. This directory contains the content to implement this function;
Deployments: configuration files related to the X code environment;
English. lproj: localized file;
Manual-tests: HTML file used for testing;
Resources: resource, icon;
WebCore. Gyp: project file. Gyp (generate youre project) is a script tool developed by Google, which is also written in Python. It uses a set of custom rules to generate various engineering files;
WebCore. vcproj: VC project file;
WebCore. xcodeproj: X code project file;
WTF: Apple's c ++ library, which can be viewed as a simplified STL; sunspider
A JavaScript detection program that does not detect Dom or other browser APIs. It is only used to detect JavaScript.
Javascriptglue

Javascriptcore: javascript-related content, including the script interpreter, analyzer, and execution program;

Planetwebkit: a flexible RSS reader; planet on WebKit: One-Stop WebKit development and dynamic information;

Iv. Architecture

WebKit consists of three parts: WebKit, WebCore, and javascriptcore. The basic architecture of WebKit, coupled with the library used, is as follows:

 

 

 

 

Note that some modules are more prominent than the following modules, because this module is directly related to the following modules. For example, The WebCore module is directly related to the javascriptcore, libraries, and platforms modules.

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/spacetiller/archive/2010/08/03/5784461.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.