Introduction to mobile browser kernel WebKit

Source: Internet
Author: User

The Hybrid app is executed on the webview of the mobile operating system. We are able to embed HTML5 pages in the native page, and WebView is the container for this page. WebView is actually an embedded programming interface. WebView call the underlying browser kernel such as WebKit or Blink parsing Web pages, so the browser's kernel determines the hybrid APP HTML5 page display and user experience, the current market mainstream mobile device WebView core is basically WebKit, Contains the version number of the Apple iOS system and Android 4.4 once.

The browser kernel is also often referred to as the rendering engine. The so-called rendering, is based on descriptive narrative or definition to build a mathematical model, the process of generating images through the model. The browser's rendering engine is the module that can convert html/css/javascript text and its corresponding resource file into image results.

The kernel currently used on mobile device browsers is Webkit,blink,trident,gecko and so on, with Apple iOS platforms such as iphones and ipads primarily WebKit. Android 4.4 before Android system browser kernel is webkit,android4.4 system browser switch to chromium, kernel is WebKit branch blink. The Windows Phone 8 system Browser kernel is Trident.

Mobile Browser Kernel WebKit Introduction

WebKit is now the mainstream mobile browser rendering engine. The main design is for Web browsers to draw Web pages. WebKit is now the main engine for browsers such as Applesafari and Google Chrome (up to version number 27). According to StatCounter's browser market share survey, in November 2012, WebKit city accounted for more than 40%. It has become the typesetting engine with the largest market share, surpassing the trident used by InternetExplorer and the Gecko engine that Firefox uses. WebKit also serves as the base engine for some experimental browsers. Includes Amazon Kindle e-book reader, also used in the following mobile operating system default browser, including Apple Computer iOS, Android, BlackBerry tablet OS, Bada, Tizen and webOS. WebKit's C + + application interface provides a series of classes that allow us to display Web content on Windows, and to implement some of the features of the browser, including user-linked clicks, pre-and post-admin page lists, and historical pages that the user has visited before, and so on.

WebKit's HTML and JavaScript source code originates from KDE's khtml and KJS libraries, and is now being developed independently by KDE, Apple, Nokia, Google, Bitstream, RIM, Igalia, etc. Os X, Windows, Gnu/linux, and other Unix-like system operating systems support this project.

WebKit's WebCore and JavaScriptCore components are open source using the GNU Wide general Public License, while the other WebKit components are open source with BSD licenses.

WebKit2 published on April 8, 2010. The goal of Webkit2 is to abstract components. and provide cleaner web rendering, it will use the shell from the surrounding interface or application, create an environment so that the content of the Web page (JavaScript, HTML, typesetting, etc.) will be executed in another program (process), than WebKit. This abstraction is intended to enable WEBKIT2 to use a simpler program over and over again. Since WebKit2 has an incompatible API against WebKit, his name has been changed to WebKit2.

As of March 7, 2013, the WebKit trademark has been registered by Apple in the U.S. Patent and Trademark Office as a trademark of the company.

Chromium and Blink kernel introduction

Blink is a browser rendering engine developed by Google and Operasoftware, which Google will use as part of the chromium program. And the news was released in April 2013. This rendering engine is a branch of the WebCore component in the open Source Engine WebKit. It is also available in Chrome (28 and later), Opera (15 and later), and Yandex browsers.

Smartphones dominate the global handset market with iOS and Android systems. Apple and Google have become WebKit's biggest drivers. And to make it the biggest browser engine of the moment.

Early WebKit architectures were simpler. Multi-process is not supported at the API layer, so the hardware performance of multicore CPUs cannot be played. For this reason, Apple has expanded. Proposed a new generation of architecture WebKit2, at the same time, Google's cross-platform browser Chromium also based on the original WebKit proposed its own chromium sandbox architecture, both incompatible (see: Http://blog.csdn.net/shunzi_ _1984/article/details/6196483).

But because Apple has a lot of other words in the open source system, Google is just passively accepting it. The use of porting to achieve and the main line WebKit2 docking, which adds the complexity of chromium, but also affect the chromium architecture porting.

Obviously. Browsers are far more important to Google than Apple, and they must not be held hostage in their core areas. So Google decided to use WebKit's results to develop its own blink engine.

In April 2013, Google announced that it would develop a new self-rendering engine for Chrome, Blink, and WebKit to replace the existing browser rendering engine with blink in the next 10 weeks instead of all of its platforms. Opera then announced that it would follow Google. Discard WebKit support Blink browser engine.

Google's strategy is easy. Do the subtraction first, then do the addition.

Google has publicly indicated that Blink will not make much of an adjustment during the initial phase, but will remove 7 packages and 7,000 files very quickly from the WebKit code base. The information at the May 2013 Google I/O conference showed that their team had pulled 8.8 million lines of bloated code from Webkit, and 4.5 million of the lines were immediately abolished. At the same time, Google retains the blink and WebKit two development teams, all of which are starting to eliminate features that are deemed unnecessary.

Such a strategy ensures that the WebKit developer has a smooth transition period and adapts slowly to the new API changes.

In the latest Android4.4 KitKat version number, the WebView implementation that was originally based on Androidwebkit was replaced by chromium-based WebView implementations. In the previous section. The author also introduced that the WebView implementation based on chromium is about to become the default implementation on Android, and I have been looking forward to this major change. Now it's really happening. Applications that were previously based on the WebView interface could even work directly on the implementation without the need for any particular change.

For example, the default browser on the Android system (the browser in AOSP). The ability to work directly on new implementations without any change.

WebView is just an interface class. With some internal design changes, the detailed implementation is able to switch between the previous Android WebKit and chromium.

The new chromium implementation focuses on providing a consistent interface (in order to be compatible with previous applications). The internal rendering engine instead uses the Blink/content kernel-based engine, which provides a huge boost both in terms of functionality and performance.

Introduction to the kernel WebKit of the mobile browser

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.