KHTML
Encyclopedia
KHTML is the HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 layout engine
Layout engine
A web browser engine, , is a software component that takes marked up content and formatting information and displays the formatted content on the screen. It "paints" on the content area of a window, which is displayed on a monitor or a printer...

 developed by the KDE
KDE
KDE is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems...

 project. It is the engine used by the Konqueror
Konqueror
Not to be confused with the Conqueror web browser.Konqueror is a web browser and file manager that provides file-viewer functionality for file systems such as local files, files on a remote ftp server and files in a disk image. It is a core part of the KDE desktop environment...

 web browser. A forked version of KHTML called WebKit
WebKit
WebKit is a layout engine designed to allow web browsers to render web pages. WebKit powers Google Chrome and Apple Safari and by October 2011 held over 33% of the browser market share between them. It is also used as the basis for the experimental browser included with the Amazon Kindle ebook...

 is used by several web browsers, among them Safari
Safari (web browser)
Safari is a web browser developed by Apple Inc. and included with the Mac OS X and iOS operating systems. First released as a public beta on January 7, 2003 on the company's Mac OS X operating system, it became Apple's default browser beginning with Mac OS X v10.3 "Panther". Safari is also the...

 and Google Chrome
Google Chrome
Google Chrome is a web browser developed by Google that uses the WebKit layout engine. It was first released as a beta version for Microsoft Windows on September 2, 2008, and the public stable release was on December 11, 2008. The name is derived from the graphical user interface frame, or...

. Distributed under the terms of the GNU Lesser General Public License
GNU Lesser General Public License
The GNU Lesser General Public License or LGPL is a free software license published by the Free Software Foundation . It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License...

, KHTML is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

.

Built on the KPart framework and written in C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

, KHTML has relatively good support for Web standards. To render as many pages as possible, some extra abilities and quirks from Internet Explorer
Internet Explorer
Windows Internet Explorer is a series of graphical web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems, starting in 1995. It was first released as part of the add-on package Plus! for Windows 95 that year...

 are also supported, even though those are non-standard.

Origins

KHTML was preceded by an earlier engine called khtmlw or the KDE HTML Widget, developed by Torben Weis and Martin Jones, which implemented support for HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 3.2, HTTP 1.0, and HTML frames
Framing (World Wide Web)
When using web browsers, the terms frames or frameset refer to the display of two or more web pages or media elements displayed side-by-side within the same browser window...

, but not the W3C DOM
Document Object Model
The Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...

, CSS
Cascading Style Sheets
Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

, or scripting
DOM scripting
The term DOM scripting refers to programmatically accessing the Document Object Model . In common usage, DOM scripting implies JavaScript. DOM scripting has its roots in Dynamic HTML , but is more structured. It is the third pillar in the web standards movement.-DHTML vs...

.

KHTML came into existence on November 4, 1998, 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
Qt (toolkit)
Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface , and also used for developing non-GUI programs such as command-line tools and consoles for servers...

 2. Waldo Bastian was among those who did the work of creating that early version of KHTML.

Re-write and improvement

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
Mozilla
Mozilla is a term used in a number of ways in relation to the Mozilla.org project and the Mozilla Foundation, their defunct commercial predecessor Netscape Communications Corporation, and their related application software....

" and with adding support for scripting
DOM scripting
The term DOM scripting refers to programmatically accessing the Document Object Model . In common usage, DOM scripting implies JavaScript. DOM scripting has its roots in Dynamic HTML , but is more structured. It is the third pillar in the web standards movement.-DHTML vs...

 as the highest priority. So in May 1999, Lars Knoll began doing research with an eye toward implementing the W3C DOM
Document Object Model
The Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...

 specification, finally announcing on August 16, 1999 that he had checked in what amounted to a complete rewrite of the KHTML library — changing KHTML to use the standard W3C DOM
Document Object Model
The Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...

 as its internal document representation. That in turn allowed the beginnings of JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

 support to be added in October 1999, with the integration of Harri Porten
Harri Porten
Harri Porten is a software engineer. Porten, a KDE developer and former Trolltech employee, is the CEO of Froglogic, a consultancy company related to Qt development. He currently lives in Hamburg, Germany. Porten originally wrote the KJS JavaScript engine for Konqueror, the KDE project's file...

's KJS following shortly afterward.

