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

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

Issue 1772853002: Block the HTML parser on external stylesheets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified parser blocking logic Created 4 years, 9 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 513e130d79219ad81b2add126974acce83d9dd84..f00090f1e03b92d5eac4f9d05239b4af382cf51c 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
@@ -137,6 +137,9 @@ private:
void prepareToStopParsing() final;
void stopParsing() final;
bool isWaitingForScripts() const final;
+ bool isWaitingForStyles() const;
+ bool isWaitingForImports() const;
+ bool isWaitingForBlockingResource() const;
bool isExecutingScript() const final;
void executeScriptsWaitingForResources() final;
@@ -162,7 +165,7 @@ private:
void constructTreeFromCompactHTMLToken(const CompactHTMLToken&);
void runScriptsForPausedTreeBuilder();
- void resumeParsingAfterScriptExecution();
+ void resumeParsingAfterBlock();
void attemptToEnd();
void endIfDelayed();
@@ -194,9 +197,9 @@ private:
XSSAuditor m_xssAuditor;
XSSAuditorDelegate m_xssAuditorDelegate;
- // FIXME: m_lastChunkBeforeScript, m_tokenizer, m_token, and m_input should be combined into a single state object
+ // FIXME: m_lastChunkBeforeBlockingResource 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.
- OwnPtr<ParsedChunk> m_lastChunkBeforeScript;
+ OwnPtr<ParsedChunk> m_lastChunkBeforeBlockingResource;
Deque<OwnPtr<ParsedChunk>> m_speculations;
WeakPtrFactory<HTMLDocumentParser> m_weakFactory;
WeakPtr<BackgroundHTMLParser> m_backgroundParser;

Powered by Google App Engine
This is Rietveld 408576698