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

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

Issue 1095043003: Convert LayoutObject renderer names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « no previous file | Source/core/frame/FrameView.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 DocumentLifecycle& m_documentLifecycle; 115 DocumentLifecycle& m_documentLifecycle;
116 }; 116 };
117 117
118 DocumentLifecycle(); 118 DocumentLifecycle();
119 ~DocumentLifecycle(); 119 ~DocumentLifecycle();
120 120
121 bool isActive() const { return m_state > Inactive && m_state < Stopping; } 121 bool isActive() const { return m_state > Inactive && m_state < Stopping; }
122 State state() const { return m_state; } 122 State state() const { return m_state; }
123 123
124 bool stateAllowsTreeMutations() const; 124 bool stateAllowsTreeMutations() const;
125 bool stateAllowsRenderTreeMutations() const; 125 bool stateAllowsLayoutTreeMutations() const;
126 bool stateAllowsDetach() const; 126 bool stateAllowsDetach() const;
127 bool stateAllowsLayoutInvalidation() const; 127 bool stateAllowsLayoutInvalidation() const;
128 128
129 void advanceTo(State); 129 void advanceTo(State);
130 void ensureStateAtMost(State); 130 void ensureStateAtMost(State);
131 131
132 void incrementDetachCount() { m_detachCount++; } 132 void incrementDetachCount() { m_detachCount++; }
133 void decrementDetachCount() 133 void decrementDetachCount()
134 { 134 {
135 ASSERT(m_detachCount > 0); 135 ASSERT(m_detachCount > 0);
(...skipping 12 matching lines...) Expand all
148 148
149 inline bool DocumentLifecycle::stateAllowsTreeMutations() const 149 inline bool DocumentLifecycle::stateAllowsTreeMutations() const
150 { 150 {
151 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either, 151 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either,
152 // but we need to fix MediaList listeners and plugins first. 152 // but we need to fix MediaList listeners and plugins first.
153 return m_state != InStyleRecalc 153 return m_state != InStyleRecalc
154 && m_state != InPerformLayout 154 && m_state != InPerformLayout
155 && m_state != InCompositingUpdate; 155 && m_state != InCompositingUpdate;
156 } 156 }
157 157
158 inline bool DocumentLifecycle::stateAllowsRenderTreeMutations() const 158 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const
159 { 159 {
160 return m_detachCount || m_state == InStyleRecalc; 160 return m_detachCount || m_state == InStyleRecalc;
161 } 161 }
162 162
163 inline bool DocumentLifecycle::stateAllowsDetach() const 163 inline bool DocumentLifecycle::stateAllowsDetach() const
164 { 164 {
165 return m_state == VisualUpdatePending 165 return m_state == VisualUpdatePending
166 || m_state == InStyleRecalc 166 || m_state == InStyleRecalc
167 || m_state == StyleClean 167 || m_state == StyleClean
168 || m_state == InPreLayout 168 || m_state == InPreLayout
169 || m_state == LayoutClean 169 || m_state == LayoutClean
170 || m_state == CompositingClean 170 || m_state == CompositingClean
171 || m_state == PaintInvalidationClean 171 || m_state == PaintInvalidationClean
172 || m_state == Stopping; 172 || m_state == Stopping;
173 } 173 }
174 174
175 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const 175 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const
176 { 176 {
177 return m_state != InPerformLayout 177 return m_state != InPerformLayout
178 && m_state != InCompositingUpdate 178 && m_state != InCompositingUpdate
179 && m_state != InPaintInvalidation; 179 && m_state != InPaintInvalidation;
180 } 180 }
181 181
182 } // namespace blink 182 } // namespace blink
183 183
184 #endif 184 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698