KHTML

From Wikipedia, the free encyclopedia

Konqueror using KHTML to render the Wikipedia front page.
Enlarge
Konqueror using KHTML to render the Wikipedia front page.

KHTML is the HTML layout engine developed by the KDE project.

Built on the then new KPart framework, it was introduced with KDE2 in 2000, for use in the new Konqueror file and web browser which replaced the monolithic KDE File Manager. Written in C++ and licensed under the LGPL, it supports most of the standards related to web browsing. To render as many pages as possible, some extra abilities and quirks from Internet Explorer are supported, even though they are not part of the HTML standard definition.

KHTML is faster than the Gecko layout engine, its main open source rival and core of the Mozilla and Mozilla Firefox browsers, among others. However, being a less widely known browser, many websites fail to support it or claim no support even if the site does work. Gmail for instance only works if Konqueror reports itself as Firefox (See UA Spoofing).

Contents

[edit] Standards compliance

The following standards are supported by the KHTML engine:

[edit] KHTML and Apple

The engine was adopted by Apple in 2002 for its Safari web browser. Apple publishes the source code for up to date and all previous versions of their version of the KHTML engine as required by the LGPL. Apple's Open Source engine for Safari is known as WebCore and WebKit.

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. [1] One of the reasons for this is that Apple worked on their version of KHTML for a year before making their fork public. Apple also tended to submit their changes in large patches that incorporate a great number of changes, in some cases leaving code to do with future feature additions barely documented, making it difficult for the KDE developers to sort through and incorporate the changes.

Apple has since responded to those difficulties and released every change on the sourcecode in an easily comprehensible CVS repository. [2] Another reason is that some changes involved Mac OS X-specific features (e.g. Objective-C, KWQ, OS X calls) which are absent in KHTML/Linux. [3] However the KDE project has managed to incorporate a number of changes that have added features and improved KHTML's rendering speed, for example the addition of Acid2 compliance which was based on patches from Apple.

[edit] KHTML-based applications

[edit] See also

[edit] External links