Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h

Issue 2181943002: Rename ParsedChunk to TokenizedChunk in core/html/parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
index e5bfe856f21a97c106e43e15c5e5fb640ab54837..2a540621a2a98429883110ece73ceb5f7c58a148 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
@@ -64,8 +64,8 @@ class HTMLParserScheduler;
class HTMLResourcePreloader;
class HTMLScriptRunner;
class HTMLTreeBuilder;
-class ParsedChunkQueue;
class PumpSession;
+class TokenizedChunkQueue;
class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptRunnerHost {
USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser);
@@ -91,8 +91,8 @@ public:
void suspendScheduledTasks() final;
void resumeScheduledTasks() final;
- struct ParsedChunk {
- USING_FAST_MALLOC(ParsedChunk);
+ struct TokenizedChunk {
+ USING_FAST_MALLOC(TokenizedChunk);
public:
std::unique_ptr<CompactHTMLTokenStream> tokens;
PreloadRequestStream preloads;
@@ -106,7 +106,7 @@ public:
// Indices into |tokens|.
Vector<int> likelyDocumentWriteScriptIndices;
};
- void notifyPendingParsedChunks();
+ void notifyPendingTokenizedChunks();
void didReceiveEncodingDataFromBackgroundParser(const DocumentEncodingData&);
void appendBytes(const char* bytes, size_t length) override;
@@ -150,9 +150,9 @@ private:
void startBackgroundParser();
void stopBackgroundParser();
- void validateSpeculations(std::unique_ptr<ParsedChunk> lastChunk);
- void discardSpeculationsAndResumeFrom(std::unique_ptr<ParsedChunk> lastChunk, std::unique_ptr<HTMLToken>, std::unique_ptr<HTMLTokenizer>);
- size_t processParsedChunkFromBackgroundParser(std::unique_ptr<ParsedChunk>);
+ void validateSpeculations(std::unique_ptr<TokenizedChunk> lastChunk);
+ void discardSpeculationsAndResumeFrom(std::unique_ptr<TokenizedChunk> lastChunk, std::unique_ptr<HTMLToken>, std::unique_ptr<HTMLTokenizer>);
+ size_t processTokenizedChunkFromBackgroundParser(std::unique_ptr<TokenizedChunk>);
void pumpPendingSpeculations();
bool canTakeNextToken();
@@ -216,14 +216,14 @@ private:
// FIXME: m_lastChunkBeforeScript, m_tokenizer, m_token, and m_input should be combined into a single state object
// so they can be set and cleared together and passed between threads together.
- std::unique_ptr<ParsedChunk> m_lastChunkBeforeScript;
- Deque<std::unique_ptr<ParsedChunk>> m_speculations;
+ std::unique_ptr<TokenizedChunk> m_lastChunkBeforeScript;
+ Deque<std::unique_ptr<TokenizedChunk>> m_speculations;
WeakPtrFactory<HTMLDocumentParser> m_weakFactory;
WeakPtr<BackgroundHTMLParser> m_backgroundParser;
Member<HTMLResourcePreloader> m_preloader;
PreloadRequestStream m_queuedPreloads;
Vector<String> m_queuedDocumentWriteScripts;
- RefPtr<ParsedChunkQueue> m_parsedChunkQueue;
+ RefPtr<TokenizedChunkQueue> m_tokenizedChunkQueue;
std::unique_ptr<DocumentWriteEvaluator> m_evaluator;
bool m_shouldUseThreading;

Powered by Google App Engine
This is Rietveld 408576698