OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 void StyleEngine::scheduleInvalidationsForRuleSets( | 842 void StyleEngine::scheduleInvalidationsForRuleSets( |
843 TreeScope& treeScope, | 843 TreeScope& treeScope, |
844 const HeapHashSet<Member<RuleSet>>& ruleSets) { | 844 const HeapHashSet<Member<RuleSet>>& ruleSets) { |
845 #if DCHECK_IS_ON() | 845 #if DCHECK_IS_ON() |
846 // Full scope recalcs should be handled while collecting the ruleSets before | 846 // Full scope recalcs should be handled while collecting the ruleSets before |
847 // calling this method. | 847 // calling this method. |
848 for (auto ruleSet : ruleSets) | 848 for (auto ruleSet : ruleSets) |
849 DCHECK(!ruleSet->features().needsFullRecalcForRuleSetInvalidation()); | 849 DCHECK(!ruleSet->features().needsFullRecalcForRuleSetInvalidation()); |
850 #endif // DCHECK_IS_ON() | 850 #endif // DCHECK_IS_ON() |
851 | 851 |
| 852 TRACE_EVENT0("blink,blink_style", |
| 853 "StyleEngine::scheduleInvalidationsForRuleSets"); |
| 854 |
852 bool invalidateSlotted = false; | 855 bool invalidateSlotted = false; |
853 if (treeScope.rootNode().isShadowRoot()) { | 856 if (treeScope.rootNode().isShadowRoot()) { |
854 Element& host = toShadowRoot(treeScope.rootNode()).host(); | 857 Element& host = toShadowRoot(treeScope.rootNode()).host(); |
855 scheduleRuleSetInvalidationsForElement(host, ruleSets); | 858 scheduleRuleSetInvalidationsForElement(host, ruleSets); |
856 if (host.getStyleChangeType() >= SubtreeStyleChange) | 859 if (host.getStyleChangeType() >= SubtreeStyleChange) |
857 return; | 860 return; |
858 for (auto ruleSet : ruleSets) { | 861 for (auto ruleSet : ruleSets) { |
859 if (ruleSet->hasSlottedRules()) { | 862 if (ruleSet->hasSlottedRules()) { |
860 invalidateSlotted = true; | 863 invalidateSlotted = true; |
861 break; | 864 break; |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 } | 1135 } |
1133 | 1136 |
1134 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 1137 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
1135 for (auto sheet : m_injectedAuthorStyleSheets) { | 1138 for (auto sheet : m_injectedAuthorStyleSheets) { |
1136 visitor->traceWrappers(sheet); | 1139 visitor->traceWrappers(sheet); |
1137 } | 1140 } |
1138 visitor->traceWrappers(m_documentStyleSheetCollection); | 1141 visitor->traceWrappers(m_documentStyleSheetCollection); |
1139 } | 1142 } |
1140 | 1143 |
1141 } // namespace blink | 1144 } // namespace blink |
OLD | NEW |