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

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, 6 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 InPerformLayout, 60 InPerformLayout,
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 // In InPrePaint step, any data needed by painting are prepared.
71 InUpdatePaintProperties, 71 // When RuntimeEnabledFeatures::slimmingPaintV2Enabled, paint property t rees are built.
72 UpdatePaintPropertiesClean, 72 // Otherwise these steps are not applicable.
73 InPrePaint,
74 PrePaintClean,
73 75
74 // When RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled
75 // (implied by slimmingPaintV2Enabled).
76 InPaint, 76 InPaint,
77 PaintClean, 77 PaintClean,
78 78
79 // Once the document starts shutting down, we cannot return 79 // Once the document starts shutting down, we cannot return
80 // to the style/layout/compositing states. 80 // to the style/layout/compositing states.
81 Stopping, 81 Stopping,
82 Stopped, 82 Stopped,
83 }; 83 };
84 84
85 class Scope { 85 class Scope {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 int m_detachCount; 190 int m_detachCount;
191 }; 191 };
192 192
193 inline bool DocumentLifecycle::stateAllowsTreeMutations() const 193 inline bool DocumentLifecycle::stateAllowsTreeMutations() const
194 { 194 {
195 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either, 195 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either,
196 // but we need to fix MediaList listeners and plugins first. 196 // but we need to fix MediaList listeners and plugins first.
197 return m_state != InStyleRecalc 197 return m_state != InStyleRecalc
198 && m_state != InPerformLayout 198 && m_state != InPerformLayout
199 && m_state != InCompositingUpdate 199 && m_state != InCompositingUpdate
200 && m_state != InUpdatePaintProperties 200 && m_state != InPrePaint
201 && m_state != InPaint; 201 && m_state != InPaint;
202 } 202 }
203 203
204 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const 204 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const
205 { 205 {
206 return m_detachCount || m_state == InStyleRecalc || m_state == InLayoutSubtr eeChange; 206 return m_detachCount || m_state == InStyleRecalc || m_state == InLayoutSubtr eeChange;
207 } 207 }
208 208
209 inline bool DocumentLifecycle::stateAllowsLayoutTreeNotifications() const 209 inline bool DocumentLifecycle::stateAllowsLayoutTreeNotifications() const
210 { 210 {
211 return m_state == InLayoutSubtreeChange; 211 return m_state == InLayoutSubtreeChange;
212 } 212 }
213 213
214 inline bool DocumentLifecycle::stateAllowsDetach() const 214 inline bool DocumentLifecycle::stateAllowsDetach() const
215 { 215 {
216 return m_state == VisualUpdatePending 216 return m_state == VisualUpdatePending
217 || m_state == InStyleRecalc 217 || m_state == InStyleRecalc
218 || m_state == StyleClean 218 || m_state == StyleClean
219 || m_state == LayoutSubtreeChangeClean 219 || m_state == LayoutSubtreeChangeClean
220 || m_state == InPreLayout 220 || m_state == InPreLayout
221 || m_state == LayoutClean 221 || m_state == LayoutClean
222 || m_state == CompositingClean 222 || m_state == CompositingClean
223 || m_state == PaintInvalidationClean 223 || m_state == PaintInvalidationClean
224 || m_state == UpdatePaintPropertiesClean 224 || m_state == PrePaintClean
225 || m_state == PaintClean 225 || m_state == PaintClean
226 || m_state == Stopping; 226 || m_state == Stopping;
227 } 227 }
228 228
229 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const 229 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const
230 { 230 {
231 return m_state != InPerformLayout 231 return m_state != InPerformLayout
232 && m_state != InCompositingUpdate 232 && m_state != InCompositingUpdate
233 && m_state != InPaintInvalidation 233 && m_state != InPaintInvalidation
234 && m_state != InUpdatePaintProperties 234 && m_state != InPrePaint
235 && m_state != InPaint; 235 && m_state != InPaint;
236 } 236 }
237 237
238 } // namespace blink 238 } // namespace blink
239 239
240 #endif 240 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698