| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "config.h" | 6 #include "config.h" |
| 7 | 7 |
| 8 #include "core/css/invalidation/StyleInvalidator.h" | 8 #include "core/css/invalidation/StyleInvalidator.h" |
| 9 | 9 |
| 10 #include "core/css/invalidation/DescendantInvalidationSet.h" | 10 #include "core/css/invalidation/DescendantInvalidationSet.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ALWAYS_INLINE bool StyleInvalidator::checkInvalidationSetsAgainstElement(Element
& element, StyleInvalidator::RecursionData& recursionData) | 122 ALWAYS_INLINE bool StyleInvalidator::checkInvalidationSetsAgainstElement(Element
& element, StyleInvalidator::RecursionData& recursionData) |
| 123 { | 123 { |
| 124 if (element.styleChangeType() >= SubtreeStyleChange || recursionData.wholeSu
btreeInvalid()) { | 124 if (element.styleChangeType() >= SubtreeStyleChange || recursionData.wholeSu
btreeInvalid()) { |
| 125 recursionData.setWholeSubtreeInvalid(); | 125 recursionData.setWholeSubtreeInvalid(); |
| 126 return false; | 126 return false; |
| 127 } | 127 } |
| 128 if (element.needsStyleInvalidation()) { | 128 if (element.needsStyleInvalidation()) { |
| 129 if (InvalidationList* invalidationList = m_pendingInvalidationMap.get(&e
lement)) { | 129 if (InvalidationList* invalidationList = m_pendingInvalidationMap.get(&e
lement)) { |
| 130 for (const auto& invalidationSet : *invalidationList) | 130 for (const auto& invalidationSet : *invalidationList) |
| 131 recursionData.pushInvalidationSet(*invalidationSet); | 131 recursionData.pushInvalidationSet(*invalidationSet); |
| 132 // FIXME: It's really only necessary to clone the render style for t
his element, not full style recalc. | |
| 133 if (UNLIKELY(*s_tracingEnabled)) { | 132 if (UNLIKELY(*s_tracingEnabled)) { |
| 134 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timelin
e.invalidationTracking"), | 133 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timelin
e.invalidationTracking"), |
| 135 "StyleInvalidatorInvalidationTracking", | 134 "StyleInvalidatorInvalidationTracking", |
| 136 "data", InspectorStyleInvalidatorInvalidateEvent::invalidati
onList(element, *invalidationList)); | 135 "data", InspectorStyleInvalidatorInvalidateEvent::invalidati
onList(element, *invalidationList)); |
| 137 } | 136 } |
| 138 return true; | 137 return true; |
| 139 } | 138 } |
| 140 } | 139 } |
| 141 | 140 |
| 142 return recursionData.matchesCurrentInvalidationSets(element); | 141 return recursionData.matchesCurrentInvalidationSets(element); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 193 } |
| 195 | 194 |
| 196 void StyleInvalidator::trace(Visitor* visitor) | 195 void StyleInvalidator::trace(Visitor* visitor) |
| 197 { | 196 { |
| 198 #if ENABLE(OILPAN) | 197 #if ENABLE(OILPAN) |
| 199 visitor->trace(m_pendingInvalidationMap); | 198 visitor->trace(m_pendingInvalidationMap); |
| 200 #endif | 199 #endif |
| 201 } | 200 } |
| 202 | 201 |
| 203 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |