OLD | NEW |
---|---|
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 Loading... | |
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. | |
71 InCalcPaintProps, | |
72 CalcPaintPropsClean, | |
esprehn
2015/10/01 09:00:08
We don't generally abbreviate in blink, this shoul
esprehn
2015/10/01 09:05:06
I guess we use Calc and Recalc in other parts of t
| |
73 | |
70 // When RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled | 74 // When RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled |
71 // (implied by slimmingPaintV2Enabled). | 75 // (implied by slimmingPaintV2Enabled). |
72 InPaint, | 76 InPaint, |
73 PaintClean, | 77 PaintClean, |
74 | 78 |
75 // When RuntimeEnabledFeatures::slimmingPaintV2Enabled. | 79 // When RuntimeEnabledFeatures::slimmingPaintV2Enabled. |
76 InCompositingForSlimmingPaintV2, | 80 InCompositingForSlimmingPaintV2, |
77 CompositingForSlimmingPaintV2Clean, | 81 CompositingForSlimmingPaintV2Clean, |
78 | 82 |
79 // Once the document starts shutting down, we cannot return | 83 // Once the document starts shutting down, we cannot return |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 int m_detachCount; | 167 int m_detachCount; |
164 }; | 168 }; |
165 | 169 |
166 inline bool DocumentLifecycle::stateAllowsTreeMutations() const | 170 inline bool DocumentLifecycle::stateAllowsTreeMutations() const |
167 { | 171 { |
168 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either, | 172 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either, |
169 // but we need to fix MediaList listeners and plugins first. | 173 // but we need to fix MediaList listeners and plugins first. |
170 return m_state != InStyleRecalc | 174 return m_state != InStyleRecalc |
171 && m_state != InPerformLayout | 175 && m_state != InPerformLayout |
172 && m_state != InCompositingUpdate | 176 && m_state != InCompositingUpdate |
177 && m_state != InCalcPaintProps | |
173 && m_state != InPaint | 178 && m_state != InPaint |
174 && m_state != InCompositingForSlimmingPaintV2; | 179 && m_state != InCompositingForSlimmingPaintV2; |
175 } | 180 } |
176 | 181 |
177 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const | 182 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const |
178 { | 183 { |
179 return m_detachCount || m_state == InStyleRecalc || m_state == InLayoutSubtr eeChange; | 184 return m_detachCount || m_state == InStyleRecalc || m_state == InLayoutSubtr eeChange; |
180 } | 185 } |
181 | 186 |
182 inline bool DocumentLifecycle::stateAllowsLayoutTreeNotifications() const | 187 inline bool DocumentLifecycle::stateAllowsLayoutTreeNotifications() const |
183 { | 188 { |
184 return m_state == InLayoutSubtreeChange; | 189 return m_state == InLayoutSubtreeChange; |
185 } | 190 } |
186 | 191 |
187 inline bool DocumentLifecycle::stateAllowsDetach() const | 192 inline bool DocumentLifecycle::stateAllowsDetach() const |
188 { | 193 { |
189 return m_state == VisualUpdatePending | 194 return m_state == VisualUpdatePending |
190 || m_state == InStyleRecalc | 195 || m_state == InStyleRecalc |
191 || m_state == StyleClean | 196 || m_state == StyleClean |
192 || m_state == LayoutSubtreeChangeClean | 197 || m_state == LayoutSubtreeChangeClean |
193 || m_state == InPreLayout | 198 || m_state == InPreLayout |
194 || m_state == LayoutClean | 199 || m_state == LayoutClean |
195 || m_state == CompositingClean | 200 || m_state == CompositingClean |
196 || m_state == PaintInvalidationClean | 201 || m_state == PaintInvalidationClean |
202 || m_state == CalcPaintPropsClean | |
197 || m_state == PaintClean | 203 || m_state == PaintClean |
198 || m_state == CompositingForSlimmingPaintV2Clean | 204 || m_state == CompositingForSlimmingPaintV2Clean |
199 || m_state == Stopping; | 205 || m_state == Stopping; |
200 } | 206 } |
201 | 207 |
202 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const | 208 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const |
203 { | 209 { |
204 return m_state != InPerformLayout | 210 return m_state != InPerformLayout |
205 && m_state != InCompositingUpdate | 211 && m_state != InCompositingUpdate |
206 && m_state != InPaintInvalidation | 212 && m_state != InPaintInvalidation |
213 && m_state != InCalcPaintProps | |
207 && m_state != InPaint | 214 && m_state != InPaint |
208 && m_state != InCompositingForSlimmingPaintV2; | 215 && m_state != InCompositingForSlimmingPaintV2; |
209 } | 216 } |
210 | 217 |
211 } // namespace blink | 218 } // namespace blink |
212 | 219 |
213 #endif | 220 #endif |
OLD | NEW |