| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 ~DetachScope() | 124 ~DetachScope() |
| 125 { | 125 { |
| 126 m_documentLifecycle.decrementDetachCount(); | 126 m_documentLifecycle.decrementDetachCount(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 DocumentLifecycle& m_documentLifecycle; | 130 DocumentLifecycle& m_documentLifecycle; |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 class PreventThrottlingScope { | 133 class CORE_EXPORT AllowThrottlingScope { |
| 134 STACK_ALLOCATED(); | 134 STACK_ALLOCATED(); |
| 135 WTF_MAKE_NONCOPYABLE(PreventThrottlingScope); | 135 WTF_MAKE_NONCOPYABLE(AllowThrottlingScope); |
| 136 public: | 136 public: |
| 137 PreventThrottlingScope(DocumentLifecycle&); | 137 AllowThrottlingScope(DocumentLifecycle&); |
| 138 ~PreventThrottlingScope(); | 138 ~AllowThrottlingScope(); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 DocumentLifecycle(); | 141 DocumentLifecycle(); |
| 142 ~DocumentLifecycle(); | 142 ~DocumentLifecycle(); |
| 143 | 143 |
| 144 bool isActive() const { return m_state > Inactive && m_state < Stopping; } | 144 bool isActive() const { return m_state > Inactive && m_state < Stopping; } |
| 145 State state() const { return m_state; } | 145 State state() const { return m_state; } |
| 146 | 146 |
| 147 bool stateAllowsTreeMutations() const; | 147 bool stateAllowsTreeMutations() const; |
| 148 bool stateAllowsLayoutTreeMutations() const; | 148 bool stateAllowsLayoutTreeMutations() const; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 return m_state != InPerformLayout | 218 return m_state != InPerformLayout |
| 219 && m_state != InCompositingUpdate | 219 && m_state != InCompositingUpdate |
| 220 && m_state != InPaintInvalidation | 220 && m_state != InPaintInvalidation |
| 221 && m_state != InUpdatePaintProperties | 221 && m_state != InUpdatePaintProperties |
| 222 && m_state != InPaint; | 222 && m_state != InPaint; |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace blink | 225 } // namespace blink |
| 226 | 226 |
| 227 #endif | 227 #endif |
| OLD | NEW |