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

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

Issue 146023008: Add layout states to DocumentLifecycle state machine (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Whitelist one more transition' Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentLifecycle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentLifecycle.h
diff --git a/Source/core/dom/DocumentLifecycle.h b/Source/core/dom/DocumentLifecycle.h
index 829621cb08d332a2438e69c4eae9ba555e4c7b72..8d4dc012bbcdf840066daf054bdfb074ea5f450b 100644
--- a/Source/core/dom/DocumentLifecycle.h
+++ b/Source/core/dom/DocumentLifecycle.h
@@ -43,9 +43,15 @@ public:
Inactive,
// When the document is active, it traverses these states.
+
StyleRecalcPending,
InStyleRecalc,
- Clean,
+ StyleClean,
+
+ InPreLayout,
+ InPerformLayout,
+ AfterPerformLayout,
+ LayoutClean,
// Once the document starts shuting down, we cannot return
// to the style/layout/rendering states.
@@ -54,6 +60,34 @@ public:
Disposed,
};
+ class Scope {
+ WTF_MAKE_NONCOPYABLE(Scope);
+ public:
+ Scope(DocumentLifecycle&, State finalState);
+ ~Scope();
+
+ void setFinalState(State finalState) { m_finalState = finalState; }
+
+ private:
+ DocumentLifecycle& m_lifecycle;
+ State m_finalState;
+ };
+
+ class DeprecatedTransition {
+ WTF_MAKE_NONCOPYABLE(DeprecatedTransition);
+ public:
+ DeprecatedTransition(State from, State to);
+ ~DeprecatedTransition();
+
+ State from() const { return m_from; }
+ State to() const { return m_to; }
+
+ private:
+ DeprecatedTransition* m_previous;
+ State m_from;
+ State m_to;
+ };
+
DocumentLifecycle();
~DocumentLifecycle();
@@ -64,7 +98,9 @@ public:
void rewindTo(State);
private:
+#if !ASSERT_DISABLED
bool canAdvanceTo(State) const;
+#endif
State m_state;
};
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentLifecycle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698