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

Side by Side Diff: sky/engine/core/dom/DocumentLifecycle.h

Issue 772673002: Fix Animations, Remove Compostior Animations. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cleanup Created 6 years 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 VisualUpdatePending, 48 VisualUpdatePending,
49 49
50 InStyleRecalc, 50 InStyleRecalc,
51 StyleClean, 51 StyleClean,
52 52
53 InPreLayout, 53 InPreLayout,
54 InPerformLayout, 54 InPerformLayout,
55 AfterPerformLayout, 55 AfterPerformLayout,
56 LayoutClean, 56 LayoutClean,
57 57
58 InCompositingUpdate,
59 CompositingClean,
60
61 InPaintInvalidation, 58 InPaintInvalidation,
62 PaintInvalidationClean, 59 PaintInvalidationClean,
63 60
64 // Once the document starts shuting down, we cannot return 61 // Once the document starts shuting down, we cannot return
65 // to the style/layout/rendering states. 62 // to the style/layout/rendering states.
66 Stopping, 63 Stopping,
67 Stopped, 64 Stopped,
68 Disposed, 65 Disposed,
69 }; 66 };
70 67
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 139
143 State m_state; 140 State m_state;
144 int m_detachCount; 141 int m_detachCount;
145 }; 142 };
146 143
147 inline bool DocumentLifecycle::stateAllowsTreeMutations() const 144 inline bool DocumentLifecycle::stateAllowsTreeMutations() const
148 { 145 {
149 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either, 146 // FIXME: We should not allow mutations in InPreLayout or AfterPerformLayout either,
150 // but we need to fix MediaList listeners and plugins first. 147 // but we need to fix MediaList listeners and plugins first.
151 return m_state != InStyleRecalc 148 return m_state != InStyleRecalc
152 && m_state != InPerformLayout 149 && m_state != InPerformLayout;
153 && m_state != InCompositingUpdate;
154 } 150 }
155 151
156 inline bool DocumentLifecycle::stateAllowsRenderTreeMutations() const 152 inline bool DocumentLifecycle::stateAllowsRenderTreeMutations() const
157 { 153 {
158 return m_detachCount || m_state == InStyleRecalc; 154 return m_detachCount || m_state == InStyleRecalc;
159 } 155 }
160 156
161 inline bool DocumentLifecycle::stateAllowsDetach() const 157 inline bool DocumentLifecycle::stateAllowsDetach() const
162 { 158 {
163 return m_state == VisualUpdatePending 159 return m_state == VisualUpdatePending
164 || m_state == InStyleRecalc 160 || m_state == InStyleRecalc
165 || m_state == StyleClean 161 || m_state == StyleClean
166 || m_state == InPreLayout 162 || m_state == InPreLayout
167 || m_state == LayoutClean 163 || m_state == LayoutClean
168 || m_state == CompositingClean
169 || m_state == PaintInvalidationClean 164 || m_state == PaintInvalidationClean
170 || m_state == Stopping; 165 || m_state == Stopping;
171 } 166 }
172 167
173 } 168 }
174 169
175 #endif // SKY_ENGINE_CORE_DOM_DOCUMENTLIFECYCLE_H_ 170 #endif // SKY_ENGINE_CORE_DOM_DOCUMENTLIFECYCLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698