`
jiagou
  • 浏览: 2536068 次
文章分类
社区版块
存档分类
最新评论

webkit 资料

 
阅读更多

1 what is webkit?

WebKit 是一个开源浏览器网页排版引擎,与之相应的引擎有Gecko(Mozilla,Firefox 等使用的排版引擎)和Trident(也称为MSHTML,IE 使用的排版引擎)。同时WebKit 也是苹果Mac OS X 系统引擎框架版本的名称,主要用于Safari,Dashboard,Mail 和其他一些Mac OS X 程序。WebKit 所包含的 WebCore 排版引擎和 JSCore 引擎来自于 KDE 的 KHTML 和 KJS,当年苹果比较了 Gecko 和 KHTML 后,仍然选择了后者,就因为它拥有清晰的源码结构、极快的渲染速度。

  目前使用WebKit 引擎的浏览器主要有:Safari(apple出品),Midori,chrome(google出品)等。


PS:

網頁瀏覽器列表比較使用分佈時間線分類Trident排版引擎 Gecko排版引擎 KHTMLWebKit排版引擎或 框架 Presto排版引擎 Java軟體平台 Tasman排版引擎 文字界面 手持設備嵌入式系統或 其它 關聯項目
Internet Explorer·傲游·世界之窗瀏覽器·Avant·騰訊TT·Netscape 8·NetCaptor·Sleipnir·GOSURF·GreenBrowser·KKman
Fennec·Firefox·網景69·SeaMonkey·Camino·Flock·Galeon·K-Meleon·Minimo·Mozilla·Sleipnir·Songbird·XeroBank
Chromium·Epiphany·Google Chrome·iCab·Konqueror·Midori·OmniWeb·Safari·Shiira
Opera·任天堂DS瀏覽器
HotJava·Opera Mini·UCWEB
Internet Explorer for Mac·MSN for Mac OS X
Lynx·Links·w3m
Internet Explorer Mobile·Minimo·Opera Mobile·PSP瀏覽器
Amaya·Dillo·Mosaic
HTML·HTML排版引擎·分頁瀏覽器·網頁伺服器·瀏覽器大戰
WebKit是一個與軟體相關的小作品。你可以通過編輯或修訂擴充其內容。


2 WebKit Open Source Project 内核引擎的前世今生

  WebKit的前身是 KDE 小组的KHTML。Apple将 KHTML 发扬光大,推出了装备 KHTML 改进型的 WebKit 引擎的浏览器Safari,获得了非常好的反响。

  WebKit引擎比Gecko引擎更受程序员欢迎的原因,除了其引擎的高效稳定,兼容性好外,其源码结构清晰,易于维护,是一个重要的原因。而 Gecko 的可维护性就差多了。我在 2008年6月时候,曾编译 Gecko 引擎,准备做一个基于 Gecko 的 Embed 应用程序,但文档缺乏、结构欠清晰,折腾了一星期之后,最终不得不承认自己水平有限,放弃了事。

  现在浏览器的内核引擎,基本上是三分天下:

  • Trident: IE 以Trident 作为内核引擎。
  • Gecko: Firefox 是基于 Gecko 开发。
  • WebKit: Safari, Google Chrome 基于 Webkit 开发。

  WebKit 内核在手机上的应用十分广泛,例如 Google 的手机 Gphone、 Apple 的 iPhone, Nokia’s Series 60 browser 等所使用的 Browser 内核引擎,都是基于 WebKit。

Webkit内核在手机上的应用十分广泛,这得益于webkit引擎的高效稳定,兼容性好。在桌面平台上它获得了acid3的100/100的得分。webkit最大的特点是速度快、JS脚本处理速度是IE的6倍,同时在安全性稳定性都很出色,对web标准兼容好等特点,webkit 是一项开源工程,以每夜构建方式更新。


PS:

目前比较有名气的浏览器有:

  1. Mozilla Firefox,美国的,是开源项目。
  2. Microsoft Internet Explorer,美国的。
  3. Opera,挪威的。
  4. Konqueror,属KDE开发组,美国的,是开源项目。
  5. WebKit,美国的,是开源项目。

Webkit学习

( 参考博客:http://blog.csdn.net/sgnaw/archive/2008/05/25/2479573.aspx )

Although WebKit is a complete web rendering and layout engine, it requires platform-specificfunctionality for infrastructure and display. For this reason, the intergation of WebKit in Qt is implemented using Qt primitives. The WebKit backend is implemented using the QtAPI toprovidedrawing and network communication. In addition, parts of the WebKit API are wrapped in Qt-style classes to ensure a uniform and intuitive API across all modules conforming to Trolltech guidelines。

3 webkit QT Port:


WebKit 浏览器源程序下载:

  1. http://webkit.org
  2. http://trolltech.com/downloads
第一个是现在主要由Apple 公司维护的,用于Safari浏览器;第二个是由QT公司提供图形引擎,使用了 WebKit 提供的浏览器核心部件 -- WebCore 和 JavaScriptCore 。


4 webkit Gtk Port

Link : http://live.gnome.org/WebKitGtk



5webkit EFL Port

webkit ported to the Enlightenment Foundation Libraries

( http://code.staikos.net/cgi-bin/gitweb.cgi?p=webkit;a=shortlog;h=kenneth/efl-port )

6 webkit on maemo

maemo-developers:

http://www.gossamer-threads.com/lists/maemo/developers/25399


browser for maemo

http://browser.garage.maemo.org/docs/browser_paper.html

owb- based SDL and webkit

http://www.sand-labs.org/owb/wiki/OwbN800

Mazilla browser on maemo

http://browser.garage.maemo.org/

WebKit VS Gecko


Webkit 的优势

  Webkit 是一个开源的HTML 渲染引擎,由苹果公司基于 KDE 的 KHTML 项目开发而成。我们从 Chrome 的评测中已经看Webkit 是一个非常轻量的渲染引擎,因其紧凑干净的代码基础,出色的标准支持,以及很小的内存占用而备受赞誉。这些品质使得 Webkit 成为众多浏览器的热选内核。

  Webkit 主要用于苹果的 Safari 浏览器与 iPhone,但一些重要的厂商如 Adobe,Nokia, Trolltech 也使用这个核心。Webkit 的用户中还包括一些不太知名的浏览器,包括 iCab, Omniweb, Shiira, 以及 Epiphany。在一些二线操作系统,如 Haiku, Syllable, 甚至 Amiga,Webkit 也大行其道。越来越多的开发者,使用 Webkit 开发富 Internte 应用(rich Internet applications)。Google 在对众多内核进行评估之后,为 Android 移动浏览器,以及 Chrome 桌面浏览器选择了 WebKit。

  开发者对 Webkit 公认的评价是:这是一个非常出色的渲染引擎,可以用于众多场合,它的吸引力让很多开发者开始怀疑 Mozilla 的 Gecko 内核是否还有市场。


Gecko

Gecko 源自 Netscape,并早于 KHTML,Gecko 因庞大与复杂的代码基础而频遭诟病。Gecko 非常强大,但代价高昂,复杂,高内存占用。因此,在很多场合 Gecko 的众多功能反而成了负担。

  Gecko 内核过于复杂的原因是 Gecko 意图提供除了 HTML 渲染之外的更多功能。Mozilla 早期的野心很大,Mozilla 最早的应用套件包括浏览器,邮件和新闻组程序,Web 设计工具,IRC 聊天工具。除了渲染 HTML,Gecko 还要提供一种应用广泛的,基于 XML 的用户界面生成引擎,XUL。XUL 被用在所有这些程序中。XUL 现在仍用在 Firefox 中,用来生成用户界面,因此造就了 Firefox 最有价值的重多扩展应用。

  Gecko 过于复杂的另外一个原因是 XPCOM,一个强大的组件系统。虽然 XPCOM 为 Gecko 带来很多激动人心的功能,让这个渲染引擎实现组件化,然而,这个功能被一些开发者滥用,当 Ars Technica2004年采访 Mozilla 开发者 Scott Collins的时候,Scott Collins 说,对 XPCOM 的滥用是 Mozilla 犯的几个主要错误之一。

  鉴于 XUL 和 XPCOM 所带来的复杂性,苹果自然要考虑为 Safari 选择一种更轻量的内核。苹果要设计一款可以和 Mac 操作系统紧密结合的浏览器,他们还预见到,这个引擎应该支持移动设备,他们因此认识到 KHTML 比 Gecko 更合适。

  2003年,当苹果决定在 Safari 中使用 KHTML 的时候,Mozilla 的 Mike Shaver 曾在博客中承认 Gecko 的缺点。他同时预言,苹果会成为他们推广 Web 标准的联盟。他写道,

  “小而精练曾是我们的苦苦追寻的目标,Gecko 的庞大与臃肿在各种评测中拉了我们的分数,如果我不得不写一个新浏览器,我会考虑 Mozilla 之外的选择。我希望 Mozilla 向 Safari/KHTML 学习,因为它们用 1/10 的代码实现了非常棒的功能。”

  Gecko 洗心革面带来 Firefox 3 的火爆

  2003年以来,发生了很多变化。Gecko 代码基础已经发展了很久,Gecko 依然复杂,然而它的很多历史遗留的缺陷正被一一攻破,Gecko 为 Firefox 3 带来众多革新,为整个 Web 浏览体验带来非常显著的改善。

  Gecko 1.9 使用跨平台的 Cairo 渲染框架,对 SVG 的巨大改进简化了代码并引入一些非常 Cool 的功能,如全页缩放,同时,重构的 reflow 算法,让 Gecko 通过 Acid 2 测试成为可能。Mozilla 还非常显著地降低了对内存的占用,甚至超越了 Safari 和 Opera。

  对 XPCOM 的使用被大大减少,XPCOM 对资源的占用通过一个新的循环回收器得到减低。这个工作仍在继续,Mozilla 将在 Firefox 4 中进一步减低 XPCOM 的负担。Gecko 的其它缺陷也在新的开发中被一一正视,比如,Firefox 3.1 的 Alpha 版中就已经加入对 CSS 3 的支持,另外一些性能的改进会让 Gecko 更具竞争性。Mozilla 的 TraceMonkey 引擎将可能包含在 Firefox 3.1 中,这将显著地提高 JavaScript 性能。

  从技术的角度,Gecko 现在非常稳固,丝毫不比 Webkit 差。一些证据显示,Gecko 正在进军移动领域,这在不久前还是不可能的事。Mozilla 拥有资源,开发经验以及社区支持,这将引导 Gecko 进入任何 Webkit 所能进入的地盘。



PS: Chrome


一:国外资源

SVN:

http://src.chromium.org/svn/trunk

打包:

http://build.chromium.org/buildbot/archives/chromium.tgz

homePage:

http://code.google.com/chromium/developerPage

http://dev.chromium.org

国内免proxy:

http://sites.google.com/a/chromium.org/dev/Home

1:http://www.catonmat.net/blog/code-reuse-in-google-chrome-browser/

网上一个blog,列出了Chrome用到的开源库,链接在这:

2、http://www.cnblogs.com/hesicong/archive/2007/06/29/800017.html

集成VS 2005 sp1

3:http://www.paperfrag.com chrome中使用ActiveX的方法。

4:http://blog.chromium.org/ chrome官方BLOG

5:http://chrome-browser.ca

Google has setup the following discussion groups

chromium-announce <http://groups.google.com/group/chromium-announce > Announcements are sent to this list when a new build is available on the developer channel, and at other important events relevant to a majority of users. This is a low-volume, moderated list.

chromium-discusshttp://groups.google.com/group/chromium-discuss

General Chromium discussion, ideas and suggestions should go here.

This is a high-volume mailing list, and in general is the right list to post to as a default if you are unsure of exactly where you should post.

Topical posts include items such as ideas for new features or the improvement of existing features, questions or comments around the high level design of Chromium, and other high-level topics that are not necessarily focused on the actualengineering or implementation of code.

The engineering (developer) team uses this to discuss technical issues and for announcements. This is a moderate volume, high technical content mailing list.

Topical posts include items such as plans to reduce memory consumption, discussion around how certain code areas are implemented and how to extend or improve such code, announcements of new tests being added to the buildbots, and so forth. chromium-reviews

http://groups.google.com/group/chromium-reviews

The engineering (developer) team uses this to conduct code reviews of changes to the Chromium source. This is a high volume, high technical content mailing list. Topical posts are strictly limited to code reviews. All email threads on this list originate from code reviews. Please do not start new threads on this list.

chromium-checkins

http://groups.google.com/group/chromium-checkins

This is a read-only list that can be used to monitor individual checkins tothe Chromium source. This is a high volume, high technical content mailing list. All emails to this list are automatically generated when code is checked in. Please donot send emails to this list. chromium-bugshttp://groups.google.com/group/chromium-bugs

This is a read-only list that contains all of the bug database email traffic. All email threads originate from bugs opened in the bug database.Please do not create new threads on this list

chromiumdev:

http://sites.google.com/site/chromiumdev/



6:chromium-dev

http://groups.google.com/group/chromium-dev


7:chromespot

http://chromespot.com/

维基百科:

http://zh.wikipedia.org/w/index.php?title=Chrome&variant=zh-cn


8:官方开发网站

http://sites.google.com/a/chromium.org/dev/

9:chrome发布网站http://googlechromereleases.blogspot.com/

10:WEBKIT BLOG

http://webkit.org/blog/


.二:中文部分

1:http://www.downdig.com/chrome

chrome比较完整的中文信息

2:CSDN资源Android研究

http://blog.csdn.net/absurd

源码解析系列:

http://blog.csdn.net/bzero1982

Chrome源码剖析:

http://www.cnblogs.com/duguguiyu/

谷歌浏览器的源码分析:

http://blog.csdn.net/caimouse


WEBKIT研究:

http://blog.csdn.net/sgnaw

chrome源码优化:

http://blog.csdn.net/kokocs

yuanwen : http://hi.baidu.com/elseif/blog/item/317eda5000d8a2658535240c.html

<script type="text/javascript"></script>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics