HOME

TheInfoList



OR:

WebKit is a
browser engine A browser engine (also known as a layout engine or rendering engine) is a core software component of every major web browser. The primary job of a browser engine is to transform HTML documents and other resources of a web page into an interacti ...
primarily used in Apple's
Safari A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
, as well as all web browsers on iOS and iPadOS. WebKit is also used by the PlayStation consoles starting with the PS3, the Tizen mobile operating systems, the Amazon Kindle
e-book An ebook (short for electronic book), also spelled as e-book or eBook, is a book publication made available in electronic form, consisting of text, images, or both, readable on the flat-panel display of computers or other electronic devices. Al ...
reader, Nintendo consoles starting with the 3DS Internet Browser, GNOME Web, and the discontinued BlackBerry Browser. WebKit started as a fork of the KHTML and KJS libraries from KDE, and has since been further developed by KDE contributors,
Apple An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
,
Google Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
,
Nokia Nokia Corporation is a Finnish multinational corporation, multinational telecommunications industry, telecommunications, technology company, information technology, and consumer electronics corporation, originally established as a pulp mill in 1 ...
, Bitstream, BlackBerry,
Sony is a Japanese multinational conglomerate (company), conglomerate headquartered at Sony City in Minato, Tokyo, Japan. The Sony Group encompasses various businesses, including Sony Corporation (electronics), Sony Semiconductor Solutions (i ...
, Igalia, and others. WebKit supports
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
,
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, and various other
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s. On April 3, 2013, Google announced that it had forked WebCore, a component of WebKit, to be used in future versions of
Google Chrome Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
and the Opera web browser, under the name Blink. Its
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
engine, JavascriptCore, also powers the Bun server-side JS runtime, as opposed to V8 used by Node.js, Deno, and Blink. WebKit's C++
application programming interface An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
(API) provides a set of classes to display Web content in
windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and implements browser features such as following links when clicked by the user, managing a back-forward list, and managing a history of pages recently visited. WebKit is
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
and available under the BSD 2-Clause license with the exception of the WebCore and
JavaScriptCore WebKit is a browser engine primarily used in Apple's Safari web browser, as well as all web browsers on iOS and iPadOS. WebKit is also used by the PlayStation consoles starting with the PS3, the Tizen mobile operating systems, the Amazon ...
components, which are available under the GNU Lesser General Public License. As of March 7, 2013, WebKit is a trademark of Apple, registered with the U.S. Patent and Trademark Office.


Origins

The code that would become WebKit began in 1998 as the ''KDE HTML'' ( KHTML) layout engine and ''KDE JavaScript'' ( KJS) engine. The WebKit project was started within Apple by Lisa Melton on June 25, 2001, as a fork of KHTML and KJS. Melton explained in an e-mail to KDE developers that KHTML and KJS allowed easier development than other available technologies by virtue of being small (fewer than 140,000 lines of code), cleanly designed and standards-compliant. KHTML and KJS were ported to
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
with the help of an adapter
library A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
and renamed WebCore and JavaScriptCore. JavaScriptCore was announced in an e-mail to a KDE
mailing list A mailing list is a collection of names and addresses used by an individual or an organization to send material to multiple recipients. Mailing lists are often rented or sold. If rented, the renter agrees to use the mailing list only at contra ...
in June 2002, alongside the first release of Apple's changes. According to Apple, some changes which called for different development tactics involved macOS-specific features that are absent in KDE's KHTML, such as
Objective-C Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
, KWQ (pronounced "quack") an implementation of the subset of Qt required to make KHTML work on macOS written in Objective C++, and macOS calls.


Split development

The exchange of code between WebCore and KHTML became increasingly difficult as the code base diverged because both projects had different approaches in coding and code sharing. At one point KHTML developers said they were unlikely to accept Apple's changes and claimed the relationship between the two groups was a "bitter failure". They claimed Apple submitted their changes in large patches containing multiple changes with inadequate documentation, often in relation to future additions to the codebase. Thus, these patches were difficult for the KDE developers to integrate back into KHTML. Also, Apple had demanded that developers sign non-disclosure agreements before looking at Apple's source code and even then they were unable to access Apple's bug database. During the publicized "divorce" period, KDE developer Kurt Pfeifle (''pipitas'') posted an article claiming KHTML developers had managed to backport many (but not all) Safari improvements from WebCore to KHTML, and they always appreciated the improvements coming from Apple and still do so. The article also noted Apple had begun to contact KHTML developers about discussing how to improve the mutual relationship and ways of future cooperation. In fact, the KDE project was able to incorporate some of these changes to improve KHTML's rendering speed and add features, including compliance with the Acid2 rendering test. Following the appearance of a story of the fork in the news, Apple released the source code of the WebKit fork in a public revision-control repository. The WebKit team had also reversed many Apple-specific changes in the original WebKit code base and implemented platform-specific abstraction layers to make committing the core rendering code to other platforms significantly easier. In July 2007, '' Ars Technica'' reported that the KDE team would move from KHTML to WebKit. Instead, after several years of integration, KDE Development Platform version 4.5.0 was released in August 2010 with support for both WebKit and KHTML, and development of KHTML continued until 2016 before it was officially discontinued in 2023.


Open-sourcing

On June 7, 2005, Safari developer Dave Hyatt announced on his
weblog A blog (a Clipping (morphology), truncation of "weblog") is an informational website consisting of discrete, often informal diary-style text entries also known as posts. Posts are typically displayed in Reverse chronology, reverse chronologic ...
that Apple was open-sourcing WebKit (formerly, only WebCore and JavaScriptCore were open source) and opening up access to WebKit's revision control tree and the issue tracker. In mid-December 2005, support for Scalable Vector Graphics (SVG) was merged into the standard build. WebKit's JavaScriptCore and WebCore components are available under the GNU Lesser General Public License, while the rest of WebKit is available under the BSD 2-Clause license.


Further development

Beginning in early 2007, the development team began to implement Cascading Style Sheets (CSS) extensions, including
animation Animation is a filmmaking technique whereby still images are manipulated to create moving images. In traditional animation, images are drawn or painted by hand on transparent celluloid sheets to be photographed and exhibited on film. Animati ...
, transitions and both 2D and 3D transforms; such extensions were released as working drafts to the
World Wide Web Consortium The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
(W3C) in 2009 for standardization. In November 2007, the project announced that it had added support for media features of the
HTML5 HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
draft specification, allowing embedded video to be natively rendered and script-controlled in WebKit. On June 2, 2008, the WebKit project announced they rewrote JavaScriptCore as "SquirrelFish", a
bytecode Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normal ...
interpreter. The project evolved into SquirrelFish Extreme (abbreviated SFX), announced on September 18, 2008, which compiles JavaScript into native machine code, eliminating the need for a bytecode interpreter and thus speeding up JavaScript execution. Initially, the only supported processor architecture for SFX was the x86, but at the end of January 2009, SFX was enabled for macOS on x86-64 as it passes all tests on that platform.


WebKit2

On April 8, 2010, a project named WebKit2 was announced to redesign WebKit. Its goal was to abstract the components that provide web rendering cleanly from their surrounding interface or application shell, creating a situation where, "web content (JavaScript, HTML, layout, etc) lives in a separate process from the application UI". This abstraction was intended to make reuse a more straightforward process for WebKit2 than for WebKit. WebKit2 had "an incompatible API change from the original WebKit", which motivated its name change. The WebKit2 targets were set to Linux, macOS, Windows,
GTK GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both Free software, free and ...
, and MeeGo-Harmattan. Safari for macOS switched to the new API with version 5.1. Safari for iOS switched to WebKit2 with iOS 8. The original WebKit API has been renamed WebKitLegacy API. WebKit2 API has been renamed just plain WebKit API.


Use

WebKit is used as the rendering engine within
Safari A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
and was used by
Google Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
's Chrome web browser on Windows, macOS, and Android (before version 4.4 KitKat). Chrome used only WebCore, and included its own JavaScript engine named V8 and a multiprocess system. Chrome for iOS continues to use WebKit because Apple requires that web browsers on that platform must do so. Other applications on macOS and iOS make use of WebKit, such as Apple's e-mail client
Mail The mail or post is a system for physically transporting postcards, letter (message), letters, and parcel (package), parcels. A postal service can be private or public, though many governments place restrictions on private systems. Since the mid ...
, App Store, and the 2008 version of Microsoft's Entourage personal information manager, both of which make use of WebKit to render HTML content.


Installed base

New web browsers have been built around WebKit such as the S60 browser on Symbian mobile phones, BlackBerry Browser (ver 6.0+), Midori, Chrome browser, the Android Web browsers before version 4.4 KitKat, and the browser used in PlayStation 3 system software from version 4.10. KDE's Rekonq web browser and Plasma Workspaces also use it as the native web rendering engine. WebKit has been adopted as the rendering engine in OmniWeb, iCab and Web (formerly named Epiphany) and Sleipnir, replacing their original rendering engines. GNOME's Web supported both
Gecko Geckos are small, mostly carnivorous lizards that have a wide distribution, found on every continent except Antarctica. Belonging to the infraorder Gekkota, geckos are found in warm climates. They range from . Geckos are unique among lizards ...
and WebKit for some time, but the team decided that Gecko's release cycle and future development plans would make it too cumbersome to continue supporting it. webOS uses WebKit as the basis of its application runtime. WebKit is used to render HTML and run JavaScript in the Adobe Integrated Runtime application platform. In Adobe Creative Suite CS5, WebKit is used to render some parts of the user interface. As of the first half of 2010, an analyst estimated the cumulative number of mobile handsets shipped with a WebKit-based browser at 350 million. By mid-April 2015, WebKit browser market share was 50.3%.


Ports

The week after Hyatt announced WebKit's open-sourcing, Nokia announced that it had ported WebKit to the Symbian operating system and was developing a browser based on WebKit for mobile phones running S60. Named Web Browser for S60, it was used on Nokia, Samsung, LG, and other Symbian S60 mobile phones. Apple has also ported WebKit to iOS to run on the
iPhone The iPhone is a line of smartphones developed and marketed by Apple that run iOS, the company's own mobile operating system. The first-generation iPhone was announced by then–Apple CEO and co-founder Steve Jobs on January 9, 2007, at ...
,
iPod Touch The iPod Touch (stylized as iPod touch) is a discontinued line of iOS-based mobile devices designed and formerly marketed by Apple Inc. with a touchscreen-controlled user interface. As with other iPod models, the iPod Touch can be used as a po ...
, and iPad, where it is used to render content in the device's web browser and e-mail software. The Android mobile phone platform used WebKit (and later versions its Blink fork) as the basis of its web browser and the Palm Pre, announced January 2009, has an interface based on WebKit. The Amazon Kindle 3 includes an experimental WebKit based browser. In June 2007, Apple announced that WebKit had been ported to
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
as part of Safari. Although Safari for Windows was silently discontinued by the company, WebKit's ports to Microsoft's operating system are still actively maintained. The Windows port uses Apple's proprietary libraries to function and is used for iCloud and iTunes for Windows, whereas the "WinCairo" port is a fully open-source and redistributable port. WebKit has also been ported to several toolkits that support multiple platforms, such as the
GTK GTK (formerly GIMP ToolKit and GTK+) is a free software cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both Free software, free and ...
toolkit for
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
, under the name ''WebKitGTK'' which is used by Eolie, GNOME Web, Adobe Integrated Runtime, Enlightenment Foundation Libraries (EFL), and the Clutter toolkit. Qt Software included a WebKit port in the Qt 4.4 release as a module called QtWebKit (since superseded by Qt WebEngine, which uses Blink instead). The Iris Browser on Qt also used WebKit. The Enlightenment Foundation Libraries (EFL) port – EWebKit – was developed (by Samsung and ProFusion) focusing the embedded and mobile systems, for use as stand alone browser, widgets-gadgets, rich text viewer and composer. The Clutter port is developed by Collabora and sponsored by Robert Bosch GmbH. There was also a project synchronized with WebKit (sponsored by Pleyo) called '' Origyn Web Browser'', which provided a meta-port to an abstract platform with the aim of making porting to embedded or lightweight systems quicker and easier. This port is used for embedded devices such as
set-top box A set-top box (STB), also known as a cable converter box, cable box, receiver, or simply box, and historically television decoder or a converter, is an information appliance device that generally contains a Tuner (radio)#Television, TV tuner inpu ...
es, PMP and it has been ported into
AmigaOS AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early versions ...
, AROS and MorphOS. MorphOS version 1.7 is the first version of Origyn Web Browser (OWB) supporting
HTML5 HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
media tags.


Web Platform for Embedded

Web Platform for Embedded (WPE) is a WebKit port designed for embedded applications; it further improves the architecture by splitting the basic rendering functional blocks into a general-purpose routines library (libwpe), platform backends, and engine itself (called WPE WebKit). The GTK port, albeit self-contained, can be built to use these base libraries instead of its internal platform support implementation. The WPE port is currently maintained by Igalia.


Forking by Google

On April 3, 2013, Google announced that it would produce a fork of WebKit's WebCore component, to be named Blink. Chrome's developers decided on the fork to allow greater freedom in implementing WebCore's features in the browser without causing conflicts upstream, and to allow simplifying its codebase by removing code for WebCore components unused by Chrome. In relation to Opera Software's announcement earlier in the year that it would switch to WebKit by means of the Chromium codebase, it was confirmed that the Opera web browser would also switch to Blink. Following the announcement, WebKit developers began discussions on removing Chrome-specific code from the engine to streamline its codebase. WebKit no longer has any Chrome specific code (e.g., buildsystem, V8 JavaScript engine hooks, platform code, etc.).


Components


WebCore

WebCore is a layout, rendering, and Document Object Model (DOM)
library A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
for HTML and Scalable Vector Graphics (SVG), developed by the WebKit project. Its full source code is licensed under the GNU Lesser General Public License (LGPL). The WebKit framework wraps WebCore and JavaScriptCore, providing an Objective-C
application programming interface An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
to the C++-based WebCore rendering engine and JavaScriptCore script engine, allowing it to be easily referenced by applications based on the Cocoa API; later versions also include a
cross-platform Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
C++ platform abstraction, and various ports provide more APIs. WebKit passes the Acid2 and Acid3 tests, with pixel-perfect rendering and no timing or smoothness issues on reference hardware.


JavaScriptCore

JavaScriptCore is a framework that provides a JavaScript engine for WebKit implementations, and provides this type of scripting in other contexts within macOS. JavaScriptCore is originally derived from KDE's JavaScript engine ( KJS)
library A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
(which is part of the KDE project) and the PCRE
regular expression A regular expression (shortened as regex or regexp), sometimes referred to as rational expression, is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by string-searching algorithms for "find" ...
library. Since forking from KJS and PCRE, JavaScriptCore has been improved with many new features and greatly improved performance. On June 2, 2008, the WebKit project announced they rewrote JavaScriptCore as "SquirrelFish", a
bytecode Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normal ...
interpreter. The project evolved into SquirrelFish Extreme (abbreviated SFX, marketed as Nitro), announced on September 18, 2008 further speeding up JavaScript execution. An optimizing just-in-time (JIT) compiler named ''FTL'' was announced on May 13, 2014. It uses
LLVM LLVM, also called LLVM Core, is a target-independent optimizer and code generator. It can be used to develop a Compiler#Front end, frontend for any programming language and a Compiler#Back end, backend for any instruction set architecture. LLVM i ...
to generate optimized machine code. "FTL" stands for "Fourth-Tier-LLVM", and unofficially for faster-than-light, alluding to its speed. As of February 15, 2016, the backend of FTL JIT is replaced by "Bare Bones Backend" (or B3 for short).


See also

* Comparison of browser engines * List of WebKit-based browsers


References


External links

* * for WebKitGTK
SunSpider 1.0 JavaScript Benchmark
{{DEFAULTSORT:Webkit 1999 software 2005 software Application programming interfaces Free layout engines Free software programmed in C++ Mobile software Software based on WebKit Software forks Software that uses Cairo (graphics) WebKitGTK Software using the BSD license Apple Inc. developed frameworks