1.LoadProcess
way one
a.CachedResourceClient
b.->CachedResource.load(CachedResourceLoader* cachedResourceLoader)
c.->CachedResourceLoader::load(CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
d.->CachedResourceRequest::load(this, resource, incremental, securityCheck, sendResourceLoadCallbacks);
e.ResourceRequest.start()
way two
a.other call CachedResourceClient.XXX() //for example, ImageLoader's updateFromElement.
b.CachedResourceLoader::requestXXX
c.->CachedResource.load(CachedResourceLoader* cachedResourceLoader)
d.->CachedResourceLoader::load(CachedResource* resource, bool incremental, SecurityCheckPolicy securityCheck, bool sendResourceLoadCallbacks)
e.->CachedResourceRequest::load(this, resource, incremental, securityCheck, sendResourceLoadCallbacks);
f.ResourceRequest.start()
2.CachedResource's subclasses
3.client
A ask B to do something. B is somethingWorker, and A will have a object "somethingWorkerClient" for B to callback.
or A is a subclass of somethingWorkerClient.
IconLoader inherited from SubResourceLoaderClient
so IconLoader will ask other class to load for it,and using SubResourceLoaderClient to call back。
ImageLoader inherited from CachedResourceClient
so ImageLoader will ask other classes load for it ,and the callback will be finished through CacheResourceClient。
(may not be right)
4.
CacheResourceClient's subclasses:
CachedScriptSourceProvider
ClipboardAndroid,
CSSFontFaceSource,
CSSImageValue,
CSSImportRule,
HTMLDocument
HTMLDocumentParser,
HTMLLinkElement,
ImageLoader
,PendingScript,
ProcessingInstruction,
RenderObject,
ScriptElement,
SVGFEImageElement
SVGFontFaceUriElement
XMLTokenizer,
XMLDocumentParser,
XSLImportRule
SubResourceLoaderClient was used in SubResourceLoader, it means that the "SubResourceLoaderClient"'s loading process is done in "SubResourceLoader"
it's subclasses including:CachedResourceRequest,DocumentThreadableLoader,IconLoader
5.CacheResourceLoader's loading process
CacheResource.load----->CachedResourceLoader.load--->CachedResourceRequest.load&add()---->ResourceLoader.start()(through "ResourceLoadScheduler::scheduleLoad")
CachedResourceLoader::requestImage
CachedResourceLoader::requestResource
CachedResourceLoader::loadResource
CachedImage::load
CachedResource::load
CachedResourceRequest::load
ResourceLoadScheduler::scheduleSubresourceLoad
ResourceLoadScheduler::scheduleLoad
ResourceLoadScheduler::servePendingRequests
ResourceLoader::start
FrameLoader
loadWithDocumentLoader, create a new DocumentLoader, evaluate it to m_policyDocumentLoader.
PolicyChecker::checkNavigationPolicy, check the policy and save it to m_policyDocumentLoader.
if checkNavigationPolicy ok, stopAllLoaders and evaluate m_policyDocumentLoader to m_provisionalDocumentLoader.
change state to FrameStateProvisional
b. FrameStateProvisional
m_documentLoader, last page's documentLoader;
m_documentLoader, new page's documentLoader;