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

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

Issue 1791543005: InPrePaint document state and PrePaintTreeWalk class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 AfterPerformLayout, 61 AfterPerformLayout,
62 LayoutClean, 62 LayoutClean,
63 63
64 InCompositingUpdate, 64 InCompositingUpdate,
65 CompositingClean, 65 CompositingClean,
66 66
67 InPaintInvalidation, 67 InPaintInvalidation,
68 PaintInvalidationClean, 68 PaintInvalidationClean,
69 69
70 // When RuntimeEnabledFeatures::slimmingPaintV2Enabled. 70 // When RuntimeEnabledFeatures::slimmingPaintV2Enabled.
71 InUpdatePaintProperties, 71 InPrePaintTreeWalk,
pdr. 2016/03/12 04:04:24 Nit: Can you update the comment in LayoutObject.h
jbroman 2016/03/14 15:05:15 It becomes less obvious what this step is, now tha
Xianzhu 2016/03/14 18:56:04 Changed the state name "InPrePaintTreeWalk" to "In
72 UpdatePaintPropertiesClean, 72 PrePaintTreeWalkClean,
73 73
74 // When RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled
75 // (implied by slimmingPaintV2Enabled).
76 InPaint, 74 InPaint,
77 PaintClean, 75 PaintClean,
78 76
79 // Once the document starts shutting down, we cannot return 77 // Once the document starts shutting down, we cannot return
80 // to the style/layout/compositing states. 78 // to the style/layout/compositing states.
81 Stopping, 79 Stopping,
82 Stopped, 80 Stopped,
83 Disposed, 81 Disposed,
84 }; 82 };
85 83
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 int m_detachCount; 175 int m_detachCount;
178 }; 176 };
179 177
180 inline bool DocumentLifecycle::stateAllowsTreeMutations() const 178 inline bool DocumentLifecycle::stateAllowsTreeMutations() const
181 { 179 {
182 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either, 180 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either,
183 // but we need to fix MediaList listeners and plugins first. 181 // but we need to fix MediaList listeners and plugins first.
184 return m_state != InStyleRecalc 182 return m_state != InStyleRecalc
185 && m_state != InPerformLayout 183 && m_state != InPerformLayout
186 && m_state != InCompositingUpdate 184 && m_state != InCompositingUpdate
187 && m_state != InUpdatePaintProperties 185 && m_state != InPrePaintTreeWalk
188 && m_state != InPaint; 186 && m_state != InPaint;
189 } 187 }
190 188
191 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const 189 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const
192 { 190 {
193 return m_detachCount || m_state == InStyleRecalc || m_state == InLayoutSubtr eeChange; 191 return m_detachCount || m_state == InStyleRecalc || m_state == InLayoutSubtr eeChange;
194 } 192 }
195 193
196 inline bool DocumentLifecycle::stateAllowsLayoutTreeNotifications() const 194 inline bool DocumentLifecycle::stateAllowsLayoutTreeNotifications() const
197 { 195 {
198 return m_state == InLayoutSubtreeChange; 196 return m_state == InLayoutSubtreeChange;
199 } 197 }
200 198
201 inline bool DocumentLifecycle::stateAllowsDetach() const 199 inline bool DocumentLifecycle::stateAllowsDetach() const
202 { 200 {
203 return m_state == VisualUpdatePending 201 return m_state == VisualUpdatePending
204 || m_state == InStyleRecalc 202 || m_state == InStyleRecalc
205 || m_state == StyleClean 203 || m_state == StyleClean
206 || m_state == LayoutSubtreeChangeClean 204 || m_state == LayoutSubtreeChangeClean
207 || m_state == InPreLayout 205 || m_state == InPreLayout
208 || m_state == LayoutClean 206 || m_state == LayoutClean
209 || m_state == CompositingClean 207 || m_state == CompositingClean
210 || m_state == PaintInvalidationClean 208 || m_state == PaintInvalidationClean
211 || m_state == UpdatePaintPropertiesClean 209 || m_state == PrePaintTreeWalkClean
212 || m_state == PaintClean 210 || m_state == PaintClean
213 || m_state == Stopping; 211 || m_state == Stopping;
214 } 212 }
215 213
216 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const 214 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const
217 { 215 {
218 return m_state != InPerformLayout 216 return m_state != InPerformLayout
219 && m_state != InCompositingUpdate 217 && m_state != InCompositingUpdate
220 && m_state != InPaintInvalidation 218 && m_state != InPaintInvalidation
221 && m_state != InUpdatePaintProperties 219 && m_state != InPrePaintTreeWalk
222 && m_state != InPaint; 220 && m_state != InPaint;
223 } 221 }
224 222
225 } // namespace blink 223 } // namespace blink
226 224
227 #endif 225 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698