Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/dom/DocumentLifecycle.h" | 32 #include "core/dom/DocumentLifecycle.h" |
| 33 | 33 |
| 34 #include "platform/RuntimeEnabledFeatures.h" | |
| 34 #include "wtf/Assertions.h" | 35 #include "wtf/Assertions.h" |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 | 38 |
| 38 static DocumentLifecycle::DeprecatedTransition* s_deprecatedTransitionStack = 0; | 39 static DocumentLifecycle::DeprecatedTransition* s_deprecatedTransitionStack = 0; |
| 39 | 40 |
| 40 DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, State finalState) | 41 DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, State finalState) |
| 41 : m_lifecycle(lifecycle) | 42 : m_lifecycle(lifecycle) |
| 42 , m_finalState(finalState) | 43 , m_finalState(finalState) |
| 43 { | 44 { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 if (state == InPerformLayout) | 166 if (state == InPerformLayout) |
| 166 return true; | 167 return true; |
| 167 // We can redundant arrive in the layout clean state. This situation | 168 // We can redundant arrive in the layout clean state. This situation |
| 168 // can happen when we call layout recursively and we unwind the stack. | 169 // can happen when we call layout recursively and we unwind the stack. |
| 169 if (state == LayoutClean) | 170 if (state == LayoutClean) |
| 170 return true; | 171 return true; |
| 171 if (state == StyleClean) | 172 if (state == StyleClean) |
| 172 return true; | 173 return true; |
| 173 if (state == InCompositingUpdate) | 174 if (state == InCompositingUpdate) |
| 174 return true; | 175 return true; |
| 176 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && state == InPaint Invalidation) | |
|
chrishtr
2015/08/13 17:28:31
Also add the paint lifecycle stage in this CL.
pdr.
2015/08/13 20:54:59
Done.
As discussed offline, it'll be difficult to
| |
| 177 return true; | |
| 175 break; | 178 break; |
| 176 case InCompositingUpdate: | 179 case InCompositingUpdate: |
| 177 return state == CompositingClean; | 180 return state == CompositingClean; |
| 178 case CompositingClean: | 181 case CompositingClean: |
| 179 if (state == InStyleRecalc) | 182 if (state == InStyleRecalc) |
| 180 return true; | 183 return true; |
| 181 if (state == InPreLayout) | 184 if (state == InPreLayout) |
| 182 return true; | 185 return true; |
| 183 if (state == InCompositingUpdate) | 186 if (state == InCompositingUpdate) |
| 184 return true; | 187 return true; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 void DocumentLifecycle::ensureStateAtMost(State state) | 229 void DocumentLifecycle::ensureStateAtMost(State state) |
| 227 { | 230 { |
| 228 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean); | 231 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean); |
| 229 if (m_state <= state) | 232 if (m_state <= state) |
| 230 return; | 233 return; |
| 231 ASSERT(canRewindTo(state)); | 234 ASSERT(canRewindTo(state)); |
| 232 m_state = state; | 235 m_state = state; |
| 233 } | 236 } |
| 234 | 237 |
| 235 } | 238 } |
| OLD | NEW |