receive data to parse
1. receive data to parse
a .for chromium stack
WebUrlLoaderClient::didReceiveData
ResourceLoader::didReceiveData
MainResourceLoader::didReceiveData
ResourceLoader::didReceiveData
MainResourceLoader::addData
DocumentLoader::receivedData
DocumentLoader::commitLoad
FrameLoaderClient::committedLoad (FrameLoaderClientAndroid.cpp)
//also call ResourceLoader::didReceiveResponse
DocumentLoader::commitData(also call DocumentWrite:setEncoding to create the document.)
DocumentWriter::addData
DecodedDataDocumentParser::appendBytes
HTMLDocumentParser::append
HTMLDocumentParser::pumpTokenizerIfPossible
HTMLDocumentParser::pumpTokenizer
HTMLTokenizer::nextToken
b.for apache
LoadListener::commitLoad
WebCoreResourceLoader::nativeAddData
WebCoreResourceLoader::AddData
ResourceHandleClient::didReceiveData
ResourceLoader::didReceiveData
MainResourceLoader::didReceiveData
ResourceLoader::didReceiveData
MainResourceLoader::addData
DocumentLoader::receivedData
DocumentLoader::commitLoad
FrameLoaderClientAndroid::committedLoad
DocumentLoader::commitData
DocumentWriter::addData
DecodedDataDocumentParser::appendBytes
HTMLDocumentParser::append
HTMLDocumentParser::pumpTokenizerIfPossible
HTMLDocumentParser::pumpTokenizer
HTMLTokenizer::nextToken
HTMLTokenizer::nextToken, generate HTMLTokenizer from document;
HTMLTreeBuilder::constructTreeFromToken, generate dom tree with HTMLTokenizer
2 FrameLoaderClient::committedLoad
- void FrameLoaderClientAndroid::committedLoad(DocumentLoader* loader,
- const char* data, int length) {
- if (!m_manualLoader)
- loader->commitData(data, length);
- // commit data may have created a manual plugin loader
- if (m_manualLoader) {
- if (!m_hasSentResponseToPlugin) {
- m_manualLoader->didReceiveResponse(loader->response());
- // Failure could cause the main document to have an error causing
- // the manual loader to be reset.
- if (!m_manualLoader)
- return;
- m_hasSentResponseToPlugin = true;
- }
- m_manualLoader->didReceiveData(data, length);
- }
- }
3.Document Create
MainResourceLoader::didReceiveData
ResourceLoader::didReceiveData
MainResourceLoader::addData
DocumentLoader::receivedData
DocumentLoader::commitLoad
WebFrameLoaderClient::committedLoad(FrameLoaderClient)
DocumentLoader::commitData (also call DocumentWriter::addData to Parser)
DocumentWriter::setEncoding
FrameLoader::willSetEncoding()
FrameLoader::receivedFirstData()
DocumentWriter::begin
DocumentWriter::createDocument() //after the document was created, it was set to the frame()
4. the process from loadurl to network (chromium stack)
a.WebView.java
loadUrl
b.WebViewCore.java
loadUrl
c.BrowserFrame.java
loadUrl
nativeLoadUrl
d.WebCoreFrameBridge.cpp
LoadUrl
--pFrame->loader()->load(request, false);
e.FrameLoader
load(const ResourceRequest& request, bool lockHistory)
----FrameLoaderClient->createDocumentLoader()
load(DocumentLoader* newDocumentLoader)
----addExtraFieldsToMainResourceRequest
----loadWithDocumentLoader
callContinueLoadAfterNavigationPolicy()
continueLoadAfterWillSubmitForm()
f. DocumentLoader
startLoadingMainResource
g.MainResourceLoader
load
loadNow.
h.ResourceHandle
create
i.ResourceHandleAndroid.cpp
start
j.ResourceLoaderAndroid
start
k.WebUrlLoader
start
l.WebUrlLoaderClient
start.
......
to chromium stack.
also another imporant classes
ResourceRequest and ResourceResonse