Template:Short description Template:Use mdy dates {{#invoke:Infobox|infobox}}Template:Template other{{#invoke:Check for unknown parameters | check | showblankpositional=1 | unknown = Template:Main other | preview = Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y | AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo upright | logo size | logo title | logo_alt | logo_caption | logo_upright | logo_size | logo_title | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot upright | screenshot size | screenshot title | screenshot_alt | screenshot_upright | screenshot_size | screenshot_title | service_name | size | standard | title | ver layout | website | qid }}Template:Main other

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 Kindle e-book 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,<ref name="macport"/><ref name=":0">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> and has since been further developed by KDE contributors, Apple, Google, Nokia,<ref name=":0" /> Bitstream, BlackBerry, Sony, Igalia, and others.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> WebKit supports macOS, Windows, Linux, and various other Unix-like operating systems.<ref name="webkitsite">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> On April 3, 2013, Google announced that it had forked WebCore, a component of WebKit, to be used in future versions of Google Chrome and the Opera web browser, under the name Blink.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Its JavaScript engine, JavascriptCore, also powers the Bun server-side JS runtime,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> as opposed to V8 used by Node.js, Deno, and Blink. WebKit's C++ application programming interface (API) provides a set of classes to display Web content in windows, 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 and available under the BSD 2-Clause license<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name="licensing">Licensing WebKit | WebKit</ref> with the exception of the WebCore and JavaScriptCore 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

OriginsEdit

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<ref name="lisamelton.net">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> on June 25, 2001,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name="start_date">Template:Cite news</ref> as a fork of KHTML and KJS. Melton explained in an e-mail to KDE developers<ref name="macport" /> 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 with the help of an adapter library and renamed WebCore and JavaScriptCore.<ref name="macport"/> JavaScriptCore was announced in an e-mail to a KDE mailing list in June 2002, alongside the first release of Apple's changes.<ref name="annjavascript">Template:Cite mailing list</ref>

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, KWQ (pronounced "quack") an implementation of the subset of Qt required to make KHTML work on macOS written in Objective C++, and macOS calls.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Split developmentEdit

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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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".<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

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.<ref name="kdenews2007-06-05">Template:Cite news</ref>

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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

In July 2007, Ars Technica reported that the KDE team would move from KHTML to WebKit.<ref name="arsunfork">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref name="kde4.5.0"> {{#invoke:citation/CS1|citation |CitationClass=web }} </ref><ref name="discontinued">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Open-sourcingEdit

On June 7, 2005, Safari developer Dave Hyatt announced on his weblog 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.<ref name="kdenews2007-06-05"/>

In mid-December 2005, support for Scalable Vector Graphics (SVG) was merged into the standard build.<ref name="kdestandard">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

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.<ref name="licensing"/>

Further developmentEdit

Template:Update Beginning in early 2007, the development team began to implement Cascading Style Sheets (CSS) extensions, including animation, transitions and both 2D and 3D transforms;<ref>Template:Cite news</ref> such extensions were released as working drafts to the World Wide Web Consortium (W3C) in 2009 for standardization.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

In November 2007, the project announced that it had added support for media features of the HTML5 draft specification, allowing embedded video to be natively rendered and script-controlled in WebKit.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

On June 2, 2008, the WebKit project announced they rewrote JavaScriptCore as "SquirrelFish", a bytecode interpreter.<ref name="Announcing SquirrelFish">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name="SquirrelFish project">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref name="Introducing SquirrelFish Extreme">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref name="x86-64">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

WebKit2Edit

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.<ref name=webkit2wiki>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

The WebKit2 targets were set to Linux, macOS, Windows, GTK, and MeeGo-Harmattan.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name=meego-harmattan>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Safari for macOS switched to the new API with version 5.1.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Safari for iOS switched to WebKit2 with iOS 8.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

The original WebKit API has been renamed WebKitLegacy API.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> WebKit2 API has been renamed just plain WebKit API.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

UseEdit

WebKit is used as the rendering engine within Safari and was used by Google'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.<ref name="ars-blink" /> Chrome for iOS continues to use WebKit because Apple requires that web browsers on that platform must do so.<ref name="App Store Review Guidelines">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Other applications on macOS and iOS make use of WebKit, such as Apple's e-mail client Mail, 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 baseEdit

New web browsers have been built around WebKit such as the S60 browser<ref name="Nokia S60 Webkit Browser">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> on Symbian mobile phones, BlackBerry Browser (ver 6.0+), Midori, Chrome browser,<ref name="Google Chrome, Google's Browser Project">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name="google-comic">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> the Android Web browsers before version 4.4 KitKat, and the browser used in PlayStation 3 system software from version 4.10.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> webOS uses WebKit as the basis of its application runtime.<ref>Template:Cite magazine</ref> 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> By mid-April 2015, WebKit browser market share was 50.3%.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Template:AnchorPortsEdit

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, iPod Touch, and iPad, where it is used to render content in the device's web browser and e-mail software.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> The Android mobile phone platform used WebKit (and later versions its Blink fork) as the basis of its web browser<ref name="andport">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>Template:Cite news</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> and the Palm Pre, announced January 2009, has an interface based on WebKit.<ref name="palmPre">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> The Amazon Kindle 3 includes an experimental WebKit based browser.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

In June 2007, Apple announced that WebKit had been ported to Microsoft Windows as part of Safari. Although Safari for Windows was silently discontinued<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> by the company, WebKit's ports to Microsoft's operating system are still actively maintained.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> The Windows port uses Apple's proprietary libraries to function and is used for iCloud<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> and iTunes<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> for Windows, whereas the "WinCairo" port is a fully open-source and redistributable port.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

File:GNOME Web 47 - gnome.org.png
GNOME Web is a web browser on Linux that uses WebKitGTK.

WebKit has also been ported to several toolkits that support multiple platforms, such as the GTK toolkit for Linux, under the name WebKitGTK which is used by Eolie,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> GNOME Web,<ref name="gtkportweb">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name="gtkport">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Adobe Integrated Runtime, Enlightenment Foundation Libraries (EFL), and the Clutter toolkit.<ref name="clutterportweb">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Qt Software included a WebKit port in the Qt 4.4 release as a module called QtWebKit<ref name="Qt WebKit">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> (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<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>) focusing the embedded and mobile systems, for use as stand alone browser, widgets-gadgets, rich text viewer and composer.Template:Citation needed The Clutter port is developed by Collabora and sponsored by Robert Bosch GmbH.

There was also a project synchronized with WebKit (sponsored by Pleyo)<ref name="pleyo">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> 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.<ref name="owb">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> This port is used for embedded devices such as set-top boxes, PMP and it has been ported into AmigaOS,<ref name="owb_amiga">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name="owb_AmigaOS3.9">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> AROS<ref name="owb_AROS">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> and MorphOS. MorphOS version 1.7 is the first version of Origyn Web Browser (OWB) supporting HTML5 media tags.<ref name=mosport>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref name=OWB_html5>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Web Platform for EmbeddedEdit

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 GoogleEdit

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.<ref name=ars-blink>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Following the announcement, WebKit developers began discussions on removing Chrome-specific code from the engine to streamline its codebase.<ref name=h-webkitchrome>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> WebKit no longer has any Chrome specific code (e.g., buildsystem, V8 JavaScript engine hooks, platform code, etc.).Template:Citation needed

ComponentsEdit

WebCoreEdit

WebCore is a layout, rendering, and Document Object Model (DOM) library 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 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 C++ platform abstraction, and various ports provide more APIs.Template:Citation needed

WebKit passes the Acid2 and Acid3 tests, with pixel-perfect rendering and no timing or smoothness issues on reference hardware.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

JavaScriptCoreEdit

JavaScriptCore is a framework that provides a JavaScript engine for WebKit implementations, and provides this type of scripting in other contexts within macOS.<ref name="annjavascript"/><ref name="webjavascript">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> JavaScriptCore is originally derived from KDE's JavaScript engine (KJS) library (which is part of the KDE project) and the PCRE regular expression library. Since forking from KJS and PCRE, JavaScriptCore has been improved with many new featuresTemplate:Such as and greatly improved performance.<ref name="javascriptshowdown">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

On June 2, 2008, the WebKit project announced they rewrote JavaScriptCore as "SquirrelFish", a bytecode interpreter.<ref name="Announcing SquirrelFish"/><ref name="SquirrelFish project"/> The project evolved into SquirrelFish Extreme (abbreviated SFX, marketed as Nitro), announced on September 18, 2008 further speeding up JavaScript execution.<ref name="Introducing SquirrelFish Extreme" />

An optimizing just-in-time (JIT) compiler named FTL was announced on May 13, 2014.<ref name="ftljit">Template:Cite news</ref> It uses LLVM to generate optimized machine code. "FTL" stands for "Fourth-Tier-LLVM", and unofficially for faster-than-light, alluding to its speed.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> As of February 15, 2016, the backend of FTL JIT is replaced by "Bare Bones Backend" (or B3 for short).<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

See alsoEdit

Template:Portal

ReferencesEdit

Template:Reflist

External linksEdit

Template:Web browser engines Template:MacOS Template:ECMAScript Template:Widget engine Template:Web browsers