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

Side by Side Diff: Source/core/dom/DocumentLifecycle.h

Issue 150423004: Move Document::m_inStyleRecalc into DocumentLifecycle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/DocumentLifecycle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "wtf/Noncopyable.h" 34 #include "wtf/Noncopyable.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class DocumentLifecycle { 38 class DocumentLifecycle {
39 WTF_MAKE_NONCOPYABLE(DocumentLifecycle); 39 WTF_MAKE_NONCOPYABLE(DocumentLifecycle);
40 public: 40 public:
41 enum State { 41 enum State {
42 Uninitialized, 42 Uninitialized,
43 Inactive, 43 Inactive,
44 Active, 44
45 // When the document is active, it traverses these states.
46 Attached,
eseidel 2014/01/31 01:54:21 I would call this "clean" or something similar and
47 InStyleRecalc,
48
49 // Once the document starts shuting down, we cannot return
50 // to the style/layout/rendering states.
45 Stopping, 51 Stopping,
46 Stopped, 52 Stopped,
47 Disposed, 53 Disposed,
48 }; 54 };
49 55
50 DocumentLifecycle(); 56 DocumentLifecycle();
51 ~DocumentLifecycle(); 57 ~DocumentLifecycle();
52 58
59 bool isActive() const { return m_state > Inactive && m_state < Stopping; }
53 State state() const { return m_state; } 60 State state() const { return m_state; }
54 61
55 void advanceTo(State); 62 void advanceTo(State);
56 63
57 private: 64 private:
58 State m_state; 65 State m_state;
59 }; 66 };
60 67
61 } 68 }
62 69
63 #endif 70 #endif
OLDNEW
« 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