In the closing months of 1999 and first few months of 2000, Knoll did further work with Antti Koivisto and Dirk Mueller to add CSS support and to refine and stabilize the KHTML architecture, with most of that work being completed by March 2000. Among other things, those changes enabled KHTML to become the second browser after Internet Explorer
Internet Explorer
Windows Internet Explorer is a series of graphical web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems, starting in 1995. It was first released as part of the add-on package Plus! for Windows 95 that year...

 to correctly support Hebrew and Arabic and languages written right-to-left
Bi-directional text
Bi-directional text is text containing text in both text directionalities, both right-to-left and left-to-right . It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.Some writing systems of the...

 — before Mozilla
Mozilla
Mozilla is a term used in a number of ways in relation to the Mozilla.org project and the Mozilla Foundation, their defunct commercial predecessor Netscape Communications Corporation, and their related application software....

 had such support.

KDE 2.0 was the first KDE release (on October 23, 2000) to include KHTML (as the rendering engine of the new Konqueror
Konqueror
Not to be confused with the Conqueror web browser.Konqueror is a web browser and file manager that provides file-viewer functionality for file systems such as local files, files on a remote ftp server and files in a disk image. It is a core part of the KDE desktop environment...

 file
File manager
A file manager or file browser is a computer program that provides a user interface to work with file systems. The most common operations performed on files or groups of files are: create, open, edit, view, print, play, rename, move, copy, delete, search/find, and modify file attributes, properties...

 and web browser
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

, which replaced the monolithic KDE File Manager).

Other modules

KSVG was first developed in 2001 by Nikolas Zimmermann and Rob Buis; however, by 2003, it was decided to fork the then-current KSVG implementation into two new projects: KDOM/KSVG2 (to improve the state of DOM rendering in KHTML underneath a more formidable SVG 1.0 render state) and Kcanvas (to abstract any rendering done within khtml/ksvg2 in a single shared library, with multiple backends for it, e.g., Cairo/Qt, etc.).

KSVG2 is also a part of WebKit
WebKit
WebKit is a layout engine designed to allow web browsers to render web pages. WebKit powers Google Chrome and Apple Safari and by October 2011 held over 33% of the browser market share between them. It is also used as the basis for the experimental browser included with the Amazon Kindle ebook...

.

Standards compliance

The following standards are supported by the KHTML engine:
  • HTML
    HTML
    HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

     4.01
  • HTML 5 support
  • CSS
    Cascading Style Sheets
    Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

     1
  • CSS
    Cascading Style Sheets
    Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

     2.1 (screen and paged media)
  • CSS
    Cascading Style Sheets
    Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

     3 Selectors (fully as of KDE 3.5.6)
  • CSS
    Cascading Style Sheets
    Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

     3 Other (multiple backgrounds, box-sizing and text-shadow)
  • PNG, MNG, JPEG
    JPEG
    In computing, JPEG . The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality....

    , GIF graphic formats
  • DOM
    Document Object Model
    The Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...

     1, 2 and partially 3
  • ECMA-262/JavaScript 1.5
    JavaScript
    JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

  • Partial Scalable Vector Graphics
    Scalable Vector Graphics
    Scalable Vector Graphics is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic . The SVG specification is an open standard that has been under development by the World Wide Web Consortium since 1999.SVG images and their...

     support

KHTML and Apple

KHTML and KJS were adopted by Apple
Apple Computer
Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

 in 2002 for use in the Safari
Safari (web browser)
Safari is a web browser developed by Apple Inc. and included with the Mac OS X and iOS operating systems. First released as a public beta on January 7, 2003 on the company's Mac OS X operating system, it became Apple's default browser beginning with Mac OS X v10.3 "Panther". Safari is also the...

 web browser. Apple publishes the source code for their fork of the KHTML engine, called WebKit
WebKit
WebKit is a layout engine designed to allow web browsers to render web pages. WebKit powers Google Chrome and Apple Safari and by October 2011 held over 33% of the browser market share between them. It is also used as the basis for the experimental browser included with the Amazon Kindle ebook...

.

See also

  • List of KHTML and WebKit-based browsers
  • List of layout engines
  • Comparison of layout engines
    Comparison of layout engines
    The following tables compare general and technical information for a number of web browser engines. Please see the individual products' articles for further information. This article is not all-inclusive or necessarily up to date...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK