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

Unified Diff: Source/core/dom/Document.h

Issue 725593004: Prevent the load event from firing inside DOMContentLoaded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Done->FinishedParsing Created 6 years, 1 month 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
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/reentrant-cancel-expected.txt ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 1d49b225d492a6c05dc0e851c558e68a0c34867a..da551a8e9dd227caabc52456d24cfe7b4838c2a2 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -592,8 +592,14 @@ public:
void setReadyState(ReadyState);
bool isLoadCompleted();
- void setParsing(bool);
- bool parsing() const { return m_isParsing; }
+ enum ParsingState {
+ Parsing,
+ InDOMContentLoaded,
+ FinishedParsing
+ };
+ void setParsingState(ParsingState);
+ bool parsing() const { return m_parsingState == Parsing; }
+ bool isInDOMContentLoaded() const { return m_parsingState == InDOMContentLoaded; }
bool shouldScheduleLayout() const;
int elapsedTime() const;
@@ -1249,7 +1255,7 @@ private:
bool m_visuallyOrdered;
ReadyState m_readyState;
- bool m_isParsing;
+ ParsingState m_parsingState;
bool m_gotoAnchorNeededAfterStylesheetsLoad;
bool m_isDNSPrefetchEnabled;
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/reentrant-cancel-expected.txt ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698