attach pid
初始两个线程
thread 1
main Tools/QtTestBrowser/main.cpp
thread 2
b IconDatabase.cpp:1438
输入网址
(如何记录log LOG -> WTFLog Source/JavaScriptCore/wtf/Assertions.cpp 引用
http://blog.csdn.net/bluepath/article/details/7029215(WTF是一个子工程,其主要为WebKit提供各种基础工具,这里封装了,著名的智能指针,断言,log输出,内存分配管理,甚至重写了一套独立的容器类,比如hashmap,hashSet,Vector等,其中最为重要是智能指针的实现。其输出为\WebKitBuild\lib)
LOG(channel, ...) 宏定义 Source/JavaScriptCore/wtf/Assertions.h:365 第一个变量的实际名称为 Log##channel
-> WTFLog(WTFLogChannel* channel, const char* format, ...)
WTFLogChannel变量定义示例
extern WTFLogChannel LogIconDatabase; Source/WebCore/platform/Logging.h:45
WTFLogChannel LogIconDatabase = { 0x00000400, "WebCoreLogLevel", WTFLogChannelOff }; Source/WebCore/platform/Logging.cpp:41
使用: LOG(IconDatabase, "test"),开启时将WTFLogChannelOff替换成WTFLogChannelOn
)
技术文章
■Major Objects in WebCore
■RefPtr and PassRefPtr Basics
■A guide to Assertion macros in WebKit
■WebCore Rendering
■How WebKit loads a Web Page
■WebKit Page Cache
■How a DOM Element is Attached
未知
webkit的qt移植
Webcore中文本资源编解码
WebCore中的http请求信息维护
WebCore中的http响应信息维护
WebKit加载网页的流程
WebKit中的html词法解析
html解析模型
html的解析过程,DOM节点树的建立
Frame类
FrameLoader类
Page类
Loader 模块是如何加载资源的,分主资源和派生资源分析 loader 模块的类关系
WebKit中的设计模式(一): Noncopyable .
webkit技术译文系列(二):RefPtr和PassRefPtr基础 .
WebKit如何加载web页面 .
WebCore中的渲染机制(一):基础知识 .
WebCore中的渲染机制(二):块和内嵌(Blocks and Inlines) .
Webkit技术译文系列(一):WebCore中的主要对象 .
1.体系结构
WebKit上层组织应用
WebCore
¨Page与外框相关的内容(Frame,Page,History,Focus,Window)
¨Loader加载资源及Cache
¨HTML-DOM HTML内容及解析
¨DOM- DOM CORE内容
¨XML- XML内容及解析
¨Render-排版功能
¨CSS-DOM CSS内容
¨Binding-DOM与JavascriptCore绑定的功能
¨Editing-所有与编辑相关的功能
JavascriptCore-javascript引擎
¨API-基本javascript功能
¨Binding与其它功能绑定的功能,如:DOM,C,JNI
¨DerviedSource自动产生的代码
¨ForwordHeads头文件,无实际意义
¨PCRE-Perl-Compatible Regular Expressions
¨KJS-Javascript Kernel
¨WTF-KDE的C++模板库
Unicode unicode 库
Tools tools库
CURL-url 客户端传输库
PlatForm- 与平台相关的功能,如图形图像,字体,Unicode, IO,输入法等.
2.解析流程
CURL获得网站的stream
解析划分字符串
通过Dom Builder按合法的html规范生成Dom树
如果有javascript,JSEngine就通过ECMA-262标准完善Dom树
把Dom传给LayoutEngine,进行布局,如果有CSS样式,就通过CSSParser解析。
最后Rendering out出来
Core WebKit Classes
下载网页
加载页面
处理页面
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:586 WebCore::QNetworkReplyHandler::forwardData
Source/WebCore/loader/ResourceLoader.cpp:430 WebCore::ResourceLoader::didReceiveData
Source/WebCore/loader/MainResourceLoader.cpp:463 WebCore::MainResourceLoader::didReceiveData
Source/WebCore/loader/ResourceLoader.cpp:279 WebCore::ResourceLoader::didReceiveData
Source/WebCore/loader/MainResourceLoader.cpp WebCore::MainResourceLoader::addData
Source/WebCore/loader/DocumentLoader.cpp:333 WebCore::DocumentLoader::receivedData
Source/WebCore/loader/DocumentLoader.cpp:299 WebCore::DocumentLoader::commitLoad
Source/WebCore/loader/DocumentLoader.cpp:278 WebCore::DocumentLoader::commitIfReady
Source/WebCore/loader/FrameLoader.cpp:1960 WebCore::FrameLoader::commitProvisionalLoad
页面解析 dom
Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1547 HTMLTreeBuilder::processBodyEndTagForInBody
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:305 WebCore::QNetworkReplyWrapper::receiveSniffedMIMEType
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:320 WebCore::QNetworkReplyWrapper::emitMetaDataChanged
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:203 WebCore::QueueLocker::~QueueLocker
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:178 WebCore::QNetworkReplyHandlerCallQueue::unlock
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:195 WebCore::QNetworkReplyHandlerCallQueue::flush
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:454 WebCore::QNetworkReplyHandler::finish
Source/WebCore/loader/ResourceLoader.cpp:436 WebCore::ResourceLoader::didFinishLoading
Source/WebCore/loader/MainResourceLoader.cpp:484 WebCore::MainResourceLoader::didFinishLoading
Source/WebCore/loader/DocumentLoader.cpp:288 WebCore::DocumentLoader::finishedLoading
Source/WebCore/loader/DocumentWriter.cpp:214 WebCore::DocumentWriter::end
Source/WebCore/loader/DocumentWriter.cpp:228 WebCore::DocumentWriter::endIfNotLoadingMainResource
Source/WebCore/loader/DocumentWriter.cpp:208 WebCore::DocumentWriter::addData
Source/WebCore/dom/DecodedDataDocumentParser.cpp:54 WebCore::DecodedDataDocumentParser::appendBytes
Source/WebCore/html/parser/HTMLDocumentParser.cpp:367 WebCore::HTMLDocumentParser::append
Source/WebCore/html/parser/HTMLDocumentParser.cpp:175 WebCore::HTMLDocumentParser::pumpTokenizerIfPossible
Source/WebCore/html/parser/HTMLDocumentParser.cpp:276 WebCore::HTMLDocumentParser::pumpTokenizer
Source/WebCore/html/parser/HTMLTreeBuilder.cpp:450 WebCore::HTMLTreeBuilder::constructTreeFromToken
Source/WebCore/html/parser/HTMLTreeBuilder.cpp:460 WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken
Source/WebCore/html/parser/HTMLTreeBuilder.cpp:482 WebCore::HTMLTreeBuilder::processToken
Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2120 WebCore::HTMLTreeBuilder::processEndTag
Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1883 WebCore::HTMLTreeBuilder::processEndTagForInBody
Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1547 WebCore::HTMLTreeBuilder::processBodyEndTagForInBody
数据库?
Source/WebCore/loader/icon/IconDatabase.cpp
js执行
智能指针
Source/JavaScriptCore/wtf/RefPtr.h