What is WebKit?

WebKit is a layout engine designed to allow web browsers to render web pages. WebKit underlies the Apple Safari and Google Chrome browsers. As of July 2012 it has the most market share of any layout engine at over 40% of the browser market share according to StatCounter. It is also used as the basis for the experimental browser included with the Amazon Kindle ebook reader, as well as the default browser in the iOS, Android, BlackBerry Tablet OS, Bada and webOS mobile operating systems. The WebKit engine 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's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, and has now been further developed by individuals from KDE, Apple Inc., Nokia, Google, Bitstream, RIM, Samsung, Igalia, and others. Mac OS X, Windows, GNU/Linux, and some other Unix-like operating systems are supported by the project.

WebKit's WebCore and JavaScriptCore components are available under the GNU Lesser General Public License, and the rest of WebKit is available under a BSD-form license.

Origins

The code that would become WebKit began in 1998 as the KDE’s HTML layout engine KHTML and KDE's JavaScript engine (KJS). The WebKit project was started within Apple by Don Melton on 25 June 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 Mac OS X with the help of an adapter library and renamed WebCore and JavaScriptCore.[8] JavaScriptCore was announced in an e-mail to a KDE mailing list in June 2002, alongside the first release of Apple's changes. WebCore was announced at the Macworld Expo in January 2003 by Apple CEO Steve Jobs with the release of the Safari web browser. JavaScriptCore was first included with Mac OS X v10.2 as a private framework which Apple used within their Sherlock application, while WebCore debuted with the first beta of Safari. Mac OS X v10.3 was the first major release of Apple's operating system to bundle WebKit, although it had already been bundled with a minor release of 10.2.

However, the exchange of code patches between the two branches of KHTML has previously been difficult and the code base diverged because both projects had different approaches in coding.[10] One of the reasons for this is that Apple worked on their version of KHTML for a year before making their fork public.

Despite this, 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.[citation needed] Konqueror 3.5 passed the Acid2 test, which was released after Apple had opened its WebKit Concurrent Versions System (CVS) and Bug Database.

According to Apple, some changes involved Mac OS X–specific features (e.g., Objective-C, KWQ,[11] Mac OS X calls) that are absent in KDE's KHTML, which called for different development tactics.