1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
| [code]
FrameLoader.cpp
2048: RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request, substituteData);
2051: load(loader.get());
2083: void FrameLoader::load(DocumentLoader* newDocumentLoader)
(
2085: ResourceRequest& r = newDocumentLoader->request();
2086: addExtraFcd ieldsToMainResourceRequest(r);
)
2110: loadWithDocumentLoader(newDocumentLoader, type, 0);
2013: void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType type, PassRefPtr<FormState> prpFormState)
2130~2156: policyChecker()->checkNavigationPolicy()
3533: void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, PassRefPtr<FormState> formState, bool shouldContinue)
3596~3599:
if (formState)
m_client->dispatchWillSubmitForm(&PolicyChecker::continueLoadAfterWillSubmitForm, formState);
else
continueLoadAfterWillSubmitForm();
3093: void FrameLoader::continueLoadAfterWillSubmitForm()
3119: if (!m_provisionalDocumentLoader->startLoadingMainResource(identifier))
DocumentLoader.cpp
717: bool DocumentLoader::startLoadingMainResource(unsigned long identifier)
720: m_mainResourceLoader = MainResourceLoader::create(m_frame);
727: if (!m_mainResourceLoader->load(m_request, m_substituteData)) {
MainResourceLoader.cpp
525: bool MainResourceLoader::load(const ResourceRequest& r, const SubstituteData& substituteData)
544: if (loadNow(request)) {
492: bool MainResourceLoader::loadNow(ResourceRequest& r)
520: m_handle = ResourceHandle::create(r, this, m_frame.get(), false, true);
ResourceHandle.cpp (locate at WebCore/platform/network)
46: PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, ResourceHandleClient* client, Frame* frame, bool defersLoading, bool shouldContentSniff)
64: if (newHandle->start(frame))
(the start function depends on platform, take QT as example)
ResourceHandleQt.cpp
119: bool ResourceHandle::start(Frame* frame)
141: d->m_job = new QNetworkReplyHandler(this, QNetworkReplyHandler::LoadMode(d->m_defersLoading));
QtNetworkReplyHandler.cpp
130: QNetworkReplyHandler::QNetworkReplyHandler(ResourceHandle* handle, LoadMode loadMode)
168: start();
414: void QNetworkReplyHandler::start()
(
420: QNetworkAccessManager* manager = d->m_frame->page()->networkAccessManager();
433: m_reply = manager->get(m_request);
437: m_reply = manager->post(m_request, postDevice);
476: connect(m_reply, SIGNAL(finished()), this, SLOT(finish()), SIGNAL_CONN);
->229: void QNetworkReplyHandler::finish()
-->252: client->didFinishLoading(m_resourceHandle);
485: connect(m_reply, SIGNAL(readyRead()), this, SLOT(forwardData()), SIGNAL_CONN);
->357: void QNetworkReplyHandler::forwardData()
-->398: client->didReceiveData(m_resourceHandle, data.constData(), data.length(), data.length() /*FixMe*/);
489: connect(m_reply, SIGNAL(uploadProgress(qint64, qint64)), this, SLOT(uploadProgress(qint64, qint64)), SIGNAL_CONN);
->402: void QNetworkReplyHandler::uploadProgress(qint64 bytesSent, qint64 bytesTotal)
-->411: client->didSendData(m_resourceHandle, bytesSent, bytesTotal);
484: connect(this, SIGNAL(processQueuedItems()), this, SLOT(sendQueuedItems()), SIGNAL_CONN);
->509: void QNetworkReplyHandler::sendQueuedItems()
)
(Qt implements ResourceHandleClient for class WebCoreSynchronousLoader in ResourcehandleQt.cpp)
restart from 398: client->didReceiveData(m_resourceHandle, data.constData(), data.length(), data.length() /*FixMe*/);
ResourceLoader.cpp
248: void ResourceLoader::didReceiveData(const char* data, int length, long long lengthReceived, bool allAtOnce)
260: addData(data, length, allAtOnce);
MainResourceLoader.cpp
143: void MainResourceLoader::addData(const char* data, int length, bool allAtOnce)
146: frameLoader()->receivedData(data, length);
FrameLoader.cpp
2174: void FrameLoader::receivedData(const char* data, int length)
2176: activeDocumentLoader()->receivedData(data, length);
DocumentLoader.cpp
288: void DocumentLoader::receivedData(const char* data, int length)
292: commitLoad(data, length);
272: void DocumentLoader::commitLoad(const char* data, int length)
280: frameLoader->committedLoad(this, data, length);
FrameLoader.cpp
3350: void FrameLoader::committedLoad(DocumentLoader* loader, const char* data, int length)
(depend on platform, take Qt as example)
FrameLoaderClientQt.cpp
741: void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length)
751: fl->addData(data, length);
FrameLoader.cpp
1544: void FrameLoader::addData(const char* bytes, int length)
1549: write(bytes, length);
889: void FrameLoader::write(const char* str, int len, bool flush)
949: tokenizer->write(decoded, true);
HTMLTokenizer.cpp
1624: void HTMLTokenizer::write(const SegmentedString& str, bool appendData)
1633~1648: try to execute script
1684: while (!m_src.isEmpty() && (!frame || !frame->redirectScheduler()->locationChangePending())) {
(
1760: processToken();
1913: PassRefPtr<Node> HTMLTokenizer::processToken()
1941: n = m_parser->parseToken(&m_currentToken);
HTMLParser.cpp
230: PassRefPtr<Node> HTMLParser::parseToken(Token* t)
224: inline bool HTMLParser::insertNodeAfterLimitBlockDepth(Node* n, bool flat)
352: bool HTMLParser::insertNode(Node* n, bool flat)
n->attach();
404: m_document->frame()->loader()->dispatchDocumentElementAvailable();
)
FrameLoader.cpp
3985: void FrameLoader::dispatchDocumentElementAvailable()
3987: m_frame->injectUserScripts(InjectAtDocumentStart); (script!!)
3988: m_client->documentElementAvailable(); (depend on platform)
[/code]
|