- KHTML
Infobox Software
name = KHTML
logo =
caption =Konqueror using KHTML to render theWikipedia front page.
latest release version =
latest release date =
latest preview version =
latest preview date =
developer =KDE Team,Apple Inc. ,Nokia ,Google , others.
programming language =C++
operating system =Linux /Unix
genre =Layout engine
license =GNU Lesser General Public License
website =KHTML is the
HTML layout engine developed by theKDE project. It is the engine used by theKonqueror web browser. A forked version of KHTML calledWebKit is used by several web browsers, among them Safari and Google Chrome. Distributed under the terms of theGNU Lesser General Public License , KHTML isfree software .Built on the
KPart framework and written inC++ , KHTML has relatively good support for Web standards. To render as many pages as possible, some extra abilities and quirks fromInternet Explorer are also supported, even though those are non-standard.KHTML renders faster than the Gecko layout engine, [ [http://www.howtocreate.co.uk/browserSpeed.html Browser speed comparisons ] ] its main
open source rival and core of theMozilla andMozilla Firefox browsers, among others. However, being a less widely known browser, many websites fail to support KHTML or claim no support even if the site does work correctly inKonqueror .Gmail , for instance, only works if Konqueror reports itself asFirefox (see User Agent Spoofing).History
KHTML was preceded by an earlier engine called "khtmlw" or "the KDE HTML Widget", developed by Torben Weis and Martin Jones, [around 1:18 in December 8, 2006 "From KDE to WebKit presentation at Yahoo! office by Lars Knoll and George Staikos http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] which implemented support for
HTML 3.2,HTTP 1.0, and HTML frames, but not theW3C DOM, CSS, or scripting.KHTML came into existence in
November 4 ,1998 , [around 4:52 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] as a copy of the khtmlw library, with some slight refactoring and the addition of Unicode support and changes to support the move to Qt 2. Waldo Bastian [Waldo Bastian http://people.kde.org/waldo.html] was among those who did the work of creating that early version of KHTML. [around 5:02 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/]The real work on KHTML actually started between May and October 1999, with the realization that the choice facing the project was "either do a significant effort to move KHTML forward or to use
Mozilla " [around 5:30 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] and with adding support for scripting as the highest priority. So in May 1999, Lars Knoll [Lars Knoll http://people.kde.org/lars.html] began doing research with an eye toward implementing theW3C DOM specification, finally announcing [1999-08-16 "changes in KHTML" message from Lars Knoll http://lists.kde.org/?l=kfm-devel&m=93489518402924] onAugust 16 ,1999 that he had checked in [1999-08-16 "khtml_to_dom: kdelibs/khtml" commit message http://lists.kde.org/?l=kde-commits&m=93476738632582] what amounted to a complete rewrite of the KHTML library — changing KHTML to use the standardW3C DOM as its internal document representation. That in turn allowed the beginnings ofJavascript support to be added in October 1999, [around 8:18 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] with the integration ofHarri Porten 's KJS following shortly afterward.In the closing months of 1999 and first few months of 2000, Knoll did further work [around 9:10 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] with Antti Koivisto [Antti Koivisto http://trac.webkit.org/projects/webkit/wiki/WebKit%20Team#AnttiKoivistoanttikreview>] and Dirk Mueller [Dirk Mueller http://people.kde.org/dirk.html] to add CSS support and to refine and stabilize the KHTML architecture, [around 9:32 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] with most of that work being completed by March 2000. Among other things, those changes enabled KHTML to become the first browser other than
Internet Explorer to correctly support languages written right-to-left (for example,Hebrew andArabic ) [around 10:30 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] — beforeMozilla had such support.KDE 2.0 was the first KDE release (onOctober 23 ,2000 ) to include KHTML [around 11:10 in http://yuiblog.com/blog/2006/12/11/knoll-staikos-video/] (as the rendering engine of the newKonqueror file andweb browser , which replaced the monolithic KDE File Manager).KWQ
KWQ (pronounced "quack") is an implementation of the subset of Qt required to make KHTML work on OS X. It is written in Objective C++.
Standards compliance
The following standards are supported by the KHTML engine:
*HTML 4.01
* PartialHTML 5 support (standard still in progress)
* CSS 1
* CSS 2.1 (screen and paged media)
* CSS 3 Selectors (fully as of KDE 3.5.6 [ [http://www.kde.org/announcements/changelogs/changelog3_5_5to3_5_6.php K Desktop Environment - KDE 3.5.6 Changelog ] ] )
* CSS 3 Other (multiple backgrounds, box-sizing and text-shadow)
* PNG, MNG,JPEG , GIF graphic formats
* DOM 1, 2 and partially 3
* ECMA-262/JavaScript 1.5
* PartialScalable Vector Graphics supportKHTML and Apple
KHTML and KJS were adopted by Apple in 2002 for use in the Safari web browser. Apple publishes the source code for their fork of the KHTML engine, called
WebKit , as required by the LGPL.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. [ [http://www.kdedevelopers.org/node/view/1001] ] 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.Fact|date=August 2008According to Apple, some changes involved
Mac OS X -specific features (e.g.,Objective-C , KWQ, OS X calls) which are absent in KDE's KHTML, which called for different development tactics. [http://www.kdedevelopers.org/node/view/1006]Controversy
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". [ [http://www.kdedevelopers.org/node/1002 The bitter failure named "safari and khtml"] ] 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. 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. [ [http://news.cnet.com/Open-source-divorce-for-Apples-Safari/2100-1032_3-5703819.html Open-source divorce for Apple's Safari?] ]During the publicized 'divorce' period, KDE developer "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. [ [http://www.kdedevelopers.org/node/1049 WebCore - KHTML - Firefox: Know your facts!] ]
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. [ [http://dot.kde.org/1118138374/ Apple Opens WebKit CVS and Bug Database ] ] 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. [ [http://arstechnica.com/journals/apple.ars/2007/06/12/ars-at-wwdc-interview-with-lars-knoll-creator-of-khtml Ars at WWDC: Interview with Lars Knoll, creator of KHTML] ]
See also
* List of KHTML and WebKit-based browsers
*List of layout engines
*Comparison of layout engines References
External links
* [http://www.konqueror.org/features/browser.php Web Browser] – list of KHTML features on Konqueror site
* [http://developer.kde.org/documentation/library/kdeqt/kde3arch/khtml/ KHTML – KDE's HTML library] – definition from developer.kde.org
* [http://api.kde.org/3.5-api/kdelibs-apidocs/khtml/html/index.html KHTML from KDE API Reference]
* [http://webkit.org/ The WebKit Open Source Project]
* [http://yuiblog.com/blog/2006/12/11/knoll-staikos-video From KDE to WebKit: The Open Source Engine That's Here to Stay] – video ofDecember 8 ,2006 presentation at Yahoo! office by Lars Knoll and George Staikos
Wikimedia Foundation. 2010.