WebKit
Logo | |
Developer(s) | Apple, KDE, Nokia, Google, RIM, Palm, others. |
---|---|
Stable release | 533
|
Repository | |
Written in | C++ |
Operating system | Cross-platform |
Type | Layout engine |
License | GNU LGPL - components BSD-style license - rest |
Website | webkit.org |
WebKit is a layout engine designed to allow web browsers to render web pages. 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 was originally created as a fork of KHTML as the layout engine for Apple's Safari; it is portable to many other computing platforms. It is also used in Google's Chrome Browser.
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-style license.[1]
History
WebKit was originally derived by Apple Inc. from the Konqueror browser’s KHTML software library for use as the engine of Mac OS X’s Safari web browser and has now been further developed by individuals from the KDE project, Apple Inc., Nokia, Google, Bitstream, Torch Mobile and others.[2]
Origins
The code that would become WebKit began in 1998 as the KDE project’s HTML layout engine KHTML and KDE's JavaScript engine (KJS). The name and project 'WebKit' were created in 2002 when Apple Inc. created a fork of KHTML and KJS. Apple developers explained in an e-mail to KDE developers[3] that these engines allowed easier development than other 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.[3] JavaScriptCore was announced in an e-mail to a KDE mailing list in June 2002, alongside the first release of Apple's changes.[4] 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.[5] 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 CVS and Bug Database.
According to Apple, some changes involved Mac OS X-specific features (e.g., Objective-C, KWQ, Mac OS X calls) that are absent in KDE's KHTML, which called for different development tactics.[6]
Split development
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".[7] Apple submitted their changes in large patches that contained a great number of changes with inadequate documentation, often to do with future feature additions. Thus, these patches were difficult for the KDE developers to integrate back into KHTML.[8] Furthermore, Apple had demanded developers to sign nondisclosure agreements before looking at Apple's source code and even then they were unable to access Apple's bug database.[citation needed]
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.[9]
Since the story of the fork appeared in news, Apple has released changes of the source code of its KHTML fork in a CVS repository.[10] Since the transfer of the sourcecode into a public CVS repository, Apple and KHTML developers have had increasing collaboration. Many KHTML developers have become reviewers and submitters for Apple's WebKit SVN 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.[11]
Open-sourcing
On June 7, 2005, Safari developer Dave Hyatt announced on his weblog that Apple was open-sourcing WebKit (previously, only WebCore and JavaScriptCore were open source) and opening up access to WebKit’s CVS tree and Bugzilla tool.[10] This was announced at Apple’s Worldwide Developers Conference 2005 by Apple Senior Vice President of Software Engineering Bertrand Serlet.
In mid-December 2005 support for Scalable Vector Graphics was merged into the standard build[12] and in early January 2006 the source code was migrated from CVS to Subversion. In July 2007, the Ars Technica website published an article reporting that the KDE team would move from KHTML to WebKit.[13] This move is still in discussion in the KDE community and no official information confirmed it.
WebKit's JavaScriptCore and WebCore components are available under the GNU Lesser General Public License, while the rest of WebKit is available under a BSD-style license.
Further development
In November 2007, the project announced that it had accomplished support for HTML 5 media features, allowing for embedded video to be natively rendered and script-controlled in WebKit.[14]
On June 2, 2008, the WebKit project announced they rewrote JavaScriptCore as "SquirrelFish", a bytecode interpreter.[15][16] 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.[17] Initially the only supported architecture for SFX was the x86 architecture, but at the end of January 2009 SFX was enabled for Mac OS X on x86-64 architectures as it passes all tests on that platform.[18]
Beginning in early 2007, the development team began to implement CSS extensions, including animation, transitions and both 2D and 3D transforms;[19] such extensions were released as working drafts to the W3C in 2009 for standardization.[20]
Webkit2
Webkit2 was announced on 8 April 2010. WebKit2 is designed from the ground up to support a split process model, where the web content (JavaScript, HTML, layout, etc) lives in a separate process. This model is similar to what Google Chrome offers, with the major difference being that it has built the process split model directly into the framework, allowing other clients to use it. Currently WebKit2 is available for Mac and Windows.[21]
Usage
WebKit is used as the rendering engine within Safari on Windows, Mac OS X and iOS. Other applications on Mac OS X can make use of WebKit, for example Apple's e-mail client Mail and the 2008 version of Microsoft's Entourage personal information manager both make use of WebKit to render e-mail messages with HTML content.
New web browsers have been built around WebKit such as the S60 browser[22] on Symbian mobile phones, Midori, Shiira, Google's Chrome browser,[23][24] Uzbl, Maxthon 3 and the Android Web browser. WebKit has been adopted as the rendering engine in OmniWeb, iCab and Epiphany replacing their original rendering engines.[25] Epiphany supported both Gecko and WebKit for some time, but the team decided that Gecko's release cycle and future development plans would make it cumbersome to continue supporting it. Palm's WebOS is also based on WebKit. The latest interface update for Valve Corporation's Steam uses WebKit for rendering of its interface and built in browser.[26] WebKit is used to render HTML and execute JavaScript in Adobe's AIR application platform. In Adobe Creative Suite CS5, WebKit is used to render some parts of the user interface.
Ports
The week after Hyatt's announcement of 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. Now named Web Browser for S60, it is used on Nokia, Samsung, LG, and other Symbian S60 mobile phones. Apple has also ported WebKit to the iOS to run on the iPhone and iPod Touch, where it is used to render content within the device’s web browser and e-mail software,[27] the Android mobile phone platform uses WebKit as the basis of its web browser,[28] and the Palm Pre, announced January 2009, has an interface based on WebKit.[29]
In June 2007, Apple announced that WebKit had been ported to Microsoft Windows as part of Safari. There are also ongoing ports for the open source operating systems Syllable,[30] Haiku[31] and AROS.[32]
WebKit has also been ported to a number of toolkits that support multiple platforms, such as the GTK+ toolkit,[33] the Qt toolkit,[34] the Adobe Integrated Runtime and the EFL. Qt Software includes the Qt port in the Qt 4.4 release. The Qt port of WebKit is also available to be used in Konqueror in KDE 4.1.[13] The Iris Browser on Qt also uses WebKit. The Enlightenment Foundation Libraries (EFL) port is under development focusing the embedded and mobile systems, for use as stand alone browser, widgets/gadgets, rich text viewer and composer.
There is also a project synchronized with WebKit (sponsored by Pleyo)[35] called Origyn Web Browser, which provides a meta-port to an abstract platform with the aim of making porting to embedded or lightweight systems quicker and easier.[36] This port is used for embedded devices such as set-top boxes, PMP and it has been ported into AmigaOS 4.1, AmigaOS 3.9 for Classic Amiga machines, AROS[37][38][39] and MorphOS. MorphOS version 1.7 is the first version of OWB sporting HTML5 media tags.[40][41]
Components
WebCore
WebCore is a layout, rendering, and Document Object Model (DOM) library for HTML and SVG, developed by the WebKit project. Its complete source code is licensed under the 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 additional APIs.
WebKit passes the Acid2 and Acid3 tests, with pixel-perfect rendering and no timing or smoothness issues on reference hardware.[42]
JavaScriptCore
JavaScriptCore is a framework that provides a JavaScript engine for WebKit implementations, and provides this type of scripting in other contexts within Mac OS X.[4][43] 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 features and greatly improved performance.[44]
On June 2, 2008, the WebKit project announced they rewrote JavaScriptCore as "SquirrelFish", a bytecode interpreter.[15][16] The project evolved into SquirrelFish Extreme (abbreviated SFX, marketed as Nitro), 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.[17]
Drosera
Drosera is a JavaScript debugger that was included with the nightly builds of WebKit.[45][46] It was named after Drosera, a genus of carnivorous plants. Drosera has been replaced by the inclusion of debugging functionality in the Web Inspector.[47]
SunSpider
A benchmark suite that aims to measure JavaScript performance on tasks that are relevant to the current and near future use of JavaScript in the real world, such as encryption and text manipulation.[48] The suite further attempts to be balanced and statistically sound.[49] It was released by Apple's WebKit team in December 2007.[50] It was well-received,[51] and other browser developers also use it to compare the JavaScript performance of different browsers.[52]
See also
- Comparison of layout engines
- List of KHTML-based browsers
- List of WebKit-based browsers
- List of graphical layout engines
References
- ^ "Open Source - WebKit". Apple. Retrieved 2009-03-05.
- ^ Maciej Stachowiak (November 9, 2008). "Companies and Organizations that have contributed to WebKit". WebKit Wiki. Retrieved 2008-11-17.
- ^ a b KDE KFM-Devel mailing list "(fwd) Greetings from the Safari team at Apple Computer", January 7, 2003.
- ^ a b Stachowiak, Maciej (June 13, 2002). "JavaScriptCore, Apple's JavaScript framework based on KJS". kde-darwin (Mailing list). Retrieved 2008-08-21.
{{cite mailing list}}
: Unknown parameter|mailinglist=
ignored (|mailing-list=
suggested) (help) - ^ "So, when will KHTML merge all the WebCore changes?". kdedevelopers.org. Retrieved 2010-02-20.
- ^ "Safari and KHTML again". kdedevelopers.org. 2005-04-30. Retrieved 2010-02-20.
- ^ The bitter failure named "safari and khtml"
- ^ Open-source divorce for Apple's Safari?
- ^ WebCore - KHTML - Firefox: Know your facts!
- ^ a b Daniel Molkentin (June 7, 2005). "Apple Opens WebKit CVS and Bug Database". KDE News. Retrieved 2007-01-16.
- ^ Ars at WWDC: Interview with Lars Knoll, creator of KHTML
- ^ Next Generation KDE Technologies Ported to WebCore
- ^ a b Unrau, Troy (2007-07-23). "The unforking of KDE's KHTML and WebKit". Ars Technica. Retrieved 2007-07-30.
- ^ HTML5 Media Support by Antti Koivisto, Surfin' Safari blog, November 12th, 2007
- ^ a b Announcing SquirrelFish
- ^ a b SquirrelFish project
- ^ a b Introducing SquirrelFish Extreme
- ^ https://trac.webkit.org/changeset/40439
- ^ CSS Transforms
- ^ CSS3 Animations
- ^ https://lists.webkit.org/pipermail/webkit-dev/2010-April/012235.html
- ^ Nokia S60 Webkit Browser
- ^ Google Chrome, Google’s Browser Project
- ^ Comic describing the Google Chrome Project
- ^ Epiphany Mailing list - ANNOUNCEMENT: The Future of Epiphany
- ^ A Brand New Steam
- ^ Maciej Stachowiak (January 10, 2007). "The Obligatory iPhone Post". Surfin' Safari weblog. Retrieved 2008-01-24.
- ^ Android Uses WebKit
- ^ Palm Pre in-depth impressions, video, and huge hands-on gallery
- ^ Syllable WebKit Port, Syllable Server
- ^ Webkit port: talking to Andrea "xeD" Anzani | Haiku Project
- ^ Cow launched! | Robert Norris´ Blog on porting WebKit to AROS
- ^ Alp Toker – WebKit/Gtk+ is coming
- ^ QT WebKit
- ^ pleyo
- ^ See OWB forge
- ^ AmigaOS OWB official page
- ^ "Amiga - Powering through, dead or alive!". amigaweb.net. Retrieved 2010-06-02.
- ^ AROS OWB developer page
- ^ "Origyn Web Browser for MorphOS". Fabian Coeurjoly.
{{cite web}}
: Text "accessdate 2010-01-04" ignored (help) - ^ Thom Holwerda (March 8, 2010). "Origyn Web Browser 1.7 Supports HTML5 Media, More". OSNews.
{{cite web}}
: Text "accessdate 2010-03-08" ignored (help) - ^ Maciej Stachowiak (2008-09-25). "Full Pass Of Acid3". Surfin' Safari - The WebKit Blog. Retrieved 2008-09-29.
- ^ The WebKit Open Source Project – JavaScript
- ^ "The Great Browser JavaScript Showdown". 2007-12-19.
- ^ WebKit.org Drosera wiki article
- ^ "Introducing Drosera". Surfin’ Safari.
- ^ "Commit removing Drosera".
- ^ Muchmore, Michael (2008-06-18). "Review: Firefox 3 Stays Ahead of Browser Pack". Retrieved 2008-09-06.
- ^ "SunSpider JavaScript Benchmark". Retrieved 2008-09-06.
- ^ "Announcing SunSpider 0.9". 2007-12-18. Retrieved 2008-09-06.
- ^ Atwood, Jeff (2007-12-19). "The Great Browser JavaScript Showdown". Retrieved 2008-09-06.
- ^ Resig, John (2008-09-03). "JavaScript Performance Rundown". Retrieved 2008-06-09.
External links
- The WebKit Open Source Project – Official site
- The WebKit Help Mailinglist Archive – Webkit Help mailinglist archive
- SunSpider JavaScript Benchmark