Android Browser (i): WebKit Project with Chromuim project

Source: Internet
Author: User
Tags html interpreter

Reprint Please specify the original address:http://blog.csdn.net/u012637501/article/details/46878253 At present, the common kernel of mobile device browser is Webkit,blink,trident,gecko etc., of which the Apple iOS platform such as iphone and ipad are mainly webkit,android 4.4 Before the Android system browser kernel was webkit,android4.4 system browser switched to chromium ( kernel is WebKit branch blink), Windows Phone 8 System Browser Kernel is Trident. 1.WebKit Project (1) Project Introductionthe WebKit project isApple Inc. is2005launched a new open source project, is the core of the Safari browser, is currently the mainstream browser rendering engine. The WebKit project has the advantages of clear structure and easy maintenance, WebKit is simple and flexible and easy to introduce new porting features, so it is quickly called the mainstream rendering engine. (2) WebKit architectureWebCore part: Contains the WebKit shared part which is currently used by various browsers, is the basic part of loading and rendering Web page, including HTML interpreter, CSS interpreter, etc. JavaScriptCore Engine: Is the default JavaScript engine in WebKit. In Google's Chromium project, it was replaced with the V8 engine.
WebKit Ports Part: Is the non-shared part of the WebKit red, belonging to the WebKit transplanted module. Because different browsers make platform differences, dependent third-party libraries and requirements different, resulting in a variety of webkit versions. WebKit Embedded interface: Refers to a layer of binding and embedded programming interfaces on the WebCore and JavaScript engines that can be called by various browsers.
2.Chromuim Project (1) Project IntroductionC The Hromuim Project is a new project created by Google with the Apple Open Source project WebKit as the core, the goal of which is to create a fast browser that supports many operating systems. On the basis of the Chromium project, Google has released its browser product, Chrome. Unlike the Safari browser, which uses WebKit as the kernel, chromium itself is a browser, not a chrome kernel, and the Chrome browser uses the WebKit kernel before it is detached from the WebKit project. In April 2013, Google announced that it would replicate from WebKit and operate the Blink project, which is the kernel currently used by Android4.4 and above system browsers. (2) Blink kernelWhen the Blink project was detached from WebKit itself, it originated from the WebKit project, except that Google removed the code for porting other than the Chromium browser, and added a lot of new technology to the Blink project. Some of the techniques are: implementing an IFRAME across processes. The IFRAME allows other pages to be embedded in the page, creating a separate sandbox process for the IFRAME to address potential security issues. Reorganize and modify WebKit's network-related architectures and interfaces.
Bring the DOM tree into the JavaScript engine.
Performance optimizations for a variety of technologies, including graphics, JavaScript engines, memory usage, compiled binary file sizes, and more.
(3) Chromium browser structure based on Blink engineDescribing the architecture and main modules of the chromium, Blink is just one of the modules, and it also has numerous chromium modules, including gpu/commandbuffer (Hardware acceleration architecture), V8 JavaScript engine, sandbox model, CC ( Chromium synthesizer), IPC, UI, etc. "Content module" and "Content API (interface)"
The "content module" and "Content API" hide the following rendering mechanism, security mechanism and plug-in mechanism, and provide an interface layer, which is an abstraction of the function of the rendered Web page by chromium, which is called by the internal Chromium browser and the content shell. , which is the module used to render the content of the Web page. "Chromium browsing and" Content Shell "
"chromium browsing and" content Shell "are the two" browsers "built on the Content API, and the chromium has browser completion capabilities. The content shell is a simple "shell" that is packaged with the content API, and users can use content modules to render and display Web page content. Android WebView Module
The Android WebView module is intended to take advantage of the CHROMIUIM implementation to replace the original Android system's default WebView. 3. Browser kernel (1) Introduction to the kernelIn the browser, there is one of the most important module, its main function is to transform the page into a visual image results, this is the browser kernel, also known as the rendering engine. Rendering is the process of building a mathematical model based on a description or definition and generating an image from a model. The browser's rendering engine is the module that can convert html/css/javascript text and its corresponding resource file into image results.
(2) kernel featuresA rendering engine mainly includes HTML interpreter, CSS interpreter, layout and JavaScript engine, drawing and so on. HTML interpreter: An interpreter that interprets HTML text, the main purpose of which is to interpret HTML text as a DOM (Document Object Model) tree, which is a way of representing a document.
CSS interpreter: An interpreter for cascading style sheets, the main purpose of which is to compute style information for each element object in the DOM, thus providing the infrastructure for computing the layout of the last page.
Layout: After the DOM is created, WebKit needs to combine the same information of the element objects, calculate the layout information of their size and position, and form an internal representation model that can represent all of this information.
JavaScript engine: Using JavaScript code can modify the content of the Web page, can also modify the CSS information, JS engine can interpret the JS code and through the DOM interface and Cssom interface to modify the content and style information, so as to change the rendering results.
Drawing: Use the graphics library to plot the nodes of each page after the layout is calculated as graphical results.

Reference:(1)http://mogoweb.net/blog/2014/01/16/analysis-of-android-4-4-webview-implementation/(2) Ju Yongsheng-The insider of WebKit technology

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Browser (i): WebKit Project with Chromuim project

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.