What do web browser engine use to render html?
I've always been wondering : What librai开发者_运维问答ries/APIs are used by web browser engines (Gecko, WebKit ...) to render images, text, buttons & stuff ?
Think about it, webpages are rendered pixel by pixel identically across operating systems. Yet buttons, drop lists and text look native on most platforms.
The main are
Trident (IE and derivats)
Webkit (Safari, Chrome)
KHTML (KDE Konqueror) This was the base for webkit
Presto (Opera)
You can read more here: http://en.wikipedia.org/wiki/Web_browser_engine
These engines create an object structure of the HTML and then use Components to build the page, the browser engine does not render pixel by pixel but uses buttons, comboboxes, image elements all of which in them self render to a buffer and then those imagebuffers are collapsed to the screen.
Some engines use the plattforms own components (Trident) other use their own with different skins for different plattforms.
For actual rendering I know IE uses windows controlls and Gecko as you noted uses Cairo.
I assume webkit might use gtk or qt but I am not sure and for opera I have no idea but I assume they use some form of framework or toolkit.
精彩评论