| 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; | 
| }; | 
|  |