| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef StyleInvalidator_h | 5 #ifndef StyleInvalidator_h |
| 6 #define StyleInvalidator_h | 6 #define StyleInvalidator_h |
| 7 | 7 |
| 8 #include "core/css/RuleFeature.h" | 8 #include "core/css/RuleFeature.h" |
| 9 #include "heap/Heap.h" | 9 #include "heap/Heap.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 public: | 37 public: |
| 38 RecursionCheckpoint(RecursionData* data) | 38 RecursionCheckpoint(RecursionData* data) |
| 39 : m_prevClassLength(data->m_invalidationClasses.size()), | 39 : m_prevClassLength(data->m_invalidationClasses.size()), |
| 40 m_prevAttributeLength(data->m_invalidationAttributes.size()), | 40 m_prevAttributeLength(data->m_invalidationAttributes.size()), |
| 41 m_prevFoundInvalidationSet(data->m_foundInvalidationSet), | 41 m_prevFoundInvalidationSet(data->m_foundInvalidationSet), |
| 42 m_data(data) | 42 m_data(data) |
| 43 { } | 43 { } |
| 44 ~RecursionCheckpoint() | 44 ~RecursionCheckpoint() |
| 45 { | 45 { |
| 46 m_data->m_invalidationClasses.remove(m_prevClassLength, m_data->m_in
validationClasses.size() - m_prevClassLength); | 46 m_data->m_invalidationClasses.remove(m_prevClassLength, m_data->m_in
validationClasses.size() - m_prevClassLength); |
| 47 m_data->m_invalidationAttributes.remove(m_prevAttributeLength, m_dat
a->m_invalidationAttributes.size() - m_prevAttributeLength); |
| 47 m_data->m_foundInvalidationSet = m_prevFoundInvalidationSet; | 48 m_data->m_foundInvalidationSet = m_prevFoundInvalidationSet; |
| 48 } | 49 } |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 int m_prevClassLength; | 52 int m_prevClassLength; |
| 52 int m_prevAttributeLength; | 53 int m_prevAttributeLength; |
| 53 bool m_prevFoundInvalidationSet; | 54 bool m_prevFoundInvalidationSet; |
| 54 RecursionData* m_data; | 55 RecursionData* m_data; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 Document& m_document; | 58 Document& m_document; |
| 58 RuleFeatureSet::PendingInvalidationMap& m_pendingInvalidationMap; | 59 RuleFeatureSet::PendingInvalidationMap& m_pendingInvalidationMap; |
| 59 RecursionData m_recursionData; | 60 RecursionData m_recursionData; |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace WebCore | 63 } // namespace WebCore |
| 63 | 64 |
| 64 #endif // StyleInvalidator_h | 65 #endif // StyleInvalidator_h |
| OLD | NEW |