| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 AfterPerformLayout, | 62 AfterPerformLayout, |
| 63 LayoutClean, | 63 LayoutClean, |
| 64 | 64 |
| 65 InCompositingUpdate, | 65 InCompositingUpdate, |
| 66 CompositingClean, | 66 CompositingClean, |
| 67 | 67 |
| 68 InPaintInvalidation, | 68 InPaintInvalidation, |
| 69 PaintInvalidationClean, | 69 PaintInvalidationClean, |
| 70 | 70 |
| 71 // In InPrePaint step, any data needed by painting are prepared. | 71 // In InPrePaint step, any data needed by painting are prepared. |
| 72 // When RuntimeEnabledFeatures::slimmingPaintV2Enabled, paint property trees
are built. | 72 // When RuntimeEnabledFeatures::slimmingPaintV2Enabled, paint property trees |
| 73 // are built. |
| 73 // Otherwise these steps are not applicable. | 74 // Otherwise these steps are not applicable. |
| 74 InPrePaint, | 75 InPrePaint, |
| 75 PrePaintClean, | 76 PrePaintClean, |
| 76 | 77 |
| 77 InPaint, | 78 InPaint, |
| 78 PaintClean, | 79 PaintClean, |
| 79 | 80 |
| 80 // Once the document starts shutting down, we cannot return | 81 // Once the document starts shutting down, we cannot return |
| 81 // to the style/layout/compositing states. | 82 // to the style/layout/compositing states. |
| 82 Stopping, | 83 Stopping, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 bool canAdvanceTo(LifecycleState) const; | 212 bool canAdvanceTo(LifecycleState) const; |
| 212 bool canRewindTo(LifecycleState) const; | 213 bool canRewindTo(LifecycleState) const; |
| 213 #endif | 214 #endif |
| 214 | 215 |
| 215 LifecycleState m_state; | 216 LifecycleState m_state; |
| 216 int m_detachCount; | 217 int m_detachCount; |
| 217 int m_disallowTransitionCount; | 218 int m_disallowTransitionCount; |
| 218 }; | 219 }; |
| 219 | 220 |
| 220 inline bool DocumentLifecycle::stateAllowsTreeMutations() const { | 221 inline bool DocumentLifecycle::stateAllowsTreeMutations() const { |
| 221 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout e
ither, | 222 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout |
| 222 // but we need to fix MediaList listeners and plugins first. | 223 // either, but we need to fix MediaList listeners and plugins first. |
| 223 return m_state != InStyleRecalc && m_state != InPerformLayout && | 224 return m_state != InStyleRecalc && m_state != InPerformLayout && |
| 224 m_state != InCompositingUpdate && m_state != InPrePaint && | 225 m_state != InCompositingUpdate && m_state != InPrePaint && |
| 225 m_state != InPaint; | 226 m_state != InPaint; |
| 226 } | 227 } |
| 227 | 228 |
| 228 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const { | 229 inline bool DocumentLifecycle::stateAllowsLayoutTreeMutations() const { |
| 229 return m_detachCount || m_state == InStyleRecalc || | 230 return m_detachCount || m_state == InStyleRecalc || |
| 230 m_state == InLayoutSubtreeChange; | 231 m_state == InLayoutSubtreeChange; |
| 231 } | 232 } |
| 232 | 233 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 245 | 246 |
| 246 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const { | 247 inline bool DocumentLifecycle::stateAllowsLayoutInvalidation() const { |
| 247 return m_state != InPerformLayout && m_state != InCompositingUpdate && | 248 return m_state != InPerformLayout && m_state != InCompositingUpdate && |
| 248 m_state != InPaintInvalidation && m_state != InPrePaint && | 249 m_state != InPaintInvalidation && m_state != InPrePaint && |
| 249 m_state != InPaint; | 250 m_state != InPaint; |
| 250 } | 251 } |
| 251 | 252 |
| 252 } // namespace blink | 253 } // namespace blink |
| 253 | 254 |
| 254 #endif | 255 #endif |
| OLD | NEW |