当前位置:   article > 正文

HTML parser_htmldocumentparser

htmldocumentparser

1. receive data to parser

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


2. Lexical Parsing

HTMLTokenizer::nextToken

parser state



3. Grammer Parsing

HTMLDocumentParser::pumpTokenizer


4. Script Parsing

void HTMLDocumentParser::pumpTokenizer(SynchronousMode mode)

bool HTMLDocumentParser::canTakeNextToken(SynchronousMode mode, PumpSession& session)

bool HTMLDocumentParser::runScriptsForPausedTreeBuilder() //m_treeBuilder->setPaused(!shouldContinueParsing);




声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/935381
推荐阅读
相关标签
  

闽ICP备14008679号