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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 DocumentLifecycle::DeprecatedTransition::~DeprecatedTransition() | 60 DocumentLifecycle::DeprecatedTransition::~DeprecatedTransition() |
61 { | 61 { |
62 s_deprecatedTransitionStack = m_previous; | 62 s_deprecatedTransitionStack = m_previous; |
63 } | 63 } |
64 | 64 |
65 DocumentLifecycle::DocumentLifecycle() | 65 DocumentLifecycle::DocumentLifecycle() |
66 : m_state(Uninitialized) | 66 : m_state(Uninitialized) |
67 , m_detachCount(0) | 67 , m_detachCount(0) |
| 68 , m_throttlingMode(ThrottlingMode::Disallow) |
68 { | 69 { |
69 } | 70 } |
70 | 71 |
71 DocumentLifecycle::~DocumentLifecycle() | 72 DocumentLifecycle::~DocumentLifecycle() |
72 { | 73 { |
73 } | 74 } |
74 | 75 |
75 #if ENABLE(ASSERT) | 76 #if ENABLE(ASSERT) |
76 | 77 |
77 bool DocumentLifecycle::canAdvanceTo(State nextState) const | 78 bool DocumentLifecycle::canAdvanceTo(State nextState) const |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 260 |
260 void DocumentLifecycle::ensureStateAtMost(State state) | 261 void DocumentLifecycle::ensureStateAtMost(State state) |
261 { | 262 { |
262 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou
tClean); | 263 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou
tClean); |
263 if (m_state <= state) | 264 if (m_state <= state) |
264 return; | 265 return; |
265 ASSERT(canRewindTo(state)); | 266 ASSERT(canRewindTo(state)); |
266 m_state = state; | 267 m_state = state; |
267 } | 268 } |
268 | 269 |
| 270 void DocumentLifecycle::setThrottlingMode(ThrottlingMode throttlingMode) |
| 271 { |
| 272 m_throttlingMode = throttlingMode; |
269 } | 273 } |
| 274 |
| 275 DocumentLifecycle::ThrottlingMode DocumentLifecycle::throttlingMode() const |
| 276 { |
| 277 return m_throttlingMode; |
| 278 } |
| 279 |
| 280 } |
OLD | NEW |